# query traffic package price

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/price/traffic_package:
    post:
      summary: query traffic package price
      deprecated: false
      description: >-
        return data array defined the traffic amount range, price and valid
        days, valid days is 30,

        data array sorted by traffic amount

        example:

        ```

        [
                {
                    "id": 1,
                    "traffic_type": "rotation_residential",
                    "traffic_amount_gb": 20,
                    "valid_days": 30,
                    "price_per_gb": 3,
                    "created_unixtime": 1678606170
                },
                {
                    "id": 2,
                    "traffic_type": "rotation_residential",
                    "traffic_amount_gb": 100,
                    "valid_days": 30,
                    "price_per_gb": 3,
                    "created_unixtime": 1678606188
                },
                {
                    "id": 24,
                    "traffic_type": "rotation_residential",
                    "traffic_amount_gb": 500,
                    "valid_days": 30,
                    "price_per_gb": 2,
                    "created_unixtime": 1686552755
                },
                {
                    "id": 3,
                    "traffic_type": "rotation_residential",
                    "traffic_amount_gb": 99999999999999,
                    "valid_days": 30,
                    "price_per_gb": 1.5,
                    "created_unixtime": 1678606217
                }
            ]
        ```

        means

        traffic 20-100GB \$3.00/GB

        traffic 100-500GB \$2.00/GB

        traffic 500+GB \$1.50/GB
      tags:
        - Rotation proxy/price
        - price
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  description: query condition
                  allOf:
                    - type: object
                      properties:
                        traffic_type:
                          description: >-
                            one of the following traffic
                            type:"rotation_residential" or "rotation_datacenter"
                          type: string
                      x-apifox-refs: {}
                      x-apifox-orders:
                        - traffic_type
                from_db:
                  description: from db or cache
                  type: boolean
                limit:
                  description: query quantity for pagination
                  type: integer
                offset:
                  description: query offset for pagination
                  type: integer
              x-apifox-refs: {}
              x-apifox-orders:
                - filter
                - from_db
                - limit
                - offset
              required:
                - from_db
                - limit
                - offset
            example:
              from_db: true
              limit: 10
              offset: 0
              filter:
                traffic_type: rotation_residential
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        created_unixtime:
                          type: integer
                        id:
                          type: integer
                        price_per_gb:
                          type: number
                        traffic_amount_gb:
                          type: integer
                        traffic_type:
                          type: string
                        valid_days:
                          type: integer
                      x-apifox-refs: {}
                      x-apifox-orders:
                        - created_unixtime
                        - id
                        - price_per_gb
                        - traffic_amount_gb
                        - traffic_type
                        - valid_days
                      required:
                        - created_unixtime
                        - id
                        - price_per_gb
                        - traffic_amount_gb
                        - traffic_type
                        - valid_days
                      description: traffic package config
                    description: query result
                  meta_message:
                    type: string
                    description: success or other error msg
                  meta_status:
                    type: integer
                    description: 1 for success, negative for error
                  total_count:
                    type: integer
                    description: total record quantity
                x-apifox-refs: {}
                x-apifox-orders:
                  - data
                  - meta_message
                  - meta_status
                  - total_count
                required:
                  - data
                  - meta_message
                  - meta_status
                  - total_count
          headers: {}
          x-apifox-name: result
      security: []
      x-apifox-folder: Rotation proxy/price
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/2880121/apis/api-88999371-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.ipcola.com
    description: ipcola
security: []

```
