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
order_numbers
array[string]
required
Order number when receiving a response from the Create Order API.
reason
string 
required
Reason for order cancel.
Example
{
    "order_numbers": ["ORDER123"],
    "reason": "Alamat pickup salah"
}

Request 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 'Content-Type: application/json' \
--data-raw '{
    "order_numbers": ["ORDER123"],
    "reason": "Alamat pickup salah"
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{
    "message": "Orders cancelled successfully",
    "cancelled": [
        "ORDER123"
    ]
}
🟠400Bad Request
🟠404Record Not Found
🟠403Forbidden
Previous
Create Order
Next
Detail Order
Built with