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

List the destinations you can sell

Request

Every destination you can sell, as { countries, regions }: an object of two lists, not wrapped in data. When your account has a destination list, only the destinations on it are listed, the same set your bookings accept; otherwise every active destination. Each entry carries id (a ULID), name, type (country or region), iso2, iso3, iso3s (empty on a country, the member countries' ISO alpha-3 codes on a region) and i18n_name. A region also carries slug and country_names (its member countries' names keyed by ISO alpha-3 code). Any of id, iso2 or iso3 is accepted as {destination} by GET /v1/destinations/{destination}, as is the name.

Query
iso3string or null

A comma-separated list of ISO 3166-1 alpha-3 codes, in any letter case (ESP,FRA). Only the listed destinations answer. A region matches only by its own iso3 code (XCA, XRC, XME); a region whose code is in iso2 (EU, XA, XN, XS, OC) never matches this filter.

curl -i -X GET \
  'https://core.hubbyesim.com/api/v1/destinations?iso3=string' \
  -H 'X-Api-Key: YOUR_API_KEY_HERE' \
  -H 'X-Signature: YOUR_API_KEY_HERE' \
  -H 'X-Timestamp: YOUR_API_KEY_HERE'

Responses

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
countriesArray of Destination (object) or Destination (object)(Destination)required
Any of:
countries[].​idstringrequired
countries[].​namestring or nullrequired
countries[].​typestringrequired
countries[].​iso3sArray of strings= 0 itemsrequired
countries[].​i18n_nameobjectrequired
countries[].​i18n_name.​property name*stringadditional property
countries[].​iso2string or nullrequired
countries[].​iso3string or nullrequired
regionsArray of Destination (object) or Destination (object)(Destination)required
Any of:
regions[].​idstringrequired
regions[].​namestring or nullrequired
regions[].​typestringrequired
regions[].​iso3sArray of strings= 0 itemsrequired
regions[].​i18n_nameobjectrequired
regions[].​i18n_name.​property name*stringadditional property
regions[].​iso2string or nullrequired
regions[].​iso3string or nullrequired
Response
application/json
{ "countries": [ { … } ], "regions": [ { … } ] }

Read one destination, with the bundles you sell for it

Request

One destination you can sell, with the bundles you can sell for it in bundles[]. A destination outside your destination list answers 404 not_found, like an unknown value.

Path
destinationstringrequired

The destination: its id (a ULID), an ISO 3166-1 alpha-2 or alpha-3 code, a region's code, or its English name, in any letter case. A translated name is not accepted here. Only a destination you can sell resolves: when your account has a destination list, a destination outside it answers 404 not_found, like an unknown value.

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

Responses

DestinationDetail

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(DestinationDetail)required
data.​idstringrequired
data.​typestringrequired
data.​tiernullrequired

Internal; not for Partner use; do not build on it.

data.​iso3sArray of stringsrequired
data.​iso2string or nullrequired

The country's ISO 3166-1 alpha-2 code, or the region's code when the region keeps it here (for example EU). Null when the region keeps its code in iso3.

data.​iso3string or nullrequired

The country's ISO 3166-1 alpha-3 code, or the region's code when the region keeps it here (for example XCA). Null when the region keeps its code in iso2.

data.​slugstring or nullrequired

The destination's English name in lowercase words joined by hyphens, for example bosnia-and-herzegovina or europe.

data.​namestring or nullrequired
data.​i18n_nameobjectrequired
data.​i18n_name.​property name*stringadditional property
data.​is_activebooleanrequired

Internal; not for Partner use; do not build on it.

data.​sort_orderintegerrequired

Internal; not for Partner use; do not build on it.

data.​click_countintegerrequired

Internal; not for Partner use; do not build on it.

data.​created_atstring or null(date-time)required

Internal; not for Partner use; do not build on it.

data.​updated_atstring or null(date-time)required

Internal; not for Partner use; do not build on it.

data.​created_bystring or nullrequired

Internal; not for Partner use; do not build on it.

data.​updated_bystring or nullrequired

Internal; not for Partner use; do not build on it.

data.​bundlesArray of objects(Bundle)required
data.​bundles[].​idstringrequired

The bundle's id. Stable: name it as bundle_id to book exactly this bundle.

data.​bundles[].​destinationobject(DestinationSummary)required

The destination the bundle is sold for. A region carries its code in iso2 or in iso3.

data.​bundles[].​destination.​idstringrequired

The destination's id: the id of GET /v1/destinations/{destination}.

data.​bundles[].​destination.​namestring or nullrequired

The destination's English name, for example Spain or Europe.

data.​bundles[].​destination.​typestring(DestinationKind)required

country or region.

Enum"country""region"
data.​bundles[].​destination.​iso2string or nullrequired

The country's ISO 3166-1 alpha-2 code, or the region's code when the region keeps it here (for example EU). Null when the region keeps its code in iso3.

data.​bundles[].​destination.​iso3string or nullrequired

The country's ISO 3166-1 alpha-3 code, or the region's code when the region keeps it here (for example XCA). Null when the region keeps its code in iso2.

