Skip to main content

Delete delivery

DELETE 

/company/delivery/:id

Permanently delete a shipment from the database (soft delete). Only shipments with a 'planned' status that have not started tracking can be deleted. Requires JWT authentication.

Use Cases:

  • Delete incorrectly created or duplicate shipments
  • Clean up test shipments
  • Remove erroneously planned shipments

Example of a successful response:

{
_id: 64d1a2b3e8b7a9001f8e7d12,
service_code: DEL-12345,
deleted: true,
deletedAt: 2025-08-08T15:20:00Z
}

Restrictions:

  • Only shipments with a 'planned' status can be deleted
  • Shipments with tracking initiated cannot be deleted
  • Shipments already completed or canceled cannot be deleted

Request

Responses

Shipment deleted successfully