KKatch Developers

Cancel Task

PUT
/tasks/update-status

Cancels a task.

Authorization

apiKeyAuth
headerAuthorization<token>

Required on every request. Send apikey <your-api-key>, together with the x-seller-id header.

Header Parameters

x-seller-id*string

Your seller id.

Request Body

application/json
  1. body
id*string

The task id to cancel.

status*"cancelled"
Value in"cancelled"

Response Body

Task cancelled successfully

application/json
  1. response
id*string

The unique identifier of the task.

sellerId?string

The unique identifier of the seller.

sellerName?string

The name of the seller.

orderNumber?string

The order number.

customerName?string

The name of the customer.

customerNumber?string

The customer number.

alternateCustomerNumber?string

Alternate customer number.

deliveryZone?string

The delivery zone.

additionalAddressDetail?string

Additional details of the address.

collectCash?boolean

Indicates if cash is to be collected.

totalAmount?string

The total amount for the task.

specialNotes?string

Special notes related to the task.

status*StatusEnum

The current status of the task.

Value in"pending""requested""accepted""pickedup""enroute""delivered""cancelled""rejected""failed"
kmart?boolean

Indicates if the order is from Kmart.

customPickup?boolean

Indicates if a custom pickup was requested.

statusHistory?array<>

History of status changes for the task.

createdAt?string

The timestamp when the task was created.

Formatdate-time
updatedAt?string

The timestamp when the task was last updated.

Formatdate-time
deliveryId?string

The unique identifier of the delivery.

driver?

Details of the driver assigned to the task.

deliveryTime?string

The timestamp when the delivery is scheduled.

Formatdate-time
completedTime?string

The timestamp when the task was completed.

Formatdate-time
sellerDetail?

Details of the seller.

deliveryDispatched?boolean

Indicates 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": {}}