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
Parameter | Type | Description |
---|
| | 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'
const axios = require('axios');
axios({
method: 'delete',
url: 'https://api.sfox.com/v1/orders/123',
headers: {
'Authorization': 'Bearer <API_KEY>'
}
}).then(response => {
console.log(response)
}).catch(err => {
console.error(err)
});
import requests
data = requests.delete(
"https://api.sfox.com/v1/orders/123",
headers={
"Authorization": "Bearer <API_KEY>",
}
)
print(data)
Last updated