KKatch Developers

Create a new task

POST
/tasks

Creates a new 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
sellerId?string

The unique identifier of the seller.

sellerName?string

The name of the seller.

orderNumber?string

The order number associated with the task.

customerName?string

The name of the customer.

customerNumber?string

The customer's contact number.

alternateCustomerNumber?string

Alternate customer's contact number.

deliveryZone?string

The delivery zone for the task.

additionalAddressDetail?string

Any additional address details.

collectCash?boolean

Indicates if cash is to be collected on delivery.

totalAmount?string

The total amount to be collected.

specialNotes?string

Any special notes for the delivery.

customPickup?boolean

Indicates if a custom pickup location is used.

pickupLocation?
deliveryLocation?
pickupName?string

Name of the pickup point.

pickupNumber?string

Contact number of the pickup point.

pickupNotes?string

Any notes related to the pickup.

selectedBranch?string

Branch name to pick up from, used with customPickup: true. See GET /tasks/branches.

Response Body

Task created successfully

application/json
  1. response
data*
curl -X POST "https://example.com/tasks" \  -H "x-seller-id: YOUR_SELLER_ID" \  -H "Content-Type: application/json" \  -d '{    "orderNumber": "ORD-1001",    "customerName": "Jane Doe",    "customerNumber": "96550000000",    "deliveryZone": "Salmiya",    "collectCash": true,    "totalAmount": "4.750",    "deliveryLocation": {      "latitude": 29.3375,      "longitude": 48.0758,      "fullAddress": [        "Salmiya, Block 11",        "Baghdad Street",        "Building 53"      ]    }  }'
{  "data": {    "createTask": {      "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": {}    }  }}