> ## Documentation Index
> Fetch the complete documentation index at: https://developers.useqx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List the packs

> Lists the packs of the key's organization, from the newest to the oldest. The list includes the active packs and the inactive packs. Each pack includes its requirements in the pack order.



## OpenAPI

````yaml /en/openapi.yaml get /packs
openapi: 3.1.0
info:
  title: QX API
  version: 1.0.0
  description: >-
    The QX API creates and reads the contacts, the collections and the documents
    of the organization, and it lists the packs.

    Each call carries the API key of the organization.


    The API sends each error in the RFC 9457 format
    (`application/problem+json`), with a stable `code`.

    In addition to the errors of each endpoint, any path under `/api/v1` can
    return these errors:


    - `404` with `route_not_found`: the API does not have the path, or the path
    does not accept the HTTP method.

    - `405` with `method_not_allowed`: the API does not recognize the HTTP
    method.

    - `406` with `not_acceptable`: the API does not recognize the `Content-Type`
    or the `Accept` of the call.

    - another `4xx` status with `request_refused`: the API could not complete
    the call.

    - a `5xx` status with `internal_error`: QX had an internal error.
servers:
  - url: https://app.useqx.com/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Collections
    description: >-
      The collections of the organization. A collection asks the contact for the
      documents of a pack.
  - name: Contacts
    description: >-
      The people and the companies of the organization. A person has a CPF, and
      a company has a CNPJ.
  - name: Documents
    description: >-
      The documents of the organization. A document sent without a collection
      goes to Triage. A document sent with a collection fills the slot of its
      type.
  - name: Packs
    description: The packs of the organization and the requirements of each pack.
