Create new shipment - Fabric

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Skip to main content

Create new shipment

cURL

curl --request POST \
  --url https://api.fabric.inc/v3/shipments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-fabric-channel-id: <x-fabric-channel-id>' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
  --data '
{
  "allocationId": "112345678912340",
  "shipmentNumber": "78974156816152",
  "attributes": {
    "attribute1": "value"
  },
  "cartons": [\
    {\
      "cartonNumber": "1",\
      "cartonType": "Package",\
      "estimatedDeliveryDate": "2023-03-26T07:58:30.996Z",\
      "estimatedShipDate": "2023-03-25T07:58:30.996Z",\
      "items": [\
        {\
          "lineItemId": "1",\
          "shippedQuantity": 2,\
          "attributes": {\
            "attribute1": "value"\
          },\
          "fees": [\
            {\
              "amount": 34.56,\
              "amountInCurrencies": [\
                {\
                  "currency": "USD",\
                  "group": "SHOPPER",\
                  "amount": 123.45\
                }\
              ],\
              "name": "RETURN_FEE",\
              "reason": "Return fee",\
              "type": "FEE"\
            }\
          ],\
          "giftCards": [\
            {\
              "amount": 50,\
              "giftCardNumber": "453456765"\
            }\
          ],\
          "itemId": 100023,\
          "orderId": "6413e370cb0dc859b6c0dcb0",\
          "orderNumber": "309020213",\
          "shipmentExternalId": "123k4h123k",\
          "orderedQuantity": 2,\
          "refundAmount": 10,\
          "refundAmountInCurrencies": [\
            {\
              "currency": "USD",\
              "group": "SHOPPER",\
              "amount": 123.45\
            }\
          ],\
          "returnQuantity": 1,\
          "returnRequestCounter": 1,\
          "segment": "segment",\
          "sku": "SKU0023",\
          "uom": "EA",\
          "vendorId": "56"\
        }\
      ],\
      "promisedDeliveryDate": "2023-03-26T07:58:30.996Z",\
      "shipmentCarrier": "FEDEX",\
      "shipmentMethod": "ground",\
      "tracking": [\
        {\
          "event": "picked up",\
          "eventId": "627963716b19511e8a3a631b",\
          "eventRecordedAt": "2019-09-30T07:58:30.996Z",\
          "location": "Reno, NV",\
          "notes": {\
            "description": "Shipment picked up"\
          },\
          "shipmentCarrier": "FEDEX"\
        }\
      ],\
      "trackingNumber": "1Z999AA10123456784",\
      "trackingURL": "https://fedex.com/tracking",\
      "weight": "500 gram"\
    }\
  ],
  "invoiceId": "63ef4360aafa8a7f5247fe48",
  "locationNumber": "WH334",
  "locationType": "DC",
  "masterTrackingNumber": "TX112345678",
  "poNumber": "1125",
  "recipients": [\
    {\
      "email": "support@example.inc",\
      "name": {\
        "firstName": "Alex",\
        "lastName": "Doe",\
        "middleName": "E"\
      },\
      "phone": {\
        "number": "123-456-7890",\
        "type": "MOBILE"\
      }\
    }\
  ],
  "reshipmentReasonCode": "Order is missing",
  "scratchedItems": [\
    {\
      "lineItemId": "2",\
      "quantity": 1,\
      "reasonCode": "ReasonCode23454",\
      "attributes": {\
        "attribute1": "value"\
      },\
      "itemId": 100043,\
      "orderId": "6413e370cb0dc859b6c0dcb0",\
      "orderNumber": 309020213,\
      "sku": "SKU00043",\
      "shipmentExternalId": "123k4h123k",\
      "subReasonCode": "SubReasonCode23242",\
      "uom": "EA"\
    }\
  ],
  "shipToId": "sg6683620405",
  "shipmentId": "627963716b19511e8a3a631b",
  "shipmentExternalId": "123k4h123k",
  "shippedAt": "2023-04-06T07:58:30.996Z",
  "statusCode": "SHIPMENT_CREATED",
  "subtype": "COD",
  "totalCartons": 2,
  "type": "STANDARD",
  "vendorId": "56"
}
'
import requests

url = "https://api.fabric.inc/v3/shipments"

