Delete Document

This endpoint allows deleting a document from a shipment.

Document Identifier: The document_identifier path parameter can be either:

  • The document_id of the document
  • The name of the document (URL-encoded if it contains special characters or spaces)

Important Behavior:

  • The document must exist in the shipment.
  • The document content will be deleted from storage (S3).
  • This operation cannot be undone.
  • If the document was uploaded to a carrier, deleting it from Carriyo does not remove it from the carrier's system.

The shipment_id is used as a path parameter to identify the shipment. Alternatively the merchant provided shipment reference (partner_shipment_reference) can also be used instead of the shipment_id.

SecurityOAuth2-Production or OAuth2-Demo
Request
path Parameters
shipment_id
required
string

The Carriyo shipment ID or the merchant provided partner_shipment_reference.

document_identifier
required
string

The document ID or document name (URL-encoded) to identify the document to delete.

header Parameters
x-api-key
required
string
tenant-id
required
string
Responses
200

Document deleted successfully. Returns the updated shipment object.

400

Bad Request - Document not found.

404

Shipment not found.

delete/shipments/{shipment_id}/documents/{document_identifier}
Request samples
Response samples
application/json
{
  • "shipment_id": "XYZABC123",
  • "entity_type": "FORWARD",
  • "merchant": "MY_BRAND",
  • "references": {
    },
  • "carrier_account": {
    },
  • "payment": {
    },
  • "insurance": {
    },
  • "collection": {
    },
  • "delivery": {
    },
  • "pickup": {
    },
  • "dropoff": {
    },
  • "items": [
    ],
  • "freight": {
    },
  • "customs": {
    },
  • "charges": [
    ],
  • "parcels": [
    ],
  • "post_shipping_info": {
    },
  • "custom_attributes": { },
  • "order_date": "2022-01-01T09:00:00.000Z",
  • "order_type": "HOME_DELIVERY",
  • "creation_date": "2022-01-01T09:00:00.000Z",
  • "update_date": "2022-01-01T09:00:00.000Z",
  • "confirmation_date": "2022-01-01T09:00:00.000Z",
  • "estimated_process_date": "2019-08-24T14:15:22Z",
  • "promised_delivery_date": "2022-01-01T09:00:00.000Z",
  • "original_promised_delivery_date": "2022-01-01T09:00:00.000Z",
  • "estimated_shipping_cost": {
    },
  • "language": "en",
  • "return_request_id": "rma_123abcXYZ"
}