Skip to main content

bookShipmentForShippedGoods

Requires permission sales:shipment:create.

Books a courier for goods that have already shipped from a sales order. It never issues stock. When every shipped item on the order is already covered by a shipment, it is refused and asks you to ship the remaining items first. Needs the delivery partners feature on your plan and the shipment create permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation BookShipmentForShippedGoods($input: BookShipmentForShippedGoodsInput!) {
bookShipmentForShippedGoods(input: $input) {
id
serviceLevelCode
shipmentNumber
trackingNumber
carrierName
serviceLevelName
costSplit {
changedByName
changedAt
courierCharge
currency
customerPaid
plannedCost
}
}
}

Variables:

{
"input": {
"delivery": {
"deliveryPartnerConfigId": "id"
},
"salesOrderId": "id"
}
}

Response:

{
"data": {
"bookShipmentForShippedGoods": [
{
"id": "id",
"serviceLevelCode": "string",
"shipmentNumber": "string",
"trackingNumber": "string",
"carrierName": "string",
"serviceLevelName": "string",
"costSplit": {
"changedByName": "string",
"changedAt": "2025-01-15T00:00:00Z",
"courierCharge": "string",
"currency": "string",
"customerPaid": "string",
"plannedCost": "string"
}
}
]
}
}
bookShipmentForShippedGoods(
input: BookShipmentForShippedGoodsInput!
): [ShipmentGql!]!

Arguments​

bookShipmentForShippedGoods.input ● BookShipmentForShippedGoodsInput! non-null input​

The details of the shipment for shipped goods to book.

Type​

ShipmentGql object​

A shipment as staff see it. It includes the seller's cost and is never returned to buyers.