Créer une mission
curl --request POST \
--url https://api.papslogistics.com/tasks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--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"
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 = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', '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', 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",
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",
"x-api-key: <api-key>"
],
]);
$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"
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("x-api-key", "<api-key>")
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")
.header("x-api-key", "<api-key>")
.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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
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_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",
"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 \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--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"
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 = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', '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', 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",
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",
"x-api-key: <api-key>"
],
]);
$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"
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("x-api-key", "<api-key>")
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")
.header("x-api-key", "<api-key>")
.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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
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_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",
"uid": "<string>"
}
}Authorizations
Clé API du client, disponible dans son espace personnel Paps.
Body
application/json
Type de mission à créer
Available options:
Pickup, Dropoff, FromStock Available options:
SCOOTER, MINI_VAN, TRICYCLE, VAN, CAMION Show child attributes
Show child attributes
Show child attributes
Show child attributes
Date de retrait (requis uniquement pour le type Pickup)
Example:
"2026-08-01"
Heure de retrait (requis uniquement pour le type Pickup)
Example:
"11:00"
Adresse de retrait (requis uniquement pour le type Pickup)
Example:
"Dakar-Plateau, Dakar, Sénégal"
Response
200 - application/json
Mission créée
Code de statut de la réponse
Example:
200
Message associé à la réponse
Example:
"Success"
null en cas de succès. En cas d'erreur métier (codes 400 et 500), contient un message ou un nom d'exception sous forme de chaîne libre.
Show child attributes
Show child attributes
⌘I