{"_id":"5a99128217d31e0037e6690c","project":"56f962d8d522d81700600280","version":{"_id":"56f962d8d522d81700600283","hasDoc":true,"__v":5,"hasReference":true,"project":"56f962d8d522d81700600280","createdAt":"2016-03-28T16:59:04.166Z","releaseDate":"2016-03-28T16:59:04.166Z","categories":["56f962d8d522d81700600284","5951d5489435c30015923d54","5951d6de50727a00155053c6","5951d99224e2f70015dec6c6","5951e40ef5c137001533814b"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"5951d6de50727a00155053c6","project":"56f962d8d522d81700600280","version":"56f962d8d522d81700600283","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-06-27T03:54:06.338Z","from_sync":false,"order":4,"slug":"reference","title":"Run API"},"user":"57736a020a6d610e00dea1fd","__v":3,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-03-02T08:59:46.464Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[]},"results":{"codes":[]},"settings":"","auth":"required","params":[{"_id":"5a99128217d31e0037e6690f","ref":"","in":"path","required":true,"desc":"Id of the driver that you want to bulk create tasks.","default":"","type":"string","name":"driverId"},{"_id":"5a99128217d31e0037e6690e","ref":"","in":"body","required":false,"desc":"array of tasks you want create.","default":"","type":"array_object","name":"tasks"},{"_id":"5a99128217d31e0037e6690d","ref":"","in":"header","required":false,"desc":"Authentication Key","default":"","type":"string","name":"Authorization"}],"url":"/api/v1/drivers/:driverId/tasks/bulkCreate"},"isReference":false,"order":14,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"tasks\\\": [\\n    {\\n      \\\"awb\\\": \\\"000d0000er027\\\",\\n      \\\"details\\\": \\\"Test Task 01\\\",\\n      \\\"pickupTask\\\": true,\\n      \\\"totalPrice\\\": 100,\\n      \\\"paymentTypeId\\\": 1,\\n      \\\"completeAfter\\\": \\\"2018-02-28 23:59:00\\\",\\n      \\\"completeBefore\\\": \\\"2018-03-05 09:00:00\\\",\\n      \\\"address\\\": {\\n        \\\"address\\\":\\\"Test\\\",\\n        \\\"lat\\\":16.1,\\n        \\\"lng\\\": 108.4\\n      }\\n    },\\n    {\\n      \\\"awb\\\": \\\"000d0000e028\\\",\\n      \\\"details\\\": \\\"Test Task 02\\\",\\n      \\\"pickupTask\\\": false,\\n      \\\"completeAfter\\\": \\\"2018-02-23 23:59:00\\\",\\n      \\\"completeBefore\\\": \\\"2018-03-05 09:00:00\\\",\\n      \\\"address\\\": {\\n        \\\"address\\\":\\\"Test 2\\\",\\n        \\\"lat\\\":16.10,\\n        \\\"lng\\\": 108.325\\n      }\\n    }\\n  ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Example\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"bulk-create","type":"endpoint","title":"Bulk Create Task"}

postBulk Create Task


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

driverId:
required
string
Id of the driver that you want to bulk create tasks.

Body Params

tasks:
array of objects
array of tasks you want create.

Headers

Authorization:
string
Authentication Key

Documentation

[block:code] { "codes": [ { "code": "{\n \"tasks\": [\n {\n \"awb\": \"000d0000er027\",\n \"details\": \"Test Task 01\",\n \"pickupTask\": true,\n \"totalPrice\": 100,\n \"paymentTypeId\": 1,\n \"completeAfter\": \"2018-02-28 23:59:00\",\n \"completeBefore\": \"2018-03-05 09:00:00\",\n \"address\": {\n \"address\":\"Test\",\n \"lat\":16.1,\n \"lng\": 108.4\n }\n },\n {\n \"awb\": \"000d0000e028\",\n \"details\": \"Test Task 02\",\n \"pickupTask\": false,\n \"completeAfter\": \"2018-02-23 23:59:00\",\n \"completeBefore\": \"2018-03-05 09:00:00\",\n \"address\": {\n \"address\":\"Test 2\",\n \"lat\":16.10,\n \"lng\": 108.325\n }\n }\n ]\n}", "language": "json", "name": "Example" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}