payload = {
    "allocationId": "112345678912340",
    "shipmentNumber": "78974156816152",
    "attributes": { "attribute1": "value" },
    "cartons": [\
        {\
            "cartonNumber": "1",\
            "cartonType": "Package",\
            "estimatedDeliveryDate": "2023-03-26T07:58:30.996Z",\
            "estimatedShipDate": "2023-03-25T07:58:30.996Z",\
            "items": [\
                {\
                    "lineItemId": "1",\
                    "shippedQuantity": 2,\
                    "attributes": { "attribute1": "value" },\
                    "fees": [\
                        {\
                            "amount": 34.56,\
                            "amountInCurrencies": [\
                                {\
                                    "currency": "USD",\
                                    "group": "SHOPPER",\
                                    "amount": 123.45\
                                }\
                            ],\
                            "name": "RETURN_FEE",\
                            "reason": "Return fee",\
                            "type": "FEE"\
                        }\
                    ],\
                    "giftCards": [\
                        {\
                            "amount": 50,\
                            "giftCardNumber": "453456765"\
                        }\
                    ],\
                    "itemId": 100023,\
                    "orderId": "6413e370cb0dc859b6c0dcb0",\
                    "orderNumber": "309020213",\
                    "shipmentExternalId": "123k4h123k",\
                    "orderedQuantity": 2,\
                    "refundAmount": 10,\
                    "refundAmountInCurrencies": [\
                        {\
                            "currency": "USD",\
                            "group": "SHOPPER",\
                            "amount": 123.45\
                        }\
                    ],\
                    "returnQuantity": 1,\
                    "returnRequestCounter": 1,\
                    "segment": "segment",\
                    "sku": "SKU0023",\
                    "uom": "EA",\
                    "vendorId": "56"\
                }\
            ],\
            "promisedDeliveryDate": "2023-03-26T07:58:30.996Z",\
            "shipmentCarrier": "FEDEX",\
            "shipmentMethod": "ground",\
            "tracking": [\
                {\
                    "event": "picked up",\
                    "eventId": "627963716b19511e8a3a631b",\
                    "eventRecordedAt": "2019-09-30T07:58:30.996Z",\
                    "location": "Reno, NV",\
                    "notes": { "description": "Shipment picked up" },\
                    "shipmentCarrier": "FEDEX"\
                }\
            ],\
            "trackingNumber": "1Z999AA10123456784",\
            "trackingURL": "https://fedex.com/tracking",\
            "weight": "500 gram"\
        }\
    ],
    "invoiceId": "63ef4360aafa8a7f5247fe48",
    "locationNumber": "WH334",
    "locationType": "DC",
    "masterTrackingNumber": "TX112345678",
    "poNumber": "1125",
    "recipients": [\
        {\
            "email": "support@example.inc",\
            "name": {\
                "firstName": "Alex",\
                "lastName": "Doe",\
                "middleName": "E"\
            },\
            "phone": {\
                "number": "123-456-7890",\
                "type": "MOBILE"\
            }\
        }\
    ],
    "reshipmentReasonCode": "Order is missing",
    "scratchedItems": [\
        {\
            "lineItemId": "2",\
            "quantity": 1,\
            "reasonCode": "ReasonCode23454",\
            "attributes": { "attribute1": "value" },\
            "itemId": 100043,\
            "orderId": "6413e370cb0dc859b6c0dcb0",\
            "orderNumber": 309020213,\
            "sku": "SKU00043",\
            "shipmentExternalId": "123k4h123k",\
            "subReasonCode": "SubReasonCode23242",\
            "uom": "EA"\
        }\
    ],
    "shipToId": "sg6683620405",
    "shipmentId": "627963716b19511e8a3a631b",
    "shipmentExternalId": "123k4h123k",
    "shippedAt": "2023-04-06T07:58:30.996Z",
    "statusCode": "SHIPMENT_CREATED",
    "subtype": "COD",
    "totalCartons": 2,
    "type": "STANDARD",
    "vendorId": "56"
}
headers = {
    "x-fabric-tenant-id": "<x-fabric-tenant-id>",
    "x-fabric-channel-id": "<x-fabric-channel-id>",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {
    'x-fabric-tenant-id': '<x-fabric-tenant-id>',
    'x-fabric-channel-id': '<x-fabric-channel-id>',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    allocationId: '112345678912340',
    shipmentNumber: '78974156816152',
    attributes: {attribute1: 'value'},
    cartons: [\
      {\
        cartonNumber: '1',\
        cartonType: 'Package',\
        estimatedDeliveryDate: '2023-03-26T07:58:30.996Z',\
        estimatedShipDate: '2023-03-25T07:58:30.996Z',\
        items: [\
          {\
            lineItemId: '1',\
            shippedQuantity: 2,\
            attributes: {attribute1: 'value'},\
            fees: [\
              {\
                amount: 34.56,\
                amountInCurrencies: [{currency: 'USD', group: 'SHOPPER', amount: 123.45}],\
                name: 'RETURN_FEE',\
                reason: 'Return fee',\
                type: 'FEE'\
              }\
            ],\
            giftCards: [{amount: 50, giftCardNumber: '453456765'}],\
            itemId: 100023,\
            orderId: '6413e370cb0dc859b6c0dcb0',\
            orderNumber: '309020213',\
            shipmentExternalId: '123k4h123k',\
            orderedQuantity: 2,\
            refundAmount: 10,\
            refundAmountInCurrencies: [{currency: 'USD', group: 'SHOPPER', amount: 123.45}],\
            returnQuantity: 1,\
            returnRequestCounter: 1,\
            segment: 'segment',\
            sku: 'SKU0023',\
            uom: 'EA',\
            vendorId: '56'\
          }\
        ],\
        promisedDeliveryDate: '2023-03-26T07:58:30.996Z',\
        shipmentCarrier: 'FEDEX',\
        shipmentMethod: 'ground',\
        tracking: [\
          {\
            event: 'picked up',\
            eventId: '627963716b19511e8a3a631b',\
            eventRecordedAt: '2019-09-30T07:58:30.996Z',\
            location: 'Reno, NV',\
            notes: {description: 'Shipment picked up'},\
            shipmentCarrier: 'FEDEX'\
          }\
        ],\
        trackingNumber: '1Z999AA10123456784',\
        trackingURL: 'https://fedex.com/tracking',\
        weight: '500 gram'\
      }\
    ],
    invoiceId: '63ef4360aafa8a7f5247fe48',
    locationNumber: 'WH334',
    locationType: 'DC',
    masterTrackingNumber: 'TX112345678',
    poNumber: '1125',
    recipients: [\
      {\
        email: 'support@example.inc',\
        name: {firstName: 'Alex', lastName: 'Doe', middleName: 'E'},\
        phone: {number: '123-456-7890', type: 'MOBILE'}\
      }\
    ],
    reshipmentReasonCode: 'Order is missing',
    scratchedItems: [\
      {\
        lineItemId: '2',\
        quantity: 1,\
        reasonCode: 'ReasonCode23454',\
        attributes: {attribute1: 'value'},\
        itemId: 100043,\
        orderId: '6413e370cb0dc859b6c0dcb0',\
        orderNumber: 309020213,\
        sku: 'SKU00043',\
        shipmentExternalId: '123k4h123k',\
        subReasonCode: 'SubReasonCode23242',\
        uom: 'EA'\
      }\
    ],
    shipToId: 'sg6683620405',
    shipmentId: '627963716b19511e8a3a631b',
    shipmentExternalId: '123k4h123k',
    shippedAt: '2023-04-06T07:58:30.996Z',
    statusCode: 'SHIPMENT_CREATED',
    subtype: 'COD',
    totalCartons: 2,
    type: 'STANDARD',
    vendorId: '56'
  })
};

