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

# Merge customers

> Merges one customer into another.



## OpenAPI

````yaml post /v1/businesses/{businessId}/customers/{customerId}/merge
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/customers/{customerId}/merge:
    post:
      tags: []
      summary: Merge customers
      description: Merges one customer into another.
      operationId: business.customers.merge
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business the customers belong to.
          required: true
          schema:
            type: string
            format: uuid
        - name: customerId
          in: path
          description: The UUID of the customer to merge into (target customer).
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MergeCustomerRequest'
      responses:
        '200':
          description: Customers merged successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCustomerData'
components:
  schemas:
    MergeCustomerRequest:
      type: object
      required:
        - customer_to_archive_id
      properties:
        customer_to_archive_id:
          type: string
          format: uuid
          description: UUID of the customer that will be archived after merging.
    ApiCustomerData:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the customer.
        external_id:
          type: string
          description: >-
            Unique ID of the customer in your system for linking purposes.
            **Idempotency key**.
          example: '31415926535'
        individual_name:
          type: string
          nullable: true
          description: >-
            Full name of the individual customer or contact at a corporate
            customer.
        company_name:
          type: string
          nullable: true
          description: Name of the company customer.
        email:
          type: string
          nullable: true
          description: Email address of the customer.
        mobile_phone:
          type: string
          nullable: true
          description: Mobile phone number of the customer.
        office_phone:
          type: string
          nullable: true
          description: Office phone number of the customer.
        address_string:
          type: string
          nullable: true
          description: Address of the customer.
        memo:
          type: string
          nullable: true
          description: >-
            Memo for any text you would like to associate with the customer (for
            example, to display to end users).
        status:
          type: string
          description: 'Status of the customer. Possible values: `ACTIVE`, `ARCHIVED`.'
          example: ACTIVE
        transaction_tags:
          type: array
          items:
            $ref: '#/components/schemas/ApiTag'
    ApiTag:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID for the tag.
        key:
          type: string
          description: Key for the tag.
          example: ExampleTagKey
        dimension_display_name:
          type: string
          nullable: true
          description: Display name for the tag dimension.
        value:
          type: string
          description: Value for the tag.
          example: ExampleTagValue
        value_display_name:
          type: string
          nullable: true
          description: Display name for the tag value definition.
        dimension_id:
          type: string
          format: uuid
          description: ID of the tag dimension this tag belongs to.
        definition_id:
          type: string
          format: uuid
          description: ID of the tag value definition.
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: When the tag was archived.
      required:
        - id
        - key
        - value
        - dimension_id
        - definition_id
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````