Offer & Options
An offer represents the entity used to bill the airtime consumption of the systems.
An offer can have some options which can be added or removed on systems.
Read only fields are computed by AirVantage and can only be seen on response fragments sent by find request.
Offer
Field | Description | Read Only | Type |
---|---|---|---|
uid | Offer's unique identifier. | true | uid |
name | Offer's name. | true | string |
limit | The maximum number of bytes authorized for this offer. | true | number |
types | [DEPRECATED] Possible values are: LITE, LITE2, LITE3, ADVANCED, ADVANCED2, ADVANCED3, TAILORED, ESSENTIALS1, ESSENTIALS2, ESSENTIALS3, ESSENTIALS4, BOOTSTRAP This field is deprecated, see the one at service level. | true | string |
connection.uid | [DEPRECATED] Uid of the Operator connection for which the offer is restricted. This field is deprecated, see the one at service level. |
true | string |
connection.name | [DEPRECATED] Name of the Operator connection for which the offer is restricted. This field is deprecated, see the one at service level. |
true | string |
bundle | True if the offer is a bundle offer otherwise false | true | boolean |
connectivity | True if the offer is a connectivity offer otherwise false | true | boolean |
services | List of services of the offer. See below | true | object array |
Service offer
Field | Description | Read Only | Type |
---|---|---|---|
uid | Service's unique identifier. | true | uid |
type | Type of the service. Types are CONNECTIVITY, DM | true | string |
includes | List of compatible Module types or SIM types. | true | array string |
excludes | List of incompatible Module types or SIM types. | true | array string |
connection | Operator connection identifier for which the service is restricted. Only for CONNECTIVITY service. | true | uid |
optional | True if the service is optional on the offer otherwise false. | true | boolean |
parentServiceId | Identifier of the parent service (or null if the service is the parent). | true | uid |
Options
Field | Description | Read Only | Type |
---|---|---|---|
uid | Option's unique identifier. | true | uid |
name | Name of the option. | true | string |
type | Type of the option. Types are GENERAL, SERVICE, ROAMING | true | string |
This is a complete representation of an Offer.
{ "uid": "Offer uid", "name": "Offer name", "limit": 10485760, "types":["LITE", "LITE2"] }
This is a complete representation of an Option.
{ "uid": "Option uid", "name": "Option name", "type": "SERVICE" }
API Methods
Find
/api/v1/offers
Returns a list of available offers
Request
GET https://na.airvantage.net/api/v1/offers
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json [ { "uid": "5b909116ee1749559c6941766168dae5", "name": "My Offer", "limit": 10485760, "types": [ "LITE" ], "bundle": false, "connectivity": true, "connection": { "uid": "1634025233174ad0b93e7d5380fb3b03", "name": "Sierra Wireless" }, "templateId": null, "alOfferType": null, "autoActivationPeriod": null, "services": [ { "uid": "gsfetr69c904482e9e1b5b3501b38d9c", "type": "CONNECTIVITY", "includes": [ "LITE" ], "excludes": [], "connection": "1634025233174ad0b93e7d5380fb3b03", "optional": false, "parentServiceId": null } ] } ]
Name | Description | Use | Default | Type | Operand |
---|---|---|---|---|---|
company | Set the context company. | optional | caller's company | uid | = |
HTTP Method | GET |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | None |
Permissions | None |
Get options of an offer
/api/v1/offers/{uid}/options
Returns the options of the specified offer
Request
GET https://na.airvantage.net/api/v1/offers/257f1e80d39f457f95c67549e3d65688/options
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json [ { "type": "ROAMING", "uid": "43c9ea75020f4fa2b24ff4c9b8f4884c", "name": "AFRICA - Central" }, { "type": "SERVICE", "uid": "47ada9be615b46b7bab606d39f1588bb", "name": "Data - APN internet.swir" }, { "type": "GENERAL", "uid": "fe023918a2ea4793936b142307e81288", "name": "LTE" } ]
Name | Description |
---|---|
offer.unknown | Raised when no offer matches the 'uid'. |
HTTP Method | GET |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | None |
Permissions | None |
Find available options
/api/v1/offers/options
Returns a list of available options
Request
GET https://na.airvantage.net/api/v1/offers/options
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json [ { "type": "ROAMING", "uid": "43c9ea75020f4fa2b24ff4c9b8f4884c", "name": "AFRICA - Central" }, { "type": "SERVICE", "uid": "47ada9be615b46b7bab606d39f1588bb", "name": "Data - APN internet.swir" }, { "type": "GENERAL", "uid": "fe023918a2ea4793936b142307e81288", "name": "LTE" } ]
Name | Description | Use | Default | Type | Operand |
---|---|---|---|---|---|
company | Set the context company. | optional | caller's company | uid | = |
offer | Returns all options linked to the given offer uid. | optional | null | uid | = |
name | Returns all options whose name matches the given string. | optional | null | string | = |
exactMatch | The name criterion behaves as LIKE when this parameter is set to false < |
optional | true | boolean |
HTTP Method | GET |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | None |
Permissions | None |
Get aggregated usage data
/api/v1/offers/data/aggregated
Gets a temporal aggregation of usage data for a selection of offers. Most recent datapoints are returned first.
Request
GET https://na.airvantage.net/api/v1/offers/data/aggregated?dataIds=INVOICED_DATA_BYTES_TOTAL,DATA_SESSION&offerIds=be6647d8c9a64dc6aa3c36d3c4a28cf1,5cdc94f3e0494087a6f0e0fc4fe30fb8...
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "be6647d8c9a64dc6aa3c36d3c4a28cf1": { "INVOICED_DATA_BYTES_TOTAL" : [{ "ts": 1331908459440, "v": 2.0 }, { "ts": 1331907459440, "v": 7.2 }, { "ts": 1331906459440, "v": null }], "DATA_SESSION" : [{ "ts": 1331908459440, "v": 2.0 }, { "ts": 1331907459440, "v": 5.0 }, { "ts": 1331906459440, "v": null }] }, "5cdc94f3e0494087a6f0e0fc4fe30fb8": { "INVOICED_DATA_BYTES_TOTAL" : [{ "ts": 1331908459440, "v": 2.0 }, { "ts": 1331907459440, "v": 7.2 }, { "ts": 1331906459440, "v": null }] } }
Name | Description | Use | Default | Type |
---|---|---|---|---|
interval | Intervals are specified by a multiplier and a unit of time, i.e. 6hour or 1day. The supported time units are:
|
optional | 1hour | string |
offerIds | The list of offer ids separated by a ','. It is only possible to request up to 5 ids. | required | - | string |
dataIds | The list of usage data separated by a ','. It is only possible to request up to 10 ids. See description of the usage data. | required | - | string |
inOfferZone | If true only the usages occured in the offer zone will be selected, false means outside the offer zone, otherwise (null value) no filter on zone will be applied. | optional | null | boolean |
zoneId | The identifier of a zone. Allow to select only the usages occured in a particular zone. No filter on zone will be applied by default. | optional | null | string |
interim | If true only the interim usage sessions will be selected, false means only the complete usage sessions will be selected, otherwise (null value) all usages sessions will be selected. | optional | null | boolean |
from | Timestamp in milli-seconds used to select the start interval. If null it will be the timestamp of the first value of the list starting from the to timestamp and depending to size. This interval is included. | optional | null | timestamp |
to | Timestamp in milli-seconds used to select the end interval. This interval is excluded. | optional | current time | timestamp |
fn | The folding function specifies how the datapoints are reduced within each interval. The default folding
function is mean which returns the mean (average). The following folding functions are supported:
|
optional | mean | string |
size | Size of the list of values per offer and data. Max result size: 500. | optional | 100 | int |
Name | Description |
---|---|
aggregation.invalid.multiplier | Raised when multiplier is lower than one or bigger than 50. |
aggregation.invalid.timescale | Raised when timescale is not one of hour, day, month or year. |
invalid.timerange | Raised when 'from' is greater than 'to'. |
aggregation.too.many.targets | Raised when too many system are requested for a single API call. |
aggregation.too.many.data | Raised when too many data are requested for a single API call. |
HTTP Method | GET |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | none |
Permissions | entities.systems.view |