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
The shipmentId
from Get shipments or Create shipment.
Response in xml format instead of json.
Request example
DELETE <base>/shipments/*shipmentId* HTTP/1.1
Response
200
Content-type: application/json
ok
if success, else no
.
Order ID for the shipment that was deleted.
Shipment ID for the shipment that was deleted.
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"
}