{
 "info": {
  "name": "Prokso API",
  "description": "Documentation: https://prokso.com/en/api",
  "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
 },
 "auth": {
  "type": "bearer",
  "bearer": [
   {
    "key": "token",
    "value": "{{api_key}}",
    "type": "string"
   }
  ]
 },
 "variable": [
  {
   "key": "base_url",
   "value": "https://prokso.com/api/v1"
  },
  {
   "key": "api_key",
   "value": ""
  },
  {
   "key": "plan_id",
   "value": "1"
  },
  {
   "key": "order_id",
   "value": "1"
  },
  {
   "key": "proxy_id",
   "value": "1"
  }
 ],
 "item": [
  {
   "name": "Account",
   "item": [
    {
     "name": "getAccount",
     "request": {
      "method": "GET",
      "description": "Account email and balance.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/me",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "me"
       ]
      }
     }
    },
    {
     "name": "getPrices",
     "request": {
      "method": "GET",
      "description": "Prices per 1 GB and single-order conditions for each proxy type, the same as in the dashboard.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/prices",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "prices"
       ]
      }
     }
    }
   ]
  },
  {
   "name": "Plans",
   "item": [
    {
     "name": "listPlans",
     "request": {
      "method": "GET",
      "description": "All plans: type, status (active, paused, limited), login, GB bought and traffic left.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/plans",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans"
       ]
      }
     }
    },
    {
     "name": "createPlan",
     "request": {
      "method": "POST",
      "description": "A new plan paid from your balance. pool is residential, mobile or datacenter; gb is an integer; label and promo are optional.",
      "header": [
       {
        "key": "Idempotency-Key",
        "value": "{{$guid}}"
       },
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/plans",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"pool\": \"residential\",\n  \"gb\": 10,\n  \"label\": \"My plan\"\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      }
     }
    },
    {
     "name": "getPlan",
     "request": {
      "method": "GET",
      "description": "One plan: host, ports, login and password, IP whitelist, pool settings.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/plans/{{plan_id}}",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans",
        "{{plan_id}}"
       ]
      }
     }
    },
    {
     "name": "renamePlan",
     "request": {
      "method": "PATCH",
      "description": "Rename a plan (label, up to 60 characters).",
      "header": [
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/plans/{{plan_id}}",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans",
        "{{plan_id}}"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"label\": \"Ads Poland\"\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      }
     }
    },
    {
     "name": "topUpPlan",
     "request": {
      "method": "POST",
      "description": "Add GB to an existing plan from your balance. Same rules as for a new plan.",
      "header": [
       {
        "key": "Idempotency-Key",
        "value": "{{$guid}}"
       },
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/plans/{{plan_id}}/topup",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans",
        "{{plan_id}}",
        "topup"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"gb\": 10\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      }
     }
    },
    {
     "name": "pausePlan",
     "request": {
      "method": "POST",
      "description": "Pause a plan (proxies stop working, no traffic is used) or resume it.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/plans/{{plan_id}}/pause",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans",
        "{{plan_id}}",
        "pause"
       ]
      }
     }
    },
    {
     "name": "resumePlan",
     "request": {
      "method": "POST",
      "description": "Pause a plan (proxies stop working, no traffic is used) or resume it.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/plans/{{plan_id}}/resume",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans",
        "{{plan_id}}",
        "resume"
       ]
      }
     }
    }
   ]
  },
  {
   "name": "Proxies",
   "item": [
    {
     "name": "getProxyLines",
     "request": {
      "method": "GET",
      "description": "Proxy lines for a plan, as JSON or plain text. Add the Accept: text/plain header to get plain text, one proxy per line.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/plans/{{plan_id}}/proxies?count=10&session=rotating&format=url",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans",
        "{{plan_id}}",
        "proxies"
       ],
       "query": [
        {
         "key": "country",
         "value": "",
         "disabled": true
        },
        {
         "key": "count",
         "value": "10",
         "disabled": false
        },
        {
         "key": "protocol",
         "value": "http",
         "disabled": true
        },
        {
         "key": "session",
         "value": "rotating",
         "disabled": false
        },
        {
         "key": "format",
         "value": "url",
         "disabled": false
        },
        {
         "key": "start_port",
         "value": "",
         "disabled": true
        },
        {
         "key": "state",
         "value": "",
         "disabled": true
        },
        {
         "key": "city",
         "value": "",
         "disabled": true
        },
        {
         "key": "zip",
         "value": "",
         "disabled": true
        },
        {
         "key": "asn",
         "value": "",
         "disabled": true
        },
        {
         "key": "exclude_state",
         "value": "",
         "disabled": true
        },
        {
         "key": "exclude_city",
         "value": "",
         "disabled": true
        },
        {
         "key": "exclude_zip",
         "value": "",
         "disabled": true
        },
        {
         "key": "session_prefix",
         "value": "",
         "disabled": true
        }
       ]
      }
     }
    }
   ]
  },
  {
   "name": "Whitelist",
   "item": [
    {
     "name": "listWhitelist",
     "request": {
      "method": "GET",
      "description": "Plan IP whitelist: list, add (POST with an ip field) and remove (DELETE with an ip parameter).",
      "header": [],
      "url": {
       "raw": "{{base_url}}/plans/{{plan_id}}/whitelist",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans",
        "{{plan_id}}",
        "whitelist"
       ]
      }
     }
    },
    {
     "name": "addWhitelistIp",
     "request": {
      "method": "POST",
      "description": "Plan IP whitelist: list, add (POST with an ip field) and remove (DELETE with an ip parameter).",
      "header": [
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/plans/{{plan_id}}/whitelist",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans",
        "{{plan_id}}",
        "whitelist"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"ip\": \"203.0.113.7\"\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      }
     }
    },
    {
     "name": "removeWhitelistIp",
     "request": {
      "method": "DELETE",
      "description": "Plan IP whitelist: list, add (POST with an ip field) and remove (DELETE with an ip parameter).",
      "header": [],
      "url": {
       "raw": "{{base_url}}/plans/{{plan_id}}/whitelist?ip=",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "plans",
        "{{plan_id}}",
        "whitelist"
       ],
       "query": [
        {
         "key": "ip",
         "value": "",
         "disabled": false
        }
       ]
      }
     }
    }
   ]
  },
  {
   "name": "Orders",
   "item": [
    {
     "name": "listOrders",
     "request": {
      "method": "GET",
      "description": "Recent account orders (limit up to 100) and a single order by ID.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/orders",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "orders"
       ],
       "query": [
        {
         "key": "limit",
         "value": "",
         "disabled": true
        }
       ]
      }
     }
    },
    {
     "name": "getOrder",
     "request": {
      "method": "GET",
      "description": "Recent account orders (limit up to 100) and a single order by ID.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/orders/{{order_id}}",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "orders",
        "{{order_id}}"
       ]
      }
     }
    }
   ]
  },
  {
   "name": "Static proxies",
   "item": [
    {
     "name": "listStaticProducts",
     "request": {
      "method": "GET",
      "description": "Which products are on sale now, terms and prices per IP (in cents and dollars).",
      "header": [],
      "url": {
       "raw": "{{base_url}}/static/products",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "static",
        "products"
       ]
      }
     }
    },
    {
     "name": "listStaticCountries",
     "request": {
      "method": "GET",
      "description": "Countries in stock: code (ua), alpha-3 (UKR) and name. The product parameter is isp, ipv4, mobile.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/static/countries?product=isp",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "static",
        "countries"
       ],
       "query": [
        {
         "key": "product",
         "value": "isp",
         "disabled": false
        },
        {
         "key": "country",
         "value": "",
         "disabled": true
        }
       ]
      }
     }
    },
    {
     "name": "createStaticOrder",
     "request": {
      "method": "POST",
      "description": "Buy addresses from your balance: product, country (ua or UKR), period (1w or 1m), qty. The response has the order ID and status; addresses appear within a few minutes.",
      "header": [
       {
        "key": "Idempotency-Key",
        "value": "{{$guid}}"
       },
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/static/orders",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "static",
        "orders"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"product\": \"isp\",\n  \"country\": \"ua\",\n  \"period\": \"1m\",\n  \"qty\": 1\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      }
     }
    },
    {
     "name": "getStaticOrder",
     "request": {
      "method": "GET",
      "description": "Progress of one order and the IDs of the issued addresses (proxy_ids).",
      "header": [],
      "url": {
       "raw": "{{base_url}}/static/orders/{{order_id}}",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "static",
        "orders",
        "{{order_id}}"
       ]
      }
     }
    },
    {
     "name": "listStaticProxies",
     "request": {
      "method": "GET",
      "description": "Your addresses: IP, HTTP and SOCKS5 ports, username, password, country, term and note. Expired addresses have no username and password.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/static/proxies",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "static",
        "proxies"
       ]
      }
     }
    },
    {
     "name": "renewStaticProxies",
     "request": {
      "method": "POST",
      "description": "Renew active addresses from your balance (ids, period).",
      "header": [
       {
        "key": "Idempotency-Key",
        "value": "{{$guid}}"
       },
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/static/proxies/renew",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "static",
        "proxies",
        "renew"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"ids\": [\n    1\n  ],\n  \"period\": \"1m\"\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      }
     }
    },
    {
     "name": "rotateMobileIp",
     "request": {
      "method": "POST",
      "description": "Change the IP of a mobile proxy with the \"by link\" rotation, at most once a minute.",
      "header": [],
      "url": {
       "raw": "{{base_url}}/static/proxies/{{proxy_id}}/rotate",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "static",
        "proxies",
        "{{proxy_id}}",
        "rotate"
       ]
      }
     }
    }
   ]
  }
 ]
}