openapi: 3.0.3
info:
  title: ProxyShard User API Billing
  version: 1.0.0
  description: >
    All methods require the Authorization: Bearer <API_KEY> header for paths
    starting with /user/api/.
  x-gitbook-description-document:
    object: document
    data:
      schemaVersion: 9
    nodes:
      - object: block
        type: paragraph
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: >-
                  All methods require the Authorization: Bearer <API_KEY>
                  header for paths starting with /user/api/.
                marks: []
            key: W9AMVuV3X2nr
        key: N826mpAA6bPi
    key: 3pQjnI1fT5Tx
  x-gitbook-description-html: >-
    <p>All methods require the Authorization: Bearer &#x3C;API_KEY> header for
    paths starting with /user/api/.</p>
tags:
  - name: Datacenter & ISP Proxies
    description: Operations for datacenter and ISP proxies
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Operations for datacenter and ISP proxies
                  marks: []
              key: Y5DyHZExD0Z1
          key: TNYN9BzKcb7R
      key: FV8JUezeGRVG
    x-gitbook-description-html: <p>Operations for datacenter and ISP proxies</p>
  - name: Residential Proxies
    description: Operations for residential proxies
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Operations for residential proxies
                  marks: []
              key: rR2I6Lv0N6kX
          key: iBD5gLwqAKCi
      key: ZeCc5kz7S5s6
    x-gitbook-description-html: <p>Operations for residential proxies</p>
  - name: General
    description: General operations (profile, orders, reference data)
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 9
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: General operations (profile, orders, reference data)
                  marks: []
              key: LL5lIQ1Nofxb
          key: 6zcCj8DYlgFj
      key: o5kyefuuGtq2
    x-gitbook-description-html: <p>General operations (profile, orders, reference data)</p>
