Skip to main content

Register a deviation on an order

POST 

/freight/:reference/deviation

Register a deviation (e.g. damaged goods, a failed pickup) on an existing order identified by its Swipload reference. The calling company must be the shipper or the carrier on the order, and the deviation is attributed to the user the api-token resolves to.

DeviationMoment is optional and is recorded as sent — it is not checked against the order's status. When it is omitted the moment is derived from that status instead: Deliver for an order that is InTransit or Delivered, PickUp for any earlier status. Either way the moment that was recorded is returned in the response. A deviation cannot be registered on an order that is Draft, Cancelled or Deleted. A supporting document is optional and may be supplied inline as DocumentData or by link as DocumentURL, but never both. A DocumentURL that cannot be downloaded does not fail the request: the deviation is registered and the response reports DocumentUploaded as false with the reason in DocumentError.

Request​

Responses​

Deviation successfully registered.