Saltar para o conteúdo
duxt
Versão futura
Está a consultar a documentação de uma versão futura. A documentação e as funcionalidades podem ainda mudar.
Esta página ainda não está disponível no seu idioma
Está a lê-la em English (UK).

Follow a consignment

get
/consignments/{consignmentId}/events

streamConsignmentEvents

Holds the connection open and writes one event per line as the consignment moves, in the text/event-stream format.

The response is not a document, which is the interesting part for a reference: there is a schema for one event, and none for the body as a whole.

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

Caminho

  • consignmentId*Obrigatóriostring

Cabeçalho

  • Last-Event-IDstring

    Resume after the event you last saw.

Respostas

200
The stream, until you close it.

text/event-stream

objectConsignmentEventOne thing that happened to a consignment.
  • id*ObrigatóriostringThe value to send back as `Last-Event-ID`.
  • at*Obrigatóriostring
  • status*ObrigatóriostringConsignmentStatusbooked | loading | sailing | landed | cancelledWhere a consignment has got to.
  • berthstring | nullWhere it is, once it is anywhere.
json
{
  "id": "string",
  "at": "2026-01-01T09:00:00Z",
  "status": "booked",
  "berth": "string"
}
404
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"
}

Enviar um pedido

Autenticação

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

Parâmetros

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

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'