Cancel shipment at carrier

POST /openapi/Shipment/CancelShipmentOnCarrier — TMS API · Shipment Update and Cancellation

Deletes the shipment record on the carrier side. Works also for active shipments with label taken; after cancellation, a new label can be taken with the same shipmentKey.

  • shipmentKey can be the ShipmentKey or tracking number of the shipment. For multi-package / single tracking number accounts, ShipmentKey is the same as the bill of lading number.
  • If cancelShipmentInfos[].isCancelNotSupported: true in the response, the carrier integration does not support cancellation; the shipment is not considered canceled.
  • To recall a consigned (delivered to carrier) shipment, use RecallShipment.

İstek gövdesi

  • clientCode (string, zorunlu): Organization code.
  • accountCode (string, zorunlu): Account code.
  • shipmentKey (string, zorunlu): Shipment's ShipmentKey or tracking number.
  • cancellationDescription (string): Cancellation description to be sent to the carrier (optional).

Yanıtlar

  • 200: Carrier cancellation response
  • 400: Shipment not found or could not be canceled
  • 401: No token, invalid or expired (response without body).

200 yanıt alanları

  • carrierCode (string): Carrier code.
  • cancelShipmentInfos (object[]): Cancellation result per shipment.
    • cancelShipmentInfos.message (string): Carrier message.
    • cancelShipmentInfos.isSuccess (boolean): Is cancellation successful.
    • cancelShipmentInfos.shipmentId (integer): TMS shipment ID.
    • cancelShipmentInfos.trackingNumber (string): Tracking number.
    • cancelShipmentInfos.isCancelNotSupported (boolean): true if carrier integration does not support cancellation; shipment is not considered canceled.