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

Analytics summary

Request

Your headline figures for a date range: bookings, customers, upcoming departures, the 14-day activation rate, net revenue per currency, data consumed and packages that started using data. Set compare to add the same totals for the preceding period of equal length.

With a key that has key inheritance, the figures also include every descendant of your own Partner that has moved to this platform, and by_partner splits them per Partner. Name descendants in partner_ids to narrow to them, and set include_self=0 to leave your own Partner out. Descendants not yet on this platform are listed in meta.excluded_partners and counted in no figure. A key without key inheritance reads your own Partner only, and refuses both parameters. Parameters that leave no Partner on this platform in scope answer 422 with code no_partner_in_scope.

Figures may be up to 15 minutes old: a repeated request is answered from the same computation, and meta.computed_at says when it ran.

Only available once your own Partner has moved to this platform; before that it answers 403. When a range takes too long to compute it answers 503 with a Retry-After header: retry later or choose a shorter range.

Query
fromstring or null(date)

The first day of the range, Y-m-d, a UTC calendar day. Send from and to together, or neither: with neither, the range is the last 30 days, today included. A malformed value is refused with 422.

tostring or null(date)

The last day of the range, Y-m-d, a UTC calendar day on or after from, both ends included. The range may cover at most 366 days; a longer one is refused with 422.

partner_ids[]Array of strings

The descendants to narrow the figures to, by Partner id. Only with key inheritance: a key without it is refused with 422. An id that is not one of your descendants is refused with 422.

include_selfboolean

Set to 0 to leave your own Partner out of the figures. Only with key inheritance: a key without it is refused with 422. Default 1.

compareboolean

Set to 1 (or true) to add comparison: the same totals for the preceding period of the same length, ending the day before from. Any value that is not a boolean is refused with 422.

Default false
curl -i -X GET \
  'https://core.hubbyesim.com/api/v1/analytics/summary?compare=false&from=2019-08-24&include_self=true&partner_ids%5B%5D=string&to=2019-08-24' \
  -H 'X-Api-Key: YOUR_API_KEY_HERE' \
  -H 'X-Signature: YOUR_API_KEY_HERE' \
  -H 'X-Timestamp: YOUR_API_KEY_HERE'

Responses

AnalyticsSummary

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(AnalyticsSummary)required
data.​bookingsobjectrequired

Bookings created in the range, test bookings left out. Includes bookings moved over from the previous platform, created here on the day they moved.

data.​bookings.​totalintegerrequired

New plus moved over.

data.​bookings.​newintegerrequired

Bookings made on this platform.

data.​bookings.​moved_overintegerrequired

Bookings moved over from the previous platform.

data.​bookings.​tests_excludedintegerrequired

Test bookings created in the range and left out of every figure.

data.​customersobjectrequired

Customers (travellers) gained in the range.

data.​customers.​totalintegerrequired

New plus moved over.

data.​customers.​newintegerrequired

Customers who first appeared on this platform.

data.​customers.​moved_overintegerrequired

Customers moved over from the previous platform.

data.​departing_from_todayobjectrequired

Bookings departing from today onwards, whatever the range.

data.​departing_from_today.​next_30dintegerrequired

Departing between today and 30 days from today (UTC).

data.​departing_from_today.​next_60dintegerrequired

Departing between today and 60 days from today (UTC).

data.​departing_from_today.​next_90dintegerrequired

Departing between today and 90 days from today (UTC).

data.​activationobject(AnalyticsActivation)required

The 14-day claim-to-activation rate for codes claimed in the judged part of the range (judged_range): only claims at least 14 days old are judged.

data.​activation.​rateobject(AnalyticsRatio)required

Activated over claimed, as a rate.

data.​activation.​rate.​valuenumber or nullrequired

The rate as a percentage from 0 to 100, rounded to two decimals; null when suppressed.

data.​activation.​rate.​suppressedbooleanrequired

True when the denominator is below 30 records, too few for the rate to mean anything.

data.​activation.​rate.​numeratorintegerrequired

How many records met the condition.

