Skip to main content

Link Freight Load to Shipment

POST 

/api/freight/shipments/:id/link

Link the load to a sales order shipment (fulfillment). The load takes that shipment's sales order. When the load is already booked, its references are written to the shipment's freight details as described on Book Freight.

Required scope: orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Body fields

  • sales_order_fulfillment_id (required, must exist)
  • acknowledge_retailer_routing (boolean): required as true to replace a carrier the retailer already routed the shipment to.

Refused with 409 when the shipment belongs to another order, is cancelled, already has another active booking, or its retailer routing was not acknowledged.

Errors. 409 when the load is in a state that does not allow this action; the body carries message and reasons (every problem, one per entry). 422 when the freight provider rejected the request; errors maps each field the provider named to its messages (an invalid API key appears under credentials). 502 when the freight provider did not answer; code carries the provider's error code when it sent one.

Authentication: Requires Bearer token with the orders:write scope.

Requires permission: freight.book

Request​

Responses​

OK

Response Headers
    Content-Type