Cancel Order

Cancel Order

You can use this endpoint to cancel an order.

Authorizations : X-API-Key_Header
Request Body Schema : application/json

Delete Cancel Order

DELETE /v3/order/{ORDER_ID}}

Path Parameter

Parameter

Type

Description

order_id
(required)

string

The ID of the order that needs to be cancelled

Request Data

Paramater

Type

Description

reason

string

State the reason why the order needs to be cancelled

Sample Request & Response

curl --location --request DELETE '{{baseUrl}}/v3/order/2155YY54QW2PM' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reason": "Stock barang habis"
}'
{
    "metadata": {
        "path": "/v3/order/2155YY54QW2PM?%3Aorder_id=2155YY54QW2PM&",
        "http_status_code": 200,
        "http_status": "OK",
        "timestamp": 1622193589
    },
    "data": {
        "cancel_order": {
            "order_id": "2155YY54QW2PM",
            "cancel": true
        }
    }
}

Response List

Parameter

Description

metadata

Metadata information

metadata.path

API endpoint path

metadata.http_status_code

HTTP status code

metadata.http_status

HTTP status

metadata.timestamp

Timestamp

data

All important information about order cancelation placed on this param

data.cancel_order

All important information about order cancellation placed on this param

data.order_id

Order ID cancelled

data.cancel

Cancellation success information. Return true if successfully cancelled