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

# Add aliases to existing orders

> Additively attach alternate order IDs to existing orders. Aliases that already
exist are silently ignored. Orders must already exist.


Additively attach alternate order IDs to existing orders. Aliases that already
exist are silently ignored. Orders must already exist.

<div className="nb-api-tables nb-field-table">
  ## Headers

  | Header | Description |
  | :- | :- |
  | `Authorization` <span className="nb-req">required</span> | Your Northbeam API key |
  | `Data-Client-ID` <span className="nb-req">required</span> | Your Northbeam client ID |
  | `Content-Type` <span className="nb-req">required</span> | `application/json` |

  ## Body

  <div className="nb-table-wrap"><table className="nb-main-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr className="nb-has-children"><td><code>aliases</code> <span className="nb-req">required</span></td><td>object\[]</td><td>Maximum array length: <code>2500</code></td></tr><tr className="nb-children-row"><td /><td /><td colSpan={1}><div className="nb-toggle nb-children"><label><input type="checkbox" /><span>Show child attributes</span></label><div className="nb-toggle-body"><div className="nb-child-table"><div className="nb-ct-head"><div>Field</div><div>Type</div><div>Description</div><div>Example</div></div><div className="nb-ct-row"><div><code>order\_id</code> <span className="nb-req">required</span></div><div>string</div><div>The order\_id to attach this alias to<br />Minimum string length: <code>1</code></div><div /></div><div className="nb-ct-row"><div><code>type</code> <span className="nb-req">required</span></div><div>string</div><div>Alias type identifier<br />Minimum string length: <code>1</code></div><div><code className="nb-ex">"shopify\_checkout\_token"</code></div></div><div className="nb-ct-row"><div><code>id</code> <span className="nb-req">required</span></div><div>string</div><div>The alternate order ID value<br />Minimum string length: <code>1</code></div><div><code className="nb-ex">"abc-xyz-123"</code></div></div></div></div></div></td></tr></tbody></table></div>

  ## Responses

  | Status | Description |
  | :- | :- |
  | `200` | Aliases accepted |
  | `400` | Validation error |
  | `404` | One or more order\_ids not found |
</div>


## OpenAPI

````yaml openapi/orders-v2.json POST /orders/aliases
openapi: 3.1.0
info:
  title: API - Orders - V2
  description: API for syncing data from ecommerce shops to the Northbeam app.
  termsOfService: https://www.northbeam.io/terms
  contact:
    name: Northbeam customer success
    email: success@northbeam.io
  version: 1.1.0
servers:
  - url: https://api.northbeam.io/v2
    description: Production server (uses live data)
  - url: https://api-uat.northbeam.io/v2
    description: >-
      User Acceptance Testing (UAT), Production Equivalent (provided for
      Customer Testing ONLY, orders submitted here do not get used in
      attribution)
security:
  - api_key: []
    client_id: []
tags: []
paths:
  /orders/aliases:
    post:
      summary: Add aliases to existing orders
      description: >
        Additively attach alternate order IDs to existing orders. Aliases that
        already

        exist are silently ignored. Orders must already exist.
      operationId: addOrderAliases
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - aliases
              properties:
                aliases:
                  type: array
                  maxItems: 2500
                  items:
                    type: object
                    additionalProperties: false
                    required:
                      - order_id
                      - type
                      - id
                    properties:
                      order_id:
                        type: string
                        minLength: 1
                        description: The order_id to attach this alias to
                      type:
                        type: string
                        minLength: 1
                        description: Alias type identifier
                        examples:
                          - shopify_checkout_token
                          - custom:legacy_system
                      id:
                        type: string
                        minLength: 1
                        description: The alternate order ID value
                        examples:
                          - abc-xyz-123
      responses:
        '200':
          description: Aliases accepted
        '400':
          description: Validation error
        '404':
          description: One or more order_ids not found
components:
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
    client_id:
      type: apiKey
      name: Data-Client-ID
      in: header

````