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

Return the authenticated partner

Request

Read it before you create bookings: two of its settings change what a package specification may carry. When package_strategy is set, it fixes package_type, size and package_duration on every specification. When force_destinationless is true, your bookings are made without a destination, and the traveller picks one when they redeem in the Hubby app; it is never true for a Partner App account (end_customer_channel partner_app). Under either setting, a specification that names a bundle_id is refused with 422: specify by dimensions instead.

curl -i -X GET \
  https://core.hubbyesim.com/api/v1/me \
  -H 'X-Api-Key: YOUR_API_KEY_HERE' \
  -H 'X-Signature: YOUR_API_KEY_HERE' \
  -H 'X-Timestamp: YOUR_API_KEY_HERE'

Responses

Partner

Headers
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(Partner)required
data.​idstringrequired
data.​slugstringrequired
data.​namestringrequired
data.​is_activebooleanrequired
data.​parent_idstring or nullrequired
data.​end_customer_channelEndCustomerChannel (string) or nullrequired

Where your travellers get their eSIM, which decides what a booking carries. webapp: Hubby's web app; each package specification must name the traveller (email or external_user_id). native_app: the Hubby app; travellers redeem the item's code. partner_app: your own app over this API; you issue and install the package yourself, and booking items carry no code, offer_uuid, upgrade_url or deep_link_url.

Any of:

Where your travellers get their eSIM, which decides what a booking carries. webapp: Hubby's web app; each package specification must name the traveller (email or external_user_id). native_app: the Hubby app; travellers redeem the item's code. partner_app: your own app over this API; you issue and install the package yourself, and booking items carry no code, offer_uuid, upgrade_url or deep_link_url.

string(EndCustomerChannel)

Where your travellers get their eSIM, which decides what a booking carries. webapp: Hubby's web app; each package specification must name the traveller (email or external_user_id). native_app: the Hubby app; travellers redeem the item's code. partner_app: your own app over this API; you issue and install the package yourself, and booking items carry no code, offer_uuid, upgrade_url or deep_link_url.

Enum"webapp""native_app""partner_app"
data.​price_list_idstring or nullrequired

The id of the price list your bundle prices are read from, or null when none is set on your account. Informational: the prices themselves are on each bundle in GET /v1/bundles.

data.​package_strategyobject or nullrequired

The fixed package dimensions applied to every booking you create through this API. When present, the package_type, size and package_duration on every package specification you send are replaced before the booking is stored — your destination, travel dates and traveller identities are never changed. The sizes here are canonical units, not the units you send: size_bytes is what size ("1GB", "512MB") becomes, and duration_seconds is what package_duration (whole days) becomes. A null on either means that dimension does not apply to the type — an unlimited package carries no size, a data-limited one no duration. That is a dimension you do not choose, not a package without a validity: a data-limited package lasts the duration_days of the bundle chosen at issue, counted from activation, and valid_until on the issued package says when it ends (null only when that bundle carries no duration).

This may be set on your account or inherited from a parent account; either way it is what governs your bookings. null means no strategy applies: you specify packages freely.

data.​package_strategy.​package_typestringrequired
data.​package_strategy.​size_bytesinteger or nullrequired
data.​package_strategy.​duration_secondsinteger or nullrequired
data.​force_destinationlessbooleanrequired

Whether every booking you create through this API is stored without a destination, whatever destination you send. When true, the destination on each package specification is optional and is discarded if you send one — nothing is rejected for naming a destination, and your travel dates, package dimensions and traveller identities are untouched. Each traveller picks their destination when they redeem in the Hubby app, from the destinations available to your account.

Hubby never sets this on a Partner App account (end_customer_channel partner_app): a package issued over this API has no redeem step in which to pick a destination, so your bookings always carry the destination you send, and a package specification with neither destination nor bundle_id is refused at booking with 422 validation_failed.

This may be set on your account or inherited from a parent account; either way it is what governs your bookings. false means your bookings keep the destination you send, which is the normal case.

data.​default_localestring or nullrequired

The language bookings you create through this API are recorded in when you send no locale — for example nl-NL. Only ever fills a blank. A locale you send on a booking is always kept, whatever this says, and a booking you send without one is recorded in this language instead of none. null means no default is set on your account: a booking with no locale keeps none, exactly as before.

It applies to the booking itself. Travellers are not switched to this language — a traveller keeps whichever language they have chosen, and one who has chosen none keeps none until they do.

This is set on your account. Unlike package_strategy and force_destinationless, it is NOT inherited from a parent account.

data.​created_atstring or null(date-time)required
data.​updated_atstring or null(date-time)required
Response
application/json
{ "data": { "id": "string", "slug": "string", "name": "string", "is_active": true, "parent_id": "string", "end_customer_channel": "webapp", "price_list_id": "string", "package_strategy": { … }, "force_destinationless": true, "default_locale": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } }

Destination

Operations

DeviceCompatibility

Operations

Esim

Operations

RedirectToken

Operations