An object representing a shipment. A shipment contains one or more shipment items, reflecting its content. Thus, an order may be split into several shipments and a shipment may contain several orders.
Property | Type | Description |
---|---|---|
uid | integer | The unique indentifier of the shipment. |
type | string | Type of shipment, "order/delivery" or "order/return" . |
trackingUrl | string | URL to external tracking service. |
shipmentMethod | integer | The unique identifier of the delivery method. |
services | object | An object containing services, see Service. |
packageCount | number | Number of packages in this shipment. |
items | array | The unique identifiers of the ShipmentItems as an array. |
events | array | Status event list, see Event. |
documentUrl | string | URL to freight document. |
These are the properties for the services object:
Property | Type | Description |
---|---|---|
carrierType | string | <> |
carrierRef | string | <> |
Property | Type | Description |
---|---|---|
status | string | The status of this event. |
datetime | string | When this event was happening. |
Adds an entire Order to the shipment.
Parameter | Description |
---|---|
uid | The unique identifier of an existing shipment or null to create a new shipment. |
order | The unique identifier of an existing Order. |
query | What to return; defaults to uid . See Query language. |
Shipment data based on the query parameter.
Shipment.addAllItemsFromOrder(12345678, 98765432, [
"uid",
"items"
])
Adds an entire Suborder to the shipment.
Parameter | Description |
---|---|
uid | The unique identifier of an existing shipment or null to create a new shipment. |
suborder | The unique identifier of an existing Suborder. |
query | What to return; defaults to uid . See Query language. |
Shipment data based on the query parameter.
Shipment.addAllItemsFromSuborder(12345678, 6543210, [
"uid",
"items"
])
Adds an OrderItem to the shipment, optionally with quantity.
Parameter | Description |
---|---|
uid | The unique identifier of an existing shipment or null to create a new shipment. |
orderitem | The unique identifier of an existing OrderItem. |
quantity | The quantity of order item, defaults to null which will add all items to the shipment. |
query | What to return; defaults to uid . See Query language. |
Shipment data based on the query parameter.
Shipment.addItem(12345678, 1234567, 2, [
"uid",
"items"
])
Add service to shipment, mainly for tracking URL.
Parameter | Description |
---|---|
uid | The unique identifier of an existing shipment. |
serviceName | The unique identifier of an existing shipment. |
query | What to return; defaults to uid . See Query language. |
Fetches information about a shipment.
Parameter | Description |
---|---|
uid | The unique identifier of an existing shipment. |
query | What to return; defaults to uid . See Query language. |
Shipment.get(12345678, [
"uid",
"items",
"packageCount"
])
Fetches the JSON Schema which can be used for client-side validation.
Will ready the shipment for delivery, and possibly trigger integrations.
Parameter | Description |
---|---|
uid | The unique identifier of an existing shipment or null to create a new shipment. |
delivered | If set, delivery status of contained Orders/Suborders/OrderItems will be evaluated and set, defaults to false . |
query | What to return; defaults to uid . See Query language. |
Shipment data based on the query parameter.
Shipment.ship(12345678, true, [
"uid",
"events"
])