1. Inbound Shipments/ASN
  2. Delete Inbound Shipments
DELETE
/inbound_shipments
curl --request DELETE \
     --url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/inbound_shipments \
     --header 'Authorization: Bearer <token>' \
     --header 'Content-Type: application/json' \
     --data '{
  "customer_identifier": "<string>"
}'

Soft delete inbound shipments that are no longer needed. This endpoint performs a logical deletion, maintaining records for audit purposes.

Only shipments with open status can be deleted. Shipments that are already on dock or being received cannot be removed.

This is a soft delete operation. Shipments are marked as deleted but remain in the system for historical tracking and reconciliation.

​
Request Body Schema

Send an array of objects containing the customer identifiers of shipments to delete.

customer_identifier
required
string

Unique shipment identifier that matches the existing shipment you want to delete.

curl -X DELETE "https://app.masonhub.co/{account}/api/v1/inbound_shipments" \
  -H "Authorization: Bearer your_jwt_token" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "customer_identifier": "shipment234523"
    },
    {
      "customer_identifier": "shipment234524"
    }
  ]'
{
  "success": true,
  "data": [
    {
      "customer_identifier": "shipment234523",
      "status": "deleted",
      "deleted_at": "2018-12-02T14:30:00Z"
    },
    {
      "customer_identifier": "shipment234524",
      "status": "deleted",
      "deleted_at": "2018-12-02T14:30:00Z"
    }
  ]
}

​
Delete Behavior

When you delete an inbound shipment:

1

Status Validation

System checks that the shipment is in open status

2

Soft Delete

Shipment is marked as deleted but remains in the system

3

Inventory Adjustment

Expected inventory is reduced for all line item SKUs

4

Callback Triggered

skuInventoryChange callbacks are sent for affected SKUs

​
When to Delete Shipments

​
Batch Operations

You can delete multiple shipments in a single request. The system processes each deletion independently:

  • Full Success: All shipments deleted successfully (HTTP 200)
  • Partial Success: Some deletions succeeded, others failed (HTTP 207)
  • Full Failure: All deletions failed (HTTP 400)

When batch deleting, check the response carefully. The API returns detailed information about which shipments were successfully deleted and which failed, including specific error reasons.

​
Best Practices

​
Status Restrictions

Shipments can only be deleted when in open status. Once a shipment moves to:

  • onDock: Shipment has arrived - contact MasonHub support
  • receivingStarted: Processing has begun - deletion not allowed
  • receivingComplete: Processing complete - shipment is closed

​
Inventory Impact

Deleting an inbound shipment immediately affects expected inventory:

  • Expected quantities are reduced for all line items
  • Available and allocated inventory remain unchanged
  • skuInventoryChange callbacks notify you of the changes
  • The system maintains accurate inventory projections

If you accidentally delete a shipment, you can recreate it using the same customer_identifier as long as no new shipment with that identifier has been created.