# query traffic package

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/traffic_package/query:
    post:
      summary: query traffic package
      deprecated: false
      description: ''
      tags:
        - Rotation proxy/traffic package
        - traffic package
      parameters:
        - name: Authorization
          in: header
          description: ''
          example: Bearer {{AUTH_TOKEN}}
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  description: query condition
                  allOf:
                    - type: object
                      properties:
                        buy_end_date:
                          description: 'required, end date, format: 2023-02-10'
                          type: string
                        buy_start_date:
                          description: 'required, start date, format: 2023-01-10'
                          type: string
                        id:
                          description: optional, specific record id
                          type: integer
                        traffic_type:
                          description: >-
                            one of the following traffic
                            type:"rotation_residential" or "rotation_datacenter"
                          type: string
                      x-apifox-refs: {}
                      x-apifox-orders:
                        - buy_end_date
                        - buy_start_date
                        - id
                        - traffic_type
                      required:
                        - traffic_type
                      x-apifox-ignore-properties: []
                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
              x-apifox-ignore-properties: []
            example:
              from_db: true
              offset: 0
              limit: 10
              filter:
                traffic_type: rotation_residential
                buy_start_date: '2023-06-01'
                buy_end_date: '2023-06-30'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  current_unixtime:
                    type: integer
                    description: current time stamp from server
                  data:
                    type: array
                    items:
                      type: object
                      properties: {}
                    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:
                  - current_unixtime
                  - data
                  - meta_message
                  - meta_status
                  - total_count
                x-apifox-ignore-properties: []
          headers: {}
          x-apifox-name: result
      security: []
      x-apifox-folder: Rotation proxy/traffic package
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/2880121/apis/api-88999370-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.ipcola.com
    description: ipcola
security: []

```