fetch('https://api.fabric.inc/v3/shipments', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [\
  CURLOPT_URL => "https://api.fabric.inc/v3/shipments",\
  CURLOPT_RETURNTRANSFER => true,\
  CURLOPT_ENCODING => "",\
  CURLOPT_MAXREDIRS => 10,\
  CURLOPT_TIMEOUT => 30,\
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
  CURLOPT_CUSTOMREQUEST => "POST",\
  CURLOPT_POSTFIELDS => json_encode([\
    'allocationId' => '112345678912340',\
    'shipmentNumber' => '78974156816152',\
    'attributes' => [\
        'attribute1' => 'value'\
    ],\
    'cartons' => [\
        [\
                'cartonNumber' => '1',\
                'cartonType' => 'Package',\
                'estimatedDeliveryDate' => '2023-03-26T07:58:30.996Z',\
                'estimatedShipDate' => '2023-03-25T07:58:30.996Z',\
                'items' => [\
                                [\
                                                                'lineItemId' => '1',\
                                                                'shippedQuantity' => 2,\
                                                                'attributes' => [\
                                                                                                                                'attribute1' => 'value'\
                                                                ],\
                                                                'fees' => [\
                                                                                                                                [\
                                                                                                                                                                                                                                                                'amount' => 34.56,\
                                                                                                                                                                                                                                                                'amountInCurrencies' => [\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'currency' => 'USD',\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'group' => 'SHOPPER',\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'amount' => 123.45\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ]\
                                                                                                                                                                                                                                                                ],\
                                                                                                                                                                                                                                                                'name' => 'RETURN_FEE',\
                                                                                                                                                                                                                                                                'reason' => 'Return fee',\
                                                                                                                                                                                                                                                                'type' => 'FEE'\
                                                                                                                                ]\
                                                                ],\
                                                                'giftCards' => [\
                                                                                                                                [\
                                                                                                                                                                                                                                                                'amount' => 50,\
                                                                                                                                                                                                                                                                'giftCardNumber' => '453456765'\
                                                                                                                                ]\
                                                                ],\
                                                                'itemId' => 100023,\
                                                                'orderId' => '6413e370cb0dc859b6c0dcb0',\
                                                                'orderNumber' => '309020213',\
                                                                'shipmentExternalId' => '123k4h123k',\
                                                                'orderedQuantity' => 2,\
                                                                'refundAmount' => 10,\
                                                                'refundAmountInCurrencies' => [\
                                                                                                                                [\
                                                                                                                                                                                                                                                                'currency' => 'USD',\
                                                                                                                                                                                                                                                                'group' => 'SHOPPER',\
                                                                                                                                                                                                                                                                'amount' => 123.45\
                                                                                                                                ]\
                                                                ],\
                                                                'returnQuantity' => 1,\
                                                                'returnRequestCounter' => 1,\
                                                                'segment' => 'segment',\
                                                                'sku' => 'SKU0023',\
                                                                'uom' => 'EA',\
                                                                'vendorId' => '56'\
                                ]\
                ],\
                'promisedDeliveryDate' => '2023-03-26T07:58:30.996Z',\
                'shipmentCarrier' => 'FEDEX',\
                'shipmentMethod' => 'ground',\
                'tracking' => [\
                                [\
                                                                'event' => 'picked up',\
                                                                'eventId' => '627963716b19511e8a3a631b',\
                                                                'eventRecordedAt' => '2019-09-30T07:58:30.996Z',\
                                                                'location' => 'Reno, NV',\
                                                                'notes' => [\
                                                                                                                                'description' => 'Shipment picked up'\
                                                                ],\
                                                                'shipmentCarrier' => 'FEDEX'\
                                ]\
                ],\
                'trackingNumber' => '1Z999AA10123456784',\
                'trackingURL' => 'https://fedex.com/tracking',\
                'weight' => '500 gram'\
        ]\
    ],\
    'invoiceId' => '63ef4360aafa8a7f5247fe48',\
    'locationNumber' => 'WH334',\
    'locationType' => 'DC',\
    'masterTrackingNumber' => 'TX112345678',\
    'poNumber' => '1125',\
    'recipients' => [\
        [\
                'email' => 'support@example.inc',\
                'name' => [\
                                'firstName' => 'Alex',\
                                'lastName' => 'Doe',\
                                'middleName' => 'E'\
                ],\
                'phone' => [\
                                'number' => '123-456-7890',\
                                'type' => 'MOBILE'\
                ]\
        ]\
    ],\
    'reshipmentReasonCode' => 'Order is missing',\
    'scratchedItems' => [\
        [\
                'lineItemId' => '2',\
                'quantity' => 1,\
                'reasonCode' => 'ReasonCode23454',\
                'attributes' => [\
                                'attribute1' => 'value'\
                ],\
                'itemId' => 100043,\
                'orderId' => '6413e370cb0dc859b6c0dcb0',\
                'orderNumber' => 309020213,\
                'sku' => 'SKU00043',\
                'shipmentExternalId' => '123k4h123k',\
                'subReasonCode' => 'SubReasonCode23242',\
                'uom' => 'EA'\
        ]\
    ],\
    'shipToId' => 'sg6683620405',\
    'shipmentId' => '627963716b19511e8a3a631b',\
    'shipmentExternalId' => '123k4h123k',\
    'shippedAt' => '2023-04-06T07:58:30.996Z',\
    'statusCode' => 'SHIPMENT_CREATED',\
    'subtype' => 'COD',\
    'totalCartons' => 2,\
    'type' => 'STANDARD',\
    'vendorId' => '56'\
  ]),\
  CURLOPT_HTTPHEADER => [\
    "Authorization: Bearer <token>",\
    "Content-Type: application/json",\
    "x-fabric-channel-id: <x-fabric-channel-id>",\
    "x-fabric-tenant-id: <x-fabric-tenant-id>"\
  ],\
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io"
)

