An overview of the typical use case handling in regards to usage data records (UDRs).
Depending on the nature of your product, service or licence, the regular invoice to be created may vary as the underlying billing model depends on the consumption/usage within the related period of time. For this type of products, you will have to work with the usage data records (UDR). UDR represent the customer's usage data in the context of the subscription module. In case of usage-based products, they play an important part of your billing data. The subscriptions module provides a variety of mechanisms to deal with the processing of the provided usage data.
When providing usage data records, the following process steps will take place:
When processing customer usage data, the following types of asynchronous process tasks exist:
The processing tasks are covered asynchronously by regularly executed jobs. This type of usage data processing is common in industries where invoicing is not time-critical or only occurs once a month.
To provide customer usage data, make a POST /subscriptions/{version}/usage
request.
POST /subscriptions/v1/usage HTTP/1.1
Host: api-uat.accounting.riverty.io
X-Subscription-Key: YOUR_API_SUBSCRIPTION_TOKEN
Content-Type: application/json
{
"transactionID": "TR13134131223",
"usageStart": "2018-12-01T00:00:00.0000000",
"usageEnd": "2018-12-31T00:00:00.0000000"
"usageType": "CarRentUsage",
"VIN": "SGZCZ43D13S812715",
"contractId": "CON123",
"distance": 112
}
HTTP/1.1 200 OK