data.​activation.​rate.​denominatorintegerrequired

How many records the rate is out of.

data.​activation.​claimedintegerrequired

Booking codes first claimed in the judged part of the range.

data.​activation.​activatedintegerrequired

Of those, how many had their eSIM package activated within the window.

data.​activation.​window_daysintegerrequired

How long after the first claim an activation still counts, in days.

data.​activation.​judged_rangeobject or nullrequired

The part of the range old enough to judge, as UTC dates with both ends included; null when none of it is.

data.​activation.​judged_range.​fromstringrequired

First judged day (UTC).

data.​activation.​judged_range.​tostringrequired

Last judged day (UTC).

data.​activation.​is_immaturebooleanrequired

True when the whole range is too recent to judge, so no rate is given; read it as "too early to tell", not as a low rate.

data.​revenue_netobjectrequired

Net revenue in the range: purchases minus refunds, per ISO 4217 currency code, in integer minor units. Currencies are never converted or added together. Empty when there was none.

data.​revenue_net.​property name*integeradditional property
data.​data_consumed_bytesintegerrequired

Mobile data your travellers used in the range on packages sold through this platform, in bytes.

data.​used_data_packagesintegerrequired

Packages sold through this platform that started using data in the range.

data.​by_partnerArray of objects(AnalyticsPartnerContribution)required

Each Partner in meta.partner_ids, with its part of bookings, customers, net revenue and data consumed. The rows add up to the totals above. One row when the figures are for your own Partner alone.

data.​by_partner[].​partner_idstringrequired

The Partner these figures are for, one of meta.partner_ids.

data.​by_partner[].​namestringrequired

The Partner's name, to label the row with.

data.​by_partner[].​bookingsintegerrequired

This Partner's part of bookings.total.

data.​by_partner[].​customersintegerrequired

This Partner's part of customers.total.

data.​by_partner[].​revenue_netobjectrequired

This Partner's part of revenue_net, per ISO 4217 currency code, in integer minor units. Empty when there was none.

data.​by_partner[].​revenue_net.​property name*integeradditional property
data.​by_partner[].​data_consumed_bytesintegerrequired

This Partner's part of data_consumed_bytes, in bytes.

data.​comparisonobject or nullrequired

The same headline figures for the preceding period of equal length, when compare was set. Null otherwise.

data.​comparison.​rangeobjectrequired

The preceding period, as UTC dates with both ends included.

data.​comparison.​range.​fromstringrequired

First day (UTC).

data.​comparison.​range.​tostringrequired

Last day (UTC).

data.​comparison.​bookingsintegerrequired

Bookings created in the preceding period, counted as bookings.total is.

data.​comparison.​revenue_netobjectrequired

Net revenue in the preceding period, per currency, in integer minor units.

data.​comparison.​revenue_net.​property name*integeradditional property
data.​comparison.​data_consumed_bytesintegerrequired

Data used in the preceding period on packages sold through this platform, in bytes.

data.​comparison.​activationobject(AnalyticsActivation)required

The activation rate for codes claimed in the preceding period.

data.​comparison.​activation.​rateobject(AnalyticsRatio)required

Activated over claimed, as a rate.

data.​comparison.​activation.​rate.​valuenumber or nullrequired

The rate as a percentage from 0 to 100, rounded to two decimals; null when suppressed.

data.​comparison.​activation.​rate.​suppressedbooleanrequired

True when the denominator is below 30 records, too few for the rate to mean anything.

data.​comparison.​activation.​rate.​numeratorintegerrequired

How many records met the condition.

data.​comparison.​activation.​rate.​denominatorintegerrequired

How many records the rate is out of.

data.​comparison.​activation.​claimedintegerrequired

Booking codes first claimed in the judged part of the range.

data.​comparison.​activation.​activatedintegerrequired

Of those, how many had their eSIM package activated within the window.

data.​comparison.​activation.​window_daysintegerrequired

How long after the first claim an activation still counts, in days.

data.​comparison.​activation.​judged_rangeobject or nullrequired

