Create task and assign it
For each order you can create task and assign it to a delivery service.
post
https://api.smartlivraison.com/v1/
merchant_create_tasks
Create Task and Assign to Delivery Service
HTTP
CURL
Java - OkHttp
Python - http.client
PHP - cURL
1
POST /v1/merchant_create_tasks HTTP/1.1
2
Host: api.smartlivraison.com
3
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzIiwianRpIjoiZmZmNDdmOGNlZDhkNjAxNGRhOWRiNmQ4ZTNmMzI4MmFhNzFiZWU2NTYzNTdhNTUyMWY1M2EyYWRjZjE2NjQwNjUyMTE2NTdmYmZlNzVkNGYiLCJpYXQiOjE1OTM5OTQ0NTksIm5iZiI6MTU5Mzk5NDQ1OSwiZXhwIjoxNTkzOTk0NzU5LCJzdWIiOiIiLCJzY29wZXMiOlsiKiJdfQ.ccMBYzUl5U7LYmJWaiPpK6LOoXVQgczJ8K_E3Tk8hoSaFX401oDVKCJ2MzVoU_C7evpKIg5FosNB3O65LGoQSxzcN-HCFQBt0rOUsrgC-SMGdHPS-xci648n4yC8a_P1PGRdmJq7DYXZX_t2TILsMfkZCb2GYElmGrfeRqKcJGyo-3yiHi4QDaqUNbnun3kyAKUm55Z_RfCNw3W1HegmLI1mjwJ7rinDBGe_8MXMAfp5GCv9JrH2WK28_YkHrs9iwA9pG00j_cUjK3ZrJL3OvSIxFAg0fQ9IeehgfpDgyGZnkFgAIld8m-qVKrPttCZgspbV6mG35Z-DW8KuKAVnatlWaXrZWSKd2SpQb4Elp7PyJ-97vGG18f7486YS_Up6QruM9lpk87qteTzKQB6dJoHVcuqvudkGD1SExlcg7fyEMkHsYKd65U_tVSS_nzuMAykf9eVJdCut32rZoALYVViWQJiLR6sIAaB4xwvEOQvauEVX_E7TU6mXFJMMjqxqCCJ2ljqsWSGVezIlD6ScxdSvBbfkHfhGxcl4NOL4lnDsxiaAg1t4eEec2zlVr1OMW82NHbbDP7aVbd1gRGCRoKcZpvNpg9DzNz3ZprKWtI93OIyaRLOWPFu1hQPfaaAxMTDL4Y_fIzXh1MYOZDcJ0BwskSWA3klIxyam35kDfGU
4
Content-Type: application/json
5
6
7
{
8
"jobs":[
9
{
10
"customer_name": "Ange Bagui",
11
"customer_phone": "+22556888385",
12
"customer_email": "",
13
"location_name":"Pharmacie Arums",
14
"location_latitude":"5.3955564",
15
"location_longitude": "-3.9770718",
16
"order_id":"1589661051",
17
"order_description":"",
18
"order_price":"10000",
19
"currency_code":"XOF",
20
"has_pickup":true,
21
"delivery_fees":"0",
22
"job_datetime":"2020-05-17 09:00:00",
23
"images":[],
24
"description":""
25
},
26
{
27
"customer_name": "Marie Beatrice Tahi",
28
"customer_phone": "+22556888385",
29
"customer_email": "",
30
"location_name":"Abidjan Mall",
31
"location_latitude":"5.3617424",
32
"location_longitude": "-3.966724",
33
"order_id":"1589661051",
34
"order_description":"",
35
"order_price":"10000",
36
"currency_code":"XOF",
37
"has_pickup":false,
38
"delivery_fees":"1500",
39
"job_datetime":"2020-05-17 12:00:00",
40
"images":[],
41
"description":""
42
}
43
44
],
45
46
"delivery_service":"adjemin",
47
"merchant_id":"1",
48
"customer_payment_method_code":"cash",
49
"customer_paid":false,
50
"merchant_notification_url": "https://api.adjemin.com/v2/smartlivraison_notify"
51
}
Copied!
1
curl --location --request POST 'https://api.smartlivraison.com/v1/merchant_create_tasks' \
2
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzIiwianRpIjoiZmZmNDdmOGNlZDhkNjAxNGRhOWRiNmQ4ZTNmMzI4MmFhNzFiZWU2NTYzNTdhNTUyMWY1M2EyYWRjZjE2NjQwNjUyMTE2NTdmYmZlNzVkNGYiLCJpYXQiOjE1OTM5OTQ0NTksIm5iZiI6MTU5Mzk5NDQ1OSwiZXhwIjoxNTkzOTk0NzU5LCJzdWIiOiIiLCJzY29wZXMiOlsiKiJdfQ.ccMBYzUl5U7LYmJWaiPpK6LOoXVQgczJ8K_E3Tk8hoSaFX401oDVKCJ2MzVoU_C7evpKIg5FosNB3O65LGoQSxzcN-HCFQBt0rOUsrgC-SMGdHPS-xci648n4yC8a_P1PGRdmJq7DYXZX_t2TILsMfkZCb2GYElmGrfeRqKcJGyo-3yiHi4QDaqUNbnun3kyAKUm55Z_RfCNw3W1HegmLI1mjwJ7rinDBGe_8MXMAfp5GCv9JrH2WK28_YkHrs9iwA9pG00j_cUjK3ZrJL3OvSIxFAg0fQ9IeehgfpDgyGZnkFgAIld8m-qVKrPttCZgspbV6mG35Z-DW8KuKAVnatlWaXrZWSKd2SpQb4Elp7PyJ-97vGG18f7486YS_Up6QruM9lpk87qteTzKQB6dJoHVcuqvudkGD1SExlcg7fyEMkHsYKd65U_tVSS_nzuMAykf9eVJdCut32rZoALYVViWQJiLR6sIAaB4xwvEOQvauEVX_E7TU6mXFJMMjqxqCCJ2ljqsWSGVezIlD6ScxdSvBbfkHfhGxcl4NOL4lnDsxiaAg1t4eEec2zlVr1OMW82NHbbDP7aVbd1gRGCRoKcZpvNpg9DzNz3ZprKWtI93OIyaRLOWPFu1hQPfaaAxMTDL4Y_fIzXh1MYOZDcJ0BwskSWA3klIxyam35kDfGU' \
3
--header 'Content-Type: application/json' \
4
--data-raw '
5
{
6
"jobs":[
7
{
8
"customer_name": "Ange Bagui",
9
"customer_phone": "+22556888385",
10
"customer_email": "",
11
"location_name":"Pharmacie Arums",
12
"location_latitude":"5.3955564",
13
"location_longitude": "-3.9770718",
14
"order_id":"1589661051",
15
"order_description":"",
16
"order_price":"10000",
17
"currency_code":"XOF",
18
"has_pickup":true,
19
"delivery_fees":"0",
20
"job_datetime":"2020-05-17 09:00:00",
21
"images":[],
22
"description":""
23
},
24
{
25
"customer_name": "Marie Beatrice Tahi",
26
"customer_phone": "+22556888385",
27
"customer_email": "",
28
"location_name":"Abidjan Mall",
29
"location_latitude":"5.3617424",
30
"location_longitude": "-3.966724",
31
"order_id":"1589661051",
32
"order_description":"",
33
"order_price":"10000",
34
"currency_code":"XOF",
35
"has_pickup":false,
36
"delivery_fees":"1500",
37
"job_datetime":"2020-05-17 12:00:00",
38
"images":[],
39
"description":""
40
}
41
42
],
43
44
"delivery_service":"adjemin",
45
"merchant_id":"1",
46
"customer_payment_method_code":"cash",
47
"customer_paid":false,
48
"merchant_notification_url": "https://api.adjemin.com/v2/smartlivraison_notify"
49
}'
Copied!
1
OkHttpClient client = new OkHttpClient().newBuilder()
2
.build();
3
MediaType mediaType = MediaType.parse("application/json");
4
RequestBody body = RequestBody.create(mediaType, "\n{\n\t\"jobs\":[\n\t\t{\n\t\t\"customer_name\": \"Ange Bagui\",\n\t\t\"customer_phone\": \"+22556888385\",\n\t\t\"customer_email\": \"\",\n\t\t\"location_name\":\"Pharmacie Arums\",\n\t\t\"location_latitude\":\"5.3955564\",\n\t\t\"location_longitude\": \"-3.9770718\",\n\t\t\"order_id\":\"1589661051\",\n\t\t\"order_description\":\"\",\n\t\t\"order_price\":\"10000\",\n\t\t\"currency_code\":\"XOF\",\n\t\t\"has_pickup\":true,\n\t\t\"delivery_fees\":\"0\",\n\t\t\"job_datetime\":\"2020-05-17 09:00:00\",\n\t\t\"images\":[],\n\t\t\"description\":\"\"\n\t\t},\n\t\t{\n\t\t\"customer_name\": \"Marie Beatrice Tahi\",\n\t\t\"customer_phone\": \"+22556888385\",\n\t\t\"customer_email\": \"\",\n\t\t\"location_name\":\"Abidjan Mall\",\n\t\t\"location_latitude\":\"5.3617424\",\n\t\t\"location_longitude\": \"-3.966724\",\n\t\t\"order_id\":\"1589661051\",\n\t\t\"order_description\":\"\",\n\t\t\"order_price\":\"10000\",\n\t\t\"currency_code\":\"XOF\",\n\t\t\"has_pickup\":false,\n\t\t\"delivery_fees\":\"1500\",\n\t\t\"job_datetime\":\"2020-05-17 12:00:00\",\n\t\t\"images\":[],\n\t\t\"description\":\"\"\n\t\t}\n\t\t\n\t\t],\n\t\t\n\t\"delivery_service\":\"adjemin\",\n\t\"merchant_id\":\"1\",\n\t\"customer_payment_method_code\":\"cash\",\n\t\"customer_paid\":false,\n\t\"merchant_notification_url\": \"https://api.adjemin.com/v2/smartlivraison_notify\"\n}");
5
Request request = new Request.Builder()
6
.url("https://api.smartlivraison.com/v1/merchant_create_tasks")
7
.method("POST", body)
8
.addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzIiwianRpIjoiZmZmNDdmOGNlZDhkNjAxNGRhOWRiNmQ4ZTNmMzI4MmFhNzFiZWU2NTYzNTdhNTUyMWY1M2EyYWRjZjE2NjQwNjUyMTE2NTdmYmZlNzVkNGYiLCJpYXQiOjE1OTM5OTQ0NTksIm5iZiI6MTU5Mzk5NDQ1OSwiZXhwIjoxNTkzOTk0NzU5LCJzdWIiOiIiLCJzY29wZXMiOlsiKiJdfQ.ccMBYzUl5U7LYmJWaiPpK6LOoXVQgczJ8K_E3Tk8hoSaFX401oDVKCJ2MzVoU_C7evpKIg5FosNB3O65LGoQSxzcN-HCFQBt0rOUsrgC-SMGdHPS-xci648n4yC8a_P1PGRdmJq7DYXZX_t2TILsMfkZCb2GYElmGrfeRqKcJGyo-3yiHi4QDaqUNbnun3kyAKUm55Z_RfCNw3W1HegmLI1mjwJ7rinDBGe_8MXMAfp5GCv9JrH2WK28_YkHrs9iwA9pG00j_cUjK3ZrJL3OvSIxFAg0fQ9IeehgfpDgyGZnkFgAIld8m-qVKrPttCZgspbV6mG35Z-DW8KuKAVnatlWaXrZWSKd2SpQb4Elp7PyJ-97vGG18f7486YS_Up6QruM9lpk87qteTzKQB6dJoHVcuqvudkGD1SExlcg7fyEMkHsYKd65U_tVSS_nzuMAykf9eVJdCut32rZoALYVViWQJiLR6sIAaB4xwvEOQvauEVX_E7TU6mXFJMMjqxqCCJ2ljqsWSGVezIlD6ScxdSvBbfkHfhGxcl4NOL4lnDsxiaAg1t4eEec2zlVr1OMW82NHbbDP7aVbd1gRGCRoKcZpvNpg9DzNz3ZprKWtI93OIyaRLOWPFu1hQPfaaAxMTDL4Y_fIzXh1MYOZDcJ0BwskSWA3klIxyam35kDfGU")
9
.addHeader("Content-Type", "application/json")
10
.build();
11
Response response = client.newCall(request).execute();
Copied!
1
import http.client
2
import mimetypes
3
conn = http.client.HTTPSConnection("api.smartlivraison.com")
4
payload = "\n{\n\t\"jobs\":[\n\t\t{\n\t\t\"customer_name\": \"Ange Bagui\",\n\t\t\"customer_phone\": \"+22556888385\",\n\t\t\"customer_email\": \"\",\n\t\t\"location_name\":\"Pharmacie Arums\",\n\t\t\"location_latitude\":\"5.3955564\",\n\t\t\"location_longitude\": \"-3.9770718\",\n\t\t\"order_id\":\"1589661051\",\n\t\t\"order_description\":\"\",\n\t\t\"order_price\":\"10000\",\n\t\t\"currency_code\":\"XOF\",\n\t\t\"has_pickup\":true,\n\t\t\"delivery_fees\":\"0\",\n\t\t\"job_datetime\":\"2020-05-17 09:00:00\",\n\t\t\"images\":[],\n\t\t\"description\":\"\"\n\t\t},\n\t\t{\n\t\t\"customer_name\": \"Marie Beatrice Tahi\",\n\t\t\"customer_phone\": \"+22556888385\",\n\t\t\"customer_email\": \"\",\n\t\t\"location_name\":\"Abidjan Mall\",\n\t\t\"location_latitude\":\"5.3617424\",\n\t\t\"location_longitude\": \"-3.966724\",\n\t\t\"order_id\":\"1589661051\",\n\t\t\"order_description\":\"\",\n\t\t\"order_price\":\"10000\",\n\t\t\"currency_code\":\"XOF\",\n\t\t\"has_pickup\":false,\n\t\t\"delivery_fees\":\"1500\",\n\t\t\"job_datetime\":\"2020-05-17 12:00:00\",\n\t\t\"images\":[],\n\t\t\"description\":\"\"\n\t\t}\n\t\t\n\t\t],\n\t\t\n\t\"delivery_service\":\"adjemin\",\n\t\"merchant_id\":\"1\",\n\t\"customer_payment_method_code\":\"cash\",\n\t\"customer_paid\":false,\n\t\"merchant_notification_url\": \"https://api.adjemin.com/v2/smartlivraison_notify\"\n}"
5
headers = {
6
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzIiwianRpIjoiZmZmNDdmOGNlZDhkNjAxNGRhOWRiNmQ4ZTNmMzI4MmFhNzFiZWU2NTYzNTdhNTUyMWY1M2EyYWRjZjE2NjQwNjUyMTE2NTdmYmZlNzVkNGYiLCJpYXQiOjE1OTM5OTQ0NTksIm5iZiI6MTU5Mzk5NDQ1OSwiZXhwIjoxNTkzOTk0NzU5LCJzdWIiOiIiLCJzY29wZXMiOlsiKiJdfQ.ccMBYzUl5U7LYmJWaiPpK6LOoXVQgczJ8K_E3Tk8hoSaFX401oDVKCJ2MzVoU_C7evpKIg5FosNB3O65LGoQSxzcN-HCFQBt0rOUsrgC-SMGdHPS-xci648n4yC8a_P1PGRdmJq7DYXZX_t2TILsMfkZCb2GYElmGrfeRqKcJGyo-3yiHi4QDaqUNbnun3kyAKUm55Z_RfCNw3W1HegmLI1mjwJ7rinDBGe_8MXMAfp5GCv9JrH2WK28_YkHrs9iwA9pG00j_cUjK3ZrJL3OvSIxFAg0fQ9IeehgfpDgyGZnkFgAIld8m-qVKrPttCZgspbV6mG35Z-DW8KuKAVnatlWaXrZWSKd2SpQb4Elp7PyJ-97vGG18f7486YS_Up6QruM9lpk87qteTzKQB6dJoHVcuqvudkGD1SExlcg7fyEMkHsYKd65U_tVSS_nzuMAykf9eVJdCut32rZoALYVViWQJiLR6sIAaB4xwvEOQvauEVX_E7TU6mXFJMMjqxqCCJ2ljqsWSGVezIlD6ScxdSvBbfkHfhGxcl4NOL4lnDsxiaAg1t4eEec2zlVr1OMW82NHbbDP7aVbd1gRGCRoKcZpvNpg9DzNz3ZprKWtI93OIyaRLOWPFu1hQPfaaAxMTDL4Y_fIzXh1MYOZDcJ0BwskSWA3klIxyam35kDfGU',
7
'Content-Type': 'application/json'
8
}
9
conn.request("POST", "/v1/merchant_create_tasks", payload, headers)
10
res = conn.getresponse()
11
data = res.read()
12
print(data.decode("utf-8"))
Copied!
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://api.smartlivraison.com/v1/merchant_create_tasks",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "POST",
14
CURLOPT_POSTFIELDS =>"\n{\n\t\"jobs\":[\n\t\t{\n\t\t\"customer_name\": \"Ange Bagui\",\n\t\t\"customer_phone\": \"+22556888385\",\n\t\t\"customer_email\": \"\",\n\t\t\"location_name\":\"Pharmacie Arums\",\n\t\t\"location_latitude\":\"5.3955564\",\n\t\t\"location_longitude\": \"-3.9770718\",\n\t\t\"order_id\":\"1589661051\",\n\t\t\"order_description\":\"\",\n\t\t\"order_price\":\"10000\",\n\t\t\"currency_code\":\"XOF\",\n\t\t\"has_pickup\":true,\n\t\t\"delivery_fees\":\"0\",\n\t\t\"job_datetime\":\"2020-05-17 09:00:00\",\n\t\t\"images\":[],\n\t\t\"description\":\"\"\n\t\t},\n\t\t{\n\t\t\"customer_name\": \"Marie Beatrice Tahi\",\n\t\t\"customer_phone\": \"+22556888385\",\n\t\t\"customer_email\": \"\",\n\t\t\"location_name\":\"Abidjan Mall\",\n\t\t\"location_latitude\":\"5.3617424\",\n\t\t\"location_longitude\": \"-3.966724\",\n\t\t\"order_id\":\"1589661051\",\n\t\t\"order_description\":\"\",\n\t\t\"order_price\":\"10000\",\n\t\t\"currency_code\":\"XOF\",\n\t\t\"has_pickup\":false,\n\t\t\"delivery_fees\":\"1500\",\n\t\t\"job_datetime\":\"2020-05-17 12:00:00\",\n\t\t\"images\":[],\n\t\t\"description\":\"\"\n\t\t}\n\t\t\n\t\t],\n\t\t\n\t\"delivery_service\":\"adjemin\",\n\t\"merchant_id\":\"1\",\n\t\"customer_payment_method_code\":\"cash\",\n\t\"customer_paid\":false,\n\t\"merchant_notification_url\": \"https://api.adjemin.com/v2/smartlivraison_notify\"\n}",
15
CURLOPT_HTTPHEADER => array(
16
"Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzIiwianRpIjoiZmZmNDdmOGNlZDhkNjAxNGRhOWRiNmQ4ZTNmMzI4MmFhNzFiZWU2NTYzNTdhNTUyMWY1M2EyYWRjZjE2NjQwNjUyMTE2NTdmYmZlNzVkNGYiLCJpYXQiOjE1OTM5OTQ0NTksIm5iZiI6MTU5Mzk5NDQ1OSwiZXhwIjoxNTkzOTk0NzU5LCJzdWIiOiIiLCJzY29wZXMiOlsiKiJdfQ.ccMBYzUl5U7LYmJWaiPpK6LOoXVQgczJ8K_E3Tk8hoSaFX401oDVKCJ2MzVoU_C7evpKIg5FosNB3O65LGoQSxzcN-HCFQBt0rOUsrgC-SMGdHPS-xci648n4yC8a_P1PGRdmJq7DYXZX_t2TILsMfkZCb2GYElmGrfeRqKcJGyo-3yiHi4QDaqUNbnun3kyAKUm55Z_RfCNw3W1HegmLI1mjwJ7rinDBGe_8MXMAfp5GCv9JrH2WK28_YkHrs9iwA9pG00j_cUjK3ZrJL3OvSIxFAg0fQ9IeehgfpDgyGZnkFgAIld8m-qVKrPttCZgspbV6mG35Z-DW8KuKAVnatlWaXrZWSKd2SpQb4Elp7PyJ-97vGG18f7486YS_Up6QruM9lpk87qteTzKQB6dJoHVcuqvudkGD1SExlcg7fyEMkHsYKd65U_tVSS_nzuMAykf9eVJdCut32rZoALYVViWQJiLR6sIAaB4xwvEOQvauEVX_E7TU6mXFJMMjqxqCCJ2ljqsWSGVezIlD6ScxdSvBbfkHfhGxcl4NOL4lnDsxiaAg1t4eEec2zlVr1OMW82NHbbDP7aVbd1gRGCRoKcZpvNpg9DzNz3ZprKWtI93OIyaRLOWPFu1hQPfaaAxMTDL4Y_fIzXh1MYOZDcJ0BwskSWA3klIxyam35kDfGU",
17
"Content-Type: application/json"
18
),
19
));
20
21
$response = curl_exec($curl);
22
23
curl_close($curl);
24
echo $response;
25
Copied!
Last modified 1yr ago
Copy link