servers:
  - url: https://user-api.proxyshard.com
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    ApiSuccess:
      type: object
      properties:
        success:
          type: boolean
      required:
        - success
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
      required:
        - success
        - message
    PurchaseRequest:
      type: object
      properties:
        product:
          type: string
          example: Datacenter Proxy
        location:
          type: string
          nullable: true
          example: DE
        cycle:
          type: string
          example: monthly
        quantity:
          type: integer
          minimum: 1
          default: 1
          example: 10
        promo_code:
          type: string
          nullable: true
          example: SAVE10
        auto_renewal:
          type: boolean
          default: false
      required:
        - product
        - cycle
    PurchaseRequestDcIsp:
      type: object
      description: Purchase for Datacenter/ISP — the location field is required.
      properties:
        product:
          type: string
          enum:
            - Datacenter Proxy
            - ISP Proxy
          example: Datacenter Proxy
        location:
          type: string
          example: DE
        cycle:
          type: string
          example: monthly
        quantity:
          type: integer
          minimum: 1
          default: 1
          example: 10
        promo_code:
          type: string
          nullable: true
        auto_renewal:
          type: boolean
          default: false
      required:
        - product
        - location
        - cycle
      x-gitbook-description-html: <p>Purchase for Datacenter/ISP — the location field is required.</p>
    PurchaseRequestResidentialStandard:
      type: object
      description: >-
        Purchase for Standart Residential Proxy — location is not required; the cycle
        is fixed (lifetime).
      properties:
        product:
          type: string
          enum:
            - Standart Residential Proxy
          example: Standart Residential Proxy
        quantity:
          type: integer
          minimum: 1
          default: 1
          example: 1
        promo_code:
          type: string
          nullable: true
      required:
        - product
      x-gitbook-description-html: >-
        <p>Purchase for Standart Residential Proxy — location is not required; the cycle
        is fixed (lifetime).</p>
    PurchaseRequestResidentialPremium:
      type: object
      description: >-
        Purchase for Premium Residential Proxy — location is not required; the cycle
        is fixed (lifetime).
      properties:
        product:
          type: string
          enum:
            - Premium Residential Proxy
          example: Premium Residential Proxy
        quantity:
          type: integer
          minimum: 1
          default: 1
          example: 1
        promo_code:
          type: string
          nullable: true
      required:
        - product
      x-gitbook-description-html: >-
        <p>Purchase for Premium Residential Proxy — location is not required; the cycle
        is fixed (lifetime).</p>
    PurchaseRequestResidentialUnmetered:
      type: object
      description: Purchase for Unmetered Residential proxy — supports auto-renewal.
      properties:
        product:
          type: string
          enum:
            - Unmetered Residential proxy
          example: Unmetered Residential proxy
        cycle:
          type: string
          example: monthly
        promo_code:
          type: string
          nullable: true
        auto_renewal:
          type: boolean
          default: false
      required:
        - product
        - cycle
      x-gitbook-description-html: >-
        <p>Purchase for Unmetered Residential proxy — supports
        auto-renewal.</p>
    PurchaseResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Order paid successfully
        order_id:
          type: integer
      required:
        - success
        - message
        - order_id
    ActiveProxyItem:
      type: object
      properties:
        ip:
          type: string
        username:
          type: string
        password:
          type: string
        http_port:
          type: integer
        socks_port:
          type: integer
        until:
          type: string
          description: ISO8601/string date
          x-gitbook-description-html: <p>ISO8601/string date</p>
        status:
          type: string
      required:
        - ip
        - username
        - password
        - http_port
        - socks_port
        - until
        - status
    AvailableCountRequest:
      type: object
      properties:
        country:
          type: string
          example: DE
        product:
          type: string
          example: dc
      required:
        - country
        - product
    AvailableCountResponse:
      type: object
      properties:
        country:
          type: string
        product:
          type: string
        amount:
          type: integer
      required:
        - country
        - product
        - amount
    ApiMeResponse:
      type: object
      properties:
        email:
          type: string
        active_orders:
          type: integer
        wallet_balance:
          type: integer
          description: in cents
          x-gitbook-description-html: <p>in cents</p>
      required:
        - email
        - active_orders
        - wallet_balance
    ProductWithCycles:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
          nullable: true
        location:
          type: string
          nullable: true
        cycles:
          type: array
          items:
            type: string
      required:
        - name
        - cycles
    AddBandwidthRequest:
      type: object
      properties:
        amount:
          type: integer
          example: 5
          description: Amount in GB
          x-gitbook-description-html: <p>Amount in GB</p>
        promo_code:
          type: string
          nullable: true
      required:
        - amount
    GetSubUsersRequest:
      type: object
      properties:
        offset:
          type: integer
          example: 0
          description: Offset (default 0)
          x-gitbook-description-html: <p>Offset (default 0)</p>
        limit:
          type: integer
          example: 20
          description: Page size (default 20)
          x-gitbook-description-html: <p>Page size (default 20)</p>
    EditSubUserPayload:
      type: object
      properties:
        name:
          type: string
      required:
        - name
    CreateSubUserPayload:
      type: object
      properties:
        proxy_type:
          type: string
          example: standart
        name:
          type: string
        data:
          type: integer
          example: 5
          description: Amount in GB
          x-gitbook-description-html: <p>Amount in GB</p>
      required:
        - proxy_type
        - name
        - data
    ChangeSubUserPasswordPayload:
      type: object
      properties:
        proxy_type:
          type: string
          example: standart
      required:
        - proxy_type
    ModifyTrafficPayload:
      type: object
      properties:
        proxy_type:
          type: string
          example: standart
        data:
          type: integer
          example: 5
          description: Amount in GB
          x-gitbook-description-html: <p>Amount in GB</p>
      required:
        - proxy_type
        - data
    Country:
      type: object
      properties:
        code:
          type: string
          maxLength: 10
          description: ISO country code
          x-gitbook-description-html: <p>ISO country code</p>
        name:
          type: string
          maxLength: 255
          description: Country name
          x-gitbook-description-html: <p>Country name</p>
      required:
        - code
        - name
    Region:
      type: object
      properties:
        code:
          type: string
          maxLength: 10
          description: Region code (state/province code)
          x-gitbook-description-html: <p>Region code (state/province code)</p>
        name:
          type: string
          maxLength: 255
          description: Region name (state/province name)
          x-gitbook-description-html: <p>Region name (state/province name)</p>
        country:
          $ref: '#/components/schemas/Country'
      required:
        - code
        - name
        - country
    City:
      type: object
      properties:
        code:
          type: string
          maxLength: 50
          description: City code (usually slug format)
          x-gitbook-description-html: <p>City code (usually slug format)</p>
        name:
          type: string
          maxLength: 255
          description: City name
          x-gitbook-description-html: <p>City name</p>
        country:
          $ref: '#/components/schemas/Country'
        region:
          type: object
          nullable: true
          properties:
            code:
              type: string
              maxLength: 10
              description: Region code
              x-gitbook-description-html: <p>Region code</p>
            name:
              type: string
              maxLength: 255
              description: Region name
              x-gitbook-description-html: <p>Region name</p>
          required:
            - code
            - name
      required:
        - code
        - name
        - country
    PagedCountriesResponse:
      type: object
      properties:
        count:
          type: integer
        results:
          type: array
          items:
            $ref: '#/components/schemas/Country'
      required:
        - count
        - results
    PagedRegionsResponse:
      type: object
      properties:
        count:
          type: integer
        results:
          type: array
          items:
            $ref: '#/components/schemas/Region'
      required:
        - count
        - results
    PagedCitiesResponse:
      type: object
      properties:
        count:
          type: integer
        results:
          type: array
          items:
            $ref: '#/components/schemas/City'
      required:
        - count
        - results