paths:
  /packs:
    get:
      tags:
        - Packs
      summary: List the packs
      description: >-
        Lists the packs of the key's organization, from the newest to the
        oldest. The list includes the active packs and the inactive packs. Each
        pack includes its requirements in the pack order.
      operationId: listPacks
      parameters:
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
        - name: active
          in: query
          description: >-
            With `true`, the list includes only the active packs. With `false`,
            the list includes only the inactive packs.
          schema:
            type: boolean
          example: true
        - name: kind
          in: query
          description: >-
            The kind of the pack. A `kyc` pack asks for the registration
            documents of the client. An `operation` pack asks for the documents
            of an operation.
          schema:
            type: string
            enum:
              - kyc
              - operation
          example: operation
      responses:
        '200':
          description: A page of packs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackList'
              examples:
                page:
                  summary: A page with an operation pack and a registration pack
                  value:
                    data:
                      - id: pck_12
                        name: Importação marítima
                        kind: operation
                        required_for: pj
                        active: true
                        identification_mode: any
                        requirements:
                          - document_type:
                              id: dtp_31
                              name: Fatura Comercial (Commercial Invoice)
                            required: true
                            identifier: true
                            accepts_many: true
                            position: 1
                          - document_type:
                              id: dtp_32
                              name: Bill of Lading (B/L)
                            required: true
                            identifier: true
                            accepts_many: false
                            position: 2
                          - document_type:
                              id: dtp_33
                              name: Romaneio de Carga (Packing List)
                            required: false
                            identifier: false
                            accepts_many: true
                            position: 3
                      - id: pck_9
                        name: Cadastro PJ
                        kind: kyc
                        required_for: pj
                        active: true
                        identification_mode: any
                        requirements:
                          - document_type:
                              id: dtp_4
                              name: Contrato Social
                            required: true
                            identifier: false
                            accepts_many: false
                            position: 1
                          - document_type:
                              id: dtp_7
                              name: Cartão CNPJ
                            required: true
                            identifier: false
                            accepts_many: false
                            position: 2
                    has_more: false
                    next_cursor: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    Limit:
      name: limit
      in: query
      description: The number of items on the page, from 1 to 100. The default is 25.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
      example: 25
    Cursor:
      name: cursor
      in: query
      description: >-
        The `next_cursor` value of the previous page. Without this parameter,
        the list starts at the newest item.
      schema:
        type: string
      example: WyIyMDI2LTA5LTI1VDEzOjMxOjEyLjAwMDAwMFoiLDQwXQ
  schemas:
    PackList:
      type: object
      additionalProperties: false
      required:
        - data
        - has_more
        - next_cursor
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Pack'
        has_more:
          type: boolean
          description: With `true`, the list has more items after this page.
        next_cursor:
          type:
            - string
            - 'null'
          description: >-
            The value of the `cursor` parameter for the next page. On the last
            page, the value is `null`.
    Pack:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - kind
        - required_for
        - active
        - identification_mode
        - requirements
      properties:
        id:
          type: string
          pattern: ^pck_[1-9][0-9]*$
          description: The id of the pack.
          examples:
            - pck_12
        name:
          type: string
          description: The name of the pack.
          examples:
            - Importação marítima
        kind:
          type: string
          enum:
            - kyc
            - operation
          description: >-
            The kind of the pack. A `kyc` pack asks for the registration
            documents of the client. An `operation` pack asks for the documents
            of an operation.
        required_for:
          type: string
          enum:
            - pf
            - pj
            - both
          description: >-
            The client that the pack serves: `pf` for an individual, `pj` for a
            legal entity and `both` for the two.
        active:
          type: boolean
          description: With `false`, the pack is inactive.
        identification_mode:
          type: string
          enum:
            - any
            - all
          description: >-
            How many identifier requirements are enough to identify the
            operation: `any` for any one of them and `all` for all of them.
        requirements:
          type: array
          description: The requirements of the pack, in the pack order.
          items:
            $ref: '#/components/schemas/PackRequirement'
    Problem:
      type: object
      description: An error in the RFC 9457 format.
      required:
        - type
        - title
        - status
        - detail
        - code
      properties:
        type:
          type: string
          const: about:blank
          description: Always `about:blank`.
        title:
          type: string
          description: The phrase of the HTTP status, in English.
          examples:
            - Unauthorized
        status:
          type: integer
          description: The HTTP status.
          examples:
            - 401
        detail:
          type: string
          description: >-
            The explanation of the error, in the language of the organization.
            An answer that leaves before the key identifies the organization
            stays in Portuguese.
        code:
          type: string
          description: >-
            The error code, in English. The code does not change between
            versions of v1.
    PackRequirement:
      type: object
      additionalProperties: false
      required:
        - document_type
        - required
        - identifier
        - accepts_many
        - position
      properties:
        document_type:
          $ref: '#/components/schemas/DocumentTypeReference'
        required:
          type: boolean
          description: With `true`, the collection requires a document of this type.
        identifier:
          type: boolean
          description: >-
            With `true`, the number printed on a document of this type
            identifies the operation.
        accepts_many:
          type: boolean
          description: >-
            With `true`, the requirement accepts more than one document. For
            example, an operation can have many invoices.
        position:
          type: integer
          minimum: 1
          description: >-
            The position of the requirement in the pack. The first position is
            1.
    DocumentTypeReference:
      type: object
      additionalProperties: false
      required:
        - id
        - name
      properties:
        id:
          type: string
          pattern: ^dtp_[1-9][0-9]*$
          description: The id of the document type.
          examples:
            - dtp_31
        name:
          type: string
          description: The name of the document type.
          examples:
            - Fatura Comercial (Commercial Invoice)
  responses:
    BadRequest:
      description: >-
        The API refused the call. The `code` gives the reason:


        - `invalid_parameter`: a parameter is missing or has an invalid value.

        - `malformed_request`: the API could not read the call. Examples of
        causes:
          - the path or the query has an invalid encoding;
          - the query repeats a parameter in different forms, such as `limit=1&limit[]=2`;
          - the body is not valid JSON;
          - the address in the `Client-IP` header is not in the `X-Forwarded-For` header.
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Problem'
              - type: object
                properties:
                  code:
                    enum:
                      - invalid_parameter
                      - malformed_request
          examples:
            invalid_parameter:
              summary: The limit is above 100
              value:
                type: about:blank
                title: Bad Request
                status: 400
                detail: The limit parameter has an invalid value.
                code: invalid_parameter
            malformed_request:
              $ref: '#/components/examples/MalformedRequest'
    Unauthorized:
      description: The key is missing, does not exist or is revoked.
      headers:
        WWW-Authenticate:
          $ref: '#/components/headers/WwwAuthenticate'
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Problem'
              - type: object
                properties:
                  code:
                    enum:
                      - unauthorized
          examples:
            unauthorized:
              summary: The key is missing or not valid
              value:
                type: about:blank
                title: Unauthorized
                status: 401
                detail: >-
                  The call did not include a valid API key. Send the key in the
                  Authorization header, in the format Bearer <key>.
                code: unauthorized
    PaymentRequired:
      description: The subscription of the organization is blocked.
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Problem'
              - type: object
                properties:
                  code:
                    enum:
                      - subscription_blocked
          examples:
            subscription_blocked:
              summary: The subscription is blocked
              value:
                type: about:blank
                title: Payment Required
                status: 402
                detail: >-
                  The subscription of the organization is blocked. Settle the
                  payment in QX to use the API.
                code: subscription_blocked
    Forbidden:
      description: >-
        The organization is archived, or the plan of the organization does not
        include the API.
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Problem'
              - type: object
                properties:
                  code:
                    enum:
                      - organization_archived
                      - plan_required
          examples:
            plan_required:
              summary: The free plan does not include the API
              value:
                type: about:blank
                title: Forbidden
                status: 403
                detail: >-
                  The free plan does not include the API. Subscribe to a paid
                  plan in QX to use the API.
                code: plan_required
    TooManyRequests:
      description: The key or the IP address went over a limit.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Problem'
              - type: object
                properties:
                  code:
                    enum:
                      - rate_limited
                      - daily_limit_reached
                      - too_many_invalid_keys
          examples:
            rate_limited:
              summary: The key went over the per-minute limit
              value:
                type: about:blank
                title: Too Many Requests
                status: 429
                detail: >-
                  The key went over a per-minute limit. Wait for the seconds in
                  the Retry-After header and call again.
                code: rate_limited
  examples:
    MalformedRequest:
      summary: The API could not read the call
      value:
        type: about:blank
        title: Bad Request
        status: 400
        detail: >-
          The API could not read the call. Check the shape and the encoding of
          the path and the query, the JSON of the body and the headers.
        code: malformed_request
  headers:
    WwwAuthenticate:
      description: The authentication scheme that the API expects.
      required: true
      schema:
        type: string
      example: Bearer realm="QX API"
    RetryAfter:
      description: The seconds to wait before the next call.
      required: true
      schema:
        type: integer
        minimum: 1
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        The API key of the organization, in the `Authorization: Bearer <key>`
        header. The key starts with `qx_`.

````