Create a new task
POST
Creates a new task.
apiKeyAuthheader
Authorization<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
sellerId?stringThe unique identifier of the seller.
sellerName?stringThe name of the seller.
orderNumber?stringThe order number associated with the task.
customerName?stringThe name of the customer.
customerNumber?stringThe customer's contact number.
alternateCustomerNumber?stringAlternate customer's contact number.
deliveryZone?stringThe delivery zone for the task.
additionalAddressDetail?stringAny additional address details.
collectCash?booleanIndicates if cash is to be collected on delivery.
totalAmount?stringThe total amount to be collected.
specialNotes?stringAny special notes for the delivery.
customPickup?booleanIndicates if a custom pickup location is used.
pickupLocation?deliveryLocation?pickupName?stringName of the pickup point.
pickupNumber?stringContact number of the pickup point.
pickupNotes?stringAny notes related to the pickup.
selectedBranch?stringBranch name to pick up from, used with customPickup: true. See GET /tasks/branches.
Task created successfully
application/json- 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": {} } }}