Delete shipment¶
Order API v1
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¶
string
optional
|
The shipmentId from Get shipments or Create shipment. |
boolean
optional
|
Response in xml format instead of json. |
Request example¶
1 | DELETE <base>/shipments/*shipmentId* HTTP/1.1
|
Response¶
200
Content-type: application/json
string
required
|
ok if success, else no . |
int
|
Order ID for the shipment that was deleted. |
string
|
Shipment ID for the shipment that was deleted. |
string
optional
|
If status returns no , this value should send back a message why it failed. |
Response example¶
1 2 3 4 5 6 | {
"status": "ok",
"msg": "shipment removed",
"order": 8,
"shipment": "8-1"
}
|
Error example¶
1 2 3 4 5 | {
"status": "no",
"msg": "shipment has invoices or creditnotes and could not be deleted.",
"shipment": "3-1"
}
|