Esta página aún no está disponible en tu idioma
La estás leyendo en English (UK).
Book a consignment
post
/consignmentscreateConsignment
Books one consignment and tells you where it ended up.
Autorización
Cualquiera de estos
apiKeyapiKey · X-Api-Key · CabeceraA key from the account page.
Cualquiera de estos
bearerhttp · bearerA token obtained from the authorisation server.
Parámetros
Cabecera
X-Request-IdstringAn identifier echoed back on every response.
Cuerpo de la solicitud Obligatorio
The consignment to book.
objectNewConsignmentOne consignment, as the API sees it.
idstringSolo lecturareference*Obligatoriostringlongitud mín 1longitud máx 120status*ObligatoriostringConsignmentStatusbooked | loading | sailing | landed | cancelledWhere a consignment has got to.createdAtstringSolo lecturaparentanyConsignmentSe refiere a sí mismo; desplegado arriba.tagsarray<string>únicosCada elemento
stringmetadataobjectCualquier otra propiedad
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"
]
}Respuestas
201
Booked.Cabeceras
Location*ObligatoriostringWhere the new consignment can be read.
application/json
objectConsignmentOne consignment, as the API sees it.
id*ObligatoriostringSolo lecturareference*Obligatoriostringlongitud mín 1longitud máx 120status*ObligatoriostringConsignmentStatusbooked | loading | sailing | landed | cancelledWhere a consignment has got to.createdAtstringSolo lecturaparentanyConsignmentSe refiere a sí mismo; desplegado arriba.tagsarray<string>únicosCada elemento
stringmetadataobjectCualquier otra propiedad
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*ObligatoriostringA short, human-readable summary.status*Obligatoriointegermín 400máx 599detailstring | null
json
{
"title": "string",
"status": 400,
"detail": "string"
}Retrollamadas
consignmentLoaded
post
{$request.body#/callbackUrl}Sent once the consignment has been loaded.
application/json
objectConsignmentOne consignment, as the API sees it.
idstringSolo lecturareference*Obligatoriostringlongitud mín 1longitud máx 120status*ObligatoriostringConsignmentStatusbooked | loading | sailing | landed | cancelledWhere a consignment has got to.createdAtstringSolo lecturaparentanyConsignmentSe refiere a sí mismo; desplegado arriba.tagsarray<string>únicosCada elemento
stringmetadataobjectCualquier otra propiedad
string
json
{
"reference": "string",
"status": "booked",
"parent": null,
"tags": [
"string"
],
"metadata": {}
}Respuesta esperada
- 204Acknowledged.
Enviar una solicitud
curl 'https://api.example.org/v3/consignments' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer demo-token' \
-H 'X-Request-Id: 00000000-0000-4000-8000-000000000000' \
-d '{
"reference": "HB-1042",
"status": "booked"
}'