func main() {

url := "https://api.fabric.inc/v3/shipments"

payload := strings.NewReader("{\n  \"allocationId\": \"112345678912340\",\n  \"shipmentNumber\": \"78974156816152\",\n  \"attributes\": {\n    \"attribute1\": \"value\"\n  },\n  \"cartons\": [\n    {\n      \"cartonNumber\": \"1\",\n      \"cartonType\": \"Package\",\n      \"estimatedDeliveryDate\": \"2023-03-26T07:58:30.996Z\",\n      \"estimatedShipDate\": \"2023-03-25T07:58:30.996Z\",\n      \"items\": [\n        {\n          \"lineItemId\": \"1\",\n          \"shippedQuantity\": 2,\n          \"attributes\": {\n            \"attribute1\": \"value\"\n          },\n          \"fees\": [\n            {\n              \"amount\": 34.56,\n              \"amountInCurrencies\": [\n                {\n                  \"currency\": \"USD\",\n                  \"group\": \"SHOPPER\",\n                  \"amount\": 123.45\n                }\n              ],\n              \"name\": \"RETURN_FEE\",\n              \"reason\": \"Return fee\",\n              \"type\": \"FEE\"\n            }\n          ],\n          \"giftCards\": [\n            {\n              \"amount\": 50,\n              \"giftCardNumber\": \"453456765\"\n            }\n          ],\n          \"itemId\": 100023,\n          \"orderId\": \"6413e370cb0dc859b6c0dcb0\",\n          \"orderNumber\": \"309020213\",\n          \"shipmentExternalId\": \"123k4h123k\",\n          \"orderedQuantity\": 2,\n          \"refundAmount\": 10,\n          \"refundAmountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"returnQuantity\": 1,\n          \"returnRequestCounter\": 1,\n          \"segment\": \"segment\",\n          \"sku\": \"SKU0023\",\n          \"uom\": \"EA\",\n          \"vendorId\": \"56\"\n        }\n      ],\n      \"promisedDeliveryDate\": \"2023-03-26T07:58:30.996Z\",\n      \"shipmentCarrier\": \"FEDEX\",\n      \"shipmentMethod\": \"ground\",\n      \"tracking\": [\n        {\n          \"event\": \"picked up\",\n          \"eventId\": \"627963716b19511e8a3a631b\",\n          \"eventRecordedAt\": \"2019-09-30T07:58:30.996Z\",\n          \"location\": \"Reno, NV\",\n          \"notes\": {\n            \"description\": \"Shipment picked up\"\n          },\n          \"shipmentCarrier\": \"FEDEX\"\n        }\n      ],\n      \"trackingNumber\": \"1Z999AA10123456784\",\n      \"trackingURL\": \"https://fedex.com/tracking\",\n      \"weight\": \"500 gram\"\n    }\n  ],\n  \"invoiceId\": \"63ef4360aafa8a7f5247fe48\",\n  \"locationNumber\": \"WH334\",\n  \"locationType\": \"DC\",\n  \"masterTrackingNumber\": \"TX112345678\",\n  \"poNumber\": \"1125\",\n  \"recipients\": [\n    {\n      \"email\": \"support@example.inc\",\n      \"name\": {\n        \"firstName\": \"Alex\",\n        \"lastName\": \"Doe\",\n        \"middleName\": \"E\"\n      },\n      \"phone\": {\n        \"number\": \"123-456-7890\",\n        \"type\": \"MOBILE\"\n      }\n    }\n  ],\n  \"reshipmentReasonCode\": \"Order is missing\",\n  \"scratchedItems\": [\n    {\n      \"lineItemId\": \"2\",\n      \"quantity\": 1,\n      \"reasonCode\": \"ReasonCode23454\",\n      \"attributes\": {\n        \"attribute1\": \"value\"\n      },\n      \"itemId\": 100043,\n      \"orderId\": \"6413e370cb0dc859b6c0dcb0\",\n      \"orderNumber\": 309020213,\n      \"sku\": \"SKU00043\",\n      \"shipmentExternalId\": \"123k4h123k\",\n      \"subReasonCode\": \"SubReasonCode23242\",\n      \"uom\": \"EA\"\n    }\n  ],\n  \"shipToId\": \"sg6683620405\",\n  \"shipmentId\": \"627963716b19511e8a3a631b\",\n  \"shipmentExternalId\": \"123k4h123k\",\n  \"shippedAt\": \"2023-04-06T07:58:30.996Z\",\n  \"statusCode\": \"SHIPMENT_CREATED\",\n  \"subtype\": \"COD\",\n  \"totalCartons\": 2,\n  \"type\": \"STANDARD\",\n  \"vendorId\": \"56\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-fabric-tenant-id", "<x-fabric-tenant-id>")
    req.Header.Add("x-fabric-channel-id", "<x-fabric-channel-id>")
    req.Header.Add("Authorization", "Bearer <token>")
    req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.fabric.inc/v3/shipments")
  .header("x-fabric-tenant-id", "<x-fabric-tenant-id>")
  .header("x-fabric-channel-id", "<x-fabric-channel-id>")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"allocationId\": \"112345678912340\",\n  \"shipmentNumber\": \"78974156816152\",\n  \"attributes\": {\n    \"attribute1\": \"value\"\n  },\n  \"cartons\": [\n    {\n      \"cartonNumber\": \"1\",\n      \"cartonType\": \"Package\",\n      \"estimatedDeliveryDate\": \"2023-03-26T07:58:30.996Z\",\n      \"estimatedShipDate\": \"2023-03-25T07:58:30.996Z\",\n      \"items\": [\n        {\n          \"lineItemId\": \"1\",\n          \"shippedQuantity\": 2,\n          \"attributes\": {\n            \"attribute1\": \"value\"\n          },\n          \"fees\": [\n            {\n              \"amount\": 34.56,\n              \"amountInCurrencies\": [\n                {\n                  \"currency\": \"USD\",\n                  \"group\": \"SHOPPER\",\n                  \"amount\": 123.45\n                }\n              ],\n              \"name\": \"RETURN_FEE\",\n              \"reason\": \"Return fee\",\n              \"type\": \"FEE\"\n            }\n          ],\n          \"giftCards\": [\n            {\n              \"amount\": 50,\n              \"giftCardNumber\": \"453456765\"\n            }\n          ],\n          \"itemId\": 100023,\n          \"orderId\": \"6413e370cb0dc859b6c0dcb0\",\n          \"orderNumber\": \"309020213\",\n          \"shipmentExternalId\": \"123k4h123k\",\n          \"orderedQuantity\": 2,\n          \"refundAmount\": 10,\n          \"refundAmountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"returnQuantity\": 1,\n          \"returnRequestCounter\": 1,\n          \"segment\": \"segment\",\n          \"sku\": \"SKU0023\",\n          \"uom\": \"EA\",\n          \"vendorId\": \"56\"\n        }\n      ],\n      \"promisedDeliveryDate\": \"2023-03-26T07:58:30.996Z\",\n      \"shipmentCarrier\": \"FEDEX\",\n      \"shipmentMethod\": \"ground\",\n      \"tracking\": [\n        {\n          \"event\": \"picked up\",\n          \"eventId\": \"627963716b19511e8a3a631b\",\n          \"eventRecordedAt\": \"2019-09-30T07:58:30.996Z\",\n          \"location\": \"Reno, NV\",\n          \"notes\": {\n            \"description\": \"Shipment picked up\"\n          },\n          \"shipmentCarrier\": \"FEDEX\"\n        }\n      ],\n      \"trackingNumber\": \"1Z999AA10123456784\",\n      \"trackingURL\": \"https://fedex.com/tracking\",\n      \"weight\": \"500 gram\"\n    }\n  ],\n  \"invoiceId\": \"63ef4360aafa8a7f5247fe48\",\n  \"locationNumber\": \"WH334\",\n  \"locationType\": \"DC\",\n  \"masterTrackingNumber\": \"TX112345678\",\n  \"poNumber\": \"1125\",\n  \"recipients\": [\n    {\n      \"email\": \"support@example.inc\",\n      \"name\": {\n        \"firstName\": \"Alex\",\n        \"lastName\": \"Doe\",\n        \"middleName\": \"E\"\n      },\n      \"phone\": {\n        \"number\": \"123-456-7890\",\n        \"type\": \"MOBILE\"\n      }\n    }\n  ],\n  \"reshipmentReasonCode\": \"Order is missing\",\n  \"scratchedItems\": [\n    {\n      \"lineItemId\": \"2\",\n      \"quantity\": 1,\n      \"reasonCode\": \"ReasonCode23454\",\n      \"attributes\": {\n        \"attribute1\": \"value\"\n      },\n      \"itemId\": 100043,\n      \"orderId\": \"6413e370cb0dc859b6c0dcb0\",\n      \"orderNumber\": 309020213,\n      \"sku\": \"SKU00043\",\n      \"shipmentExternalId\": \"123k4h123k\",\n      \"subReasonCode\": \"SubReasonCode23242\",\n      \"uom\": \"EA\"\n    }\n  ],\n  \"shipToId\": \"sg6683620405\",\n  \"shipmentId\": \"627963716b19511e8a3a631b\",\n  \"shipmentExternalId\": \"123k4h123k\",\n  \"shippedAt\": \"2023-04-06T07:58:30.996Z\",\n  \"statusCode\": \"SHIPMENT_CREATED\",\n  \"subtype\": \"COD\",\n  \"totalCartons\": 2,\n  \"type\": \"STANDARD\",\n  \"vendorId\": \"56\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.fabric.inc/v3/shipments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-fabric-tenant-id"] = '<x-fabric-tenant-id>'
