{
"opencollection": "1.0.0",
"info": {
"name": "Paigo Customers Usage API",
"version": "v1.10"
},
"items": [
{
"info": {
"name": "Usage",
"type": "folder"
},
"items": [
{
"info": {
"name": "Collect usage data",
"type": "http"
},
"http": {
"method": "POST",
"url": "https://api.prod.paigo.tech/usage",
"params": [
{
"name": "invoice",
"value": "true",
"type": "query",
"description": "The invoice query parameter is used to create an invoice for the usage data body. It can _only_ be used with dimensions that have an `upfront` payment schedule and `last` aggregation method. If the dimension does not have these properties, the invoice will not be created and a `400` status code will be returned. Additionally, the customer for the usage must be actively enrolled in an offering in order to make use of the automated invoice, otherwise a `400` error will be returned. The body will not be loaded into the database on any `400` error.
The invoice created is independent of any `tiers`, or `entitlement` associated with the dimension, and will be created for the exact usage data sent in.
The invoice will be created for the difference between the usage data sent in, and the most recent usage data for the dimension. If the usage data sent in is less than the most recent usage data, a zero quantity line item will be created. For example if the most recent usage data for a dimension is `5`, and the usage data sent in is `3`, a zero quantity line item will be created. If the usage data sent in is `7`, a `2` quantity line item will be created."
}
],
"body": {
"type": "json",
"data": "{}"
},
"auth": {
"type": "oauth2",
"flow": "client_credentials",
"accessTokenUrl": "https://auth.paigo.tech/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "Collect usage data by API-based method.\nSee Measure and Collect Usage Data At Production Scale\nfor full documentation on Paigo Usage Measurement and Collection."
}
]
}
],
"bundled": true
}