This series of articles gives the best practices to integrate ProAbono. Pass it on to your technical team if you want a perennial integration that allows you to create offers and subscriptions on the fly without technical assistance.
<< Chapter 1
< Previous chapter: Implementing rights synchronization with ProAbono
Chap 3. Mapping your rights management with your subscriptions
The Characteristics
The Feature is the only resource you need to know to manage rights.
A Feature allows you to define a variable that is used both to influence the price of a subscription, but also to determine rights in your service.
A Feature can be hidden if it is useful for releasing rights but you do not want to show it to the customer.
Each feature is associated with a unique reference (ReferenceFeature) of your choice.
GET /v1/Usages?ReferenceCustomer=123456 { "Page": 1, "SizePage": 10, "Count": 3, "TotalItems": 3, "DateGenerated": "2018-02-08T17:00:29.28Z", "Items": [ { "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 }, { "Id": 5478, "IsVisible": true, "ReferenceFeature": "Premium-Access", "TypeFeature": "OnOff", "ReferenceCustomer": "123456", "IsIncluded": true, "IsEnabled": true } ] }
Types of characteristics
OnOff
- Binary value
- example: access to the Premium section
Consumption
- Positive integer value
- Represents a consumption: a volume that is periodically reset to zero.
- example: a quota, a number of SMS sent monthly
Limitation
- Positive integer value
- Represents a persistent volume over time
- example: the number of users
These specifications are sufficient to manage rights in any service. Can’t see how to cover your needs? Want more information? Contact us
Use
For OnOff features, the API will tell you whether or not it is enabled.
If several subscriptions coexist and you have asked for a combined value, then the answer will be ‘enabled’, if at least one subscription has this feature enabled.
For the Limit and Consumption features, the API will tell you the known value.
If the field “QuantityCurrent” is not indicated, it means that the quantity is unlimited, enjoy!
If several subscriptions coexist and you have asked for a combined value, then the answer will be the sum of the values for each subscription. If a subscription is unlimited, the answer will be ‘unlimited’.
In the next chapter we will see how to request rights by Client and by Feature >.