openapi: 3.0.3 info: title: api description: '' version: 1.0.2 servers: - url: 'https://api.papaproxy.net' paths: /api/clients: get: summary: 'GET clients list.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "[{\n\"id\": numeric (client ID),\n\"email\": string (email),\n}] or empty array" 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints '/api/stats/{id}': get: summary: 'GET service stats by Service ID. Only for PPR.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "[{\n\"date\": string (date YYYY-MM-DD),\n\"rate\": numeric (count of requests|used traffic in MB),\n}] or empty array" 422: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity ' properties: error: type: string example: 'Unprocessable Entity ' 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints parameters: - in: path name: id description: 'Service ID.' example: '123' required: true schema: type: string '/api/rate/{id}': get: summary: 'GET service rate by Service ID. Only for PPR.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "[{\n\"limit\": numeric (limit of requests|used traffic in MB),\n\"rate\": numeric (count of requests|used traffic in MB),\n}] or empty array" 422: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity ' properties: error: type: string example: 'Unprocessable Entity ' 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints parameters: - in: path name: id description: 'Service ID.' example: '123' required: true schema: type: string '/api/product/{pid}': get: summary: 'GET product by Product ID.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "{\n\"productId\": numeric (product ID),\n\"price\": numeric (product price in USD),\n\"groupId\": numeric (product group ID),\n\"groupName\": string (group name),\n\"created_at\": string (product date creation YYYY-MM-DD),\n\"product_hidden\": boolean (product hidden or not),\n\"group_hidden\": boolean (group hidden or not),\n\"product_type\": string (fpr - static proxy or ppr - rotating proxy),\n\"ip_count\": numeric (IP count for fpr only),\n\"update_time\": string (update time YYYY-MM-DD HH:MM:SS for fpr only),\n\"geo\": array (geo list for fpr only),\n}" 422: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity or product ID not found' properties: error: type: string example: 'Unprocessable Entity or product ID not found' 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints post: summary: 'POST add new service' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "{\n'serviceId': numeric,\n'orderId': numeric,\n'invoiceId': numeric,\n'amount': numeric,\n\"ip\": string,\n}" 422: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity. ClientID not found' properties: error: type: string example: 'Unprocessable Entity. ClientID not found' 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: clientid: type: integer description: 'Client ID.' example: 1 setip: type: string description: 'IP address for bind. For FPR only.' example: 12.34.56.78 required: - clientid parameters: - in: path name: pid description: 'Product ID.' example: '12' required: true schema: type: string /api/products: get: summary: 'GET products list.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "[{\n\"productId\": numeric (product ID),\n\"productName\": string (product name),\n\"price\": numeric (product price in USD),\n\"groupId\": numeric (product group ID),\n\"groupName\": string (group name),\n\"created_at\": string (product date creation YYYY-MM-DD),\n}] or empty array" 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints '/api/products/orderby/{field}': get: summary: 'GET products list order by field.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "[{\n\"productId\": numeric (product ID),\n\"productName\": string (product name),\n\"price\": numeric (product price in USD),\n\"groupId\": numeric (product group ID),\n\"groupName\": string (group name),\n\"created_at\": string (product date creation YYYY-MM-DD),\n}] or empty array" 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints parameters: - in: path name: field description: 'Field name for order by: productId or productName or price or groupId or groupName or created_at .' example: productId required: true schema: type: string '/api/networkstatus/errors/{id}': get: summary: 'GET network status errors proxy servers list by Service ID.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: 'array (IP address list) or empty array' 422: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity ' properties: error: type: string example: 'Unprocessable Entity ' 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity. ClientID not found' properties: error: type: string example: 'Unprocessable Entity. ClientID not found' tags: - Endpoints parameters: - in: path name: id description: 'Service ID.' example: '123' required: true schema: type: string '/api/networkstatus/inactive/{id}': get: summary: 'GET network status inactive proxy servers list by Service ID.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: 'array (IP address list) or empty array' 422: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity ' properties: error: type: string example: 'Unprocessable Entity ' 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity. ClientID not found' properties: error: type: string example: 'Unprocessable Entity. ClientID not found' tags: - Endpoints parameters: - in: path name: id description: 'Service ID.' example: '123' required: true schema: type: string /api/billing/credit: get: summary: 'GET billing credit.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "{\n\"credit\": numeric (credit in USD),\n}" 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints /api/billing/invoices: get: summary: 'GET billing invoices list.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "[{\n\"id\": numeric (invoice ID),\n\"description\": string (invoice description),\n\"status\": string (Unpaid|Paid|Cancelled|Refunded|Collections|Payment Pending|Pending),\n\"created_at\": string (invoice date creation YYYY-MM-DD),\n\"amount\": numeric (invoice amount in USD),\n\"date_refunded\": string (invoice date refunded YYYY-MM-DD),\n\"date_paid\": string (invoice date paid YYYY-MM-DD),\n\"paymentmethod\": string (payment method),\n\"serviceid\": numeric (service ID),\n}] or empty array" 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints '/api/billing/invoice/{id}': get: summary: 'GET billing invoice by Invoice ID.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "[{\n\"id\": numeric (invoice ID),\n\"description\": string (invoice description),\n\"status\": string (Unpaid|Paid|Cancelled|Refunded|Collections|Payment Pending|Pending),\n\"created_at\": string (invoice date creation YYYY-MM-DD),\n\"amount\": numeric (invoice amount in USD),\n\"date_refunded\": string (invoice date refunded YYYY-MM-DD),\n\"date_paid\": string (invoice date paid YYYY-MM-DD),\n\"paymentmethod\": string (payment method),\n\"serviceid\": numeric (service ID),\n}] or empty array" 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints parameters: - in: path name: id description: 'The ID of the invoice.' example: sit required: true schema: type: string '/api/service/{id}': get: summary: 'GET service by Service ID.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "{\n \"service_id\": numeric (service ID),\n \"orderid\": numeric (order ID),\n \"product_name\": string (product name),\n \"regdate\": string (date YYYY-MM-DD),\",\n \"nextduedate\": string (date YYYY-MM-DD),\n \"status\": string (Active|Pending|Suspended|Terminated|Cancelled|Fraud),\n \"billingcycle\": string (Free|Monthly|Quarterly|Semi-Annually|Annually|Biennially|Triennially),\n \"username\": string (username),\n \"password\": string (password),\n \"bindedip\": string (binded IP address 111.222.233.144 for fpr only),\n \"product_type\": string (fpr - static proxy or ppr - rotating proxy),\n \"ip_count\": numeric (IP count for fpr only),\n \"price\": numeric (price in USD),\n}" 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints put: summary: 'PUT update service by Service ID.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: setip: success: 'IP address updated successfully' update_list: success: 'IP list updated successfully' password: success: 'Password updated successfully' properties: setip: type: object example: success: 'IP address updated successfully' update_list: type: object example: success: 'IP list updated successfully' password: type: object example: success: 'Password updated successfully' 422: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity. Invalid IPv4 format' properties: error: type: string example: 'Unprocessable Entity. Invalid IPv4 format' 429: description: '' content: application/json: schema: type: object example: error: 'Too Many Attempts (updateList). Next update possible: YYYY-MM-DD HH:MM:SS' properties: error: type: string example: 'Too Many Attempts (updateList). Next update possible: YYYY-MM-DD HH:MM:SS' 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity. ClientID not found' properties: error: type: string example: 'Unprocessable Entity. ClientID not found' tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: setip: type: string description: 'IP address for bind.' example: 12.34.56.78 update_list: type: string description: 'Update IP list.' example: 'true' password: type: string description: 'New password base64 encoded.' example: cGFzc3dvcmQ= parameters: - in: path name: id description: 'The ID of the service.' example: libero required: true schema: type: string /api/services: get: summary: 'GET user services list.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "[{\n\"service_id\": numeric,\n\"product_name\": string (product name),\n\"nextduedate\": string (date),\n\"orderid\": numeric,\n\"status\": string (Active|Pending|Suspended|Terminated|Cancelled|Fraud),\n}]" 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints '/api/iplist/{typel}/{formatl}/{id}': get: summary: 'GET IP list by Service ID.' description: '' parameters: - in: header name: Authorization description: '' example: 'Basic {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: 'ip list in selected format' 422: description: '' content: application/json: schema: type: object example: error: 'Unprocessable Entity ' properties: error: type: string example: 'Unprocessable Entity ' 401: description: '' content: text/plain: schema: type: string example: Unauthenticated 400: description: '' content: text/plain: schema: type: string example: 'Invalid credentials format' tags: - Endpoints parameters: - in: path name: typel description: 'IP list type http-ip or socks-ip or http-auth or ppr-http or ppr-socks.' example: http-ip required: true schema: type: string - in: path name: formatl description: 'IP list format csv or txt or json.' example: csv required: true schema: type: string - in: path name: id description: 'Service ID.' example: '123' required: true schema: type: string tags: - name: Endpoints description: '' components: securitySchemes: default: type: http scheme: basic description: '' security: - default: []