Créer une mission
curl --request POST \
--url 'https://api.papslogistics.com/tasks?apikey=' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"receiver": {
"firstname": "John",
"lastname": "Doe",
"phoneNumber": "+221770000000",
"email": "[email protected]",
"entreprise": "John Corporation",
"address": "Dakar-Plateau, Dakar, Sénégal",
"specificationAddress": "côté brioche"
},
"parcels": [
{
"packageSize": "XL",
"description": "iPhone 13 Pro Max",
"additionalInfo": "Pay attention, it's fragile",
"Reference": "4759XHG0MKH",
"price": 10000,
"amountCollect": 10000,
"address_pickup": "Dakar-Plateau, Dakar, Sénégal"
}
],
"datePickup": "2026-08-01",
"timePickup": "11:00",
"address": "Dakar-Plateau, Dakar, Sénégal"
}
EOFimport requests
url = "https://api.papslogistics.com/tasks?apikey="
payload = {
"receiver": {
"firstname": "John",
"lastname": "Doe",
"phoneNumber": "+221770000000",
"email": "[email protected]",
"entreprise": "John Corporation",
"address": "Dakar-Plateau, Dakar, Sénégal",
"specificationAddress": "côté brioche"
},
"parcels": [
{
"packageSize": "XL",
"description": "iPhone 13 Pro Max",
"additionalInfo": "Pay attention, it's fragile",
"Reference": "4759XHG0MKH",
"price": 10000,
"amountCollect": 10000,
"address_pickup": "Dakar-Plateau, Dakar, Sénégal"
}
],
"datePickup": "2026-08-01",
"timePickup": "11:00",
"address": "Dakar-Plateau, Dakar, Sénégal"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
receiver: {
firstname: 'John',
lastname: 'Doe',
phoneNumber: '+221770000000',
email: '[email protected]',
entreprise: 'John Corporation',
address: 'Dakar-Plateau, Dakar, Sénégal',
specificationAddress: 'côté brioche'
},
parcels: [
{
packageSize: 'XL',
description: 'iPhone 13 Pro Max',
additionalInfo: 'Pay attention, it\'s fragile',
Reference: '4759XHG0MKH',
price: 10000,
amountCollect: 10000,
address_pickup: 'Dakar-Plateau, Dakar, Sénégal'
}
],
datePickup: '2026-08-01',
timePickup: '11:00',
address: 'Dakar-Plateau, Dakar, Sénégal'
})
};
fetch('https://api.papslogistics.com/tasks?apikey=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.papslogistics.com/tasks?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'receiver' => [
'firstname' => 'John',
'lastname' => 'Doe',
'phoneNumber' => '+221770000000',
'email' => '[email protected]',
'entreprise' => 'John Corporation',
'address' => 'Dakar-Plateau, Dakar, Sénégal',
'specificationAddress' => 'côté brioche'
],
'parcels' => [
[
'packageSize' => 'XL',
'description' => 'iPhone 13 Pro Max',
'additionalInfo' => 'Pay attention, it\'s fragile',
'Reference' => '4759XHG0MKH',
'price' => 10000,
'amountCollect' => 10000,
'address_pickup' => 'Dakar-Plateau, Dakar, Sénégal'
]
],
'datePickup' => '2026-08-01',
'timePickup' => '11:00',
'address' => 'Dakar-Plateau, Dakar, Sénégal'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.papslogistics.com/tasks?apikey="
payload := strings.NewReader("{\n \"receiver\": {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"phoneNumber\": \"+221770000000\",\n \"email\": \"[email protected]\",\n \"entreprise\": \"John Corporation\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"specificationAddress\": \"côté brioche\"\n },\n \"parcels\": [\n {\n \"packageSize\": \"XL\",\n \"description\": \"iPhone 13 Pro Max\",\n \"additionalInfo\": \"Pay attention, it's fragile\",\n \"Reference\": \"4759XHG0MKH\",\n \"price\": 10000,\n \"amountCollect\": 10000,\n \"address_pickup\": \"Dakar-Plateau, Dakar, Sénégal\"\n }\n ],\n \"datePickup\": \"2026-08-01\",\n \"timePickup\": \"11:00\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.papslogistics.com/tasks?apikey=")
.header("Content-Type", "application/json")
.body("{\n \"receiver\": {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"phoneNumber\": \"+221770000000\",\n \"email\": \"[email protected]\",\n \"entreprise\": \"John Corporation\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"specificationAddress\": \"côté brioche\"\n },\n \"parcels\": [\n {\n \"packageSize\": \"XL\",\n \"description\": \"iPhone 13 Pro Max\",\n \"additionalInfo\": \"Pay attention, it's fragile\",\n \"Reference\": \"4759XHG0MKH\",\n \"price\": 10000,\n \"amountCollect\": 10000,\n \"address_pickup\": \"Dakar-Plateau, Dakar, Sénégal\"\n }\n ],\n \"datePickup\": \"2026-08-01\",\n \"timePickup\": \"11:00\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.papslogistics.com/tasks?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"receiver\": {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"phoneNumber\": \"+221770000000\",\n \"email\": \"[email protected]\",\n \"entreprise\": \"John Corporation\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"specificationAddress\": \"côté brioche\"\n },\n \"parcels\": [\n {\n \"packageSize\": \"XL\",\n \"description\": \"iPhone 13 Pro Max\",\n \"additionalInfo\": \"Pay attention, it's fragile\",\n \"Reference\": \"4759XHG0MKH\",\n \"price\": 10000,\n \"amountCollect\": 10000,\n \"address_pickup\": \"Dakar-Plateau, Dakar, Sénégal\"\n }\n ],\n \"datePickup\": \"2026-08-01\",\n \"timePickup\": \"11:00\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Success",
"error": "<string>",
"data": {
"_id": "<string>",
"job_type": "Pickup",
"job_address": {
"country": "Senegal",
"countryCode": "SN",
"city": "Dakar-Plateau",
"region": "Dakar Region",
"address": "Dakar-Plateau, Dakar Region, Senegal",
"additional_address": "<string>",
"location": {
"latitude": 14.6629438,
"longitude": -17.4374803
},
"place_id": "ChIJXRv0vE5ywQ4RpvG-1YKthC0"
},
"job_date": "2020-01-01",
"job_slot_start": "11:00",
"job_slot_end": "13:00",
"job_time": "11:00",
"job_vehicle_type": "SCOOTER",
"uid": "<string>"
}
}Tasks
Créer une mission
Crée une mission de livraison (retrait, dépôt ou depuis stock).
POST
/
tasks
Créer une mission
curl --request POST \
--url 'https://api.papslogistics.com/tasks?apikey=' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"receiver": {
"firstname": "John",
"lastname": "Doe",
"phoneNumber": "+221770000000",
"email": "[email protected]",
"entreprise": "John Corporation",
"address": "Dakar-Plateau, Dakar, Sénégal",
"specificationAddress": "côté brioche"
},
"parcels": [
{
"packageSize": "XL",
"description": "iPhone 13 Pro Max",
"additionalInfo": "Pay attention, it's fragile",
"Reference": "4759XHG0MKH",
"price": 10000,
"amountCollect": 10000,
"address_pickup": "Dakar-Plateau, Dakar, Sénégal"
}
],
"datePickup": "2026-08-01",
"timePickup": "11:00",
"address": "Dakar-Plateau, Dakar, Sénégal"
}
EOFimport requests
url = "https://api.papslogistics.com/tasks?apikey="
payload = {
"receiver": {
"firstname": "John",
"lastname": "Doe",
"phoneNumber": "+221770000000",
"email": "[email protected]",
"entreprise": "John Corporation",
"address": "Dakar-Plateau, Dakar, Sénégal",
"specificationAddress": "côté brioche"
},
"parcels": [
{
"packageSize": "XL",
"description": "iPhone 13 Pro Max",
"additionalInfo": "Pay attention, it's fragile",
"Reference": "4759XHG0MKH",
"price": 10000,
"amountCollect": 10000,
"address_pickup": "Dakar-Plateau, Dakar, Sénégal"
}
],
"datePickup": "2026-08-01",
"timePickup": "11:00",
"address": "Dakar-Plateau, Dakar, Sénégal"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
receiver: {
firstname: 'John',
lastname: 'Doe',
phoneNumber: '+221770000000',
email: '[email protected]',
entreprise: 'John Corporation',
address: 'Dakar-Plateau, Dakar, Sénégal',
specificationAddress: 'côté brioche'
},
parcels: [
{
packageSize: 'XL',
description: 'iPhone 13 Pro Max',
additionalInfo: 'Pay attention, it\'s fragile',
Reference: '4759XHG0MKH',
price: 10000,
amountCollect: 10000,
address_pickup: 'Dakar-Plateau, Dakar, Sénégal'
}
],
datePickup: '2026-08-01',
timePickup: '11:00',
address: 'Dakar-Plateau, Dakar, Sénégal'
})
};
fetch('https://api.papslogistics.com/tasks?apikey=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.papslogistics.com/tasks?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'receiver' => [
'firstname' => 'John',
'lastname' => 'Doe',
'phoneNumber' => '+221770000000',
'email' => '[email protected]',
'entreprise' => 'John Corporation',
'address' => 'Dakar-Plateau, Dakar, Sénégal',
'specificationAddress' => 'côté brioche'
],
'parcels' => [
[
'packageSize' => 'XL',
'description' => 'iPhone 13 Pro Max',
'additionalInfo' => 'Pay attention, it\'s fragile',
'Reference' => '4759XHG0MKH',
'price' => 10000,
'amountCollect' => 10000,
'address_pickup' => 'Dakar-Plateau, Dakar, Sénégal'
]
],
'datePickup' => '2026-08-01',
'timePickup' => '11:00',
'address' => 'Dakar-Plateau, Dakar, Sénégal'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.papslogistics.com/tasks?apikey="
payload := strings.NewReader("{\n \"receiver\": {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"phoneNumber\": \"+221770000000\",\n \"email\": \"[email protected]\",\n \"entreprise\": \"John Corporation\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"specificationAddress\": \"côté brioche\"\n },\n \"parcels\": [\n {\n \"packageSize\": \"XL\",\n \"description\": \"iPhone 13 Pro Max\",\n \"additionalInfo\": \"Pay attention, it's fragile\",\n \"Reference\": \"4759XHG0MKH\",\n \"price\": 10000,\n \"amountCollect\": 10000,\n \"address_pickup\": \"Dakar-Plateau, Dakar, Sénégal\"\n }\n ],\n \"datePickup\": \"2026-08-01\",\n \"timePickup\": \"11:00\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.papslogistics.com/tasks?apikey=")
.header("Content-Type", "application/json")
.body("{\n \"receiver\": {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"phoneNumber\": \"+221770000000\",\n \"email\": \"[email protected]\",\n \"entreprise\": \"John Corporation\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"specificationAddress\": \"côté brioche\"\n },\n \"parcels\": [\n {\n \"packageSize\": \"XL\",\n \"description\": \"iPhone 13 Pro Max\",\n \"additionalInfo\": \"Pay attention, it's fragile\",\n \"Reference\": \"4759XHG0MKH\",\n \"price\": 10000,\n \"amountCollect\": 10000,\n \"address_pickup\": \"Dakar-Plateau, Dakar, Sénégal\"\n }\n ],\n \"datePickup\": \"2026-08-01\",\n \"timePickup\": \"11:00\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.papslogistics.com/tasks?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"receiver\": {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"phoneNumber\": \"+221770000000\",\n \"email\": \"[email protected]\",\n \"entreprise\": \"John Corporation\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"specificationAddress\": \"côté brioche\"\n },\n \"parcels\": [\n {\n \"packageSize\": \"XL\",\n \"description\": \"iPhone 13 Pro Max\",\n \"additionalInfo\": \"Pay attention, it's fragile\",\n \"Reference\": \"4759XHG0MKH\",\n \"price\": 10000,\n \"amountCollect\": 10000,\n \"address_pickup\": \"Dakar-Plateau, Dakar, Sénégal\"\n }\n ],\n \"datePickup\": \"2026-08-01\",\n \"timePickup\": \"11:00\",\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Success",
"error": "<string>",
"data": {
"_id": "<string>",
"job_type": "Pickup",
"job_address": {
"country": "Senegal",
"countryCode": "SN",
"city": "Dakar-Plateau",
"region": "Dakar Region",
"address": "Dakar-Plateau, Dakar Region, Senegal",
"additional_address": "<string>",
"location": {
"latitude": 14.6629438,
"longitude": -17.4374803
},
"place_id": "ChIJXRv0vE5ywQ4RpvG-1YKthC0"
},
"job_date": "2020-01-01",
"job_slot_start": "11:00",
"job_slot_end": "13:00",
"job_time": "11:00",
"job_vehicle_type": "SCOOTER",
"uid": "<string>"
}
}Authorizations
Body
application/json
Response
200 - application/json
Mission créée