request["x-fabric-channel-id"] = '<x-fabric-channel-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"allocationId\": \"112345678912340\",\n  \"shipmentNumber\": \"78974156816152\",\n  \"attributes\": {\n    \"attribute1\": \"value\"\n  },\n  \"cartons\": [\n    {\n      \"cartonNumber\": \"1\",\n      \"cartonType\": \"Package\",\n      \"estimatedDeliveryDate\": \"2023-03-26T07:58:30.996Z\",\n      \"estimatedShipDate\": \"2023-03-25T07:58:30.996Z\",\n      \"items\": [\n        {\n          \"lineItemId\": \"1\",\n          \"shippedQuantity\": 2,\n          \"attributes\": {\n            \"attribute1\": \"value\"\n          },\n          \"fees\": [\n            {\n              \"amount\": 34.56,\n              \"amountInCurrencies\": [\n                {\n                  \"currency\": \"USD\",\n                  \"group\": \"SHOPPER\",\n                  \"amount\": 123.45\n                }\n              ],\n              \"name\": \"RETURN_FEE\",\n              \"reason\": \"Return fee\",\n              \"type\": \"FEE\"\n            }\n          ],\n          \"giftCards\": [\n            {\n              \"amount\": 50,\n              \"giftCardNumber\": \"453456765\"\n            }\n          ],\n          \"itemId\": 100023,\n          \"orderId\": \"6413e370cb0dc859b6c0dcb0\",\n          \"orderNumber\": \"309020213\",\n          \"shipmentExternalId\": \"123k4h123k\",\n          \"orderedQuantity\": 2,\n          \"refundAmount\": 10,\n          \"refundAmountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"returnQuantity\": 1,\n          \"returnRequestCounter\": 1,\n          \"segment\": \"segment\",\n          \"sku\": \"SKU0023\",\n          \"uom\": \"EA\",\n          \"vendorId\": \"56\"\n        }\n      ],\n      \"promisedDeliveryDate\": \"2023-03-26T07:58:30.996Z\",\n      \"shipmentCarrier\": \"FEDEX\",\n      \"shipmentMethod\": \"ground\",\n      \"tracking\": [\n        {\n          \"event\": \"picked up\",\n          \"eventId\": \"627963716b19511e8a3a631b\",\n          \"eventRecordedAt\": \"2019-09-30T07:58:30.996Z\",\n          \"location\": \"Reno, NV\",\n          \"notes\": {\n            \"description\": \"Shipment picked up\"\n          },\n          \"shipmentCarrier\": \"FEDEX\"\n        }\n      ],\n      \"trackingNumber\": \"1Z999AA10123456784\",\n      \"trackingURL\": \"https://fedex.com/tracking\",\n      \"weight\": \"500 gram\"\n    }\n  ],\n  \"invoiceId\": \"63ef4360aafa8a7f5247fe48\",\n  \"locationNumber\": \"WH334\",\n  \"locationType\": \"DC\",\n  \"masterTrackingNumber\": \"TX112345678\",\n  \"poNumber\": \"1125\",\n  \"recipients\": [\n    {\n      \"email\": \"support@example.inc\",\n      \"name\": {\n        \"firstName\": \"Alex\",\n        \"lastName\": \"Doe\",\n        \"middleName\": \"E\"\n      },\n      \"phone\": {\n        \"number\": \"123-456-7890\",\n        \"type\": \"MOBILE\"\n      }\n    }\n  ],\n  \"reshipmentReasonCode\": \"Order is missing\",\n  \"scratchedItems\": [\n    {\n      \"lineItemId\": \"2\",\n      \"quantity\": 1,\n      \"reasonCode\": \"ReasonCode23454\",\n      \"attributes\": {\n        \"attribute1\": \"value\"\n      },\n      \"itemId\": 100043,\n      \"orderId\": \"6413e370cb0dc859b6c0dcb0\",\n      \"orderNumber\": 309020213,\n      \"sku\": \"SKU00043\",\n      \"shipmentExternalId\": \"123k4h123k\",\n      \"subReasonCode\": \"SubReasonCode23242\",\n      \"uom\": \"EA\"\n    }\n  ],\n  \"shipToId\": \"sg6683620405\",\n  \"shipmentId\": \"627963716b19511e8a3a631b\",\n  \"shipmentExternalId\": \"123k4h123k\",\n  \"shippedAt\": \"2023-04-06T07:58:30.996Z\",\n  \"statusCode\": \"SHIPMENT_CREATED\",\n  \"subtype\": \"COD\",\n  \"totalCartons\": 2,\n  \"type\": \"STANDARD\",\n  \"vendorId\": \"56\"\n}"

