Book shipment
Submits a shipment draft for carrier booking.
Prerequisites
- The shipment must be
PENDING. - It must have no linked payments, quotations, proforma data, or automatic returns.
- The service must support carrier booking.
OTHERcannot be booked. - The stored shipment must meet current service requirements and have an available price greater than zero.
Behavior
- Booking revalidates the draft and recalculates its price. For parcel-shop delivery, it also revalidates the stored shop ID and refreshes the shop details.
200withPROCESSINGconfirms queue dispatch. Read the shipment for the completed booking result.409 PRICE_CHANGEDkeeps the draftPENDING, updates its price, and returnserrors.price. Review the price and use a new idempotency key to accept it. The previous key replays the conflict.409 SERVICE_NO_LONGER_AVAILABLEqueues no booking.- Retry a
503dispatch failure with the same idempotency key.
Permission
SHIPMENTS_WRITE
See Troubleshooting for authentication, access, rate-limit, and service errors.
/shipments/{id}/bookAuthorizationBearer token · headerrequiredRequired header: Authorization: Bearer <customer-api-key>. Use a Customer API key with the operation's required permission. Never use a dashboard or webshop token.
idstringrequiredID of the shipment. Obtain it from a list or create response. Unavailable IDs return 404.
Idempotency-KeystringrequiredUnique operation key, at most 255 characters after trimming. Retry the same request with the same key; use a new key for a changed request.
application/jsonEmpty JSON object ({}). No payload fields are accepted. The shipment ID comes from the URL.
objectSuccessful result
successanyrequiredmessagestringrequireddataobjectrequiredShow propertiesHide properties
idstringrequiredstatusstringrequiredpricePriceShow propertiesHide properties
currencystringrequiredbaseAmountstringrequiredsurchargeAmountstringrequiredpalletExchangeAmountstringrequiredtaxAmountstringrequiredtotalAmountstringrequiredcustomerReferencestring | nullrequestIdstringrequiredInvalid shipment input, including an invalid GLS shop ID or receiver-country mismatch.
successanyrequiredmessagestringrequireddataanyrequiredrequestIdstringrequirederrorCodestringrequirederrorsobject | anyrequiredShow propertiesHide properties
fieldsobject[]Show propertiesHide properties
objectpathstringrequirederrorCodestringrequiredmessagestringrequiredpricePriceShow propertiesHide properties
currencystringrequiredbaseAmountstringrequiredsurchargeAmountstringrequiredpalletExchangeAmountstringrequiredtaxAmountstringrequiredtotalAmountstringrequiredcurrentStatusstringretryAfterSecondsintegeranyResource does not exist or belongs to another account.
successanyrequiredmessagestringrequireddataanyrequiredrequestIdstringrequirederrorCodestringrequirederrorsobject | anyrequiredShow propertiesHide properties
fieldsobject[]Show propertiesHide properties
objectpathstringrequirederrorCodestringrequiredmessagestringrequiredpricePriceShow propertiesHide properties
currencystringrequiredbaseAmountstringrequiredsurchargeAmountstringrequiredpalletExchangeAmountstringrequiredtaxAmountstringrequiredtotalAmountstringrequiredcurrentStatusstringretryAfterSecondsintegeranyState, idempotency, price, or label conflict; inspect errorCode and errors.
successanyrequiredmessagestringrequireddataanyrequiredrequestIdstringrequirederrorCodestringrequirederrorsobject | anyrequiredShow propertiesHide properties
fieldsobject[]Show propertiesHide properties
objectpathstringrequirederrorCodestringrequiredmessagestringrequiredpricePriceShow propertiesHide properties
currencystringrequiredbaseAmountstringrequiredsurchargeAmountstringrequiredpalletExchangeAmountstringrequiredtaxAmountstringrequiredtotalAmountstringrequiredcurrentStatusstringretryAfterSecondsintegeranyShop lookup or booking dispatch is temporarily unavailable. Retry booking with the same Idempotency-Key.
successanyrequiredmessagestringrequireddataanyrequiredrequestIdstringrequirederrorCodestringrequirederrorsobject | anyrequiredShow propertiesHide properties
fieldsobject[]Show propertiesHide properties
objectpathstringrequirederrorCodestringrequiredmessagestringrequiredpricePriceShow propertiesHide properties
currencystringrequiredbaseAmountstringrequiredsurchargeAmountstringrequiredpalletExchangeAmountstringrequiredtaxAmountstringrequiredtotalAmountstringrequiredcurrentStatusstringretryAfterSecondsintegerany