1/ Manage Access Rights
Features are the sole resource to consider for managing rights. They represent a variable element that influences the pricing of the subscription and also determine the access rights to your service.
Recall of feature types
OnOff
- Binary value
- Example: access to the Premium section
Consumption
- Positive integer value
- Represents a consumption: a volume that is reset periodically
- Example: number of monthly sent SMS
Limitation
- Positive integer value
- Represents a persistent volume over time
- Example: number of users
Note: A feature can be hidden if it is useful for granting rights but you don’t want to display it to the customer.
Note: Each feature is associated with a unique reference (ReferenceFeature) of your choice.
Usage
GET /v1/Usages?ReferenceCustomer=123456
{
...
"Items": [
{
"Id": 5478,
"IsVisible": true,
"ReferenceFeature": "Premium-Access",
"TypeFeature": "OnOff",
"ReferenceCustomer": "123456",
"IsIncluded": true,
"IsEnabled": true
},
{
"Id": 1797,
"IsVisible": true,
"ReferenceFeature": "Users",
"TypeFeature": "Limitation",
"ReferenceCustomer": "123456",
"QuantityIncluded": 3,
"QuantityCurrent": 4
},
{
"Id": 1785,
"IsVisible": true,
"ReferenceFeature": "Quota",
"TypeFeature": "Consumption",
"ReferenceCustomer": "123456",
"QuantityIncluded": 100,
"QuantityCurrent": 357
}
]
}
To learn more about the request, refer to the dedicated API documentation
The interpretation of the data depends on the type of the feature:
- OnOff: the API will indicate whether it is enabled or not.
- If multiple subscriptions coexist and you have requested a combined value, the response will be ‘enabled’ if at least one subscription has this feature enabled.
- Limitation and Consumption: the API will provide the known value.
-
- If the “QuantityCurrent” field is not indicated, it means the quantity is unlimited.
- If multiple subscriptions coexist and you have requested a combined value, the response will be the sum of the values for each subscription. If a subscription is unlimited, the response will be ‘unlimited’.
-
Next chapter: adjusting rights and consumption through the API >