batch report usageRecordGroups
POST/org/:orgId/batchCreateUsageRecordGroups
Batch report new usage record groups.
Request
Path Parameters
Organization ID
- application/json
Body
array
required
Array of new usage record groups to report
Array [
Array [
]
Array [
]
]
billableRecords
object[]
for usage metering API v2, don't use it together with the records v1.
Key is the unique identifier of a billable metric.
properties
object
Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.
Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.
The quantity (or numeric value) of a billable metric.
metaInfo
object
If it is true, the validation of the usage record group is skipped.
billableRecords
object[]
for usage metering API v2
Key is the unique identifier of a billable metric.
properties
object
Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.
Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.
The quantity (or numeric value) of a billable metric.
The lago amount (in dollars) of the customer. This field keeps the largest of the monthly amount. So it can only be updated when the invoice month increases.
The lago subscription ID of the customer.
The lago usage start time of the customer usage.
The metronome daily cost amount (in dollars) of the customer.
The metronome monthly invoice amount (in dollars) of the customer. This field keeps the largest amount of the invoice month. So it can only be updated when the invoice month increases.
The metronome monthly invoice amount (in dollars) of the customer, which is adjusted by the seller. This field is populated only when the invoice amount is decreased by the seller via credit granting.
originRecords
object
The original records reported by the customer before convertion. If no dimension mapping is applied, this field is the same as the records field.
Possible values: [``, API
, INTERNAL
, METRONOME
, ORB
, LAGO
]
The source of the usage record group. Can be from Suger API or other third party services, such as Metronome.
The timestamp (UTC)) of when the usage records were generated. Optional, if not provided, the current report timestamp will be used.
records
object
required
for usage metering API v1, don't use it together with the billableRecords v2.
The timestamp of when the usage records were generated. Optional, if not provided, the current report timestamp will be used. This is not the timestamp of when the usage records were reported to Suger.
Responses
- 200
- 400
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
]
]
metaInfo
object
If it is true, the validation of the usage record group is skipped.
billableRecords
object[]
for usage metering API v2
Key is the unique identifier of a billable metric.
properties
object
Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.
Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.
The quantity (or numeric value) of a billable metric.
The lago amount (in dollars) of the customer. This field keeps the largest of the monthly amount. So it can only be updated when the invoice month increases.
The lago subscription ID of the customer.
The lago usage start time of the customer usage.
The metronome daily cost amount (in dollars) of the customer.
The metronome monthly invoice amount (in dollars) of the customer. This field keeps the largest amount of the invoice month. So it can only be updated when the invoice month increases.
The metronome monthly invoice amount (in dollars) of the customer, which is adjusted by the seller. This field is populated only when the invoice amount is decreased by the seller via credit granting.
originRecords
object
The original records reported by the customer before convertion. If no dimension mapping is applied, this field is the same as the records field.
Possible values: [``, API
, INTERNAL
, METRONOME
, ORB
, LAGO
]
The timestamp (UTC)) of when the usage records were generated. Optional, if not provided, the current report timestamp will be used.
Possible values: [AWS
, AZURE
, GCP
]
records
object
[
{
"buyerID": "string",
"creationTime": "2024-07-29T15:51:28.071Z",
"entitlementID": "string",
"id": "string",
"lastUpdateTime": "2024-07-29T15:51:28.071Z",
"metaInfo": {
"SkipValidation": true,
"billableRecords": [
{
"key": "string",
"properties": {},
"quantity": 0
}
],
"lagoAmount": 0,
"lagoSubscriptionID": "string",
"lagoUsageStartTime": "2024-07-29T15:51:28.071Z",
"metronomeDailyCostAmount": 0,
"metronomeMonthlyInvoiceAmount": 0,
"metronomeMonthlyInvoiceAmountAdjusted": 0,
"originRecords": {},
"source": "",
"timestamp": "2024-07-29T15:51:28.071Z"
},
"organizationID": "string",
"partner": "AWS",
"records": {},
"serialID": 0,
"status": "string",
"usageRecordReportID": "string"
}
]
all the quantity of usage records are zero
- application/json
- Schema
Schema
string
Internal server error
- application/json
- Schema
Schema
string