response = http.request(request)
puts response.read_body

201

400

401

500

{
  "version": 2,
  "allocationId": "6413e3d3fd03a35efccb426e",
  "auditLogs": [\
    {\
      "auditId": "a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111",\
      "auditType": "CANCEL",\
      "auditedAt": "2023-03-12T09:24:54.804Z",\
      "employeeId": "6227",\
      "lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",\
      "note": "Note",\
      "reasonCode": "Scratched item",\
      "source": "POS",\
      "subReasonCode": "Scratched item",\
      "updatedFields": [\
        {\
          "fieldName": "UOM",\
          "fieldOriginalValue": "PK"\
        }\
      ]\
    }\
  ],
  "cartons": [\
    {\
      "cartonNumber": "1",\
      "cartonType": "Package",\
      "estimatedDeliveryDate": "2023-04-26T07:58:30.996Z",\
      "estimatedShipmentDate": "2023-03-25T07:58:30.996Z",\
      "items": [\
        {\
          "fees": [\
            {\
              "amount": 34.56,\
              "amountInCurrencies": [\
                {\
                  "currency": "USD",\
                  "group": "SHOPPER",\
                  "amount": 123.45\
                }\
              ],\
              "name": "RETURN_FEE",\
              "reason": "Return fee",\
              "type": "FEE"\
            }\
          ],\
          "giftCards": [\
            {\
              "amount": 50,\
              "amountInCurrencies": [\
                {\
                  "currency": "USD",\
                  "group": "SHOPPER",\
                  "amount": 123.45\
                }\
              ],\
              "giftCardActivatedAt": "2023-04-26T07:58:30.996Z",\
              "giftCardActivationRequestedAt": "2023-03-26T07:58:30.996Z",\
              "giftCardNumber": "453456765",\
              "giftCardStatus": "ACTIVE"\
            }\
          ],\
          "itemId": 100023,\
          "lineItemId": "1",\
          "orderId": "6413e370cb0dc859b6c0dcb0",\
          "orderNumber": "309020213",\
          "orderedQuantity": 2,\
          "refundAmount": 10,\
          "refundAmountInCurrencies": [\
            {\
              "currency": "USD",\
              "group": "SHOPPER",\
              "amount": 123.45\
            }\
          ],\
          "returnQuantity": 1,\
          "segment": "segment",\
          "shipmentLineItemId": "607f1f77bcf86cd799439011",\
          "shippedQuantity": 2,\
          "sku": "SKU0023",\
          "uom": "EA",\
          "vendorId": "vend12346667"\
        }\
      ],\
      "promisedDeliveryDate": "2023-03-26T07:58:30.996Z",\
      "shipmentCarrier": "FEDEX",\
      "shipmentMethod": "ground",\
      "tracking": [\
        {\
          "event": "picked up",\
          "eventId": "627963716b19511e8a3a631b",\
          "eventRecordedAt": "2019-09-30T07:58:30.996Z",\
          "location": "Reno, NV",\
          "notes": {\
            "description": "Shipment picked up"\
          },\
          "shipmentCarrier": "FEDEX"\
        }\
      ],\
      "trackingNumber": "1Z999AA10123456784",\
      "trackingURL": "https://example.com/tracking",\
      "weight": "500 grams"\
    }\
  ],
  "createdAt": "2023-04-06T07:58:30.996Z",
  "invoiceId": "63ef4360aafa8a7f5247fe48",
  "locationNumber": "WH334",
  "locationType": "DC",
  "masterTrackingNumber": "TX112345678",
  "orderNumbers": [\
    "309020213, 459020213"\
  ],
  "poNumber": "1125",
  "recipients": [\
    {\
      "email": "support@example.inc",\
      "name": {\
        "firstName": "Alex",\
        "lastName": "Doe",\
        "middleName": "E"\
      },\
      "phone": {\
        "number": "123-456-7890",\
        "type": "MOBILE"\
      }\
    }\
  ],
  "reshipmentReasonCode": "Order is missing",
  "scratchedItems": [\
    {\
      "reasonCode": "ReasonCode23454",\
      "itemId": 100043,\
      "lineItemId": "2",\
      "orderId": "6413e370cb0dc859b6c0dcb0",\
      "quantity": 1,\
      "sku": "SKU00043",\
      "subReasonCode": "SubReasonCode23242",\
      "uom": "EA"\
    }\
  ],
  "shipToAddress": {
    "addressLine1": "123 Main St.",
    "city": "Seattle",
    "countryCode": "US",
    "latitude": 47.6205,
    "longitude": -122.3493,
    "postalCode": "98121",
    "region": "WA",
    "type": "Home",
    "addressLine2": "Suite 100",
    "addressLine3": "Seventh floor",
    "addressLine4": "Attention: Pat E. Kake",
    "email": "test@example.com",
    "name": {
      "firstName": "Alex",
      "lastName": "Doe",
      "middleName": "E"
    },
    "phone": {
      "number": "123-456-7890",
      "type": "MOBILE"
    }
  },
  "shipToId": "1",
  "shipmentId": "627963716b19511e8a3a631b",
  "shipmentNumber": "78974156816152",
  "shipmentExternalId": "123k4h123k",
  "shippedAt": "2023-04-06T07:58:30.996Z",
  "statusCode": "SHIPMENT_CREATED",
  "subtype": "COD",
  "totalCartons": 2,
  "type": "STANDARD",
  "updatedAt": "2023-04-06T07:58:30.996Z",
  "vendorId": "56"
}
{
  "errors": [\
    {\
      "message": "Invalid request",\
      "type": "CLIENT_ERROR"\
    }\
  ],
  "message": "Bad request",
  "type": "CLIENT_ERROR"
}
{
  "message": "Unauthorized request",
  "type": "CLIENT_ERROR"
}
{
  "message": "Internal server error",
  "type": "SERVER_ERROR"
}

