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

# Export buyers

> Download all buyers on your platform as a CSV file. Returns a complete, unpaginated export of buyer records – ideal for reporting and bulk data sync.

The export endpoint streams all buyers associated with your platform as a single CSV file. Unlike the paginated `GET /v1/buyers` endpoint, this response is not split into pages – every matching buyer is included in one response. This makes it the right tool for bulk reporting, reconciliation workflows, and data syncs with external systems such as a CRM or ERP. The response `Content-Type` is `text/csv` and includes a header row with column names.

<Note>
  The `limit` and `offset` pagination parameters used by `GET /v1/buyers` are not supported on this endpoint. All buyers
  matching your filter criteria are included in the CSV response regardless of volume.
</Note>

<Tip>
  When saving the CSV output with `curl`, use the `--output` flag to write the response body directly to a file. Without it, the
  raw CSV content will print to stdout.
</Tip>


## OpenAPI

````yaml GET /v1/buyers/export/csv
openapi: 3.0.0
info:
  version: 0.0.1
  title: Tilta API
  description: Tilta API documentation
servers:
  - url: https://api.tilta.io
    description: Tilta Production API
  - url: https://api.tilta-sandbox.io
    description: Tilta Sandbox API
security: []
paths:
  /v1/buyers/export/csv:
    get:
      tags:
        - Buyers
      summary: Export buyers
      description: >-
        Export buyers as CSV. Uses the same filters and sort as GET /v1/buyers;
        list pagination (limit/offset) is not applied – all matching buyers are
        streamed.
      parameters:
        - schema:
            type: string
            description: Buyer's IDs to filter in buyers.
            example: buyer_123,buyer_456
          required: false
          description: Buyer's IDs to filter in buyers.
          name: external_id
          in: query
        - schema:
            type: string
            description: Buyer's legal name to filter in buyers.
          required: false
          description: Buyer's legal name to filter in buyers.
          name: legal_name
          in: query
        - schema:
            type: string
            description: Buyer's trading name to filter in buyers.
          required: false
          description: Buyer's trading name to filter in buyers.
          name: trading_name
          in: query
        - schema:
            type: string
            description: Buyer's legal forms to filter in buyers.
            example: LIMITED_COMPANY,PUBLIC_COMPANY
          required: false
          description: Buyer's legal forms to filter in buyers.
          name: legal_form
          in: query
        - schema:
            type: string
            description: >-
              Created at range filter (unix timestamps in seconds). Format:
              "gte..lte" where each bound is optional (e.g.
              "1580515200..1583020800").
            example: 1580515200..1583020800
          required: false
          description: >-
            Created at range filter (unix timestamps in seconds). Format:
            "gte..lte" where each bound is optional (e.g.
            "1580515200..1583020800").
          name: created_at
          in: query
        - schema:
            type: string
            description: Buyer's billing address countries to filter in buyers.
            example: DE,AT
          required: false
          description: Buyer's billing address countries to filter in buyers.
          name: business_address_country
          in: query
        - schema:
            type: string
            description: Buyer's billing address city to filter in buyers.
          required: false
          description: Buyer's billing address city to filter in buyers.
          name: business_address_city
          in: query
        - schema:
            type: string
            description: Buyer's billing address street to filter in buyers.
          required: false
          description: Buyer's billing address street to filter in buyers.
          name: business_address_street
          in: query
        - schema:
            type: string
            description: Buyer's billing address postcode to filter in buyers.
          required: false
          description: Buyer's billing address postcode to filter in buyers.
          name: business_address_postcode
          in: query
        - schema:
            type: string
            description: Buyer's delivery address countries to filter in buyers.
            example: DE,AT
          required: false
          description: Buyer's delivery address countries to filter in buyers.
          name: delivery_address_country
          in: query
        - schema:
            type: string
            description: Buyer's delivery address city to filter in buyers.
          required: false
          description: Buyer's delivery address city to filter in buyers.
          name: delivery_address_city
          in: query
        - schema:
            type: string
            description: Buyer's delivery address street to filter in buyers.
          required: false
          description: Buyer's delivery address street to filter in buyers.
          name: delivery_address_street
          in: query
        - schema:
            type: string
            description: Buyer's delivery address postcode to filter in buyers.
          required: false
          description: Buyer's delivery address postcode to filter in buyers.
          name: delivery_address_postcode
          in: query
        - schema:
            type: string
            description: Buyer's VAT IDs to filter in buyers.
          required: false
          description: Buyer's VAT IDs to filter in buyers.
          name: vat_id
          in: query
        - schema:
            type: string
            description: >-
              Maximum days past due range to filter buyers by, in the format
              gte..lte.
            example: 15..30
          required: false
          description: >-
            Maximum days past due range to filter buyers by, in the format
            gte..lte.
          name: max_days_past_due
          in: query
        - schema:
            type: string
            description: >-
              Sort buyers by provided field in ascending or descending order.
              Prefix field with - for descending order. Example:
              sort_by=-created_at
          required: false
          description: >-
            Sort buyers by provided field in ascending or descending order.
            Prefix field with - for descending order. Example:
            sort_by=-created_at
          name: sort_by
          in: query
        - schema:
            type: array
            nullable: true
            items:
              type: string
              enum:
                - contacts
            description: >-
              Buyer sub-entities to expand in the response object. Currently
              supported: contacts (buyer contacts).
            example:
              - contacts
          required: false
          description: >-
            Buyer sub-entities to expand in the response object. Currently
            supported: contacts (buyer contacts).
          name: expand
          in: query
        - schema:
            type: array
            nullable: true
            items:
              type: string
              enum:
                - contacts
          required: false
          name: expand[]
          in: query
        - schema:
            type: string
            enum:
              - COMMA
              - SEMICOLON
            default: COMMA
          required: false
          name: delimiter
          in: query
      responses:
        '200':
          description: ''
          content:
            text/csv:
              schema:
                $ref: '#/components/schemas/csvExportResponseSchema'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequestSchema'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedRequestSchema'
      security:
        - bearerAuth: []
components:
  schemas:
    csvExportResponseSchema:
      type: string
      format: binary
      description: CSV payload streamed as the response body.
    badRequestSchema:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: BAD_REQUEST
        error:
          type: string
          description: Error message for debugging purposes
          example: Request validation failed. 1 issue found.
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Issue code
                example: INVALID_TYPE
              path:
                type: string
                description: Issue path starting with body, params, querystring, or headers
                example: body.registered_at
              message:
                type: string
                description: Issue message for debugging purposes
                example: Invalid type
            required:
              - code
              - path
              - message
          description: List of issues
          example:
            - code: INVALID_TYPE
              path: body.registered_at
              message: Invalid type
      required:
        - code
        - error
        - issues
      description: Bad Request, see error message for details.
      example:
        code: BAD_REQUEST
        error: Request validation failed. 1 issue found.
        issues:
          - code: INVALID_TYPE
            path: body.registered_at
            message: Invalid type
    unauthorizedRequestSchema:
      type: object
      properties:
        error:
          type: string
          description: Error details.
          example: Unauthorized
        code:
          type: string
          description: Error code.
          example: UNAUTHORIZED
      required:
        - error
        - code
      description: Unauthorized Request.
      example:
        error: Unauthorized
        code: UNAUTHORIZED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your Tilta API key, sent as `Bearer <key>`.

````