Skip to content

Cancel order

POST /v1/cancel_order

Cancels an existing order.

Request

Send username, password and secretkey along with a data object. See Making requests.

{
  "username": "YOUR_USERNAME",
  "password": "YOUR_PASSWORD",
  "secretkey": "YOUR_SECRET_KEY",
  "data": {
    "xid": "23542123",
    "order_id": "1001",
    "msg": "sorry but cancel this order, please"
  }
}
curl -X POST https://gatewaybeta.marcofinearts.com/v1/cancel_order \
  -H "Content-Type: application/json" \
  -d '{
    "username": "YOUR_USERNAME",
    "password": "YOUR_PASSWORD",
    "secretkey": "YOUR_SECRET_KEY",
    "data": {
      "xid": "23542123",
      "order_id": "1001",
      "msg": "sorry but cancel this order, please"
    }
  }'

data fields

Field Required Validation Notes
xid Conditional Your order number. Required if order_id is not passed.
order_id Conditional Marco Fine Arts order ID. Required if xid is not passed.
msg No Reason for the request.

Response

{
  "res": "success"
}
{
  "res": "error",
  "code": "000",
  "message": "Error message."
}

Error codes

Code Error Description
501 Authentication failed Your account is invalid or does not have API access. Check username, password and secretkey.
502 Missing field One or more required fields are missing.
514 Missing field order_id or xid is required.
515 Invalid data Invalid order_id or xid.