POST

/

shipments

Try it

Create new shipment

cURL

import requests

url = "https://api.fabric.inc/v3/shipments"

response = requests.post(url, json=payload, headers=headers)

print(response.text)

fetch('https://api.fabric.inc/v3/shipments', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));


`, where `` is your auth token. #### Headers [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#parameter-x-fabric-tenant-id) x-fabric-tenant-id string required A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from [Copilot](https://developer.fabric.inc/v3/platform/settings/account-details/getting-the-account-id). This header is required. [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#parameter-x-fabric-channel-id) x-fabric-channel-id string required x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required. [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#parameter-x-fabric-request-id) x-fabric-request-id string Unique request ID #### Body application/json Details to create shipment [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-allocation-id) allocationId string required Allocation ID for this shipment, generated by the fabric Allocation service through Create allocation (internal) endpoint, which occurs prior to Shipment Creation. This is mandatory to create a new shipment. Example: `"112345678912340"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-shipment-number) shipmentNumber string required Merchant-defined shipment identifier Example: `"78974156816152"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-attributes) attributes object Merchant-defined custom attributes. This is a placeholder for addition info (in key: value pairs) Example: ``` { "attribute1": "value" } ``` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-cartons) cartons object\[\] Carton details Show child attributes [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-invoice-id) invoiceId string Invoice ID generated from fabric Invoice service during shipment creation. Note: Invoices are only created for Shipments where merchants have payment Capture at Shipment feature enabled. The value will be “Null” if merchants don't have “Capture at Shipment” feature enabled. Example: `"63ef4360aafa8a7f5247fe48"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-location-number) locationNumber string Unique value to identify ship-from location. This must be the `locationNumber` stored in the fabric Location service. Example: `"WH334"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-location-type) locationType string Location type, such as distribution center (DC) or warehouse. This must be the type stored in the fabric Location service. Example: `"DC"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-master-tracking-number) masterTrackingNumber string Master tracking number for all cartons in the shipment Example: `"TX112345678"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-po-number) poNumber string Merchant-defined purchase order number Example: `"1125"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-recipients) recipients object\[\] Recipient details Show child attributes [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-reshipment-reason-code) reshipmentReasonCode string Reshipment reason code Example: `"Order is missing"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-scratched-items) scratchedItems object\[\] Scratched items Show child attributes [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-ship-to-address) shipToAddress object Address details Show child attributes [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-ship-to-id) shipToId string Ship-to ID generated in the response of Create Shipping endpoint of Shipping service Example: `"sg6683620405"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-shipment-id) shipmentId string Shipment's autogenerated unique id Example: `"627963716b19511e8a3a631b"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-shipment-external-id) shipmentExternalId string Unique shipment identifier defined by the merchant. This value can be used to track or reconcile shipments in external systems and serves as a reference between fabric and the merchant's order management or fulfillment system. Example: `"123k4h123k"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-shipped-at) shippedAt string Order shipment time (UTC) Example: `"2023-04-06T07:58:30.996Z"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-status-code) statusCode enum Current shipment status (fabric-defined codes). For standard shipments, the initial status would be SHIPMENT\_CREATED. For pickup shipment, the initial status would be PICKUP\_CREATED and once the customer picks up, the status changes to PICKUP\_COMPLETED Available options: `SHIPMENT_CREATED`, `SHIPMENT_UPDATED`, `SHIPMENT_CANCELLED`, `PICKUP_CREATED`, `PICKUP_COMPLETED`, `SHIPMENT_RETURN_PENDING`, `SHIPMENT_RETURN_RECEIVED`, `SHIPMENT_PARTIALLY_DELIVERED`, `SHIPMENT_DELIVERED`, `SHIPMENT_ERROR` Example: `"SHIPMENT_CREATED"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-subtype) subtype string Shipment subtype. Free-form text to add another layer of classification, if required. Example: `"COD"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-total-cartons) totalCartons integer Total number of cartons in the given shipment. Example: `2` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-type) type enum Shipment types Available options: `STANDARD`, `RESHIP`, `RETURN`, `SCRATCH`, `PENDING_RETURN`, `PICKUP`, `TRANSFER` Example: `"STANDARD"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#body-vendor-id) vendorId string Vendor ID. Applicable in dropshipping scenarios to indicate the vendor responsible for the given item. Example: `"56"` #### Response 201 application/json Created Shipment details [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-version) version integer required The current version of the shipment document. This integer indicates the number of times the shipment has been updated by any operation. Example: `2` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-allocation-id) allocationId string System-generated allocation ID (UUID) from the Create allocation endpoint of fabric Allocation service. It refers to the given shipment. Note: Allocation occurs prior to Shipment Creation. `allocationId` is mandatory to create a Shipment. Example: `"6413e3d3fd03a35efccb426e"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-audit-logs) auditLogs object\[\] Audit log details Show child attributes [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-cartons) cartons object\[\] Carton details Show child attributes [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-created-at) createdAt string Shipment creation time (UTC) Example: `"2023-04-06T07:58:30.996Z"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-invoice-id) invoiceId string Example: `"63ef4360aafa8a7f5247fe48"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-location-number) locationNumber string Unique value to identify ship-from location. This must be the `locationNumber` stored in the fabric Location service. Example: `"WH334"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-location-type) locationType string Location type, such as distribution center (DC) or warehouse Example: `"DC"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-master-tracking-number) masterTrackingNumber string Master tracking number for all cartons in the shipment Example: `"TX112345678"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-order-numbers) orderNumbers string\[\] List of order numbers associated with a shipment. Note: Currently, a shipment can be associated with only one order. In the future, this property will support a scenario where a customer places a second order for the same product immediately after their first order. Multiple order numbers can be linked to one shipment in such cases. [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-po-number) poNumber string Merchant-defined purchase order number Example: `"1125"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-recipients) recipients object\[\] Recipient details Show child attributes [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-reshipment-reason-code) reshipmentReasonCode string The reshipment reason code. Example: `"Order is missing"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-scratched-items) scratchedItems object\[\] Details of scratched items Show child attributes [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-ship-to-address) shipToAddress object Address details Show child attributes [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-ship-to-id) shipToId string Ship-to ID generated in the response of Create shipping endpoint of Shipping service Example: `"1"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-shipment-id) shipmentId string System-generated shipment ID (UUID) Example: `"627963716b19511e8a3a631b"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-shipment-number) shipmentNumber string Merchant-defined unique shipment identifier. Note: It can be optionally generated by fabric by using resource generator feature in the Configuration service Example: `"78974156816152"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-shipment-external-id) shipmentExternalId string Example: `"123k4h123k"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-shipped-at) shippedAt string Order shipment time (UTC) Example: `"2023-04-06T07:58:30.996Z"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-status-code) statusCode enum Current shipment status (fabric-defined codes). Note: For standard shipments, the status would be SHIPMENT\_CREATED. For pickup shipment, the initial status would be PICKUP\_CREATED and once the customer picks up, the status changes to PICKUP\_COMPLETED Available options: `SHIPMENT_CREATED`, `SHIPMENT_UPDATED`, `SHIPMENT_CANCELLED`, `PICKUP_CREATED`, `PICKUP_COMPLETED`, `SHIPMENT_DELIVERED`, `SHIPMENT_RETURN_PENDING`, `SHIPMENT_RETURN_RECEIVED`, `SHIPMENT_PARTIALLY_DELIVERED` Example: `"SHIPMENT_CREATED"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-subtype) subtype string Shipment subtype, for another layer of classification. There are no pre-defined values; the possible value is Cash On Delivery (COD) Example: `"COD"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-total-cartons) totalCartons integer Total number of cartons in the given shipment. There can be only one carton per trackingNumber. Example: `2` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-type) type enum Shipment types Available options: `STANDARD`, `RESHIP`, `RETURN`, `SCRATCH`, `PENDING_RETURN`, `PICKUP`, `TRANSFER` Example: `"STANDARD"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-updated-at) updatedAt string Time of last update to shipment (UTC) Example: `"2023-04-06T07:58:30.996Z"` [​](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-new-shipment#response-vendor-id) vendorId string Vendor ID. Applicable in dropshipping scenarios to indicate the vendor responsible for the given item. Example: `"56"` Was this page helpful? YesNo [Getting Started with Shipments](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/overview) [Create shipment for an existing order](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/orders/shipments/create-shipment-from-allocation) Ctrl+I Assistant Responses are generated using AI and may contain mistakes.