Hubby Partner API (5.20.0)

Every response of a matched route carries the header X-Hubby-Call-Id, the id of the call in Hubby's records. A request refused before it reaches a route carries no call id: an unknown path (404, code not_found), a method the path does not take (405, code method_not_allowed), or a query string PHP cannot parse whole (400, code malformed_query_string). Those two refusals, 405 and 400, can answer any path and are not listed per operation. Every 4xx refusal body carries a message and a code to branch on. A 5xx can carry a message alone: the issue call's 500 (POST /v1/bookings/{booking}/items/{item}/package) has no code; retry it with the same Idempotency-Key.

Download OpenAPI description
Languages
Servers
Production
https://core.hubbyesim.com/api/
Staging
https://core-staging.hubbyesim.com/api/

Analytics

Operations

Booking

Operations

BookingItemPackage

Operations

Bundle

Operations

CurrentPartner

Operations

Destination

Operations

DeviceCompatibility

Operations

Esim

Operations

RedirectToken

Operations

Create a redirect token that signs one of your travellers in to the Hubby web app

Request

A short-lived, single-use token that signs one of your travellers in to the Hubby web app, by your external_user_id; no booking is needed. The traveller is found, imported, or created on this call: a traveller you have not named before is created now. For a Partner that moved over from the legacy platform, Hubby first asks the legacy platform for the traveller, and imports their legacy eSIMs, packages and bookings when it holds them; only a traveller it does not hold is created fresh. While the legacy platform cannot answer, the call answers 503 with Retry-After, and nothing is created. The token lives expires_in seconds (300) and is consumed by the first sign-in.

Headers
Idempotency-Keystring

Optional. A unique key for this request, for example a UUID, reused across every retry of it. A retry with the same key replays the stored success for 24 hours instead of running the request again.

Bodyapplication/jsonrequired
external_user_idstring<= 255 charactersrequired

Your id for the traveller, the same value you send on bookings. A traveller you have not named before is created on this call; for a Partner that moved over from the legacy platform, their legacy record is imported first.

curl -i -X POST \
  https://core.hubbyesim.com/api/v1/redirect-tokens \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: string' \
  -H 'X-Api-Key: YOUR_API_KEY_HERE' \
  -H 'X-Signature: YOUR_API_KEY_HERE' \
  -H 'X-Timestamp: YOUR_API_KEY_HERE' \
  -d '{
    "external_user_id": "string"
  }'

Responses

RedirectToken

Headers
Idempotent-Replayedstring

Sent as true only when this answer is the stored answer to an earlier request with the same Idempotency-Key, replayed unchanged. Absent on the first answer.

X-Hubby-Call-Idstringrequired

The id of this call in Hubby's records. Quote it when you ask Hubby about a call.

Bodyapplication/json
dataobject(RedirectToken)required
data.​redirect_tokenstringrequired
data.​expires_inintegerrequired

Lifetime of the redirect token in seconds.

Response
application/json
{ "data": { "redirect_token": "string", "expires_in": 0 } }