Pular para o conteúdo
duxt
Esta página ainda não está disponível no seu idioma
Você está lendo em English (UK).

Book a consignment

post
/consignments

createConsignment

Books one consignment and tells you where it ended up.

Autorização

  • Qualquer um destes

    • apiKeyapiKey · X-Api-Key · Cabeçalho

      A key from the account page.

  • Qualquer um destes

    • bearerhttp · bearer

      A token obtained from the authorisation server.

Parâmetros

Cabeçalho

  • X-Request-Idstring

    An identifier echoed back on every response.

Corpo do pedido Obrigatório

The consignment to book.

objectNewConsignmentOne consignment, as the API sees it.
  • idstringApenas leitura
  • reference*Obrigatóriostringcomprimento mín 1comprimento máx 120
  • status*ObrigatóriostringConsignmentStatusbooked | loading | sailing | landed | cancelledWhere a consignment has got to.
  • createdAtstringApenas leitura
  • parentanyConsignmentRefere-se a si próprio; expandido acima.
  • tagsarray<string>únicos

    Cada elemento

    string
  • metadataobject

    Qualquer outra propriedade

    string
  • callbackUrlstringWhere 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"
  ]
}

Respostas

201
Booked.

Cabeçalhos

  • Location*Obrigatóriostring

    Where the new consignment can be read.

application/json

objectConsignmentOne consignment, as the API sees it.
  • id*ObrigatóriostringApenas leitura
  • reference*Obrigatóriostringcomprimento mín 1comprimento máx 120
  • status*ObrigatóriostringConsignmentStatusbooked | loading | sailing | landed | cancelledWhere a consignment has got to.
  • createdAtstringApenas leitura
  • parentanyConsignmentRefere-se a si próprio; expandido acima.
  • tagsarray<string>únicos

    Cada elemento

    string
  • metadataobject

    Qualquer outra propriedade

    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*ObrigatóriostringA short, human-readable summary.
  • status*Obrigatóriointegermín 400máx 599
  • detailstring | null
json
{
  "title": "string",
  "status": 400,
  "detail": "string"
}

Chamadas de retorno

consignmentLoaded

post
{$request.body#/callbackUrl}

Sent once the consignment has been loaded.

application/json

objectConsignmentOne consignment, as the API sees it.
  • idstringApenas leitura
  • reference*Obrigatóriostringcomprimento mín 1comprimento máx 120
  • status*ObrigatóriostringConsignmentStatusbooked | loading | sailing | landed | cancelledWhere a consignment has got to.
  • createdAtstringApenas leitura
  • parentanyConsignmentRefere-se a si próprio; expandido acima.
  • tagsarray<string>únicos

    Cada elemento

    string
  • metadataobject

    Qualquer outra propriedade

    string
json
{
  "reference": "string",
  "status": "booked",
  "parent": null,
  "tags": [
    "string"
  ],
  "metadata": {}
}

Resposta esperada

  • 204
    Acknowledged.

Enviar um pedido

Autenticação

O que escrever aqui fica neste separador, nunca é guardado e só é enviado para o servidor que escolheu.

Parâmetros

Este corpo não pode ser apresentado como formulário: edite-o como JSON.

O pedido é enviado pelo seu navegador, diretamente para esse servidor.

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"
}'