Returning doc was deleted response for repeated deletion of a shipment
General Information
Method Name
Delete document
HTTP Method
DELETE
Route
DELETE /ui/v.1.0/shipments/{id}
DELETE /v.1.0/shipments/{id}
DELETE /mobileapp/v.1.1/shipments/{id}
DELETE /cbc/v.1.0/shipments/{id}
DELETE /internal/awis/shipments/{id}
Change Type
existing endpoint update
Authorization
Authorization: Bearer jwt-token…
Product
API Gateway
Description
To correctly handle repeated shipment deletion requests, an additional shipment status check is performed through Tracking Service. The purpose is to return a unified response shipment_was_deleted if the shipment has already been deleted.
Processing logic
When executing a Delete Shipment request, API additionally sends a GET request to Tracking Service using the following parameter:
withDeleted=1This parameter allows retrieving data for previously deleted shipments.
The response is then analyzed based on the field:
deleted_atif
deleted_at ≠ null→ the shipment was previously deleted; API returns:
HTTP status: 422 Unprocessable Entity
if deleted_at = null or the field is missing → shipment is not found; current behavior remains unchanged and API returns:
HTTP status: 404 Not Found
Request example
Successful response
HTTP status: 200 OK