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

# Attach customer to collection

> Associate a collection transaction with a verified customer.

**Important:** API card collections cannot be updated with this endpoint. Required scope: `collection:create`.



## OpenAPI

````yaml /api-reference/collection/attach-customer-openapi.json post /api/external/collection/attach-customer
openapi: 3.1.0
info:
  title: Blaaiz Platform API - Attach Customer to Collection
  version: 1.0.0
  description: |-
    Associate a collection transaction with a verified customer.

    **Important:** API card collections cannot be updated with this endpoint.
servers:
  - url: https://api-prod.blaaiz.com
  - url: https://api-dev.blaaiz.com
security: []
tags:
  - name: Collection
paths:
  /api/external/collection/attach-customer:
    post:
      tags:
        - Collection
      summary: Attach customer to collection
      description: >-
        Associate a collection transaction with a verified customer.


        **Important:** API card collections cannot be updated with this
        endpoint. Required scope: `collection:create`.
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
            default: application/json
          required: false
          description: Content type header.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttachCustomerRequest'
            example:
              customer_id: 9d4c4ec5-59ea-4130-bf8a-6a5edec401ee
              transaction_id: fb87c0f8-31e3-46f3-b0d3-1ff2618565bc
      responses:
        '200':
          description: Transaction updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachCustomerResponse'
              example:
                message: Transaction updated successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                api_card_collection:
                  value:
                    message: Customer cannot be updated for API card collections.
                customer_not_verified:
                  value:
                    message: >-
                      Customer is not verified. Ensure you have uploaded
                      identify docs for customer.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Invalid or missing access token
      security:
        - oauth2ClientCredentials:
            - collection:create
components:
  schemas:
    AttachCustomerRequest:
      type: object
      properties:
        customer_id:
          type: string
          description: >-
            Unique identifier of the customer. The customer must belong to your
            business and be VERIFIED.
        transaction_id:
          type: string
          description: Unique identifier of the collection transaction.
      required:
        - customer_id
        - transaction_id
    AttachCustomerResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
    Error:
      type: object
      properties:
        message:
          type: string
      required:
        - message
  securitySchemes:
    oauth2ClientCredentials:
      type: oauth2
      description: >-
        Use your OAuth client credentials to obtain a short-lived Bearer token
        from POST /oauth/token.
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes:
            collection:create: Initiate collections.

````