Skip to content
StraventaDocs
Now in Sandbox.

Cancel a consignment before it is collected

POST
/v1/marketplace/shipping/admin/shipments/{id}/cancel

Asks the aggregator to void the booking and marks the row cancelled. ONLY requested AND booked CAN BE CANCELLED. Once a courier has scanned the parcel the consignment is a physical fact, and a row that said "cancelled" over a parcel in a van would be a lie the seller acts on. Permission marketplace.order.write. Like every admin route in this service it carries NO permission middleware — the handler calls the check itself.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://sandbox.505pay.link/v1/marketplace/shipping/admin/shipments/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel" \  -H "Content-Type: application/json" \  -d '{    "store_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",    "reason": "buyer cancelled before pickup"  }'
{
  "shipment": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
    "provider_name": "string",
    "status": "requested",
    "courier_code": "string",
    "service_code": "string",
    "waybill": "string",
    "label_url": "string",
    "cost_cents": 0,
    "currency": "IDR",
    "booked_at": "string"
  }
}
{
  "error": "not_found",
  "message": "resource not found",
  "request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}
{
  "error": "not_found",
  "message": "resource not found",
  "request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}
{
  "error": "not_found",
  "message": "resource not found",
  "request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}
{
  "error": "not_found",
  "message": "resource not found",
  "request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}
{
  "error": "not_found",
  "message": "resource not found",
  "request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}
{
  "error": "not_found",
  "message": "resource not found",
  "request_id": "01916b2a-f3c0-7000-0000-0000000000ff"
}

Was this page helpful?