T
T
Teliver
Search…
Create Task
This api allows you to create a Task for your project app.
1
POST https://api.teliver.xyz/v1/task/create?apikey=Your_Api_Key
2
3
Request Body
4
5
{
6
"pickup": {
7
"lnglat": [
8
80.2707,
9
13.0828657
10
],
11
"address": "Adyar",
12
"customer": {
13
"name": "Pickup Customer",
14
"mobile": "1234567"
15
}
16
},
17
"drop": {
18
"lnglat": [
19
80.6488,
20
13.8774545
21
],
22
"address": "Nungambakkam",
23
"customer": {
24
"name": "Drop Customer",
25
"mobile": "12345678"
26
}
27
},
28
"notes": "Food Delivery",
29
"time": "2010-10-12T08:50Z",
30
"type": 3,
31
"auto_assign": false
32
}
Copied!
The above is the sample request data for Pick/Drop Task.
Parameters
Requires
Values
Description
apikey
yes
The api key is the unique identifier for your respective application. (You can get it from yourDashboard). Always pass this as query parameter.
pickup
Mandatory if your task is a pickup task.
"pickup": {"lnglat": [80.2707,13.0828657],"address": "Adyar"} lnglat = [longitude, latitude],Address = “your complete address”
The pickup is used when the api is to create a pickup task. If the task is for both the pickup and drop then pickup and drop both were given.
drop
Mandatory if your task is drop task.
"drop":{"lnglat": [80.6488,13.8774545],"address": "Adyar"} Lnglat = [your lnglat values],Address = “your complete address”
The drop is used when the api is used to create a drop task. If the task is for both the pickup and drop then pickup and drop both were given.
type
yes
1 = if the task is pickup 2. If the task is drop. 3. If the task is pickup and drop.
The type indicates the task type.
order_id
Not mandatory
ORD123456
This is used to linkup between your order id and created task.
notes
Not mandatory
Some Notes
The notes will be send to the driver if any.
time
Not mandatory
Time in UTC ISO format(2010-10-12T08:50Z)
The time will indicate the task created time.
customer
Not mandatory
name: name of contact person, mobile: mobile number
The name and mobile number of the customer.
auto_assign
Not mandatory
If set to true, then the task will be assigned to the nearest available driver automatically.
RESPONSE:
1
{
2
"message": "Task created",
3
"success": true,
4
"data": {
5
"task": {
6
"task_id": "rxiq3nGx7",
7
"type": 3,
8
"time": "2010-10-12T08:50:00.000Z",
9
"notes": "Food Delivery",
10
"status": "created",
11
"drop": {
12
"address": "Adyar",
13
"lnglat": [
14
80.6488,
15
13.8774545
16
],
17
"customer": {
18
"name": "Pickup Customer",
19
"mobile": "1234567"
20
}
21
},
22
"pickup": {
23
"address": "Nungambakkam",
24
"lnglat": [
25
80.2707,
26
13.0828657
27
],
28
"customer": {
29
"name": "Drop Customer",
30
"mobile": "12345678"
31
}
32
},
33
"order_id": "",
34
"updated_at": "2018-06-04T13:20:19.504Z",
35
"created_at": "2018-06-04T13:20:19.504Z"
36
}
37
}
38
}
Copied!
Last modified 1yr ago
Copy link