data.​bundles[].​typestring(PackageType)required

The package type: data_limited, starter or unlimited. Send it back as package_type when you specify by dimensions.

Enum"data_limited""starter""unlimited"
data.​bundles[].​labelstringrequired

Internal; not for Partner use; do not build on it.

data.​bundles[].​providerstringrequired

Internal; not for Partner use; do not build on it.

data.​bundles[].​size_bytesinteger or nullrequired
data.​bundles[].​duration_secondsinteger or nullrequired
data.​bundles[].​duration_daysinteger or nullrequired

The validity in whole days, counted from first use: duration_seconds / 86400, rounded to the nearest whole day. Unlimited bundles are listed once for every day count that has a price.

data.​bundles[].​package_templateobjectrequired

Internal; not for Partner use; do not build on it.

data.​bundles[].​package_template.​idstringrequired
data.​bundles[].​package_template.​namestringrequired
data.​bundles[].​partnerobject or nullrequired

Internal; not for Partner use; do not build on it.

data.​bundles[].​partner.​idstringrequired
data.​bundles[].​partner.​namestringrequired
data.​bundles[].​traffic_policyobject or nullrequired

Internal; not for Partner use; do not build on it.

data.​bundles[].​traffic_policy.​descriptionstring or nullrequired
data.​bundles[].​fair_use_throttleFairUseThrottle (object) or nullrequired

The Fair-use throttle of an unlimited bundle: after throttle_after_bytes in one day the speed drops to throttled_kbps until the day resets. Show it to the traveller before purchase. Null on a bundle that is not unlimited.

Any of:

The Fair-use throttle of an unlimited bundle: after throttle_after_bytes in one day the speed drops to throttled_kbps until the day resets. Show it to the traveller before purchase. Null on a bundle that is not unlimited.

data.​bundles[].​fair_use_throttle.​throttle_after_bytesintegerrequired

The daily threshold, in bytes: the data a traveller can use in one day at full speed. The threshold applies per day, not to the whole package.

data.​bundles[].​fair_use_throttle.​throttled_kbpsintegerrequired

The speed after the daily threshold is passed, in kbps (decimal: 1 Mbps is 1000 kbps). It applies until the threshold resets.

data.​bundles[].​fair_use_throttle.​resetsstring(FairUseThrottleReset)required

When the threshold resets and the full speed comes back.

daily
Each day: the threshold applies to the data used in one day.
Value"daily"
data.​bundles[].​is_activebooleanrequired

Internal; not for Partner use; do not build on it.

data.​bundles[].​is_visiblebooleanrequired

Internal; not for Partner use; do not build on it.

data.​bundles[].​priorityintegerrequired

Internal; not for Partner use; do not build on it.

data.​bundles[].​created_atstring or null(date-time)required
data.​bundles[].​updated_atstring or null(date-time)required

When anything on the bundle last changed. A price change does not move it: compare prices too, or watch the catalog ETag.

data.​bundles[].​deleted_atstring or null(date-time)required

Internal; not for Partner use; do not build on it.

data.​bundles[].​created_bystring or nullrequired

Internal; not for Partner use; do not build on it.

data.​bundles[].​updated_bystring or nullrequired

Internal; not for Partner use; do not build on it.

data.​bundles[].​pricing_infoobjectrequired

The recommended retail price in EUR major units. Kept for older integrations; read prices instead.

data.​bundles[].​pricing_info.​final_pricenumberrequired
data.​bundles[].​pricing_info.​original_pricenumberrequired
data.​bundles[].​pricing_info.​currencystringrequired
data.​bundles[].​pricing_info.​currency_symbolstringrequired
data.​bundles[].​pricing_info.​discount_appliedbooleanrequired
data.​bundles[].​pricing_info.​discount_percentageintegerrequired
data.​bundles[].​pricesobjectrequired

Both prices of the bundle, in EUR cents.

data.​bundles[].​prices.​retailobjectrequired

The recommended retail price: what a traveller pays in Hubby's own shop.

data.​bundles[].​prices.​retail.​amountintegerrequired
data.​bundles[].​prices.​retail.​currencystringrequired
Value "EUR"
data.​bundles[].​prices.​netobject or nullrequired

Your price under your agreement: the amount Hubby invoices you. Null when your price list gives the bundle a retail price but no net price. The bundle is still listed, and you can still book it: your agreement with Hubby, not the API, sets what you pay for it.

data.​bundles[].​prices.​net.​amountintegerrequired
data.​bundles[].​prices.​net.​currencystringrequired
Value "EUR"
Response
application/json
{ "data": { "id": "string", "type": "string", "tier": null, "iso3s": [ … ], "iso2": "string", "iso3": "string", "slug": "string", "name": "string", "i18n_name": { … }, "is_active": true, "sort_order": 0, "click_count": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "created_by": "string", "updated_by": "string", "bundles": [ … ] } }

DeviceCompatibility

Operations

Esim

Operations

RedirectToken

Operations