The part of the range old enough to judge, as UTC dates with both ends included; null when none of it is.

data.​comparison.​activation.​judged_range.​fromstringrequired

First judged day (UTC).

data.​comparison.​activation.​judged_range.​tostringrequired

Last judged day (UTC).

data.​comparison.​activation.​is_immaturebooleanrequired

True when the whole range is too recent to judge, so no rate is given; read it as "too early to tell", not as a low rate.

data.​comparison.​used_data_packagesintegerrequired

Packages that started using data in the preceding period.

metaobject(AnalyticsMeta)required

What the figures cover.

meta.​rangeobjectrequired

The range the figures cover, as UTC dates with both ends included.

meta.​range.​fromstringrequired

First day (UTC).

meta.​range.​tostringrequired

Last day (UTC).

meta.​timezonestringrequired

Days are UTC days, always: a day runs from 00:00:00 to 23:59:59 UTC.

Value "UTC"
meta.​computed_atstring(date-time)required

When these figures were computed. A repeated request within 15 minutes is answered from the same computation, so this can be up to 15 minutes ago.

meta.​partner_idsArray of stringsrequired

The Partners whose figures are included: your own (unless include_self=0) and, with key inheritance, your descendants that are included.

meta.​excluded_partnersArray of objectsrequired

Descendants left out of every figure because they have not moved to this platform yet, with their names. Empty for a key without key inheritance.

meta.​excluded_partners[].​idstringrequired
meta.​excluded_partners[].​namestringrequired
meta.​cut_over_notestring or nullrequired

Present when the range starts before your own Partner moved to this platform: activity before that day is on the previous platform and is not in these figures. Null otherwise, also with include_self=0; the note is never about descendants (their earlier activity is left out without a note).

Response
application/json
{ "data": { "bookings": { … }, "customers": { … }, "departing_from_today": { … }, "activation": { … }, "revenue_net": { … }, "data_consumed_bytes": 0, "used_data_packages": 0, "by_partner": [ … ], "comparison": { … } }, "meta": { "range": { … }, "timezone": "UTC", "computed_at": "2019-08-24T14:15:22Z", "partner_ids": [ … ], "excluded_partners": [ … ], "cut_over_note": "string" } }

Analytics funnel

Request

The journey from booking codes issued to data used, for the bookings created in the range: every booking code of those bookings, followed through being claimed, paid for, eSIM installed, package activated and first data used, whenever each of those happened. Each step has its count, its rate against the previous step and its share of the codes issued. Set dimension to also split the funnel by destination, bundle size, sales channel, booking source or transaction type; the groups add up to the funnel.

The funnel covers new bookings only: bookings moved over from the previous platform and test bookings are left out (and counted in cohort), so its codes issued can differ from the summary's bookings. Its "package activated" step has no 14-day window and follows bookings from the day they were created, so it is a different figure from the summary's activation rate.

Scoped, cached and refused exactly as the summary: key inheritance (partner_ids, include_self), descendants not yet on this platform in meta.excluded_partners, figures up to 15 minutes old (see meta.computed_at), 403 before your own Partner has moved to this platform, and 503 with Retry-After when a range takes too long to compute.

Query
fromstring or null(date)

The first day of the range, Y-m-d, a UTC calendar day. Send from and to together, or neither: with neither, the range is the last 30 days, today included. A malformed value is refused with 422.

tostring or null(date)

The last day of the range, Y-m-d, a UTC calendar day on or after from, both ends included. The range may cover at most 366 days; a longer one is refused with 422.

partner_ids[]Array of strings

The descendants to narrow the figures to, by Partner id. Only with key inheritance: a key without it is refused with 422. An id that is not one of your descendants is refused with 422.

include_selfboolean

Set to 0 to leave your own Partner out of the figures. Only with key inheritance: a key without it is refused with 422. Default 1.

dimensionstring

Break the funnel down by this dimension: destination, bundle_size, sales_channel, booking_source or transaction_type. Any other value is refused with 422. Leave it out for no breakdown.

