Cancel Order

DELETE https://api.sfox.com/v1/orders/:order_id

Cancels a specified order. If the order has already been canceled or completed, the API will return an error.

Path Parameters

ParameterTypeDescription

order_id required

string

The order ID generated by sFOX upon order creation.

Responses

200: Cancelation Confirmed
{ 
    "status": "canceled" 
}
200: Cancelation In-Progress
{ 
    "status": "cancel pending" 
}
200: Order Completed – Could Not Be Canceled
{
    "status": "order already finished"
}
400: Bad Request
//order_id does not exist in your account
{
    "error": "internal error"
}

Example Requests

curl -X DELETE
  -H 'Authorization: Bearer <API_TOKEN>' \
  'https://api.sfox.com/v1/orders/123'

Last updated