paths:
  /user/api/orders/purchase:
    post:
      tags:
        - General
      security:
        - bearerAuth: []
      summary: Create and pay for an order
      description: |
        Purchase by product name, location, and cycle.
        For Datacenter/ISP, location is required.
        For Standart Residential Proxy, location is not required.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/PurchaseRequestDcIsp'
                - $ref: '#/components/schemas/PurchaseRequestResidentialStandard'
                - $ref: '#/components/schemas/PurchaseRequestResidentialPremium'
                - $ref: '#/components/schemas/PurchaseRequestResidentialUnmetered'
                - $ref: '#/components/schemas/PurchaseRequest'
            examples:
              datacenter:
                value:
                  product: Datacenter Proxy
                  location: DE
                  cycle: monthly
                  quantity: 10
                  auto_renewal: true
              isp:
                value:
                  product: ISP Proxy
                  location: US
                  cycle: monthly
                  quantity: 5
              residentialStandard:
                value:
                  product: Standart Residential Proxy
                  quantity: 1
              residentialPremium:
                value:
                  product: Premium Residential Proxy
                  quantity: 1
              residentialNew:
                value:
                  product: Residential Proxy NEW
                  cycle: monthly
                  quantity: 1
              unmeteredResidential:
                value:
                  product: Unmetered Residential proxy
                  cycle: monthly
                  auto_renewal: true
              mobile:
                value:
                  product: Mobile Proxy Plan Name
                  cycle: day
                  quantity: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseResponse'
          x-gitbook-description-html: <p>Success</p>
        '400':
          description: Validation/balance error/insufficient stock
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          x-gitbook-description-html: <p>Validation/balance error/insufficient stock</p>
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          x-gitbook-description-html: <p>Unauthorized</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Purchase by product name, location, and cycle. For
                      Datacenter/ISP, location is required. For Standart
                      Residential Proxy, location is not required.
                    marks: []
                key: a6YDYJfLO9R9
            key: S5jpGa8ot9FH
        key: 7j57RKNQ66xt
      x-gitbook-description-html: >-
        <p>Purchase by product name, location, and cycle. For Datacenter/ISP,
        location is required. For Standart Residential Proxy, location is not
        required.</p>
  /user/api/orders/change-billing-cycle/{order_id}:
    post:
      tags:
        - General
      security:
        - bearerAuth: []
      summary: Change the order billing cycle
      description: >
        Changes the billing cycle by cycle name. Only for Datacenter & ISP
        proxies.

        If the promo code is not available for the selected cycle, it will be
        automatically reset.
      parameters:
        - in: path
          name: order_id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cycle:
                  type: string
                  example: monthly
              required:
                - cycle
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  order:
                    type: object
          x-gitbook-description-html: <p>Success</p>
        '400':
          description: Invalid product or cycle
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          x-gitbook-description-html: <p>Invalid product or cycle</p>
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          x-gitbook-description-html: <p>Unauthorized</p>
        '403':
          description: Cycle is not available for this user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          x-gitbook-description-html: <p>Cycle is not available for this user</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Changes the billing cycle by cycle name. Only for
                      Datacenter & ISP proxies. If the promo code is not
                      available for the selected cycle, it will be automatically reset.
                    marks: []
                key: FCRCqYnCRIMJ
            key: CstYjsmMFFpH
        key: RctxTbOKuya7
      x-gitbook-description-html: >-
        <p>Changes the billing cycle by cycle name. Only for Datacenter &#x26;
        ISP proxies. If the promo code is not available for the selected cycle, it will be
        automatically reset.</p>
  /user/api/orders/edit-auto-renewal/{order_id}:
    post:
      tags:
        - General
      security:
        - bearerAuth: []
      summary: Change order auto-renewal
      description: |
        Enable/disable auto-renewal. Only for Datacenter & ISP proxies.
      parameters:
        - in: path
          name: order_id
          required: true
          schema:
            type: integer
        - in: query
          name: auto_renewal
          required: true
          schema:
            type: boolean
            example: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
          x-gitbook-description-html: <p>Success</p>
        '400':
          description: Invalid product for this operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          x-gitbook-description-html: <p>Invalid product for this operation</p>
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          x-gitbook-description-html: <p>Unauthorized</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Enable/disable auto-renewal. Only for Datacenter &
                      ISP proxies.
                    marks: []
                key: K9SC5NGtClVi
            key: wsP9craixrO9
        key: lPUU4UXDZMgV
      x-gitbook-description-html: >-
        <p>Enable/disable auto-renewal. Only for Datacenter &#x26; ISP
        proxies.</p>
  /user/api/proxies/active:
    get:
      tags:
        - Datacenter & ISP Proxies
      security:
        - bearerAuth: []
      summary: Get active proxies by order
      parameters:
        - in: query
          name: order_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Proxy list
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ActiveProxyItem'
                  order_tag:
                    type: string
                    nullable: true
                required:
                  - success
                  - data
          x-gitbook-description-html: <p>Proxy list</p>
        '403':
          description: Method is unavailable for this order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          x-gitbook-description-html: <p>Method is unavailable for this order</p>
  /user/api/proxies/products:
    get:
      tags:
        - General
      security:
        - bearerAuth: []
      summary: Get products and their cycles
      description: Returns API products with the names of available cycles.
      responses:
        '200':
          description: Product list
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  products:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProductWithCycles'
                required:
                  - success
                  - products
          x-gitbook-description-html: <p>Product list</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Returns API products with the names of available cycles.
                    marks: []
                key: ae0gjXUIoxK0
            key: H8DZM6car1fH
        key: dPLJyH3Xi2mm
      x-gitbook-description-html: <p>Returns API products with the names of available cycles.</p>
  /user/api/proxies/available-count:
    get:
      tags:
        - General
      security:
        - bearerAuth: []
      summary: Get the available number of proxies
      description: Returns the total available quantity for all products.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AvailableCountResponse'
          x-gitbook-description-html: <p>Success</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Returns the total available quantity for all
                      products.
                    marks: []
                key: rZiZPAWJWDci
            key: 89ELMwrVTwTZ
        key: hs4oQPezyl5t
      x-gitbook-description-html: <p>Returns the total available quantity for all products.</p>
  /user/api/me:
    get:
      tags:
        - General
      security:
        - bearerAuth: []
      summary: User information
      responses:
        '200':
          description: Profile data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiMeResponse'
          x-gitbook-description-html: <p>Profile data</p>
  /user/api/orders:
    get:
      tags:
        - General
      security:
        - bearerAuth: []
      summary: Order list
      parameters:
        - in: query
          name: status
          required: true
          description: active | on-hold | cancelled | all
          schema:
            type: string
          x-gitbook-description-html: <p>active | on-hold | cancelled | all</p>
        - in: query
          name: offset
          required: false
          description: Result offset (default 0)
          schema:
            type: integer
            minimum: 0
            example: 0
          x-gitbook-description-html: <p>Result offset (default 0)</p>
        - in: query
          name: limit
          required: false
          description: Page size (1..100, default 20)
          schema:
            type: integer
            minimum: 1
            maximum: 100
            example: 20
          x-gitbook-description-html: <p>Page size (1..100, default 20)</p>
      responses:
        '200':
          description: Order list
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        order_id:
                          type: integer
                        product_id:
                          type: integer
                        product_name:
                          type: string
                        cycle_id:
                          type: integer
                        cycle_name:
                          type: string
                        expires_at:
                          type: string
                          nullable: true
                          description: ISO8601 expiration time
                          x-gitbook-description-html: <p>ISO8601 expiration time</p>
                        auto_renewal:
                          type: boolean
                          nullable: true
                        tag:
                          type: string
                          nullable: true
                      required:
                        - order_id
                        - product_id
                        - product_name
                        - cycle_id
                        - cycle_name
                  count:
                    type: integer
                    description: Number of orders in the current result set
                    x-gitbook-description-html: <p>Number of orders in the current result set</p>
                  prev:
                    type: string
                    nullable: true
                    description: Previous page URI
                    x-gitbook-description-html: <p>Previous page URI</p>
                  next:
                    type: string
                    nullable: true
                    description: Next page URI
                    x-gitbook-description-html: <p>Next page URI</p>
                required:
                  - success
                  - orders
          x-gitbook-description-html: <p>Order list</p>
  /user/api/orders/{id}:
    get:
      tags:
        - General
      security:
        - bearerAuth: []
      summary: Get order information
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Order information
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  order:
                    type: object
                    properties:
                      order_id:
                        type: integer
                      product_name:
                        type: string
                      cycle_name:
                        type: string
                      quantity:
                        type: integer
                      price_paid:
                        type: integer
                      status:
                        type: string
                      created_at:
                        type: string
                        nullable: true
                      expires_at:
                        type: string
                        nullable: true
                      promo_code:
                        type: string
                        nullable: true
                      auto_renewal:
                        type: boolean
                        nullable: true
                      tag:
                        type: string
                        nullable: true
                required:
                  - success
                  - order
          x-gitbook-description-html: <p>Order information</p>
  /user/api/orders/{id}/renew:
    post:
      tags:
        - General
      security:
        - bearerAuth: []
      summary: Renew order
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSuccess'
          x-gitbook-description-html: <p>Success</p>
        '400':
          description: Insufficient balance/validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          x-gitbook-description-html: <p>Insufficient balance/validation</p>
  /user/api/orders/{id}/add-bandwidth:
    post:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Purchase additional traffic (Residential)
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddBandwidthRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSuccess'
          x-gitbook-description-html: <p>Success</p>
  /user/api/orders/{id}/tag:
    post:
      tags:
        - General
      security:
        - bearerAuth: []
      summary: Change order tag
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tag:
                  type: string
                  example: none
              required:
                - tag
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSuccess'
          x-gitbook-description-html: <p>Success</p>
  /user/api/proxies/sub-users:
    get:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Sub-user list
      parameters:
        - in: query
          name: proxy_type
          required: true
          description: Proxy type (standart | premium)
          schema:
            type: string
            example: standart
          x-gitbook-description-html: <p>Proxy type (standart | premium)</p>
        - in: query
          name: offset
          required: false
          schema:
            type: integer
            example: 0
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            example: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        user_id:
                          type: string
                        first_name:
                          type: string
                        proxy_password:
                          type: string
                        data:
                          type: integer
                        data_spent:
                          type: integer
                      required:
                        - user_id
                        - first_name
                        - proxy_password
                        - data
                        - data_spent
          x-gitbook-description-html: <p>Success</p>
  /user/api/proxies/sub-user/{user_id}:
    get:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Get sub-user by ID
      parameters:
        - in: path
          name: user_id
          required: true
          schema:
            type: string
        - in: query
          name: proxy_type
          required: true
          description: Proxy type (standart | premium)
          schema:
            type: string
            example: standart
          x-gitbook-description-html: <p>Proxy type (standart | premium)</p>
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        user_id:
                          type: string
                        first_name:
                          type: string
                        proxy_password:
                          type: string
                        data:
                          type: integer
                        data_spent:
                          type: integer
                      required:
                        - user_id
                        - first_name
                        - proxy_password
                        - data
                        - data_spent
          x-gitbook-description-html: <p>Success</p>
    patch:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Edit sub-user (name/package)
      parameters:
        - in: path
          name: user_id
          required: true
          schema:
            type: string
        - in: query
          name: proxy_type
          required: true
          description: Proxy type (standart | premium)
          schema:
            type: string
            example: standart
          x-gitbook-description-html: <p>Proxy type (standart | premium)</p>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditSubUserPayload'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
          x-gitbook-description-html: <p>Success</p>
    delete:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Delete sub-user
      parameters:
        - in: path
          name: user_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
          x-gitbook-description-html: <p>Success</p>
  /user/api/proxies/sub-user:
    post:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Create sub-user
      parameters:
        - in: query
          name: proxy_type
          required: true
          description: Proxy type (standart | premium)
          schema:
            type: string
            example: standart
          x-gitbook-description-html: <p>Proxy type (standart | premium)</p>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                data:
                  type: integer
              required:
                - name
                - data
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        user_id:
                          type: string
                        first_name:
                          type: string
                        proxy_password:
                          type: string
                        data:
                          type: integer
                        data_spent:
                          type: integer
                      required:
                        - user_id
                        - first_name
                        - proxy_password
                        - data
                        - data_spent
          x-gitbook-description-html: <p>Success</p>
  /user/api/proxies/sub-user/{user_id}/data/add:
    post:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Add traffic to sub-user
      parameters:
        - in: path
          name: user_id
          required: true
          schema:
            type: string
        - in: query
          name: proxy_type
          required: true
          description: Proxy type (standart | premium)
          schema:
            type: string
            example: standart
          x-gitbook-description-html: <p>Proxy type (standart | premium)</p>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: integer
                  example: 5
                  description: Amount in GB
                  x-gitbook-description-html: <p>Amount in GB</p>
              required:
                - data
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
          x-gitbook-description-html: <p>Success</p>
  /user/api/proxies/sub-user/{user_id}/data/subtract:
    post:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Subtract traffic from sub-user
      parameters:
        - in: path
          name: user_id
          required: true
          schema:
            type: string
        - in: query
          name: proxy_type
          required: true
          description: Proxy type (standart | premium)
          schema:
            type: string
            example: standart
          x-gitbook-description-html: <p>Proxy type (standart | premium)</p>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: integer
                  example: 5
                  description: Amount in GB
                  x-gitbook-description-html: <p>Amount in GB</p>
              required:
                - data
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
          x-gitbook-description-html: <p>Success</p>
  /user/api/proxies/sub-user/{user_id}/password:
    post:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Change sub-user password
      parameters:
        - in: path
          name: user_id
          required: true
          schema:
            type: string
        - in: query
          name: proxy_type
          required: true
          description: Proxy type (standart | premium)
          schema:
            type: string
            example: standart
          x-gitbook-description-html: <p>Proxy type (standart | premium)</p>
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
          x-gitbook-description-html: <p>Success</p>
  /user/api/proxies/countries:
    get:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Country list
      parameters:
        - in: query
          name: proxy_type
          required: true
          description: Proxy type (standart | premium)
          schema:
            type: string
            example: standart
          x-gitbook-description-html: <p>Proxy type (standart | premium)</p>
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedCountriesResponse'
          x-gitbook-description-html: <p>Success</p>
  /user/api/proxies/regions:
    get:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: Region list
      parameters:
        - in: query
          name: proxy_type
          required: true
          description: Proxy type (standart | premium)
          schema:
            type: string
            example: standart
          x-gitbook-description-html: <p>Proxy type (standart | premium)</p>
        - in: query
          name: country_code
          required: true
          description: ISO country code
          schema:
            type: string
            example: DE
          x-gitbook-description-html: <p>ISO country code</p>
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedRegionsResponse'
          x-gitbook-description-html: <p>Success</p>
  /user/api/proxies/cities:
    get:
      tags:
        - Residential Proxies
      security:
        - bearerAuth: []
      summary: City list
      parameters:
        - in: query
          name: proxy_type
          required: true
          description: Proxy type (standart | premium)
          schema:
            type: string
            example: standart
          x-gitbook-description-html: <p>Proxy type (standart | premium)</p>
        - in: query
          name: country_code
          required: true
          description: ISO country code
          schema:
            type: string
            example: DE
          x-gitbook-description-html: <p>ISO country code</p>
        - in: query
          name: region_code
          required: true
          description: Region code (state/province code)
          schema:
            type: string
            example: BE
          x-gitbook-description-html: <p>Region code (state/province code)</p>
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedCitiesResponse'
          x-gitbook-description-html: <p>Success</p>
