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

ParameterTypeDescription
order_id
(required)
stringThe ID of the order that needs to be cancelled

Request Data

ParamaterTypeDescription
reasonstringState 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

ParameterDescription
metadataMetadata information
metadata.pathAPI endpoint path
metadata.http_status_codeHTTP status code
metadata.http_statusHTTP status
metadata.timestampTimestamp
dataAll important information about order cancelation placed on this param
data.cancel_orderAll important information about order cancellation placed on this param
data.order_idOrder ID cancelled
data.cancelCancellation success information. Return true if successfully cancelled