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

# List purchases

> Lists purchases with customer, status, platform, date range, and amount filters.



## OpenAPI

````yaml /openapi.en.json get /v1/purchases
openapi: 3.1.0
info:
  title: Bevits API
  version: 1.0.0
  description: >-
    Public read-only API for querying CRM, purchase, and automation data from a
    Bevits organization.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.bevits.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: System
    description: API availability.
  - name: Identity
    description: Organization and API key identity.
  - name: Customers
    description: Customers and their relationships.
  - name: Segments
    description: Customer segments.
  - name: Purchases
    description: Purchases imported from integrations.
  - name: CRM data
    description: Tags and attribute definitions.
  - name: Automations
    description: Automation flows.
  - name: Campaigns
    description: Email campaigns.
paths:
  /v1/purchases:
    get:
      tags:
        - Purchases
      summary: List purchases
      description: >-
        Lists purchases with customer, status, platform, date range, and amount
        filters.
      operationId: listPurchases
      parameters:
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/PurchaseCursor'
        - $ref: '#/components/parameters/CustomerFilter'
        - $ref: '#/components/parameters/PurchaseStatus'
        - $ref: '#/components/parameters/Platform'
        - $ref: '#/components/parameters/CreatedSince'
        - $ref: '#/components/parameters/CreatedUntil'
        - $ref: '#/components/parameters/MinValue'
        - $ref: '#/components/parameters/MaxValue'
      responses:
        '200':
          $ref: '#/components/responses/PurchasePage'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    Limit:
      name: limit
      in: query
      description: Maximum number of items per page.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
    PurchaseCursor:
      name: starting_after
      in: query
      description: ID of the last purchase on the previous page.
      schema:
        type: string
        pattern: ^pur_[A-Za-z0-9_-]+$
    CustomerFilter:
      name: customer_id
      in: query
      description: Filters purchases by customer.
      schema:
        type: string
        pattern: ^cus_[A-Za-z0-9_-]+$
    PurchaseStatus:
      name: status
      in: query
      description: Filters by purchase payment status.
      schema:
        type: string
        enum:
          - any
          - pending
          - authorized
          - paid
          - abandoned
          - refunded
          - voided
    Platform:
      name: platform
      in: query
      description: Filters by source platform.
      schema:
        type: string
        enum:
          - nuvemshop
          - shopify
          - woocommerce
          - bling
          - instagram
          - popup
    CreatedSince:
      name: created_since
      in: query
      description: Includes items created at or after this instant.
      schema:
        type: string
        format: date-time
    CreatedUntil:
      name: created_until
      in: query
      description: Includes items created at or before this instant.
      schema:
        type: string
        format: date-time
    MinValue:
      name: min_value_in_cents
      in: query
      description: Minimum purchase amount in cents.
      schema:
        type: integer
        minimum: 0
    MaxValue:
      name: max_value_in_cents
      in: query
      description: Maximum purchase amount in cents.
      schema:
        type: integer
        minimum: 0
  responses:
    PurchasePage:
      description: Purchase page.
      headers:
        ETag:
          $ref: '#/components/headers/ETag'
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PurchasePage'
    Unauthorized:
      description: Missing, invalid, expired, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: authentication_error
              message: Invalid API key.
              request_id: req_07f6cdc3c20249d6afcd90b4
    ValidationError:
      description: A parameter failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: validation_error
              message: Invalid query parameters.
              param: limit
              request_id: req_07f6cdc3c20249d6afcd90b4
    RateLimited:
      description: Request limit exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  headers:
    ETag:
      description: Content version identifier for conditional caching.
      schema:
        type: string
        example: '"v1-4ad31f5efb6b8f35"'
    RequestId:
      description: Request identifier for support and tracing.
      schema:
        type: string
        pattern: ^req_[a-f0-9]{24}$
    RetryAfter:
      description: Seconds before retrying.
      schema:
        type: integer
        minimum: 1
    RateLimitLimit:
      description: Total limit for the current window.
      schema:
        type: integer
        example: 600
    RateLimitRemaining:
      description: Requests remaining in the current window.
      schema:
        type: integer
        example: 599
    RateLimitReset:
      description: UTC instant when the current window ends.
      schema:
        type: string
        format: date-time
  schemas:
    PurchasePage:
      allOf:
        - $ref: '#/components/schemas/Page'
        - type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/Purchase'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    RateLimitErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          required:
            - retry_after
          properties:
            retry_after:
              type: integer
              minimum: 1
              description: Seconds before retrying.
    Page:
      type: object
      required:
        - data
        - has_more
      properties:
        has_more:
          type: boolean
          description: Indicates whether another page is available.
    Purchase:
      type: object
      required:
        - object
        - id
        - customer_id
        - purchase_value_in_cents
        - created_at
        - updated_at
      properties:
        object:
          type: string
          const: purchase
        id:
          type: string
          pattern: ^pur_[A-Za-z0-9_-]+$
        customer_id:
          type: string
          pattern: ^cus_[A-Za-z0-9_-]+$
        order_id_on_integration_platform:
          type: string
        order_number:
          type: string
        platform:
          type: string
        status:
          type: string
        payment_status:
          type: string
        shipping_status:
          type: string
        currency:
          type: string
          example: BRL
        purchase_value_in_cents:
          type: integer
        subtotal_amount_in_cents:
          type: integer
        total_amount_in_cents:
          type: integer
        discount_in_cents:
          type: integer
        shipping_cost_customer_in_cents:
          type: integer
        coupons:
          type: array
          items:
            $ref: '#/components/schemas/Coupon'
        attributed_flow_ids:
          type: array
          items:
            type: string
            pattern: ^flw_[A-Za-z0-9_-]+$
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - type
        - message
        - request_id
      properties:
        type:
          type: string
          enum:
            - authentication_error
            - conflict
            - internal_error
            - invalid_request
            - not_found
            - permission_denied
            - rate_limited
            - validation_error
        message:
          type: string
        param:
          type: string
        request_id:
          type: string
          pattern: ^req_[a-f0-9]{24}$
    Coupon:
      type: object
      required:
        - id
        - code
        - value
        - type
      properties:
        id:
          type: string
        code:
          type: string
        value:
          type: number
        type:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: bvt_live_...
      description: API key created in the organization settings.

````