Version à venir
Vous consultez la documentation d’une version à venir. Sa documentation et ses fonctionnalités peuvent encore changer.
Cette page n’est pas encore disponible dans votre langue
Vous la lisez en English (UK).
Book a consignment
post
/consignmentscreateConsignment
Books one consignment and tells you where it ended up.
Autorisation
L’un de ceux-ci suffit
apiKeyapiKey · X-Api-Key · En-têteA key from the account page.
L’un de ceux-ci suffit
bearerhttp · bearerA token obtained from the authorisation server.
Paramètres
En-tête
X-Request-IdstringAn identifier echoed back on every response.
Corps de la requête Obligatoire
The consignment to book.
objectNewConsignmentOne consignment, as the API sees it.
idstringLecture seulereference*Obligatoirestringlongueur min 1longueur max 120status*ObligatoirestringConsignmentStatusbooked | loading | sailing | landed | cancelledWhere a consignment has got to.createdAtstringLecture seuleparentanyConsignmentSe référence lui-même ; déplié plus haut.tagsarray<string>uniquesChaque élément
stringmetadataobjectToute autre propriété
stringcallbackUrlstringWhere to send the callback once the load is aboard.
The smallest body that works
json
{
"reference": "HB-1042",
"status": "booked"
}With the paperwork attached
json
{
"reference": "HB-1042",
"status": "booked",
"callbackUrl": "https://example.org/hooks/harbour",
"tags": [
"refrigerated"
]
}Réponses
201
Booked.En-têtes
Location*ObligatoirestringWhere the new consignment can be read.
application/json
objectConsignmentOne consignment, as the API sees it.
id*ObligatoirestringLecture seulereference*Obligatoirestringlongueur min 1longueur max 120status*ObligatoirestringConsignmentStatusbooked | loading | sailing | landed | cancelledWhere a consignment has got to.createdAtstringLecture seuleparentanyConsignmentSe référence lui-même ; déplié plus haut.tagsarray<string>uniquesChaque élément
stringmetadataobjectToute autre propriété
string
json
{
"id": "00000000-0000-4000-8000-000000000000",
"reference": "string",
"status": "booked",
"createdAt": "2026-01-01T09:00:00Z",
"parent": null,
"tags": [
"string"
],
"metadata": {}
}422
Something went wrong, described the same way every time.application/problem+json
objectProblem
title*ObligatoirestringA short, human-readable summary.status*Obligatoireintegermin 400max 599detailstring | null
json
{
"title": "string",
"status": 400,
"detail": "string"
}Rappels
consignmentLoaded
post
{$request.body#/callbackUrl}Sent once the consignment has been loaded.
application/json
objectConsignmentOne consignment, as the API sees it.
idstringLecture seulereference*Obligatoirestringlongueur min 1longueur max 120status*ObligatoirestringConsignmentStatusbooked | loading | sailing | landed | cancelledWhere a consignment has got to.createdAtstringLecture seuleparentanyConsignmentSe référence lui-même ; déplié plus haut.tagsarray<string>uniquesChaque élément
stringmetadataobjectToute autre propriété
string
json
{
"reference": "string",
"status": "booked",
"parent": null,
"tags": [
"string"
],
"metadata": {}
}Réponse attendue
- 204Acknowledged.
Envoyer une requête
curl 'https://api.example.org/v3/consignments?limit=20&cursor=string&status=%5B%0A++%22booked%22%0A%5D&session=string' \
-H 'Authorization: Bearer demo-token' \
-H 'X-Request-Id: 00000000-0000-4000-8000-000000000000'