Returns the usage record with the given identifier.
GET /accounting/usages/{id}
Group: Accounting › Usage · Operation ID: getUsage
Open in the interactive reference
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | "v1" |
yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
id |
path | string | yes | The unique identifier for the usage record to return. |
Response
200 Success
Under data (getUsageOutput):
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the usage record. |
usageNumber |
string | no | The usage number, unique within the tenant. Absent while none has been assigned. |
usageIdentifier |
string | no | The external identifier for this usage record, as supplied at ingestion. |
date |
string (date-time) | yes | The date and time the usage occurred, without a time zone. Format YYYY-MM-DDTHH:mm:ss. |
description |
string | no | A free-form description of the usage record. Absent when none is set. |
productIdentifier |
string | no | The product code or identifier this usage is attributed to, as supplied at ingestion. |
billableComponentId |
string | no | The billable component this usage is attributed to. Absent until it is resolved. There is no endpoint for it. |
usageComponent |
string | no | The billable component's name or identifier, included so you do not need a second read. |
quantity |
string (decimal) | yes | The quantity of usage recorded, in unitOfMeasure. |
unitOfMeasure |
string | no | The unit the quantity is measured in, for example 'Hour', 'GB' or 'Call'. |
unitPrice |
string (decimal) | yes | The price per unit for this usage. This record has no currency field. The currency is on the subscription or contract this usage bills against. |
status |
string | yes | The lifecycle status of the usage record. Possible values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'. |
usagePeriodId |
string | yes | The unique identifier for the usage period this record belongs to. There is no endpoint for it. |
customFields |
UnknownObject | no | Custom data recorded on this usage record, as a JSON object. Absent when none was set. |
orderIndex |
number | no | The position of this usage record within the batch it was created in. Absent when not known. |
lastModifiedDate |
string (date-time) | yes | The date and time the usage record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND401— Missing or invalid access token403— Not authorized404— Not found429— Too many requests500— Internal server error