curl --request POST \
--url https://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"dates": {},
"options": {
"aller": [
"<string>"
],
"retour": [
"<string>"
]
},
"documents": {
"pending": [
"<string>"
],
"copy": [
"<string>"
],
"exclude_pv_papier": true
}
}
'import requests
url = "https://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview"
payload = {
"dates": {},
"options": {
"aller": ["<string>"],
"retour": ["<string>"]
},
"documents": {
"pending": ["<string>"],
"copy": ["<string>"],
"exclude_pv_papier": True
}
}
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({
dates: {},
options: {aller: ['<string>'], retour: ['<string>']},
documents: {pending: ['<string>'], copy: ['<string>'], exclude_pv_papier: true}
})
};
fetch('https://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview', 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://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview",
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([
'dates' => [
],
'options' => [
'aller' => [
'<string>'
],
'retour' => [
'<string>'
]
],
'documents' => [
'pending' => [
'<string>'
],
'copy' => [
'<string>'
],
'exclude_pv_papier' => true
]
]),
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://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview"
payload := strings.NewReader("{\n \"dates\": {},\n \"options\": {\n \"aller\": [\n \"<string>\"\n ],\n \"retour\": [\n \"<string>\"\n ]\n },\n \"documents\": {\n \"pending\": [\n \"<string>\"\n ],\n \"copy\": [\n \"<string>\"\n ],\n \"exclude_pv_papier\": true\n }\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://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dates\": {},\n \"options\": {\n \"aller\": [\n \"<string>\"\n ],\n \"retour\": [\n \"<string>\"\n ]\n },\n \"documents\": {\n \"pending\": [\n \"<string>\"\n ],\n \"copy\": [\n \"<string>\"\n ],\n \"exclude_pv_papier\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview")
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 \"dates\": {},\n \"options\": {\n \"aller\": [\n \"<string>\"\n ],\n \"retour\": [\n \"<string>\"\n ]\n },\n \"documents\": {\n \"pending\": [\n \"<string>\"\n ],\n \"copy\": [\n \"<string>\"\n ],\n \"exclude_pv_papier\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": null,
"transport_id": null,
"options": {
"aller": [
"<string>"
],
"retour": [
"<string>"
]
},
"status": "scheduled",
"price": {
"amount_ht": 123,
"currency": "EUR",
"express": true
},
"return_trip": {
"price": {
"amount_ht": 123,
"currency": "EUR",
"express": true
}
},
"duplicated_from": {
"id": "<string>",
"transport_id": "M-58120"
},
"documents": {
"to_copy": 123
},
"warnings": [
"<string>"
]
}Aperçu d'une duplication
Même corps et mêmes contrôles que POST /transports/{id}/duplicate, mais
sans effet de bord : aucune mission créée, aucun événement, pas
d’idempotence. Renvoie le prix par jambe et le nombre de documents qui
seraient recopiés. Une source déjà dupliquée renvoie 409 comme la création.
curl --request POST \
--url https://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"dates": {},
"options": {
"aller": [
"<string>"
],
"retour": [
"<string>"
]
},
"documents": {
"pending": [
"<string>"
],
"copy": [
"<string>"
],
"exclude_pv_papier": true
}
}
'import requests
url = "https://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview"
payload = {
"dates": {},
"options": {
"aller": ["<string>"],
"retour": ["<string>"]
},
"documents": {
"pending": ["<string>"],
"copy": ["<string>"],
"exclude_pv_papier": True
}
}
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({
dates: {},
options: {aller: ['<string>'], retour: ['<string>']},
documents: {pending: ['<string>'], copy: ['<string>'], exclude_pv_papier: true}
})
};
fetch('https://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview', 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://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview",
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([
'dates' => [
],
'options' => [
'aller' => [
'<string>'
],
'retour' => [
'<string>'
]
],
'documents' => [
'pending' => [
'<string>'
],
'copy' => [
'<string>'
],
'exclude_pv_papier' => true
]
]),
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://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview"
payload := strings.NewReader("{\n \"dates\": {},\n \"options\": {\n \"aller\": [\n \"<string>\"\n ],\n \"retour\": [\n \"<string>\"\n ]\n },\n \"documents\": {\n \"pending\": [\n \"<string>\"\n ],\n \"copy\": [\n \"<string>\"\n ],\n \"exclude_pv_papier\": true\n }\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://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dates\": {},\n \"options\": {\n \"aller\": [\n \"<string>\"\n ],\n \"retour\": [\n \"<string>\"\n ]\n },\n \"documents\": {\n \"pending\": [\n \"<string>\"\n ],\n \"copy\": [\n \"<string>\"\n ],\n \"exclude_pv_papier\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.myexpressdriver.com/v1/transports/{id}/duplicate/preview")
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 \"dates\": {},\n \"options\": {\n \"aller\": [\n \"<string>\"\n ],\n \"retour\": [\n \"<string>\"\n ]\n },\n \"documents\": {\n \"pending\": [\n \"<string>\"\n ],\n \"copy\": [\n \"<string>\"\n ],\n \"exclude_pv_papier\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": null,
"transport_id": null,
"options": {
"aller": [
"<string>"
],
"retour": [
"<string>"
]
},
"status": "scheduled",
"price": {
"amount_ht": 123,
"currency": "EUR",
"express": true
},
"return_trip": {
"price": {
"amount_ht": 123,
"currency": "EUR",
"express": true
}
},
"duplicated_from": {
"id": "<string>",
"transport_id": "M-58120"
},
"documents": {
"to_copy": 123
},
"warnings": [
"<string>"
]
}Autorisations
Clé API liée à un groupe (med_live_… en production, med_test_… en test).
Fournie en clair une seule fois à la création depuis le profil client.
Paramètres de chemin
Identifiant de la mission (offer_id).
Corps
Une entrée par jambe existante : enlevement-aller, livraison-aller,
et, si la source a un retour, enlevement-retour, livraison-retour.
Toutes obligatoires, dans le futur, ordonnées, et au-delà du délai
minimal de commande (sinon 422 too_early avec min_date).
Show child attributes
Show child attributes
Par jambe : soit un tableau des options de la source à conserver
(libellés tels qu'ils figurent sur la source ; absent = toutes), soit
un objet { keep, add } pour ajouter des options au prix de votre
grille, avec leurs obligations (params, cf. GET /options). Une clé
inconnue renvoie 422 unknown_option, une obligation manquante
422 requirements_not_met. Un créneau need_appointment ajoute
d'office l'option « Prise de rendez-vous ».
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Réponse
Aperçu tarifé (identifiants à null).
Aperçu d'une duplication — rien n'est créé.
Options finales par jambe (conservées, ajoutées, prise de rendez-vous automatique), clés {nom} - {prix}.
Show child attributes
Show child attributes
Statut public stable d'une mission (ou de sa jambe retour) :
scheduled (planifiée, en attente de convoyeur), assigned (convoyeur
attribué, véhicule pas encore enlevé), in_transit (aller en cours),
in_transit_return (retour en cours), awaiting_documents (en attente des
PV / documents), under_review (documents en validation), completed
(terminée, jamais une mission annulée), incident (anomalie signalée),
cancelled (mission annulée).
scheduled, assigned, in_transit, in_transit_return, awaiting_documents, under_review, completed, incident, cancelled Show child attributes
Show child attributes
Show child attributes
Show child attributes
Référence courte vers une mission.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
