boscod OpenAPI
  1. Orders
boscod OpenAPI
  • Introduction
  • Shipping label
  • Errors
  • Changelog
  • API
    • Coverage Area
      • Provinces
      • Cities
      • Districts
      • Search Area
    • Rates
      • List Courier
      • Shipping Fee
      • Shipping Fee (SSE)
    • Orders
      • Create Order
        POST
      • Cancel Order
        POST
      • Detail Order
        GET
      • Tracking
        GET
      • Estimation Rates
        GET
  • Webhook
  1. Orders

Cancel Order

Developing
POST
/v1/order/cancel
Cancels an existing delivery order, with the condition that only orders with the "Pending Pickup" status can be canceled. The cancellation process supports multiple orders, which can be provided as an array of order numbers.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "order_numbers": ["ORDER123"],
    "reason": "Alamat pickup salah"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://demo.boscod.com:4004/v1/order/cancel' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_numbers": ["ORDER123"],
    "reason": "Alamat pickup salah"
}'

Responses

🟢200Success
application/json
Body

Example
{
    "message": "Orders cancelled successfully",
    "cancelled": [
        "ORDER123"
    ]
}
🟠400Bad Request
🟠404Record Not Found
🟠403Forbidden
Modified at 2025-03-05 04:45:35
Previous
Create Order
Next
Detail Order
Built with