GET/v1/transfers/tracking/:reservationId/events/stream

Stream transfer tracking events

Receive vehicle position and journey status continuously over Server-Sent Events (SSE).

Share

Receive vehicle position and journey status continuously over Server-Sent Events (SSE).

Authentication and headers

HeaderDescription
AuthorizationBearer <secret_key>. Keep the secret on the server and never write it to client logs.
X-Travelandz-Id<public_key>:<profile_code>, where the persisted profile code has the form dp_<12 alphanumeric>.
LANGPreferred locale header. Accept-Language is also supported.
Accepttext/event-stream for progressive stream responses.

Response headers

http
http
Content-Type: text/event-stream
Cache-Control: no-cache, no-transform
Connection: keep-alive

Request

This endpoint takes no body and accepts the same parameters as the latest-event endpoint. Send Accept: text/event-stream. The language captured when the connection opens is reused for every later event.

Request Params Schema

reservationId
stringYes
Reservation identifier returned when the booking was created.

Request Query Params Schema

currency
enum
EURUSDINRCHFJPYGBPAUDCADCNYSGDNZDMXN
No
Lowercase values are accepted and normalized. Defaults to USD on a new search and is inherited afterwards.
language
enum
en-USes-ESde-DEfr-FRpt-BRzh-CNit-IT
No
Legacy field. Prefer the LANG or Accept-Language header.

Success response

Each update event carries the same payload as the latest-event endpoint.

Response Body Schema

location
objectYes
locationlatitude
numberNo
locationlongitude
numberNo
status
stringNo
Journey state, for example driver_departed_to_pickup.
timestamp
string
Format: ISO 8601
No
trackingId
stringNo

Stream events

EventDescription
updateA refreshed snapshot. Replace what you are showing with the payload of the latest event.
errorA refresh could not be completed. Carries code and message. The connection is not closed automatically; the next refresh may succeed.

Stream example

text
text
event: update
data: {"location":{"latitude":40.7607634,"longitude":-73.971212},"status":"driver_departed_to_pickup","timestamp":"2026-07-25T17:47:01.761854Z","trackingId":"c90n51960f274447b29473fc0d995f6a"}

event: error
data: {"code":"transfer_provider_error","message":"Unable to load tracking data"}

Errors

HTTPCodeMeaningRecommended action
400The body, query or path is invalid, or contains an unknown property.Fix the request using the message array.
400transfer_invalid_currencyThe currency is outside the supported list.Use a supported currency.
400transfer_invalid_languageThe requested language is not supported.Use one of the documented language values.
429transfer_provider_errorThe service is temporarily rate limited.Retry with exponential backoff.
502transfer_provider_errorThe request could not be completed.Do not assume success. Keep your identifiers and read the reservation when the operation could have been created.

Usage notes

Keep the connection open only while the traveller is looking at the live view, and close it explicitly afterwards. Handle both update and error events, and reconnect after a network interruption.

Validation that fails before the stream opens is returned as a normal JSON HTTP error. Once the stream is open, failures arrive as error events instead.

cURL example

bash
bash
curl --request GET \
  --url "https://api.sandbox.travelandz.com/v1/transfers/tracking/f390daff1fdf4cccb19b7abd825dc011/events/stream?currency=USD" \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE" \
  -H "Accept: text/event-stream"