Créer une demande de transport national
curl --request POST \
--url https://api.papslogistics.com/requests \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"executionDate": "2026-08-01",
"vehicles": [
{
"numberOfVehicule": 1
}
],
"stops": [
{
"address": "Dakar-Plateau, Dakar, Sénégal",
"itemsToPick": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"itemsToDelivered": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"receiver": {
"firstname": "John",
"lastname": "Doe",
"phoneNumber": "+221770000000",
"email": "[email protected]",
"entreprise": "John Corporation",
"address": "Dakar-Plateau, Dakar, Sénégal",
"specificationAddress": "côté brioche"
}
}
],
"additionnalInfos": "Test"
}
'import requests
url = "https://api.papslogistics.com/requests"
payload = {
"executionDate": "2026-08-01",
"vehicles": [{ "numberOfVehicule": 1 }],
"stops": [
{
"address": "Dakar-Plateau, Dakar, Sénégal",
"itemsToPick": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"itemsToDelivered": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"receiver": {
"firstname": "John",
"lastname": "Doe",
"phoneNumber": "+221770000000",
"email": "[email protected]",
"entreprise": "John Corporation",
"address": "Dakar-Plateau, Dakar, Sénégal",
"specificationAddress": "côté brioche"
}
}
],
"additionnalInfos": "Test"
}
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({
executionDate: '2026-08-01',
vehicles: [{numberOfVehicule: 1}],
stops: [
{
address: 'Dakar-Plateau, Dakar, Sénégal',
itemsToPick: [
{
product: {
reference: '4759XHG0MKH',
description: 'iPhone 13 Pro Max',
quantity: 3,
value: 3000,
pickup: 3
},
counter: 3
}
],
itemsToDelivered: [
{
product: {
reference: '4759XHG0MKH',
description: 'iPhone 13 Pro Max',
quantity: 3,
value: 3000,
pickup: 3
},
counter: 3
}
],
receiver: {
firstname: 'John',
lastname: 'Doe',
phoneNumber: '+221770000000',
email: '[email protected]',
entreprise: 'John Corporation',
address: 'Dakar-Plateau, Dakar, Sénégal',
specificationAddress: 'côté brioche'
}
}
],
additionnalInfos: 'Test'
})
};
fetch('https://api.papslogistics.com/requests', 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/requests",
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([
'executionDate' => '2026-08-01',
'vehicles' => [
[
'numberOfVehicule' => 1
]
],
'stops' => [
[
'address' => 'Dakar-Plateau, Dakar, Sénégal',
'itemsToPick' => [
[
'product' => [
'reference' => '4759XHG0MKH',
'description' => 'iPhone 13 Pro Max',
'quantity' => 3,
'value' => 3000,
'pickup' => 3
],
'counter' => 3
]
],
'itemsToDelivered' => [
[
'product' => [
'reference' => '4759XHG0MKH',
'description' => 'iPhone 13 Pro Max',
'quantity' => 3,
'value' => 3000,
'pickup' => 3
],
'counter' => 3
]
],
'receiver' => [
'firstname' => 'John',
'lastname' => 'Doe',
'phoneNumber' => '+221770000000',
'email' => '[email protected]',
'entreprise' => 'John Corporation',
'address' => 'Dakar-Plateau, Dakar, Sénégal',
'specificationAddress' => 'côté brioche'
]
]
],
'additionnalInfos' => 'Test'
]),
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/requests"
payload := strings.NewReader("{\n \"executionDate\": \"2026-08-01\",\n \"vehicles\": [\n {\n \"numberOfVehicule\": 1\n }\n ],\n \"stops\": [\n {\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"itemsToPick\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\n \"itemsToDelivered\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\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 }\n ],\n \"additionnalInfos\": \"Test\"\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/requests")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"executionDate\": \"2026-08-01\",\n \"vehicles\": [\n {\n \"numberOfVehicule\": 1\n }\n ],\n \"stops\": [\n {\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"itemsToPick\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\n \"itemsToDelivered\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\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 }\n ],\n \"additionnalInfos\": \"Test\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.papslogistics.com/requests")
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 \"executionDate\": \"2026-08-01\",\n \"vehicles\": [\n {\n \"numberOfVehicule\": 1\n }\n ],\n \"stops\": [\n {\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"itemsToPick\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\n \"itemsToDelivered\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\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 }\n ],\n \"additionnalInfos\": \"Test\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Success",
"error": "<string>",
"data": {
"executionDate": "2026-08-01",
"vehicles": [
{
"numberOfVehicule": 1
}
],
"stops": [
{
"address": "Dakar-Plateau, Dakar, Sénégal",
"itemsToPick": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"itemsToDelivered": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"receiver": {
"firstname": "John",
"lastname": "Doe",
"phoneNumber": "+221770000000",
"email": "[email protected]",
"entreprise": "John Corporation",
"address": "Dakar-Plateau, Dakar, Sénégal",
"specificationAddress": "côté brioche"
}
}
],
"additionnalInfos": "Test"
}
}Transport Requests
Créer une demande de transport
Crée une demande de transport national avec un ou plusieurs arrêts.
POST
/
requests
Créer une demande de transport national
curl --request POST \
--url https://api.papslogistics.com/requests \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"executionDate": "2026-08-01",
"vehicles": [
{
"numberOfVehicule": 1
}
],
"stops": [
{
"address": "Dakar-Plateau, Dakar, Sénégal",
"itemsToPick": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"itemsToDelivered": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"receiver": {
"firstname": "John",
"lastname": "Doe",
"phoneNumber": "+221770000000",
"email": "[email protected]",
"entreprise": "John Corporation",
"address": "Dakar-Plateau, Dakar, Sénégal",
"specificationAddress": "côté brioche"
}
}
],
"additionnalInfos": "Test"
}
'import requests
url = "https://api.papslogistics.com/requests"
payload = {
"executionDate": "2026-08-01",
"vehicles": [{ "numberOfVehicule": 1 }],
"stops": [
{
"address": "Dakar-Plateau, Dakar, Sénégal",
"itemsToPick": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"itemsToDelivered": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"receiver": {
"firstname": "John",
"lastname": "Doe",
"phoneNumber": "+221770000000",
"email": "[email protected]",
"entreprise": "John Corporation",
"address": "Dakar-Plateau, Dakar, Sénégal",
"specificationAddress": "côté brioche"
}
}
],
"additionnalInfos": "Test"
}
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({
executionDate: '2026-08-01',
vehicles: [{numberOfVehicule: 1}],
stops: [
{
address: 'Dakar-Plateau, Dakar, Sénégal',
itemsToPick: [
{
product: {
reference: '4759XHG0MKH',
description: 'iPhone 13 Pro Max',
quantity: 3,
value: 3000,
pickup: 3
},
counter: 3
}
],
itemsToDelivered: [
{
product: {
reference: '4759XHG0MKH',
description: 'iPhone 13 Pro Max',
quantity: 3,
value: 3000,
pickup: 3
},
counter: 3
}
],
receiver: {
firstname: 'John',
lastname: 'Doe',
phoneNumber: '+221770000000',
email: '[email protected]',
entreprise: 'John Corporation',
address: 'Dakar-Plateau, Dakar, Sénégal',
specificationAddress: 'côté brioche'
}
}
],
additionnalInfos: 'Test'
})
};
fetch('https://api.papslogistics.com/requests', 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/requests",
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([
'executionDate' => '2026-08-01',
'vehicles' => [
[
'numberOfVehicule' => 1
]
],
'stops' => [
[
'address' => 'Dakar-Plateau, Dakar, Sénégal',
'itemsToPick' => [
[
'product' => [
'reference' => '4759XHG0MKH',
'description' => 'iPhone 13 Pro Max',
'quantity' => 3,
'value' => 3000,
'pickup' => 3
],
'counter' => 3
]
],
'itemsToDelivered' => [
[
'product' => [
'reference' => '4759XHG0MKH',
'description' => 'iPhone 13 Pro Max',
'quantity' => 3,
'value' => 3000,
'pickup' => 3
],
'counter' => 3
]
],
'receiver' => [
'firstname' => 'John',
'lastname' => 'Doe',
'phoneNumber' => '+221770000000',
'email' => '[email protected]',
'entreprise' => 'John Corporation',
'address' => 'Dakar-Plateau, Dakar, Sénégal',
'specificationAddress' => 'côté brioche'
]
]
],
'additionnalInfos' => 'Test'
]),
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/requests"
payload := strings.NewReader("{\n \"executionDate\": \"2026-08-01\",\n \"vehicles\": [\n {\n \"numberOfVehicule\": 1\n }\n ],\n \"stops\": [\n {\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"itemsToPick\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\n \"itemsToDelivered\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\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 }\n ],\n \"additionnalInfos\": \"Test\"\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/requests")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"executionDate\": \"2026-08-01\",\n \"vehicles\": [\n {\n \"numberOfVehicule\": 1\n }\n ],\n \"stops\": [\n {\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"itemsToPick\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\n \"itemsToDelivered\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\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 }\n ],\n \"additionnalInfos\": \"Test\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.papslogistics.com/requests")
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 \"executionDate\": \"2026-08-01\",\n \"vehicles\": [\n {\n \"numberOfVehicule\": 1\n }\n ],\n \"stops\": [\n {\n \"address\": \"Dakar-Plateau, Dakar, Sénégal\",\n \"itemsToPick\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\n \"itemsToDelivered\": [\n {\n \"product\": {\n \"reference\": \"4759XHG0MKH\",\n \"description\": \"iPhone 13 Pro Max\",\n \"quantity\": 3,\n \"value\": 3000,\n \"pickup\": 3\n },\n \"counter\": 3\n }\n ],\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 }\n ],\n \"additionnalInfos\": \"Test\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Success",
"error": "<string>",
"data": {
"executionDate": "2026-08-01",
"vehicles": [
{
"numberOfVehicule": 1
}
],
"stops": [
{
"address": "Dakar-Plateau, Dakar, Sénégal",
"itemsToPick": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"itemsToDelivered": [
{
"product": {
"reference": "4759XHG0MKH",
"description": "iPhone 13 Pro Max",
"quantity": 3,
"value": 3000,
"pickup": 3
},
"counter": 3
}
],
"receiver": {
"firstname": "John",
"lastname": "Doe",
"phoneNumber": "+221770000000",
"email": "[email protected]",
"entreprise": "John Corporation",
"address": "Dakar-Plateau, Dakar, Sénégal",
"specificationAddress": "côté brioche"
}
}
],
"additionnalInfos": "Test"
}
}Authorizations
Clé API du client, disponible dans son espace personnel Paps.
Body
application/json
Date d'exécution de la demande (format AAAA-MM-JJ)
Example:
"2026-08-01"
Type de produit transporté
Available options:
COURIERS, FRAGILE, FOOD, FRESH_PRODUCTS, OTHER Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"Test"
Response
200 - application/json
Demande de transport 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