POST
/
shipment
curl --request POST \
  --url https://prod01.oms.fabric.inc/api/v2/shipment/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "shipmentNum": "78974156816152",
  "allocationId": "112345678912340",
  "invoiceId": "5674156816152",
  "poNumber": "1125",
  "vendorId": "56",
  "statusCode": "SHIPMENT_CREATED",
  "type": "STANDARD",
  "reshipmentReasonCode": "Order went missing",
  "shipDate": "2022-06-06T07:58:30.996Z",
  "locationNum": "132412",
  "locationType": "DC",
  "totalCartons": 2,
  "masterTrackingNumber": "TX112345678",
  "shipToId": "1",
  "shipToAddress": {
    "addressLine1": "888 Broadway",
    "addressLine2": "505 suite",
    "addressLine3": "<string>",
    "addressLine4": "<string>",
    "city": "New York",
    "state": "NY",
    "country": "USA",
    "postalCode": "1003",
    "type": "home",
    "latitude": 134.13413,
    "longitude": 757.0435
  },
  "recipient": [
    {
      "name": {
        "first": "John",
        "middle": "<string>",
        "last": "Doe"
      },
      "email": "support@abc.inc",
      "phone": {
        "number": 10612345678,
        "type": "MOBILE"
      }
    }
  ],
  "cartons": [
    {
      "cartonNum": "1",
      "cartonType": "Package",
      "promisedDeliveryDate": "2022-05-26T07:58:30.996Z",
      "estimatedShipDate": "2022-05-25T07:58:30.996Z",
      "estimatedDeliveryDate": "2022-05-26T07:58:30.996Z",
      "shipmentMethod": "ground",
      "shipmentCarrier": "FEDEX",
      "weight": "500 gram",
      "trackingNumber": "1Z999AA10123456784",
      "trackingURL": "https://fedex.com/tracking",
      "trackingDetails": [
        {
          "event": "picked up",
          "eventId": "627963716b19511e8a3a631b",
          "timestamp": "2019-09-30T07:58:30.996Z",
          "shipmentCarrier": "FEDEX",
          "location": "Reno, NV",
          "notes": {}
        }
      ],
      "items": [
        {
          "lineItemId": "1",
          "itemId": "100023",
          "sku": "SKU0023",
          "orderId": "317736896",
          "orderNumber": "507f1f77bcf86cd799439011",
          "channelId": "12",
          "segment": null,
          "vendorId": "56",
          "orderedQuantity": 2,
          "shippedQuantity": 2,
          "returnQuantity": 1,
          "returnAmount": 10,
          "fees": [
            {
              "type": "tax",
              "value": 34.56,
              "quantity": 12,
              "refundAmount": 10.4
            }
          ],
          "giftCard": [
            {
              "giftCardNum": "453456765",
              "amount": 50
            }
          ],
          "attributes": {},
          "uom": null
        }
      ]
    }
  ],
  "scratchedItems": [
    {
      "lineItemId": "2",
      "itemId": "100043",
      "sku": "SKU00043",
      "quantity": 1,
      "reasonCode": "<string>",
      "subReasonCode": null,
      "attributes": {},
      "uom": null
    }
  ],
  "auditLogs": [
    {
      "auditType": "create",
      "employeeId": "62272e917b12209e68751d94",
      "auditTimestamp": "2022-05-12T09:24:54.804Z",
      "source": "POS",
      "note": "Note",
      "attributes": {},
      "updatedFields": [
        {
          "attributeName": "UOM",
          "attributeOriginalValue": "PK"
        }
      ]
    }
  ],
  "attributes": {}
}'
{
  "shipmentId": "627963716b19511e8a3a631b",
  "shipmentNum": "78974156816152",
  "invoiceId": "5674156816152",
  "allocationId": "112345678912340",
  "orderNumber": [
    "112345678912340",
    "112345678912340"
  ],
  "poNumber": "1125",
  "vendorId": "56",
  "statusCode": "SHIPPED",
  "type": "STANDARD",
  "reshipmentReasonCode": "Order went missing",
  "shipDate": "2022-06-06T07:58:30.996Z",
  "locationNum": "132412",
  "locationType": "DC",
  "totalCartons": 2,
  "masterTrackingNumber": "TX112345678",
  "shipToId": "1",
  "shipToAddress": {
    "addressLine1": "888 Broadway",
    "addressLine2": "505 suite",
    "addressLine3": "<string>",
    "addressLine4": "<string>",
    "city": "New York",
    "state": "NY",
    "country": "USA",
    "postalCode": "1003",
    "type": "home",
    "latitude": 134.13413,
    "longitude": 757.0435
  },
  "recipient": [
    {
      "name": {
        "first": "John",
        "middle": "<string>",
        "last": "Doe"
      },
      "email": "support@abc.inc",
      "phone": {
        "number": 10612345678,
        "type": "MOBILE"
      }
    }
  ],
  "cartons": [
    {
      "cartonNum": "1",
      "cartonType": "Package",
      "promisedDeliveryDate": "2022-05-26T07:58:30.996Z",
      "estimatedShipDate": "2022-05-25T07:58:30.996Z",
      "estimatedDeliveryDate": "2022-05-26T07:58:30.996Z",
      "shipmentMethod": "ground",
      "shipmentCarrier": "FEDEX",
      "weight": "500 gram",
      "trackingNumber": "1Z999AA10123456784",
      "trackingURL": "https://fedex.com/tracking",
      "trackingDetails": [
        {
          "event": "picked up",
          "eventId": "627963716b19511e8a3a631b",
          "timestamp": "2019-09-30T07:58:30.996Z",
          "shipmentCarrier": "FEDEX",
          "location": "Reno, NV",
          "notes": {}
        }
      ],
      "items": [
        {
          "shipmentLineItemId": "607f1f77bcf86cd799439011",
          "orderId": "317736896",
          "orderNumber": "507f1f77bcf86cd799439011",
          "lineItemId": "1",
          "itemId": "100023",
          "sku": "SKU0023",
          "channelId": "12",
          "segment": null,
          "vendorId": "56",
          "orderedQuantity": 2,
          "shippedQuantity": 2,
          "returnQuantity": 1,
          "returnAmount": 10,
          "fees": [
            {
              "type": "tax",
              "value": 34.56,
              "quantity": 12,
              "refundAmount": 10.4
            }
          ],
          "giftCard": [
            {
              "giftCardNum": "453456765",
              "amount": 50,
              "giftCardStatus": "ACTIVE",
              "giftCardActiveRequestDate": "2022-05-26T07:58:30.996Z",
              "giftCardActiveDate": "2022-06-26T07:58:30.996Z"
            }
          ],
          "attributes": {},
          "uom": null
        }
      ]
    }
  ],
  "scratchedItems": [
    {
      "orderId": "507f1f77bcf86cd799439012",
      "lineItemId": "2",
      "itemId": "100043",
      "sku": "SKU00043",
      "quantity": 1,
      "reasonCode": "<string>",
      "subReasonCode": "<string>",
      "attributes": {},
      "uom": null
    }
  ],
  "createdAt": "2022-06-06T07:58:30.996Z",
  "updatedAt": "2022-06-06T07:58:30.996Z",
  "auditLogs": [
    {
      "auditType": "create",
      "employeeId": "62272e917b12209e68751d94",
      "auditTimestamp": "2022-05-12T09:24:54.804Z",
      "source": "POS",
      "note": "Note",
      "attributes": {},
      "updatedFields": [
        {
          "attributeName": "UOM",
          "attributeOriginalValue": "PK"
        }
      ]
    }
  ],
  "attributes": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-site-context
string
required

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.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Body

application/json

Shipment and reshipment details

shipmentNum
string

Shipment number

Example:

"78974156816152"

allocationId
string

Allocation ID for an order, generated from allocation service

Example:

"112345678912340"

invoiceId
string

fabric-generated Invoice ID

Example:

"5674156816152"

poNumber
string

Purchase order number (generally, vendor-generated)

Example:

"1125"

vendorId
string

Vendor ID

Example:

"56"

statusCode
enum<string>

Shipment status code

Available options:
SHIPMENT_CREATED,
SHIPMENT_CANCELLED,
PICKUP_CREATED,
PICKUP_COMPLETED,
SHIPMENT_RETURN_PENDING,
SHIPMENT_RETURN_RECEIVED,
SHIPMENT_PARTIALLY_DELIVERED,
SHIPMENT_DELIVERED
Example:

"SHIPMENT_CREATED"

type
enum<string>

Shipment type

Available options:
STANDARD,
RESHIP,
RETURN,
SCRATCH,
PICKUP
Example:

"STANDARD"

reshipmentReasonCode
string

Reason code for reshipment

Example:

"Order went missing"

shipDate
string

Shipping time

Example:

"2022-06-06T07:58:30.996Z"

locationNum
string

Location number from the location service

Example:

"132412"

locationType
string

Location type based on location service such as store, distribution center (DC)

Example:

"DC"

totalCartons
integer

Total number of cartons

Example:

2

masterTrackingNumber
string

Main tracking number, to track fulfillment of all the orders

Example:

"TX112345678"

shipToId
string

Ship-to ID

Example:

"1"

shipToAddress
object

Details of delivery address

recipient
object[]

Recipient details for shipment

cartons
object[]

Carton details

scratchedItems
object[]

Details of scratched items

auditLogs
object[]

Audit details

attributes
object

Shipment attributes

Response

200
application/json
Ok

Shipment details

shipmentId
string

24-character fabric-generated unique ID of shipment

Example:

"627963716b19511e8a3a631b"

shipmentNum
string

Shipment number (external)

Example:

"78974156816152"

invoiceId
string

fabric-generated Invoice ID

Example:

"5674156816152"

allocationId
string

Allocation ID for an order, generated from allocation service

Example:

"112345678912340"

orderNumber
string[]

Order number. It's usually generated by another system, such as an external checkout system.

Example:
["112345678912340", "112345678912340"]
poNumber
string

Purchase order number (generally, vendor-generated)

Example:

"1125"

vendorId
string

Vendor ID

Example:

"56"

statusCode
enum<string>

Shipment status code

Available options:
SHIPMENT_CREATED,
SHIPMENT_CANCELLED,
PICKUP_CREATED,
PICKUP_COMPLETED,
SHIPMENT_RETURN_PENDING,
SHIPMENT_RETURN_RECEIVED,
SHIPMENT_PARTIALLY_DELIVERED,
SHIPMENT_DELIVERED
Example:

"SHIPPED"

type
enum<string>

shipment type

Available options:
STANDARD,
RESHIP,
RETURN,
SCRATCH,
PICKUP
Example:

"STANDARD"

reshipmentReasonCode
string

Reason code for reshipment

Example:

"Order went missing"

shipDate
string

Time of shipping

Example:

"2022-06-06T07:58:30.996Z"

locationNum
string

location number from location service to get exact address.

Example:

"132412"

locationType
string

Location type based on location service such as store, distribution center (DC)

Example:

"DC"

totalCartons
integer

Total number of cartons

Example:

2

masterTrackingNumber
string

Main tracking number, to track fulfillment of all the orders

Example:

"TX112345678"

shipToId
string

Ship-to ID refers to item's delivery address

Example:

"1"

shipToAddress
object

Details of delivery address

recipient
object[]

Recipient details for shipment

cartons
object[]

Carton details

scratchedItems
object[]

details of scratched items

Shipment details of return items

createdAt
string

Time of shipment creation

Example:

"2022-06-06T07:58:30.996Z"

updatedAt
string

Time of last update

Example:

"2022-06-06T07:58:30.996Z"

auditLogs
object[]

Details of audit logs

Audit details

attributes
object

Attribute details for additional information