> ## Documentation Index
> Fetch the complete documentation index at: https://omniflow-vpn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Post v1panelcustomers merge

> Requires customers.write and a reason. Merges the account in the path into the one in the body: subscriptions take new slots, orders, identities, contacts, consents, tickets, and saved methods are reassigned, the wallet balance moves as a compensating pair of ledger entries, and the source is closed pointing at the target.
Idempotent. The closing update matches only an account that has not already been merged, so a resubmitted form reports the earlier merge and moves nothing — `alreadyMerged` says which happened.
Three things are deliberately not a reassignment. A saved cart is cancelled, because one cart may be open per customer. Read markers move only where the target has not read the same post. Saved methods arrive as non-default, because one default per customer is a unique index and the survivor's is the one they last chose.



## OpenAPI

````yaml https://raw.githubusercontent.com/kewldan/omniflow/main/api/openapi.yaml post /v1/panel/customers/{customerID}/merge
openapi: 3.0.3
info:
  title: Omniflow API
  version: 1.0.0
  description: >-
    Customer, commerce, payment, wallet, fulfillment, and operations API for
    Omniflow.
servers: []
security: []
paths:
  /v1/panel/customers/{customerID}/merge:
    post:
      tags:
        - panel
      description: >-
        Requires customers.write and a reason. Merges the account in the path
        into the one in the body: subscriptions take new slots, orders,
        identities, contacts, consents, tickets, and saved methods are
        reassigned, the wallet balance moves as a compensating pair of ledger
        entries, and the source is closed pointing at the target.

        Idempotent. The closing update matches only an account that has not
        already been merged, so a resubmitted form reports the earlier merge and
        moves nothing — `alreadyMerged` says which happened.

        Three things are deliberately not a reassignment. A saved cart is
        cancelled, because one cart may be open per customer. Read markers move
        only where the target has not read the same post. Saved methods arrive
        as non-default, because one default per customer is a unique index and
        the survivor's is the one they last chose.
      operationId: mergePanelCustomer
      parameters:
        - in: path
          name: customerID
          required: true
          schema:
            type: string
            format: uuid
        - $ref: '#/components/parameters/CSRFToken'
        - $ref: '#/components/parameters/OperatorReason'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - into
              properties:
                into:
                  type: string
                  format: uuid
      responses:
        '200':
          description: Merged
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PanelMergeResult'
        '403':
          $ref: '#/components/responses/Problem'
        '404':
          $ref: '#/components/responses/Problem'
        '422':
          $ref: '#/components/responses/Problem'
components:
  parameters:
    CSRFToken:
      in: header
      name: X-CSRF-Token
      required: true
      description: >-
        Echoes the token from the current session. Required on every unsafe
        method.
      schema:
        type: string
    OperatorReason:
      in: header
      name: X-Operator-Reason
      required: true
      description: >-
        Why the change is being made. Carried as a header because almost every
        operations mutation needs one; the API refuses a change that requires a
        reason and did not get one.
      schema:
        type: string
        minLength: 1
        maxLength: 400
  schemas:
    PanelMergeResult:
      type: object
      required:
        - source
        - target
        - alreadyMerged
      properties:
        source:
          type: string
          format: uuid
        target:
          type: string
          format: uuid
        alreadyMerged:
          type: boolean
          description: True when this merge had already happened and nothing moved.
        moved:
          $ref: '#/components/schemas/PanelMergeSide'
        wallet:
          type: array
          items:
            $ref: '#/components/schemas/PanelMergeBalance'
    PanelMergeSide:
      type: object
      required:
        - id
        - status
        - createdAt
        - activeSubscriptions
        - orders
        - tickets
        - identities
        - referralsMade
        - trialClaims
        - wallet
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        activeSubscriptions:
          type: integer
          format: int64
        orders:
          type: integer
          format: int64
        tickets:
          type: integer
          format: int64
        identities:
          type: integer
          format: int64
        referralsMade:
          type: integer
          format: int64
        trialClaims:
          type: integer
          format: int64
        wallet:
          type: array
          items:
            $ref: '#/components/schemas/PanelMergeBalance'
        mergedInto:
          type: string
          format: uuid
          description: Set when this account has already been absorbed.
    PanelMergeBalance:
      type: object
      required:
        - currency
        - balanceMinor
      properties:
        currency:
          type: string
        balanceMinor:
          type: integer
          format: int64
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        request_id:
          type: string
  responses:
    Problem:
      description: Request failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.