Download OpenAPI specification:
With the IoT Monetization Hub API you can make your defined subscription plans directly available to your end customers via your webshop or app.
The Hub's API is a straight forward REST API. This means, all end-points either create, retrieve, or update objects. API calls are authenticated with an API credential.
Subscriptions are defined in the Hub based on following main parameters:
Through this endpoint users can log-in to the API.
It is required to provide the fields username, password and backendUser. By default the backendUser shall be set to true
username | string |
password | string |
backendUser | boolean |
{- "username": "string",
- "password": "string",
- "backendUser": true
}
{- "username": "string",
- "issuedAt": 0,
- "validTill": 0,
- "access_token": "string"
}
This controller has the purpose of engaging user related actions. Through this controller actions about the user creation and management are provided.
With this endpoint it is possible to get an user via a given email. The email is provided via a query parameter. Please be aware, that the email parameter is case sensitive.
email required | string email address of the user to be returned |
X-Impersonate-As | string UUID of the user to be impersonated |
{- "referenceId": "string",
- "email": "string",
- "firstName": "string",
- "lastName": "string"
}
With this endpoint a new user will be created!
X-Impersonate-As | string UUID of the user to be impersonated |
firstName | string |
lastName | string |
string | |
birthDay | string |
country | string |
postalCode | string |
city | string |
street | string |
streetNo | string |
acceptTerms | boolean |
acceptGDPR | boolean |
language | string |
{- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "birthDay": "string",
- "country": "string",
- "postalCode": "string",
- "city": "string",
- "street": "string",
- "streetNo": "string",
- "acceptTerms": true,
- "acceptGDPR": true,
- "language": "string"
}
{- "userReferenceId": "string"
}
With this controller it is possible to manage SIM cards. Actions like assigning a SIM card to an user are provided.
Through this endpoint a SIM card can be assigned to an user. It is required to have a proper registration code of the SIM card to assign it to the given user.
In the body of the request, the registration code needs to be entered as it uniquly identifies the respective SIM card.
X-Impersonate-As | string UUID of the user to be impersonated |
registrationCode | string |
{- "registrationCode": "XXXXX-XXXXX-XXXXX-XXXXX"
}
{- "type": "SimCard",
- "id": "123",
- "attributes": {
- "iccid": "0",
- "msisdn": "0",
- "name": "string",
- "firstChargeDate": "2024-03-28T03:26:55.006Z",
- "validTo": "28-04-2024",
- "type": "global-tariff",
- "assignedDate": "2024-03-28T03:26:54.58Z",
- "status": "ACTIVE",
- "currency": "EUR",
- "autoRenew": true,
- "isAutoRenew": true
}, - "relationships": {
- "tariff": {
- "data": {
- "id": "569",
- "type": "tariff"
},
}
}
}
A controller for actions related to subscriptions. Through this endpoint the basic user oriented subscription management can be done.
This endpoint gives information about the subscription tiers which are available for an upgrade of an existing user-subscription.
Please be aware, that an upgrade is only possible to a higher tier. If an user has already purchased the highest tier, no upgrade is possible and an empty list is returned.
userSubscriptionId required | integer <int64> The id of the user-subscription for which upgrade options should be returned. |
X-Impersonate-As | string UUID of the user to be impersonated |
[- {
- "tierId": 0,
- "tierName": "string",
- "tierDescription": "string",
- "defaultPricingInformation": {
- "item": {
- "id": 0,
- "salesItemType": "TIER",
- "salesItemActionType": "BUNDLE",
- "salesItemText": "string"
}, - "positions": [
- {
- "item": {
- "id": 0,
- "salesSubItemType": "ACTIVATION_FEE",
- "descriptiveType": "string"
}, - "netPrice": 0.1,
- "discounts": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "taxes": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "totalTaxation": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "totalDiscounts": 0.1
}
], - "currencyKey": "string",
- "totalNetPrice": 0.1,
- "totalGrossPrice": 0.1,
- "totalTaxation": 0.1
}, - "payNowPricingInformation": {
- "item": {
- "id": 0,
- "salesItemType": "TIER",
- "salesItemActionType": "BUNDLE",
- "salesItemText": "string"
}, - "positions": [
- {
- "item": {
- "id": 0,
- "salesSubItemType": "ACTIVATION_FEE",
- "descriptiveType": "string"
}, - "netPrice": 0.1,
- "discounts": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "taxes": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "totalTaxation": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "totalDiscounts": 0.1
}
], - "currencyKey": "string",
- "totalNetPrice": 0.1,
- "totalGrossPrice": 0.1,
- "totalTaxation": 0.1
}, - "limits": [
- {
- "limitName": "string",
- "limitDescription": "string",
- "unit": "string",
- "maxValue": 0.1
}
]
}
]
With this endpoint an user can upgrade to a higher subscription tier.
In the request body the id of the new tier should be provided.
If the upgrade was successful, a message indicating the success will be returned.
userSubscriptionId required | integer <int64> The userSubscription id to identify which subscription from an user should be upgraded. |
X-Impersonate-As | string UUID of the user to be impersonated |
Model with the necessary information to perform a subscription upgrade.
tierId | integer <int64> The id of the desired subscription tier. |
{- "tierId": 0
}
{- "message": "subscription tier successfully upgraded"
}
Through this endpoint an user can assign a bundle to a desired subscription. A bundle is an add-on product to a defined subscription pla
userSubscriptionId required | integer <int64> |
bundleId required | integer <int64> |
X-Impersonate-As | string UUID of the user to be impersonated |
{- "id": 0,
- "clientId": 0,
- "activeSince": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "subscriptionBundle": {
- "id": 0,
- "clientId": 0,
- "name": "string",
- "description": "string",
- "bundleType": {
- "id": 0,
- "name": "string",
- "description": "string",
- "icon": "string",
- "repeatable": true,
- "oneTime": true
}
}, - "userSubscriptionId": 0
}
Via this endpoint a SIM card can be added to a subscription that is related to a specific user.
For every subscription a device limit is defined. There can be as many SIM cards added to a user-subscription as defined in the device limit.
userSubscriptionId required | integer <int64> ID of the user-subscription to which the SIM card should be added. |
simCardId required | integer <int64> ID of the SIM card which should be assigned. |
X-Impersonate-As | string UUID of the user to be impersonated |
With this endpoint, an assigned SIM card can be removed from a user-subscription.
userSubscriptionId required | integer <int64> ID of the user-subscription from which the SIM card should be removed |
simCardId required | integer <int64> ID of the SIM card which should be removed. |
X-Impersonate-As | string UUID of the user to be impersonated |
With this endpoint a paused user-subscription can be continued.
userSubscriptionId required | integer <int64> ID of the affected user-subscription |
X-Impersonate-As | string UUID of the user to be impersonated |
{- "message": "subscription successfully unpaused"
}
With this endpoint a subscription can be assigned to a user. In the request body the Tier Id of the subscription to be assigned as well as the validity term shall be provided.
When the subscription was successfully assigned, the object userSubscription is returned. This object contains all relevant information of the user subscription.
X-Impersonate-As | string UUID of the user to be impersonated |
Necessary information for booking a subscription.
tierId | integer <int64> The id of the subscription tier where the user should be assigned to. |
validityId | integer <int64> The id of the validity for the subscription tier to which the user should be assigned. |
{- "tierId": 0,
- "validityId": 0
}
{- "id": 1,
- "clientId": 1,
- "active": true,
- "lastAutoRenew": "2019-08-24T14:15:22Z",
- "autoRenewReference": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "upgradeTierId": 0,
- "upgradeValidityId": 0,
- "validUntil": "2019-08-24T14:15:22Z",
- "validityPercentage": 10,
- "validityPeriod": 6,
- "validityPrice": 12.5,
- "currency": {
- "id": 1,
- "currencyKey": "EUR",
- "name": "Euro",
- "entityPath": "currency"
}
}
With this endpoint you can retrieve all defined subscriptions. Based on the selected view you can define which subscriptions are requested.
view required | string Enum: "active" "available" This request parameter is used for selecting a view. The values 'active' and 'available' are allowed, any other value will result in a bad request with the status code 400. |
X-Impersonate-As | string UUID of the user to be impersonated |
[- {
- "userSubscriptionId": 0,
- "subscriptionName": "string",
- "tierId": 0,
- "tierName": "string",
- "tierLevel": 0,
- "validityPeriod": 0,
- "lastRenewal": "2019-08-24T14:15:22Z",
- "activeSince": "2019-08-24T14:15:22Z",
- "activeUntil": "2019-08-24T14:15:22Z",
- "defaultPricingInformation": {
- "item": {
- "id": 0,
- "salesItemType": "TIER",
- "salesItemActionType": "BUNDLE",
- "salesItemText": "string"
}, - "positions": [
- {
- "item": {
- "id": 0,
- "salesSubItemType": "ACTIVATION_FEE",
- "descriptiveType": "string"
}, - "netPrice": 0.1,
- "discounts": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "taxes": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "totalTaxation": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "totalDiscounts": 0.1
}
], - "currencyKey": "string",
- "totalNetPrice": 0.1,
- "totalGrossPrice": 0.1,
- "totalTaxation": 0.1
}, - "limits": [
- {
- "limitName": "string",
- "unit": "string",
- "maxValue": 0.1,
- "amount": 0.1,
- "usedValue": 0.1
}
], - "activeBundles": [
- {
- "bundleId": 0,
- "bundleName": "string",
- "limits": [
- {
- "limitName": "string",
- "limitUnit": "string",
- "limitValue": 0.1,
- "bundleValue": 0.1
}
], - "defaultPricingInformation": {
- "item": {
- "id": 0,
- "salesItemType": "TIER",
- "salesItemActionType": "BUNDLE",
- "salesItemText": "string"
}, - "positions": [
- {
- "item": {
- "id": 0,
- "salesSubItemType": "ACTIVATION_FEE",
- "descriptiveType": "string"
}, - "netPrice": 0.1,
- "discounts": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "taxes": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "totalTaxation": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "totalDiscounts": 0.1
}
], - "currencyKey": "string",
- "totalNetPrice": 0.1,
- "totalGrossPrice": 0.1,
- "totalTaxation": 0.1
}, - "activeSince": "2019-08-24T14:15:22Z",
- "activeUntil": "2019-08-24T14:15:22Z"
}
]
}
]
Over this endpoint the available bundles defined for an user-subscription are returned.
The returned bundles are those that can be purchased on top of a subscription. If there are no bundles configured or no bundles are available (this is depending on the tier level of the subscription) then an empty list is returned with the status code 200.
The ID of the users subscription (userSubscription ID) is provided over a path variable.
userSubscriptionId required | integer <int64> |
X-Impersonate-As | string UUID of the user to be impersonated |
[- {
- "bundleId": 0,
- "bundleName": "string",
- "bundleDescription": "string",
- "defaultPricingInformation": {
- "item": {
- "id": 0,
- "salesItemType": "TIER",
- "salesItemActionType": "BUNDLE",
- "salesItemText": "string"
}, - "positions": [
- {
- "item": {
- "id": 0,
- "salesSubItemType": "ACTIVATION_FEE",
- "descriptiveType": "string"
}, - "netPrice": 0.1,
- "discounts": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "taxes": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "totalTaxation": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "totalDiscounts": 0.1
}
], - "currencyKey": "string",
- "totalNetPrice": 0.1,
- "totalGrossPrice": 0.1,
- "totalTaxation": 0.1
}, - "payNowPricingInformation": {
- "item": {
- "id": 0,
- "salesItemType": "TIER",
- "salesItemActionType": "BUNDLE",
- "salesItemText": "string"
}, - "positions": [
- {
- "item": {
- "id": 0,
- "salesSubItemType": "ACTIVATION_FEE",
- "descriptiveType": "string"
}, - "netPrice": 0.1,
- "discounts": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "taxes": [
- {
- "percentage": 0.1,
- "value": 0.1
}
], - "totalTaxation": 0.1,
- "discountedNetPrice": 0.1,
- "grossPrice": 0.1,
- "totalDiscounts": 0.1
}
], - "currencyKey": "string",
- "totalNetPrice": 0.1,
- "totalGrossPrice": 0.1,
- "totalTaxation": 0.1
}, - "limits": [
- {
- "id": 0,
- "maxValue": 0.1,
- "name": "string",
- "unit": {
- "name": "string",
- "factor": 0.1,
- "baseUnit": "string"
}
}
]
}
]
With this endpoint an active user-subscription of an user can be paused or terminated.
Via the request parameter action the stop action for the user-subscription can be defined.
The action PAUSE does pause the subscription, that means the subscription can be used but will not be renewed anymore. It is always possible for the user to continue the subscription again with the /continue endpoint.
With TERMINATE the subscription is immediately stopped. The user then is not able to use the subscription anymore and all SIM balances are deactived immediately.
userSubscriptionId required | integer <int64> The ID of the affected userSubscription. |
action required | string Enum: "PAUSE" "TERMINATE" The action through which the subscription should be stopped for the user. |
X-Impersonate-As | string UUID of the user to be impersonated |