Order API - Delete Shipment

Delete shipment

Endpoint: DELETE *base*/shipments/*shipmentId*[?xml=1]
Authentication: API Key

This will delete the shipment completely. Will only work if the shipment does not have any invoices or credit notes connected to it.

Parameters

shipmentId
string
optional

The shipmentId from Get shipments or Create shipment.

xml
boolean
optional

Response in xml format instead of json.

Request example

DELETE <base>/shipments/*shipmentId* HTTP/1.1

Response

200 Content-type: application/json

status
string
required

ok if success, else no.

order
int
optional

Order ID for the shipment that was deleted.

shipment
string
optional

Shipment ID for the shipment that was deleted.

msg
string
optional

If status returns no, this value should send back a message why it failed.

Response example

{
  "status": "ok",
  "msg": "shipment removed",
  "order": 8,
  "shipment": "8-1"
}

Error example

{
  "status": "no",
  "msg": "shipment has invoices or creditnotes and could not be deleted.",
  "shipment": "3-1"
}