> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devmob.app.br/llms.txt
> Use this file to discover all available pages before exploring further.

# List Company Credit Purchases

> Lists company credit purchases.



## OpenAPI

````yaml /api-reference/ops/openapi.json get /api/v1/ops/company-credit-purchases
openapi: 3.0.0
info:
  title: OABUS OPS API
  description: OABUS API
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/v1/ops/company-credit-purchases:
    get:
      tags:
        - CompanyCreditPurchase
      summary: List Company Credit Purchases
      description: Lists company credit purchases.
      operationId: listCompanyCreditPurchases
      parameters:
        - name: limit
          required: false
          in: query
          schema:
            default: 10
            description: Items per page
            example: 10
            type: number
        - name: page
          required: false
          in: query
          schema:
            default: 1
            description: Page number
            example: 1
            type: number
        - name: status
          required: false
          in: query
          schema:
            description: Credit purchase status
            type: string
            enum:
              - ANTIFRAUD_APPROVED
              - ANTIFRAUD_MANUAL
              - ANTIFRAUD_PENDING
              - ANTIFRAUD_REPROVED
              - CANCELED
              - CHARGEDBACK
              - OVERPAID
              - PAID
              - PARTIAL_CANCELED
              - PAYMENT_FAILED
              - PENDING
              - PROCESSING
              - REFUNDED
              - UNDERPAID
            example: PENDING
        - name: createdAt
          required: false
          in: query
          schema:
            description: Created date range
            example: '>=2024-01-01;<=2024-12-31'
            type: string
        - name: paidAt
          required: false
          in: query
          schema:
            description: Paid date range
            example: '>=2024-01-01;<=2024-12-31'
            type: string
        - name: sortBy
          required: false
          in: query
          schema:
            default: createdAt
            description: Field to sort by
            example: createdAt
            type: string
            enum:
              - createdAt
              - creditedAt
              - amount
        - name: sortOrder
          required: false
          in: query
          schema:
            default: desc
            description: Sort order
            example: desc
            type: string
            enum:
              - asc
              - desc
        - name: fields
          required: false
          in: query
          description: >-
            Comma-separated list of fields to include in the response. Supports
            dot notation for nested projection (e.g.
            `id,name,user.email,trips.route.id`). Unknown fields are silently
            dropped.
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/ListCompanyCreditPurchases200Response'
        '400':
          $ref: '#/components/responses/ListCompanyCreditPurchases400Response'
        '401':
          $ref: '#/components/responses/ListCompanyCreditPurchases401Response'
        '403':
          $ref: '#/components/responses/ListCompanyCreditPurchases403Response'
        '500':
          $ref: '#/components/responses/ListCompanyCreditPurchases500Response'
      security:
        - bearer: []
        - bearer: []