Enum"destination""bundle_size""sales_channel""booking_source""transaction_type"
curl -i -X GET \
  'https://core.hubbyesim.com/api/v1/analytics/funnel?dimension=destination&from=2019-08-24&include_self=true&partner_ids%5B%5D=string&to=2019-08-24' \
  -H 'X-Api-Key: YOUR_API_KEY_HERE' \
  -H 'X-Signature: YOUR_API_KEY_HERE' \
  -H 'X-Timestamp: YOUR_API_KEY_HERE'

Responses

AnalyticsFunnel

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(AnalyticsFunnel)required
data.​populationstringrequired

Always new: the funnel covers bookings made on this platform only. Bookings moved over from the previous platform are left out, so cohort.codes can differ from the summary's bookings.total, which includes them.

data.​cohortobjectrequired

The codes the funnel follows.

data.​cohort.​codesintegerrequired

Booking codes (one per traveller) of the new bookings created in the range: the funnel's first step.

data.​cohort.​bookingsintegerrequired

The new bookings those codes belong to.

data.​cohort.​moved_over_codes_excludedintegerrequired

Codes of bookings moved over from the previous platform, left out of the funnel.

data.​cohort.​test_codes_excludedintegerrequired

Codes of test bookings, left out of the funnel.

data.​is_immaturebooleanrequired

True when the range ended within the last 14 days and has codes: travellers are still claiming, installing and activating, so later steps are still climbing. Read low rates as "too early to tell".

data.​stepsArray of objects(AnalyticsFunnelStep)required

The steps, in order: codes_issued, claimed, paid, esim_installed, package_activated, used_data. Empty when no new booking was created in the range.

data.​steps[].​stepstringrequired

