Cancel Task
Cancels a task.
apiKeyAuthAuthorization<token>Required on every request. Send apikey <your-api-key>, together with the x-seller-id header.
x-seller-id*stringYour seller id.
application/json- body
id*stringThe task id to cancel.
status*"cancelled""cancelled"Task cancelled successfully
application/json- response
id*stringThe unique identifier of the task.
sellerId?stringThe unique identifier of the seller.
sellerName?stringThe name of the seller.
orderNumber?stringThe order number.
customerName?stringThe name of the customer.
customerNumber?stringThe customer number.
alternateCustomerNumber?stringAlternate customer number.
deliveryZone?stringThe delivery zone.
additionalAddressDetail?stringAdditional details of the address.
collectCash?booleanIndicates if cash is to be collected.
totalAmount?stringThe total amount for the task.
specialNotes?stringSpecial notes related to the task.
status*StatusEnumThe current status of the task.
"pending""requested""accepted""pickedup""enroute""delivered""cancelled""rejected""failed"kmart?booleanIndicates if the order is from Kmart.
customPickup?booleanIndicates if a custom pickup was requested.
statusHistory?array<>History of status changes for the task.
createdAt?stringThe timestamp when the task was created.
date-timeupdatedAt?stringThe timestamp when the task was last updated.
date-timedeliveryId?stringThe unique identifier of the delivery.
driver?Details of the driver assigned to the task.
deliveryTime?stringThe timestamp when the delivery is scheduled.
date-timecompletedTime?stringThe timestamp when the task was completed.
date-timesellerDetail?Details of the seller.
deliveryDispatched?booleanIndicates if the delivery has been dispatched.
pickupLocation?Coordinates of the pickup location.
addressDetails?Detailed address information.
travelDetail?Details about the travel distance and time.
tookanwebhookrequest?Webhook request data from Tookan.
curl -X PUT "https://example.com/tasks/update-status" \ -H "x-seller-id: YOUR_SELLER_ID" \ -H "Content-Type: application/json" \ -d '{ "id": "string", "status": "cancelled" }'{ "id": "string", "sellerId": "string", "sellerName": "string", "orderNumber": "string", "customerName": "string", "customerNumber": "string", "alternateCustomerNumber": "string", "deliveryZone": "string", "additionalAddressDetail": "string", "collectCash": true, "totalAmount": "string", "specialNotes": "string", "status": "pending", "kmart": true, "customPickup": true, "statusHistory": [ { "id": "string", "status": "pending", "timestamp": "2019-08-24T14:15:22Z" } ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "deliveryId": "string", "driver": { "name": "string", "phone": "string", "trackingLink": "string" }, "deliveryTime": "2019-08-24T14:15:22Z", "completedTime": "2019-08-24T14:15:22Z", "sellerDetail": { "shopName": "string", "phone": "string", "address": "string", "location": "string" }, "deliveryDispatched": true, "pickupLocation": { "latitude": 0.1, "longitude": 0.1 }, "addressDetails": { "fromAddr": { "address": "string", "moreInfo": { "streetNumber": "string", "streetName": "string", "neighborhood": "string", "locality": "string", "administrativeArea": "string", "country": "string", "postalCode": "string" } }, "toAddr": { "address": "string", "moreInfo": { "streetNumber": "string", "streetName": "string", "neighborhood": "string", "locality": "string", "administrativeArea": "string", "country": "string", "postalCode": "string" } } }, "travelDetail": { "totalDistance": 0, "duration": 0, "durationInTraffic": 0, "hasTraffic": true, "estimatedDelayByTraffic": 0 }, "tookanwebhookrequest": {}}