components:
  responses:
    ListCompanyCreditPurchases200Response:
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  type: object
                  properties:
                    companyCreditPurchaseId:
                      type: string
                      format: uuid
                    companyCreditAccountId:
                      type: string
                      format: uuid
                    organizationId:
                      type: string
                      format: uuid
                    companyId:
                      type: string
                      format: uuid
                    cooperativeId:
                      type: string
                      format: uuid
                      description: Cooperative identifier
                      example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                    cooperative:
                      type: object
                      properties:
                        cooperativeId:
                          type: string
                          format: uuid
                          description: Cooperative identifier
                          example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                        organizationId:
                          type: string
                          format: uuid
                          description: Organization identifier
                          example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                        organization:
                          type: object
                          properties:
                            document:
                              description: CNPJ
                              example: 45.723.174/0001-10
                            documentType:
                              type: string
                              enum:
                                - CPF
                                - CNPJ
                                - RG
                              description: Document type
                              example: CNPJ
                            email:
                              description: Contact email
                              example: contato@estrela.com
                              nullable: true
                            legalName:
                              description: Legal name
                              example: Cooperativa Metropolitana de Transporte Ltda.
                              nullable: true
                              type: string
                            logo:
                              description: Logo object key
                              example: >-
                                organizations/0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a/logo/0195e7b2-4a3c-7d3e-9f4a-2c6b8d0e1f3b.png
                              nullable: true
                              type: string
                            name:
                              type: string
                              description: Display name
                              example: Cooperativa Metropolitana
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization identifier
                              example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                            tradeName:
                              description: Trade name
                              example: Metropolitana
                              nullable: true
                              type: string
                            type:
                              type: string
                              enum:
                                - COOPERATIVE
                                - COMPANY
                              description: Organization type
                              example: COOPERATIVE
                          required:
                            - document
                            - documentType
                            - name
                            - organizationId
                            - type
                          additionalProperties: false
                          description: Organization identity
                      required:
                        - cooperativeId
                        - organizationId
                        - organization
                      additionalProperties: false
                      description: Cooperative
                    paymentId:
                      description: Payment identifier
                      example: null
                      nullable: true
                      type: string
                      format: uuid
                    purchasedByUserId:
                      nullable: true
                      type: string
                      format: uuid
                    code:
                      type: string
                    amount:
                      type: integer
                      exclusiveMinimum: true
                    createdBy:
                      nullable: true
                      type: string
                      format: uuid
                    updatedBy:
                      nullable: true
                      type: string
                      format: uuid
                    canceledAt:
                      nullable: true
                      type: string
                      format: date-time
                    createdAt:
                      type: string
                      format: date-time
                    creditedAt:
                      nullable: true
                      type: string
                      format: date-time
                    payment:
                      nullable: true
                      type: object
                      properties:
                        paymentId:
                          type: string
                          format: uuid
                          description: Payment identifier
                          example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                        orderId:
                          description: Order identifier
                          example: null
                          nullable: true
                          type: string
                          format: uuid
                        organizationId:
                          type: string
                          format: uuid
                          description: Organization identifier
                          example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3c
                        organization:
                          type: object
                          properties:
                            document:
                              description: CNPJ
                              example: 45.723.174/0001-10
                            documentType:
                              type: string
                              enum:
                                - CPF
                                - CNPJ
                                - RG
                              description: Document type
                              example: CNPJ
                            email:
                              description: Contact email
                              example: contato@estrela.com
                              nullable: true
                            legalName:
                              description: Legal name
                              example: Cooperativa Metropolitana de Transporte Ltda.
                              nullable: true
                              type: string
                            logo:
                              description: Logo object key
                              example: >-
                                organizations/0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a/logo/0195e7b2-4a3c-7d3e-9f4a-2c6b8d0e1f3b.png
                              nullable: true
                              type: string
                            name:
                              type: string
                              description: Display name
                              example: Cooperativa Metropolitana
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization identifier
                              example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                            tradeName:
                              description: Trade name
                              example: Metropolitana
                              nullable: true
                              type: string
                            type:
                              type: string
                              enum:
                                - COOPERATIVE
                                - COMPANY
                              description: Organization type
                              example: COOPERATIVE
                          required:
                            - document
                            - documentType
                            - name
                            - organizationId
                            - type
                          additionalProperties: false
                          description: Organization
                        cooperativeId:
                          type: string
                          format: uuid
                          description: Cooperative identifier
                          example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3c
                        cooperative:
                          type: object
                          properties:
                            cooperativeId:
                              type: string
                              format: uuid
                              description: Cooperative identifier
                              example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization identifier
                              example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                            organization:
                              type: object
                              properties:
                                document:
                                  description: CNPJ
                                  example: 45.723.174/0001-10
                                documentType:
                                  type: string
                                  enum:
                                    - CPF
                                    - CNPJ
                                    - RG
                                  description: Document type
                                  example: CNPJ
                                email:
                                  description: Contact email
                                  example: contato@estrela.com
                                  nullable: true
                                legalName:
                                  description: Legal name
                                  example: >-
                                    Cooperativa Metropolitana de Transporte
                                    Ltda.
                                  nullable: true
                                  type: string
                                logo:
                                  description: Logo object key
                                  example: >-
                                    organizations/0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a/logo/0195e7b2-4a3c-7d3e-9f4a-2c6b8d0e1f3b.png
                                  nullable: true
                                  type: string
                                name:
                                  type: string
                                  description: Display name
                                  example: Cooperativa Metropolitana
                                organizationId:
                                  type: string
                                  format: uuid
                                  description: Organization identifier
                                  example: 0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a
                                tradeName:
                                  description: Trade name
                                  example: Metropolitana
                                  nullable: true
                                  type: string
                                type:
                                  type: string
                                  enum:
                                    - COOPERATIVE
                                    - COMPANY
                                  description: Organization type
                                  example: COOPERATIVE
                              required:
                                - document
                                - documentType
                                - name
                                - organizationId
                                - type
                              additionalProperties: false
                              description: Organization identity
                          required:
                            - cooperativeId
                            - organizationId
                            - organization
                          additionalProperties: false
                          description: Cooperative
                        cashSettlementId:
                          description: Cash settlement identifier
                          example: null
                          nullable: true
                          type: string
                          format: uuid
                        externalProvider:
                          type: string
                          description: External provider name
                          example: mock
                        externalProviderId:
                          type: string
                          description: External payment identifier
                          example: pay_a1b2c3d4
                        externalOrderId:
                          description: External order identifier
                          example: order_a1b2c3d4
                          nullable: true
                          type: string
                        description:
                          description: Payment description
                          example: Order payment
                          nullable: true
                          type: string
                        method:
                          type: string
                          enum:
                            - CASH
                            - PIX
                            - CREDIT_CARD
                            - DEBIT_CARD
                          description: Payment method
                          example: PIX
                        channel:
                          type: string
                          enum:
                            - ONLINE
                            - POS
                            - DRIVER_APP
                          description: Payment channel
                          example: ONLINE
                        card:
                          description: Card details
                          nullable: true
                          type: object
                          additionalProperties: {}
                        pix:
                          description: Pix details
                          nullable: true
                          type: object
                          additionalProperties: {}
                        amount:
                          type: integer
                          description: Total amount in cents
                          example: 15000
                        canceledBy:
                          description: Canceled by
                          example: null
                          nullable: true
                          type: string
                          format: uuid
                        status:
                          type: string
                          enum:
                            - ANTIFRAUD_APPROVED
                            - ANTIFRAUD_MANUAL
                            - ANTIFRAUD_PENDING
                            - ANTIFRAUD_REPROVED
                            - CANCELED
                            - CHARGEDBACK
                            - OVERPAID
                            - PAID
                            - PARTIAL_CANCELED
                            - PAYMENT_FAILED
                            - PENDING
                            - PROCESSING
                            - REFUNDED
                            - UNDERPAID
                          description: Payment status
                          example: PENDING
                        createdBy:
                          description: Created by
                          example: null
                          nullable: true
                          type: string
                          format: uuid
                        updatedBy:
                          description: Updated by
                          example: null
                          nullable: true
                          type: string
                          format: uuid
                        canceledAt:
                          nullable: true
                          type: string
                          format: date-time
                        createdAt:
                          type: string
                          format: date-time
                        dueDate:
                          nullable: true
                          type: string
                          format: date-time
                        issuedAt:
                          type: string
                          format: date-time
                        overdueAt:
                          nullable: true
                          type: string
                          format: date-time
                        paidAt:
                          nullable: true
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - paymentId
                        - orderId
                        - organizationId
                        - organization
                        - cooperativeId
                        - cooperative
                        - externalProvider
                        - externalProviderId
                        - externalOrderId
                        - method
                        - channel
                        - amount
                        - status
                        - createdAt
                        - issuedAt
                        - updatedAt
                      additionalProperties: false
                    updatedAt:
                      type: string
                      format: date-time
                  required:
                    - companyCreditPurchaseId
                    - companyCreditAccountId
                    - organizationId
                    - companyId
                    - cooperativeId
                    - cooperative
                    - code
                    - amount
                    - createdAt
                    - updatedAt
                  additionalProperties: false
                  description: Company credit purchase
              meta:
                type: object
                properties:
                  limit:
                    type: number
                    description: Items per page
                    example: 10
                  page:
                    type: number
                    description: Current page
                    example: 1
                  totalItems:
                    type: number
                    description: Total items
                    example: 100
                  totalPages:
                    type: number
                    description: Total pages
                    example: 10
                required:
                  - limit
                  - page
                  - totalItems
                  - totalPages
                additionalProperties: false
            required:
              - data
              - meta
            additionalProperties: false
            description: List company credit purchases
      description: OK
    ListCompanyCreditPurchases400Response:
      content:
        application/json:
          example:
            errors:
              - message: required
                path: name
            message: Bad Request Error
            statusCode: 400
          schema:
            properties:
              message:
                type: string
              statusCode:
                enum:
                  - 400
                type: number
              errors:
                items:
                  properties:
                    message:
                      type: string
                    path:
                      type: string
                  required:
                    - message
                    - path
                  type: object
                type: array
            required:
              - message
              - statusCode
            type: object
      description: Bad Request Error
    ListCompanyCreditPurchases401Response:
      content:
        application/json:
          example:
            message: Missing or invalid access token
            statusCode: 401
          schema:
            properties:
              message:
                type: string
              statusCode:
                enum:
                  - 401
                type: number
            required:
              - message
              - statusCode
            type: object
      description: Unauthorized
    ListCompanyCreditPurchases403Response:
      content:
        application/json:
          example:
            message: Insufficient permissions
            statusCode: 403
          schema:
            properties:
              message:
                type: string
              statusCode:
                enum:
                  - 403
                type: number
            required:
              - message
              - statusCode
            type: object
      description: Forbidden
    ListCompanyCreditPurchases500Response:
      content:
        application/json:
          example:
            message: Internal Server Error
            statusCode: 500
          schema:
            properties:
              message:
                type: string
              statusCode:
                enum:
                  - 500
                type: number
            required:
              - message
              - statusCode
            type: object
      description: Internal Server Error
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````