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

# Add shipment to order

> Add shipment to order



## OpenAPI

````yaml oms_v1 post /api-order/orders/shipments
openapi: 3.0.0
info:
  description: Order Management System
  version: 1.0.0
  title: Orders v1 (OMS v1)
  contact:
    email: oms-team@fabric.inc
  license:
    name: fabric API license
    url: https://fabric.inc/api-license
servers:
  - url: https://prod01-apigw.{customer_name}.fabric.zone
    description: Production
    variables:
      customer_name:
        default: yourcompany
        description: Customer name, provided by support team
security: []
tags:
  - name: Cart
    description: >-
      Cart APIs<br /><br />**Note:** These are the legacy Cart APIs. To view
      fabric's new Cart APIs, navigate to *Cart API > Cart* from the left side
      navigation pane.
  - name: Bill To
    description: Bill To APIs [Deprecated]
  - name: Ship To
    description: >-
      Ship To APIs<br /><br />**Note:** These are the legacy Ship To APIs. To
      view fabric's new Shipping APIs, navigate to *Cart API > Shipping* from
      the left side navigation pane.
  - name: Wishlist
    description: Wishlist APIs
  - name: Cart Decoupled
    description: Cart Decoupled APIs
  - name: Warehouse
    description: Warehouse APIs
  - name: Inventory
    description: Inventory APIs
  - name: Attributes
    description: >-
      Attributes APIs<br /><br />**Note:** These are the legacy Attribute APIs.
      To view fabric's new Attribute APIs, navigate to *Cart API > Attribute*
      from the left side navigation pane.
  - name: List
    description: List APIs
  - name: Tax/Address Validate
    description: Tax/Address Validate APIs
  - name: Shipping
    description: Shipping APIs
  - name: Payments
    description: Payments APIs
  - name: Order
    description: Order APIs
paths:
  /api-order/orders/shipments:
    post:
      tags:
        - Order
      summary: Add shipment to order
      description: Add shipment to order
      operationId: addShipment
      parameters:
        - in: header
          name: x-api-key
          schema:
            type: string
            example: 0LybWR49k95cCwYh3cu0waCYoh4H2Eux2J52wn4k
        - $ref: '#/components/parameters/xSiteContent'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - orderId
                - shipments
              properties:
                orderId:
                  type: string
                  minLength: 15
                  maxLength: 15
                  example: 2947-5955-82579
                shipments:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - shipmentCarrier
                      - trackingNumber
                      - shipmentStatus
                      - lineItems
                    properties:
                      shipmentRef:
                        type: string
                        example: ref-1234
                      shipmentCarrier:
                        type: string
                        minLength: 3
                        example: FedEx
                      shipmentCarrierUrl:
                        type: string
                        format: uri
                        example: https://www.fedex.com/
                      trackingNumber:
                        type: string
                        example: '2345367890876543'
                      lineItems:
                        type: array
                        minItems: 1
                        items:
                          type: object
                          required:
                            - lineItemId
                            - quantity
                          properties:
                            lineItemId:
                              type: number
                              example: 1
                            quantity:
                              type: number
                              minimum: 1
                      shipmentStatus:
                        type: string
                        example: Delivered
                      shippedDate:
                        type: string
                      estimatedDeliveryDate:
                        type: string
      responses:
        '200':
          description: Successfully Added shipment
          content:
            application/json:
              schema:
                type: object
                properties:
                  orderId:
                    type: string
                    example: 4217-7227-80339
                  status:
                    type: string
                    example: Successfully added shipment
        '400':
          $ref: '#/components/responses/GenericClientError'
        '403':
          $ref: '#/components/responses/MissingXApiKeyHeader'
        '404':
          description: Not Found error while adding shipment to order
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    description: The error code
                    type: string
                  message:
                    description: The error message
                    type: string
              examples:
                OrderLineItemNotFound:
                  value:
                    code: ORDER_LINE_ITEM_NOT_FOUND
                    message: 'Unable to Find lineItemId: 2'
                OrderNotFound:
                  value:
                    code: ORDER_NOT_FOUND
                    message: Order ID Not Found
        '500':
          $ref: '#/components/responses/GenericServerError'
components:
  parameters:
    xSiteContent:
      name: x-site-context
      in: header
      description: >-
        The `x-site-context` header is a JSON object that contains information
        about the source you wish to pull from. The mandatory `account` is the
        24 character identifier found in Copilot. The `channel` (Sales channel
        ID), `stage` (environment name), and `date` attributes can be used to
        further narrow the scope of your data source.
      required: true
      schema:
        type: string
        example: >-
          {"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account":
          "1234abcd5678efgh9ijklmno","stage":"production"}
  responses:
    GenericClientError:
      description: A generic client error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                description: The error code
                type: string
              message:
                description: The error message
                type: string
    MissingXApiKeyHeader:
      description: Missing x-api-key in header
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                description: The error message
                example: Forbidden
                type: string
    GenericServerError:
      description: A generic server error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                description: The error code
                type: string
              message:
                description: The error message
                type: string

````