Which step: codes_issued (every booking code of the bookings created in the range), claimed (the traveller claimed the code), paid (the code was paid for in the app; only codes sold in the app can be), esim_installed (the eSIM carrying the code's package was installed), package_activated (the package went live on the network, at any time after the booking was created, with no 14-day window) or used_data (the package carried its first byte of data). Always in this order.

data.​steps[].​statusstringrequired

recorded when the step is counted, also with a count of 0; not_recorded only for claimed, when no code in the funnel has a claim record, so it cannot be counted and is skipped as the previous step of the next one; not_applicable when it cannot happen to any code in the funnel (paid, when no code was sold in the app).

data.​steps[].​countinteger or nullrequired

How many codes reached this step, whenever that happened. For paid, out of the codes sold in the app only. Null when the step is not recorded or not applicable.

data.​steps[].​rateAnalyticsRatio (object) or nullrequired

This step's count over the previous recorded step's count; for paid, over the codes sold in the app, and paid is never the previous step of another. Null for codes_issued and for a step that is not recorded or not applicable.

Any of:

This step's count over the previous recorded step's count; for paid, over the codes sold in the app, and paid is never the previous step of another. Null for codes_issued and for a step that is not recorded or not applicable.

data.​steps[].​rate.​valuenumber or nullrequired

The rate as a percentage from 0 to 100, rounded to two decimals; null when suppressed.

data.​steps[].​rate.​suppressedbooleanrequired

True when the denominator is below 30 records, too few for the rate to mean anything.

data.​steps[].​rate.​numeratorintegerrequired

How many records met the condition.

data.​steps[].​rate.​denominatorintegerrequired

How many records the rate is out of.

data.​steps[].​share_of_codesAnalyticsRatio (object) or nullrequired

This step's count over codes_issued. Null for codes_issued, for paid and for a step that is not recorded or not applicable.

Any of:

This step's count over codes_issued. Null for codes_issued, for paid and for a step that is not recorded or not applicable.

data.​steps[].​share_of_codes.​valuenumber or nullrequired

The rate as a percentage from 0 to 100, rounded to two decimals; null when suppressed.

data.​steps[].​share_of_codes.​suppressedbooleanrequired

True when the denominator is below 30 records, too few for the rate to mean anything.

data.​steps[].​share_of_codes.​numeratorintegerrequired

How many records met the condition.

data.​steps[].​share_of_codes.​denominatorintegerrequired

How many records the rate is out of.

data.​dimensionstring or nullrequired

The dimension the funnel is broken down by, as requested; null when none was.

data.​breakdownArray of objects or null(AnalyticsFunnelGroup)required

The funnel split by dimension, one group per value, whose codes and step counts add up to the funnel above. Null when no dimension was requested or no new booking was created in the range.

data.​breakdown[].​valuestring or nullrequired

The dimension's value: a destination id, a bundle size in bytes, a sales channel, a booking source or a transaction type. Null for the codes that have none: a code with no destination has no destination, an unlimited bundle has no size, and a code not sold in the app has no sales channel or transaction type.

data.​breakdown[].​labelstring or nullrequired

A readable name for the value: the destination's name or the bundle size (for example "5GB"), otherwise the value itself. Null when the value is null.

data.​breakdown[].​codesintegerrequired

This group's part of cohort.codes.

data.​breakdown[].​stepsArray of objects(AnalyticsFunnelStep)required

This group's funnel, with the same steps as the whole funnel.

data.​breakdown[].​steps[].​stepstringrequired

Which step: codes_issued (every booking code of the bookings created in the range), claimed (the traveller claimed the code), paid (the code was paid for in the app; only codes sold in the app can be), esim_installed (the eSIM carrying the code's package was installed), package_activated (the package went live on the network, at any time after the booking was created, with no 14-day window) or used_data (the package carried its first byte of data). Always in this order.

data.​breakdown[].​steps[].​statusstringrequired

recorded when the step is counted, also with a count of 0; not_recorded only for claimed, when no code in the funnel has a claim record, so it cannot be counted and is skipped as the previous step of the next one; not_applicable when it cannot happen to any code in the funnel (paid, when no code was sold in the app).

data.​breakdown[].​steps[].​countinteger or nullrequired

How many codes reached this step, whenever that happened. For paid, out of the codes sold in the app only. Null when the step is not recorded or not applicable.

data.​breakdown[].​steps[].​rateAnalyticsRatio (object) or nullrequired

This step's count over the previous recorded step's count; for paid, over the codes sold in the app, and paid is never the previous step of another. Null for codes_issued and for a step that is not recorded or not applicable.

Any of:

This step's count over the previous recorded step's count; for paid, over the codes sold in the app, and paid is never the previous step of another. Null for codes_issued and for a step that is not recorded or not applicable.

data.​breakdown[].​steps[].​rate.​valuenumber or nullrequired

The rate as a percentage from 0 to 100, rounded to two decimals; null when suppressed.

data.​breakdown[].​steps[].​rate.​suppressedbooleanrequired

True when the denominator is below 30 records, too few for the rate to mean anything.

data.​breakdown[].​steps[].​rate.​numeratorintegerrequired

How many records met the condition.

data.​breakdown[].​steps[].​rate.​denominatorintegerrequired

How many records the rate is out of.

data.​breakdown[].​steps[].​share_of_codesAnalyticsRatio (object) or nullrequired

This step's count over codes_issued. Null for codes_issued, for paid and for a step that is not recorded or not applicable.

Any of:

This step's count over codes_issued. Null for codes_issued, for paid and for a step that is not recorded or not applicable.

data.​breakdown[].​steps[].​share_of_codes.​valuenumber or nullrequired

The rate as a percentage from 0 to 100, rounded to two decimals; null when suppressed.

data.​breakdown[].​steps[].​share_of_codes.​suppressedbooleanrequired

True when the denominator is below 30 records, too few for the rate to mean anything.

data.​breakdown[].​steps[].​share_of_codes.​numeratorintegerrequired

How many records met the condition.

data.​breakdown[].​steps[].​share_of_codes.​denominatorintegerrequired

How many records the rate is out of.

metaobject(AnalyticsMeta)required

What the figures cover.

meta.​rangeobjectrequired

The range the figures cover, as UTC dates with both ends included.

meta.​range.​fromstringrequired

First day (UTC).

meta.​range.​tostringrequired

Last day (UTC).

meta.​timezonestringrequired

Days are UTC days, always: a day runs from 00:00:00 to 23:59:59 UTC.

Value "UTC"
meta.​computed_atstring(date-time)required

When these figures were computed. A repeated request within 15 minutes is answered from the same computation, so this can be up to 15 minutes ago.

meta.​partner_idsArray of stringsrequired

The Partners whose figures are included: your own (unless include_self=0) and, with key inheritance, your descendants that are included.

meta.​excluded_partnersArray of objectsrequired

Descendants left out of every figure because they have not moved to this platform yet, with their names. Empty for a key without key inheritance.

meta.​excluded_partners[].​idstringrequired
meta.​excluded_partners[].​namestringrequired
meta.​cut_over_notestring or nullrequired

Present when the range starts before your own Partner moved to this platform: activity before that day is on the previous platform and is not in these figures. Null otherwise, also with include_self=0; the note is never about descendants (their earlier activity is left out without a note).

Response
application/json
{ "data": { "population": "string", "cohort": { … }, "is_immature": true, "steps": [ … ], "dimension": "string", "breakdown": [ … ] }, "meta": { "range": { … }, "timezone": "UTC", "computed_at": "2019-08-24T14:15:22Z", "partner_ids": [ … ], "excluded_partners": [ … ], "cut_over_note": "string" } }

Analytics time series

Request

Your figures over time, for charts: bookings created, bookings departing, bookings cancelled, customers gained, net revenue per currency and data consumed, one row per bucket (day, the default, week or month). Every bucket in the range is present, zero when nothing happened in it. Buckets are UTC.

The figures are summed over every Partner in meta.partner_ids, with no per-Partner split (the summary has one).

Scoped, cached and refused exactly as the summary: key inheritance (partner_ids, include_self), descendants not yet on this platform in meta.excluded_partners, figures up to 15 minutes old (see meta.computed_at), 403 before your own Partner has moved to this platform, and 503 with Retry-After when a range takes too long to compute.

Query
fromstring or null(date)

The first day of the range, Y-m-d, a UTC calendar day. Send from and to together, or neither: with neither, the range is the last 30 days, today included. A malformed value is refused with 422.

tostring or null(date)

The last day of the range, Y-m-d, a UTC calendar day on or after from, both ends included. The range may cover at most 366 days; a longer one is refused with 422.

partner_ids[]Array of strings

The descendants to narrow the figures to, by Partner id. Only with key inheritance: a key without it is refused with 422. An id that is not one of your descendants is refused with 422.

include_selfboolean

Set to 0 to leave your own Partner out of the figures. Only with key inheritance: a key without it is refused with 422. Default 1.

bucketstring

The length of each row: day (the default), week (ISO weeks, starting Monday) or month, all in UTC. Any other value is refused with 422.

Default "day"
Enum"day""week""month"
curl -i -X GET \
  'https://core.hubbyesim.com/api/v1/analytics/timeseries?bucket=day&from=2019-08-24&include_self=true&partner_ids%5B%5D=string&to=2019-08-24' \
  -H 'X-Api-Key: YOUR_API_KEY_HERE' \
  -H 'X-Signature: YOUR_API_KEY_HERE' \
  -H 'X-Timestamp: YOUR_API_KEY_HERE'

Responses

AnalyticsTimeseries

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(AnalyticsTimeseries)required
data.​bucketstringrequired

The bucket every row covers: day, week (ISO weeks, Monday to Sunday) or month.

data.​seriesArray of objects(AnalyticsTimeseriesBucket)required

One row per bucket, oldest first, from the bucket holding meta.range.from to the bucket holding meta.range.to.

data.​series[].​datestringrequired

The bucket's first day (UTC): the day itself, the Monday of the week, or the first of the month. A week or month bucket at either end of the range can start before or end after it; only the days inside the range are counted.

data.​series[].​bookings_createdintegerrequired

Bookings created in the bucket, test bookings left out. Includes bookings moved over from the previous platform, created here on the day they moved.

data.​series[].​bookings_departingintegerrequired

Bookings whose departure date falls in the bucket, test bookings left out, moved-over bookings included. This follows the requested range, unlike the summary's departing_from_today, which always looks forward from today.

data.​series[].​bookings_cancelledintegerrequired

Bookings cancelled in the bucket, test bookings left out, moved-over bookings included.

data.​series[].​customersintegerrequired

Customers (travellers) gained in the bucket.

data.​series[].​revenue_netobjectrequired

Net revenue in the bucket: purchases minus refunds, per ISO 4217 currency code, in integer minor units. Currencies are never converted or added together. Empty when there was none.

data.​series[].​revenue_net.​property name*integeradditional property
data.​series[].​data_consumed_bytesintegerrequired

Mobile data your travellers used in the bucket on packages sold through this platform, in bytes.

metaobject(AnalyticsMeta)required

What the figures cover.

meta.​rangeobjectrequired

The range the figures cover, as UTC dates with both ends included.

meta.​range.​fromstringrequired

First day (UTC).

meta.​range.​tostringrequired

Last day (UTC).

meta.​timezonestringrequired

Days are UTC days, always: a day runs from 00:00:00 to 23:59:59 UTC.

Value "UTC"
meta.​computed_atstring(date-time)required

When these figures were computed. A repeated request within 15 minutes is answered from the same computation, so this can be up to 15 minutes ago.

meta.​partner_idsArray of stringsrequired

The Partners whose figures are included: your own (unless include_self=0) and, with key inheritance, your descendants that are included.

meta.​excluded_partnersArray of objectsrequired

Descendants left out of every figure because they have not moved to this platform yet, with their names. Empty for a key without key inheritance.

meta.​excluded_partners[].​idstringrequired
meta.​excluded_partners[].​namestringrequired
meta.​cut_over_notestring or nullrequired

Present when the range starts before your own Partner moved to this platform: activity before that day is on the previous platform and is not in these figures. Null otherwise, also with include_self=0; the note is never about descendants (their earlier activity is left out without a note).

Response
application/json
{ "data": { "bucket": "string", "series": [ … ] }, "meta": { "range": { … }, "timezone": "UTC", "computed_at": "2019-08-24T14:15:22Z", "partner_ids": [ … ], "excluded_partners": [ … ], "cut_over_note": "string" } }

Analytics breakdowns

Request

Your codes issued in a date range by destination and by bundle size, and the discounts given per discount code and currency. Each section counts records (codes, discounted payments), and its rows add up to that count. The figures are summed over every Partner in meta.partner_ids, with no per-Partner split (the summary has one).

Scoped, cached and refused exactly as the summary: key inheritance (partner_ids, include_self), descendants not yet on this platform in meta.excluded_partners, figures up to 15 minutes old (see meta.computed_at), 403 before your own Partner has moved to this platform, and 503 with Retry-After when a range takes too long to compute.

Query
fromstring or null(date)

The first day of the range, Y-m-d, a UTC calendar day. Send from and to together, or neither: with neither, the range is the last 30 days, today included. A malformed value is refused with 422.

tostring or null(date)

The last day of the range, Y-m-d, a UTC calendar day on or after from, both ends included. The range may cover at most 366 days; a longer one is refused with 422.

partner_ids[]Array of strings

The descendants to narrow the figures to, by Partner id. Only with key inheritance: a key without it is refused with 422. An id that is not one of your descendants is refused with 422.

include_selfboolean

Set to 0 to leave your own Partner out of the figures. Only with key inheritance: a key without it is refused with 422. Default 1.

curl -i -X GET \
  'https://core.hubbyesim.com/api/v1/analytics/breakdowns?from=2019-08-24&include_self=true&partner_ids%5B%5D=string&to=2019-08-24' \
  -H 'X-Api-Key: YOUR_API_KEY_HERE' \
  -H 'X-Signature: YOUR_API_KEY_HERE' \
  -H 'X-Timestamp: YOUR_API_KEY_HERE'

Responses

AnalyticsBreakdowns

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(AnalyticsBreakdowns)required
data.​destinationsobjectrequired

Codes issued in the range, by destination. Includes codes of bookings moved over from the previous platform, and packages bought in the app with no booking, each dated by the code's own creation; so it can differ from the funnel's codes_issued.

data.​destinations.​codesintegerrequired

Codes issued in the range that have a destination. The top counts add up to it.

data.​destinations.​topArray of objects(AnalyticsDestinationCount)required

Every destination with a code issued in the range, most codes first.

data.​destinations.​top[].​idstringrequired

The destination's id. A destination withdrawn since keeps its row and its name.

data.​destinations.​top[].​namestringrequired

The destination's name.

data.​destinations.​top[].​countintegerrequired

Codes issued in the range for this destination.

data.​bundle_sizesobjectrequired

Codes issued in the range, by bundle size. Includes codes of bookings moved over from the previous platform, and packages bought in the app with no booking, each dated by the code's own creation; so it can differ from the funnel's codes_issued.

data.​bundle_sizes.​codesintegerrequired

Codes issued in the range. The distribution counts add up to it.

data.​bundle_sizes.​distributionArray of objects(AnalyticsBundleSizeCount)required

One row per bundle size, most codes first.

data.​bundle_sizes.​distribution[].​size_bytesinteger or nullrequired

The bundle's data allowance in bytes. Null for an unlimited bundle.

data.​bundle_sizes.​distribution[].​labelstringrequired

The size as a reader would say it, in binary units (5GB is 5 × 1024³ bytes), or Unlimited.

data.​bundle_sizes.​distribution[].​countintegerrequired

Codes issued in the range with this bundle size.

data.​discountsobjectrequired

Discounts given on payments that went through in the range.

data.​discounts.​discounted_paymentsintegerrequired

Payments in the range that carried a discount of any kind: a discount code, a limited-time offer or an upgrade offer.

data.​discounts.​by_codeArray of objects(AnalyticsDiscountCode)required

The discount given through each discount code, per currency. A discount from an offer has no code, so it is counted in discounted_payments only.

data.​discounts.​by_code[].​codestringrequired

The discount code as travellers enter it.

data.​discounts.​by_code[].​discountobjectrequired

The discount given through this code in the range, per ISO 4217 currency code, in integer minor units. Currencies are never converted or added together.

data.​discounts.​by_code[].​discount.​property name*integeradditional property
metaobject(AnalyticsMeta)required

What the figures cover.

meta.​rangeobjectrequired

The range the figures cover, as UTC dates with both ends included.

meta.​range.​fromstringrequired

First day (UTC).

meta.​range.​tostringrequired

Last day (UTC).

meta.​timezonestringrequired

Days are UTC days, always: a day runs from 00:00:00 to 23:59:59 UTC.

Value "UTC"
meta.​computed_atstring(date-time)required

When these figures were computed. A repeated request within 15 minutes is answered from the same computation, so this can be up to 15 minutes ago.

meta.​partner_idsArray of stringsrequired

The Partners whose figures are included: your own (unless include_self=0) and, with key inheritance, your descendants that are included.

meta.​excluded_partnersArray of objectsrequired

Descendants left out of every figure because they have not moved to this platform yet, with their names. Empty for a key without key inheritance.

meta.​excluded_partners[].​idstringrequired
meta.​excluded_partners[].​namestringrequired
meta.​cut_over_notestring or nullrequired

Present when the range starts before your own Partner moved to this platform: activity before that day is on the previous platform and is not in these figures. Null otherwise, also with include_self=0; the note is never about descendants (their earlier activity is left out without a note).

Response
application/json
{ "data": { "destinations": { … }, "bundle_sizes": { … }, "discounts": { … } }, "meta": { "range": { … }, "timezone": "UTC", "computed_at": "2019-08-24T14:15:22Z", "partner_ids": [ … ], "excluded_partners": [ … ], "cut_over_note": "string" } }

Booking

Operations

BookingItemPackage

Operations

Bundle

Operations

CurrentPartner

Operations

Destination

Operations

DeviceCompatibility

Operations

Esim

Operations

RedirectToken

Operations