Returns the shipment with the given identifier, with all of its lines.
GET /inventory/shipments/{id}
Group: Inventory › Shipments · Operation ID: getShipment
Returns the same fields as POST inventory/shipments/search. The collection GET inventory/shipments returns headers only, without the lines.
Open in the interactive reference
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | "v1" |
yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
id |
path | string | yes | The unique identifier for the shipment to return. |
Response
200 Success
Under data (getShipmentOutput):
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the shipment. |
documentNumber |
string | no | The shipment's document number, for example 'SD-8841'. Absent while none has been assigned. |
documentStatus |
string | yes | The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'. |
documentDate |
string (date) | yes | The date the shipment is dated. Format YYYY-MM-DD. |
deliveryDate |
string (date) | no | The planned or actual delivery date. Format YYYY-MM-DD. |
entityId |
string | yes | The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities. |
entityName |
string | no | The display name of that legal entity. |
businessPartnerId |
string | yes | The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id. |
businessPartnerName |
string | no | The display name of that customer. |
shipmentCarrierId |
string | no | The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id. |
shipmentCarrierName |
string | no | The name of that carrier. |
trackingNumber |
string | no | The carrier's tracking number for the goods. |
referenceNumber |
string | no | The customer's own reference for the shipment. |
returnStatus |
string | no | How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it. |
currency |
string | no | The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'. |
totalAmount |
string (decimal) | no | The total value of the shipment, in the shipment's currency. |
notes |
string | no | Free text on the shipment. |
createdDate |
string (date-time) | no | The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
lastModifiedDate |
string (date-time) | no | The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
lines |
array of object | yes | The lines of the shipment. A shipment always has at least one. |
lines[].id |
string | yes | The unique identifier for the shipment line. |
lines[].itemId |
string | yes | The unique identifier for the item going out. See id on GET inventory/items/:id. |
lines[].itemCode |
string | no | The short code of that item. |
lines[].itemName |
string | no | The display name of that item. |
lines[].locationId |
string | no | The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id. |
lines[].locationCode |
string | no | The short code of that warehouse. |
lines[].locationName |
string | no | The display name of that warehouse. |
lines[].unitId |
string | yes | The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id. |
lines[].unitCode |
string | no | The short code of that unit. |
lines[].quantity |
string (decimal) | yes | The quantity going out, in the line's unit. |
lines[].inventoryQuantity |
string (decimal) | no | The same quantity in the item's stocking unit. |
lines[].pickedQuantity |
string (decimal) | no | How much of the line has been picked. This API does not set it. |
lines[].packedQuantity |
string (decimal) | no | How much of the line has been packed. This API does not set it. |
lines[].returnedQuantity |
string (decimal) | no | How much of the line has come back on a sales return. |
lines[].openReturnQuantity |
string (decimal) | no | How much of the line may still be returned. |
lines[].unitPrice |
string (decimal) | no | The value of one unit, in the shipment's currency. |
lines[].status |
string | no | Where the line sits in the warehouse process. This is free text with no fixed set of values. |
lines[].sourceDocumentLineId |
string | no | The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id. |
lines[].sourceDocumentLineType |
string, one of "IMInventorySalesOrderLine", "IMInventorySalesDeliveryLine", "IMSalesOrderLine", "IMInventoryPurchaseReturnLine", "IMInventorySalesReturnLine", "IMWarehouseTransferLine", "IMInventoryDecreaseLine", "IMInventoryIncreaseLine", "IMInventoryRevaluationLine", "IMInventoryTransferLine", "IMInventoryAdjustmentLine", "IMInventoryCountLine", "IMInventoryPutAwayTask", "IMInventoryPurchaseReturnReversal", "PurchaseOrderLine", "IMLandedCostAllocationLine", "SalesOrderProductItem", "IMWarehouseTransferOrderLine", "VendorBillItemBase", "InvPurchaseDeliveryLine" |
no | The kind of document line the source line is. |
lines[].notes |
string | no | Free text on the line. |
lines[].batches |
array of object | no | The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked. |
lines[].batches[].batchNumberId |
string | no | The unique identifier for the batch record. |
lines[].batches[].batchNumber |
string | yes | The batch number as printed. |
lines[].batches[].expirationDate |
string (date) | no | The expiration date of the batch. Format YYYY-MM-DD. |
lines[].batches[].quantity |
string (decimal) | yes | The quantity of this batch going out, in the line's unit. |
lines[].batches[].inventoryQuantity |
string (decimal) | no | The same quantity in the item's stocking unit. |
lines[].batches[].returnedQuantity |
string (decimal) | no | How much of this batch has come back on a sales return. |
lines[].batches[].unitCost |
string (decimal) | no | The cost of one unit of this batch at shipment, in the shipment's currency. |
lines[].serials |
array of object | no | The serialized units going out, one entry per unit. Absent when the item is not serialized. |
lines[].serials[].serialNumberId |
string | no | The unique identifier for the serial record. |
lines[].serials[].serialNumber |
string | yes | The serial number stamped on the unit. |
lines[].serials[].returnedQuantity |
string (decimal) | no | How much of this unit has come back on a sales return. |
lines[].serials[].unitCost |
string (decimal) | no | The cost of this unit at shipment, in the shipment's currency. |
lines[].binLocations |
array of object | no | The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line. |
lines[].binLocations[].binLocationId |
string | yes | The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id. |
lines[].binLocations[].binLocationCode |
string | no | The short code of that bin. |
lines[].binLocations[].quantity |
string (decimal) | yes | The quantity taken from this bin, in the line's unit. |
lines[].binLocations[].inventoryQuantity |
string (decimal) | no | The same quantity in the item's stocking unit. |
lines[].binLocations[].batchNumber |
string | no | The batch this bin entry belongs to, when it belongs to one of the line's batches. |
lines[].binLocations[].serialNumber |
string | no | The serialized unit this bin entry belongs to, when it belongs to one of the line's units. |
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND401— Missing or invalid access token403— Not authorized404— Not found429— Too many requests500— Internal server error