Create task and assign it

For each order you can create task and assign it to a delivery service.

post
Create Task and Assign to Delivery Service

https://api.smartlivraison.com/v1/merchant_create_tasks
Make a POST request with Body JSON
Request
Response
Request
Headers
Authorization
required
string
Bearer "*****ACCESS_TOKEN*****" must be the value
Accept
required
string
application/json
Body Parameters
merchant_notification_url
required
string
It is used for webhook
customer_paid
required
boolean
false for cash payment method
customer_payment_method_code
required
string
cash or online
merchant_id
required
string
delivery_service
required
string
jobs
required
object
List of Pickup and Delivery
Response
200: OK
When everything is fine
{
"success": true,
"data": {
"merchant_assignment": {
"task_id": "121",
"merchant_id": "1",
"business_username": "adjemin",
"is_waiting_acceptation": true,
"merchant_notification_url": "https://api.adjemin.com/v2/smartlivraison_notify",
"updated_at": "2020-07-06T00:14:47.000000Z",
"created_at": "2020-07-06T00:14:47.000000Z",
"id": 21,
"task": {
"id": 121,
"current_status": "unassigned",
"business_username": "",
"creator_id": 1,
"has_creator_customer": false,
"created_by": "merchants",
"is_unassigned": true,
"auto_assignment": false,
"is_completed": false,
"is_draft": false,
"on_time": false,
"orders": [
"1589661051"
],
"total_orders_amount": "10000",
"delivery_fees": "1500",
"currency_code": "XOF",
"has_paid_delivery_service": false,
"has_cash_managment": true,
"customer_paid": false,
"customer_paid_at": null,
"merchant_paid": false,
"business_receipt_id": null,
"customer_receipt_id": null,
"merchant_receipt_id": null,
"paid_delivery_service_receipt_id": null,
"is_archived": false,
"archived_datetime": null,
"has_percentage": true,
"fees": "150",
"percentage": "0.1",
"customer_payment_method_code": "cash",
"created_at": "2020-07-06T00:14:47.000000Z",
"updated_at": "2020-07-06T00:14:47.000000Z",
"deleted_at": null,
"pickups": [
{
"id": 133,
"customer_name": "Ange Bagui",
"customer_phone": "+22556888385",
"customer_email": null,
"location_name": "Pharmacie Arums",
"location_latitude": 5.395556400000000252248355536721646785736083984375,
"location_longitude": -3.97707180000000004582716428558342158794403076171875,
"location_address_typed": null,
"location_address_type": null,
"location_address_door": null,
"location_address_type_stage": null,
"location_address_town": null,
"order_id": "1589661051",
"order_description": null,
"order_price": "10000",
"delivery_fees": "0",
"currency_code": "XOF",
"has_pickup": true,
"job_datetime": "2020-05-17 09:00:00",
"description": null,
"timezone": "Africa/Abidjan",
"tracking_link": null,
"images": "[]",
"notify": null,
"geofence": null,
"tags": null,
"signatures": null,
"signatures_at": null,
"current_status": "unassigned",
"task_id": "121",
"is_completed": false,
"is_completed_on_time": false,
"has_customer_payment": false,
"customer_paid": false,
"customer_receipt_id": null,
"customer_payment_method_code": null,
"created_at": "2020-07-06T00:14:47.000000Z",
"updated_at": "2020-07-06T00:14:47.000000Z",
"deleted_at": null,
"histories": [
{
"id": 393,
"job_id": 133,
"status": "unassigned",
"agent_id": -1,
"agent_name": "",
"creator_id": 1,
"creator_name": null,
"creator": "merchants",
"job_location_address": "Pharmacie Arums",
"task_id": 121,
"created_at": "2020-07-06T00:14:47.000000Z",
"updated_at": "2020-07-06T00:14:47.000000Z",
"deleted_at": null
}
],
"customer_receipt": null
}
],
"deliveries": [
{
"id": 134,
"customer_name": "Marie Beatrice Tahi",
"customer_phone": "+22556888385",
"customer_email": null,
"location_name": "Abidjan Mall",
"location_latitude": 5.36174239999999979744416123139671981334686279296875,
"location_longitude": -3.96672400000000013875478543923236429691314697265625,
"location_address_typed": null,
"location_address_type": null,
"location_address_door": null,
"location_address_type_stage": null,
"location_address_town": null,
"order_id": "1589661051",
"order_description": null,
"order_price": "10000",
"delivery_fees": "1500",
"currency_code": "XOF",
"has_pickup": false,
"job_datetime": "2020-05-17 12:00:00",
"description": null,
"timezone": "Africa/Abidjan",
"tracking_link": null,
"images": "[]",
"notify": null,
"geofence": null,
"tags": null,
"signatures": null,
"signatures_at": null,
"current_status": "unassigned",
"task_id": "121",
"is_completed": false,
"is_completed_on_time": false,
"has_customer_payment": true,
"customer_paid": false,
"customer_receipt_id": null,
"customer_payment_method_code": null,
"created_at": "2020-07-06T00:14:47.000000Z",
"updated_at": "2020-07-06T00:14:47.000000Z",
"deleted_at": null,
"histories": [
{
"id": 394,
"job_id": 134,
"status": "unassigned",
"agent_id": -1,
"agent_name": "",
"creator_id": 1,
"creator_name": null,
"creator": "merchants",
"job_location_address": "Abidjan Mall",
"task_id": 121,
"created_at": "2020-07-06T00:14:47.000000Z",
"updated_at": "2020-07-06T00:14:47.000000Z",
"deleted_at": null
}
],
"customer_receipt": null
}
],
"agent_id": null
},
"merchant": {
"id": 1,
"company_name": "Adjemin",
"company_photo": "https://i.imgur.com/Y4oWqzk.png",
"company_address": "Immeuble Maiko, Angré 8eme Tranche, Cocody, Abidjan, Côte d'Ivoire",
"timezone": "Africa/Abidjan",
"phone_directory": "22584400483",
"merchant_permission": null,
"commission_percentage": "0.10",
"login": "angebagui@adjemin.com",
"password": "$2y$10$rl4rxMgstR6i3RZX6TRvrOHznNfiVPIAIwOlLl7Ye2h3Rtsl/1vTm",
"geofence": null,
"user_id": 4,
"created_at": "2020-05-30T23:14:16.000000Z",
"updated_at": "2020-05-30T23:14:16.000000Z",
"deleted_at": null
},
"business": {
"id": 82,
"name": "Adjemin",
"company_address": null,
"company_latitude": null,
"company_longitude": null,
"username": "adjemin",
"website": null,
"facebook": null,
"twitter": null,
"country_code": "CI",
"rcc": null,
"photo": null,
"description": null,
"user_id": 85,
"categories": null,
"product_cost_limit": null,
"pricing_type": "fixe",
"distance_min_fees": null,
"distance_max_fees": null,
"fees": null,
"transport_types": null,
"currency_code": "XOF",
"is_insured": false,
"insurer_name": null,
"business_insurer_number": null,
"has_join_adjemin": false,
"default_language": "fr",
"created_at": "2020-06-02T11:11:02.000000Z",
"updated_at": "2020-06-02T11:11:02.000000Z",
"deleted_at": null
}
},
"task": {
"id": 121,
"current_status": "unassigned",
"business_username": "",
"creator_id": 1,
"has_creator_customer": false,
"created_by": "merchants",
"is_unassigned": true,
"auto_assignment": false,
"is_completed": false,
"is_draft": false,
"on_time": false,
"orders": [
"1589661051"
],
"total_orders_amount": "10000",
"delivery_fees": "1500",
"currency_code": "XOF",
"has_paid_delivery_service": false,
"has_cash_managment": true,
"customer_paid": false,
"customer_paid_at": null,
"merchant_paid": false,
"business_receipt_id": null,
"customer_receipt_id": null,
"merchant_receipt_id": null,
"paid_delivery_service_receipt_id": null,
"is_archived": false,
"archived_datetime": null,
"has_percentage": true,
"fees": "150",
"percentage": "0.10",
"customer_payment_method_code": "cash",
"created_at": "2020-07-06T00:14:47.000000Z",
"updated_at": "2020-07-06T00:14:47.000000Z",
"deleted_at": null,
"pickups": [
{
"id": 133,
"customer_name": "Ange Bagui",
"customer_phone": "+22556888385",
"customer_email": null,
"location_name": "Pharmacie Arums",
"location_latitude": 5.395556400000000252248355536721646785736083984375,
"location_longitude": -3.97707180000000004582716428558342158794403076171875,
"location_address_typed": null,
"location_address_type": null,
"location_address_door": null,
"location_address_type_stage": null,
"location_address_town": null,
"order_id": "1589661051",
"order_description": null,
"order_price": "10000",
"delivery_fees": "0",
"currency_code": "XOF",
"has_pickup": true,
"job_datetime": "2020-05-17 09:00:00",
"description": null,
"timezone": "Africa/Abidjan",
"tracking_link": null,
"images": "[]",
"notify": null,
"geofence": null,
"tags": null,
"signatures": null,
"signatures_at": null,
"current_status": "unassigned",
"task_id": "121",
"is_completed": false,
"is_completed_on_time": false,
"has_customer_payment": false,
"customer_paid": false,
"customer_receipt_id": null,
"customer_payment_method_code": null,
"created_at": "2020-07-06T00:14:47.000000Z",
"updated_at": "2020-07-06T00:14:47.000000Z",
"deleted_at": null,
"histories": [
{
"id": 393,
"job_id": 133,
"status": "unassigned",
"agent_id": -1,
"agent_name": "",
"creator_id": 1,
"creator_name": null,
"creator": "merchants",
"job_location_address": "Pharmacie Arums",
"task_id": 121,
"created_at": "2020-07-06T00:14:47.000000Z",
"updated_at": "2020-07-06T00:14:47.000000Z",
"deleted_at": null
}
],
"customer_receipt": null
}
],
"deliveries": [
{
"id": 134,
"customer_name": "Marie Beatrice Tahi",
"customer_phone": "+22556888385",
"customer_email": null,
"location_name": "Abidjan Mall",
"location_latitude": 5.36174239999999979744416123139671981334686279296875,
"location_longitude": -3.96672400000000013875478543923236429691314697265625,
"location_address_typed": null,
"location_address_type": null,
"location_address_door": null,
"location_address_type_stage": null,
"location_address_town": null,
"order_id": "1589661051",
"order_description": null,
"order_price": "10000",
"delivery_fees": "1500",
"currency_code": "XOF",
"has_pickup": false,
"job_datetime": "2020-05-17 12:00:00",
"description": null,
"timezone": "Africa/Abidjan",
"tracking_link": null,
"images": "[]",
"notify": null,
"geofence": null,
"tags": null,
"signatures": null,
"signatures_at": null,
"current_status": "unassigned",
"task_id": "121",
"is_completed": false,
"is_completed_on_time": false,
"has_customer_payment": true,
"customer_paid": false,
"customer_receipt_id": null,
"customer_payment_method_code": null,
"created_at": "2020-07-06T00:14:47.000000Z",
"updated_at": "2020-07-06T00:14:47.000000Z",
"deleted_at": null,
"histories": [
{
"id": 394,
"job_id": 134,
"status": "unassigned",
"agent_id": -1,
"agent_name": "",
"creator_id": 1,
"creator_name": null,
"creator": "merchants",
"job_location_address": "Abidjan Mall",
"task_id": 121,
"created_at": "2020-07-06T00:14:47.000000Z",
"updated_at": "2020-07-06T00:14:47.000000Z",
"deleted_at": null
}
],
"customer_receipt": null
}
],
"agent_id": null
}
},
"message": "task created successfully"
}
HTTP
CURL
Java - OkHttp
Python - http.client
PHP - cURL
HTTP
POST /v1/merchant_create_tasks HTTP/1.1
Host: api.smartlivraison.com
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
Content-Type: application/json
{
"jobs":[
{
"customer_name": "Ange Bagui",
"customer_phone": "+22556888385",
"customer_email": "",
"location_name":"Pharmacie Arums",
"location_latitude":"5.3955564",
"location_longitude": "-3.9770718",
"order_id":"1589661051",
"order_description":"",
"order_price":"10000",
"currency_code":"XOF",
"has_pickup":true,
"delivery_fees":"0",
"job_datetime":"2020-05-17 09:00:00",
"images":[],
"description":""
},
{
"customer_name": "Marie Beatrice Tahi",
"customer_phone": "+22556888385",
"customer_email": "",
"location_name":"Abidjan Mall",
"location_latitude":"5.3617424",
"location_longitude": "-3.966724",
"order_id":"1589661051",
"order_description":"",
"order_price":"10000",
"currency_code":"XOF",
"has_pickup":false,
"delivery_fees":"1500",
"job_datetime":"2020-05-17 12:00:00",
"images":[],
"description":""
}
],
"delivery_service":"adjemin",
"merchant_id":"1",
"customer_payment_method_code":"cash",
"customer_paid":false,
"merchant_notification_url": "https://api.adjemin.com/v2/smartlivraison_notify"
}
CURL
curl --location --request POST 'https://api.smartlivraison.com/v1/merchant_create_tasks' \
--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' \
--header 'Content-Type: application/json' \
--data-raw '
{
"jobs":[
{
"customer_name": "Ange Bagui",
"customer_phone": "+22556888385",
"customer_email": "",
"location_name":"Pharmacie Arums",
"location_latitude":"5.3955564",
"location_longitude": "-3.9770718",
"order_id":"1589661051",
"order_description":"",
"order_price":"10000",
"currency_code":"XOF",
"has_pickup":true,
"delivery_fees":"0",
"job_datetime":"2020-05-17 09:00:00",
"images":[],
"description":""
},
{
"customer_name": "Marie Beatrice Tahi",
"customer_phone": "+22556888385",
"customer_email": "",
"location_name":"Abidjan Mall",
"location_latitude":"5.3617424",
"location_longitude": "-3.966724",
"order_id":"1589661051",
"order_description":"",
"order_price":"10000",
"currency_code":"XOF",
"has_pickup":false,
"delivery_fees":"1500",
"job_datetime":"2020-05-17 12:00:00",
"images":[],
"description":""
}
],
"delivery_service":"adjemin",
"merchant_id":"1",
"customer_payment_method_code":"cash",
"customer_paid":false,
"merchant_notification_url": "https://api.adjemin.com/v2/smartlivraison_notify"
}'
Java - OkHttp
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
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}");
Request request = new Request.Builder()
.url("https://api.smartlivraison.com/v1/merchant_create_tasks")
.method("POST", body)
.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")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Python - http.client
import http.client
import mimetypes
conn = http.client.HTTPSConnection("api.smartlivraison.com")
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}"
headers = {
'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',
'Content-Type': 'application/json'
}
conn.request("POST", "/v1/merchant_create_tasks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
PHP - cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.smartlivraison.com/v1/merchant_create_tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}",
CURLOPT_HTTPHEADER => array(
"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",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;