Create new shipment
To use this endpoint an “allocation” must exist for the order that’s being shipped. When an order is placed, fabric sends allocation details to external merchant system to create order fulfillment requirement details in an external system. With reference to the allocation that’s being shipped, users of this POST API can create shipment details for allocations.
Note: Shipment ID generated as part of the response is required for subsequent calls such as Acknowledge shipment (POST /shipments/{shipmentId}/acknowledge
) and Get shipment (GET /shipments/{shipmentId}
).
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
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. This header is 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.
Unique request ID
Body
Details to create shipment
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.
Merchant-defined custom attributes. This is a placeholder for addition info (in key: value pairs)
Carton details
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.
Unique value to identify ship-from location. This must be the locationNumber
stored in the fabric Location service.
Location type, such as distribution center (DC) or warehouse. This must be the type stored in the fabric Location service.
Master tracking number for all cartons in the shipment
Merchant-defined purchase order number
Recipient details
Reshipment reason code
Scratched items
Address details
Ship-to ID generated in the response of Create Shipping endpoint of Shipping service
Shipment's autogenerated unique id
Merchant-defined shipment identifier
Order shipment time (UTC)
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
SHIPMENT_CREATED
, SHIPMENT_UPDATED
, SHIPMENT_CANCELLED
, PICKUP_CREATED
, PICKUP_COMPLETED
, SHIPMENT_RETURN_PENDING
, SHIPMENT_RETURN_RECEIVED
, SHIPMENT_PARTIALLY_DELIVERED
, SHIPMENT_DELIVERED
, SHIPMENT_ERROR
Shipment subtype. Free-form text to add another layer of classification, if required.
Total number of cartons in the given shipment.
Shipment types
STANDARD
, RESHIP
, RETURN
, SCRATCH
, PENDING_RETURN
, PICKUP
, TRANSFER
Vendor ID. Applicable in dropshipping scenarios to indicate the vendor responsible for the given item.
Response
Shipment details
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.
Audit log details
Carton details
Shipment creation time (UTC)
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.
Unique value to identify ship-from location. This must be the locationNumber
stored in the fabric Location service.
Location type, such as distribution center (DC) or warehouse
Master tracking number for all cartons in the shipment
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.
Merchant-defined purchase order number
Recipient details
The reshipment reason code.
Details of scratched items
Address details
Ship-to ID generated in the response of Create shipping endpoint of Shipping service
System-generated shipment ID (UUID)
Merchant-defined unique shipment identifier. Note: It can be optionally generated by fabric by using resource generator feature in the Configuration service
Order shipment time (UTC)
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
SHIPMENT_CREATED
, SHIPMENT_UPDATED
, SHIPMENT_CANCELLED
, PICKUP_CREATED
, PICKUP_COMPLETED
, SHIPMENT_DELIVERED
, SHIPMENT_RETURN_PENDING
, SHIPMENT_RETURN_RECEIVED
, SHIPMENT_PARTIALLY_DELIVERED
Shipment subtype, for another layer of classification. There are no pre-defined values; the possible value is Cash On Delivery (COD)
Total number of cartons in the given shipment. There can be only one carton per trackingNumber.
Shipment types
STANDARD
, RESHIP
, RETURN
, SCRATCH
, PENDING_RETURN
, PICKUP
, TRANSFER
Time of last update to shipment (UTC)
Vendor ID. Applicable in dropshipping scenarios to indicate the vendor responsible for the given item.
The current version of the shipment document. This integer indicates the number of times the shipment has been updated by any operation.
Was this page helpful?