Get a Usage Consumption Object by ID
get
{apiRoot}/queryUsageConsumption/{id}
Gets the usage consumption object with the specified ID. Attribute selection is enabled for all first-level attributes.
Request
Path Parameters
-
id(required): string
The ID of the usage consumption object.
Query Parameters
-
fields(required): string
A comma-separated list of fields to return in the response.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json;charset=utf-8
200 Response
The usage consumption object was returned successfully.
Root Schema : QueryUsageConsumption
Type:
object
A usage consumption request.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
A URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
href: string
(uri)
A hyperlink reference.
-
id: string
The ID of the usage consumption object.
-
partyAccount: array
partyAccount
A reference to the account that owns the bucket.
-
queryUsageConsumptionDate: string
(date-time)
The date when the request was submitted.
- relatedParty: array relatedParty
-
searchCriteria: object
UsageConsumption
A usage consumption object, which contains the current balance and consumption counters for a subscriber's service type, such as SMS, Voice, and Data. The balance and consumption counters can be calculated for a device identified by a public key (such as an MSISDN number for a mobile device, or a PSTN or VOIP number for a fixed device).
-
usageConsumption: array
usageConsumption
A usage consumption report with the current counters and balances.
Nested Schema : partyAccount
Type:
array
A reference to the account that owns the bucket.
Show Source
-
Array of:
object PartyAccountRef
A party account reference, which is an arrangement that a party has with an enterprise that provides products to the party.
Nested Schema : UsageConsumption
Type:
object
A usage consumption object, which contains the current balance and consumption counters for a subscriber's service type, such as SMS, Voice, and Data. The balance and consumption counters can be calculated for a device identified by a public key (such as an MSISDN number for a mobile device, or a PSTN or VOIP number for a fixed device).
Show Source
-
@baseType: string
When sub-classing, this defines the super class.
-
@schemaLocation: string
(uri)
The URI to a JSON schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
bucketRefOrValue: array
bucketRefOrValue
The buckets included in the subscribed offer.
-
creationDate: string
(date-time)
The date and time that the usage consumption object was created.
-
description: string
A brief description of the usage consumption object.
-
href: string
(uri)
The usage consumption object's hyperlink reference.
-
id: string
The ID of the usage consumption object.
-
lastUpdate: string
(date-time)
The date and time when the object's status was last changed.
-
logicalResource: array
logicalResource
-
name: string
The name of the usage consumption object.
-
partyAccount: array
partyAccount
The account that owns the bucket.
-
product: array
product
- relatedParty: array relatedParty
-
service: array
service
-
state: string
Allowed Values:
[ "accepted", "terminatedWithError", "inProgress", "done" ]
The task state. -
validPeriod: object
TimePeriod
A time period, as an end time, a start time, or both.
Nested Schema : usageConsumption
Type:
array
A usage consumption report with the current counters and balances.
Show Source
-
Array of:
object UsageConsumption
A usage consumption object, which contains the current balance and consumption counters for a subscriber's service type, such as SMS, Voice, and Data. The balance and consumption counters can be calculated for a device identified by a public key (such as an MSISDN number for a mobile device, or a PSTN or VOIP number for a fixed device).
Nested Schema : PartyAccountRef
Type:
object
A party account reference, which is an arrangement that a party has with an enterprise that provides products to the party.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@referredType: string
The actual type of target instance when needed for disambiguation.
-
@schemaLocation: string
(uri)
A URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
description: string
A detailed description of the party account.
-
href: string
A reference to the party account.
-
id(required): string
The ID of the party account.
-
name: string
The name of the party account.
-
status: string
The condition of the account, such as due, paid, or in arrears.
Nested Schema : RelatedParty
Type:
object
A related party, which defines the party or party role linked to a specific entity.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@referredType(required): string
The target instance's actual type (when needed for disambiguation).
-
@schemaLocation: string
(uri)
A URI to a JSON-schema file that defines additional attributes. and relationships
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
href: string
(uri)
The hyperlink reference.
-
id(required): string
The ID of the related party.
-
name: string
The name of the related entity.
-
role: string
The role played by the related party.
Nested Schema : bucketRefOrValue
Type:
array
The buckets included in the subscribed offer.
Show Source
-
Array of:
object BucketRefOrValue
A bucket (called UsageVolumProduct in the SID Model), which represents and tracks a quantity of remaining or consumed usage. It could be either a quantity or an amount in a currency. It can represent a fixed number of SMS, MMS, call minutes, quantity of data, and so on.
Nested Schema : logicalResource
Type:
Show Source
array
-
Array of:
object UsageConsumptionLogicalResourceRef
A logical resource.
Nested Schema : partyAccount
Type:
array
The account that owns the bucket.
Show Source
-
Array of:
object PartyAccountRef
A party account reference, which is an arrangement that a party has with an enterprise that provides products to the party.
Nested Schema : TimePeriod
Type:
object
A time period, as an end time, a start time, or both.
Show Source
-
endDateTime: string
(date-time)
The end of the time period, using IETC-RFC-3339 format.Example:
1985-04-12T23:20:50.520Z
-
startDateTime: string
(date-time)
The start of the time period, using IETC-RFC-3339 format.Example:
1985-04-12T23:20:50.520Z
Nested Schema : BucketRefOrValue
Type:
object
A bucket (called UsageVolumProduct in the SID Model), which represents and tracks a quantity of remaining or consumed usage. It could be either a quantity or an amount in a currency. It can represent a fixed number of SMS, MMS, call minutes, quantity of data, and so on.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
A URI to a JSON-schema file that defines additional attributes. and relationships
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
bucketCounter: array
bucketCounter
-
bucketRelationship: array
bucketRelationship
-
description: string
A description of the bucket's contents.
-
href: string
The hyperlink reference to the bucket resource.
-
id: string
The ID of the bucket.
- isShared: boolean
-
logicalResource: array
logicalResource
-
name: string
The friendly name for the bucket.
-
partyAccount: object
PartyAccountRef
A party account reference, which is an arrangement that a party has with an enterprise that provides products to the party.
-
product: array
product
- relatedParty: array relatedParty
-
remainingValue: object
Quantity
An amount in a specified unit.
-
remainingValueName: string
The bucket's remaining amount, in a formatted string. For example, 1.9 Gb. This formatted string could be used for display.
-
reserveBalance: array
reserveBalance
-
reservedValue: object
Quantity
An amount in a specified unit.
-
service: array
service
-
status: string
The bucket's status, such as active, expired, or suspended.
-
usageType: string
The type of balance, such as data, voice, or a currency.
-
validFor: object
TimePeriod
A time period, as an end time, a start time, or both.
Nested Schema : bucketCounter
Type:
Show Source
array
-
Array of:
object ConsumptionSummary
Details about a consumption counter (called ConsumptionSummary in the SID model).
Nested Schema : bucketRelationship
Type:
Show Source
array
-
Array of:
object BucketRelationship
A linked bucket.
Nested Schema : logicalResource
Type:
Show Source
array
-
Array of:
object UsageConsumptionLogicalResourceRef
A logical resource.
Nested Schema : Quantity
Type:
object
An amount in a specified unit.
Show Source
-
amount: number
(float)
Default Value:
1
The numeric value for a specified unit. -
units: string
The unit.
Nested Schema : reserveBalance
Type:
Show Source
array
-
Array of:
object ReserveBalanceRef
A reserve balance resource, which allows adjustments to be made to the original balance topup.
Nested Schema : ConsumptionSummary
Type:
object
Details about a consumption counter (called ConsumptionSummary in the SID model).
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
A URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
consumptionPeriod: object
TimePeriod
A time period, as an end time, a start time, or both.
-
counterType: string
The type of consumption counter. For example: counterType=used or counterType=outOfBucket.
-
href: string
(uri)
The hyperlink reference to the summary usage consumption report.
-
id: string
The ID of the summary usage consumption report.
-
level: string
The counter level. The counter can be provided for the bucket globally across all users, detailed by user, or detailed by network product.
-
user: object
RelatedParty
A related party, which defines the party or party role linked to a specific entity.
-
value: object
Quantity
An amount in a specified unit.
-
valueName: string
The value of the counter, in a formatted string used for display.
Nested Schema : BucketRelationship
Type:
object
A linked bucket.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
A URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
bucketRefOrValue(required): object
BucketRefOrValue
A bucket (called UsageVolumProduct in the SID Model), which represents and tracks a quantity of remaining or consumed usage. It could be either a quantity or an amount in a currency. It can represent a fixed number of SMS, MMS, call minutes, quantity of data, and so on.
-
relationshipType(required): string
The type of bucket relationship, such as isAggregated if the bucket is a part of another bucker or aggregator if the bucket holds other buckets.
Nested Schema : UsageConsumptionLogicalResourceRef
Type:
object
A logical resource.
Show Source
-
@baseType: string
When sub-classing, this defines the super class.
-
@referredType: string
The actual type of the target instance (when needed for disambiguation).
-
@schemaLocation: string
(uri)
The URI to the JSON schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
consumptionSummary: array
consumptionSummary
-
href: string
(uri)
The usage consumption logical resource's href.
-
id(required): string
The ID of the usage consumption logical resource.
-
name: string
The name of the consumption logical resource's hyperlink reference.
Nested Schema : consumptionSummary
Type:
Show Source
array
-
Array of:
object ConsumptionSummary
Details about a consumption counter (called ConsumptionSummary in the SID model).
Nested Schema : UsageConsumptionProductRef
Type:
Show Source
object
-
@baseType: string
When sub-classing, this defines the super class.
-
@referredType: string
The target instance's actual type (when needed for disambiguation).
-
@schemaLocation: string
(uri)
The URI to the JSON-schema file that defines additional attributes.
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
consumptionSummary: array
consumptionSummary
-
href: string
(uri)
The usage consumption product's hyperlink reference.
-
id(required): string
The ID of the usage consumption product.
-
name: string
The name of the usage consumption product.
Nested Schema : consumptionSummary
Type:
Show Source
array
-
Array of:
object ConsumptionSummary
Details about a consumption counter (called ConsumptionSummary in the SID model).
Nested Schema : ReserveBalanceRef
Type:
object
A reserve balance resource, which allows adjustments to be made to the original balance topup.
Show Source
-
@baseType: string
When sub-classing, this defines the super class.
-
@referredType: string
The target instance's actual type (when needed for disambiguation).
-
@schemaLocation: string
(uri)
The URI to a JSON schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
href: string
(uri)
The reserve balance resource's hyperlink reference.
-
id(required): string
The ID of the reserve balance resource.
-
name: string
The name of the reserve balance resource.
Nested Schema : ServiceRef
Type:
object
A service reference.
Show Source
-
@baseType: string
When sub-classing, this defines the super class.
-
@referredType: string
The target instance's actual type (when needed for disambiguation).
-
@schemaLocation: string
(uri)
The URI to a JSON schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class extension name.
-
href: string
(uri)
The service's hyperlink reference.
-
id(required): string
The ID of the service.
-
name: string
The name of the service.
400 Response
The request isn't valid.
Root Schema : Error
Type:
object
An error.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
The URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class entity name.
-
code(required): string
The error code, which contains application-relevant detail.
-
message: string
More details and corrective actions related to the error which can be shown to a client user.
-
reason(required): string
The reason for the error that can be shown to a client user.
-
referenceError: string
(uri)
The URI to the documentation describing the error.
-
status: string
The HTTP error code extension.
401 Response
The client doesn't have the correct privileges.
Root Schema : Error
Type:
object
An error.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
The URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class entity name.
-
code(required): string
The error code, which contains application-relevant detail.
-
message: string
More details and corrective actions related to the error which can be shown to a client user.
-
reason(required): string
The reason for the error that can be shown to a client user.
-
referenceError: string
(uri)
The URI to the documentation describing the error.
-
status: string
The HTTP error code extension.
403 Response
The request wasn't authorized.
Root Schema : Error
Type:
object
An error.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
The URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class entity name.
-
code(required): string
The error code, which contains application-relevant detail.
-
message: string
More details and corrective actions related to the error which can be shown to a client user.
-
reason(required): string
The reason for the error that can be shown to a client user.
-
referenceError: string
(uri)
The URI to the documentation describing the error.
-
status: string
The HTTP error code extension.
404 Response
The server couldn't find the requested object.
Root Schema : Error
Type:
object
An error.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
The URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class entity name.
-
code(required): string
The error code, which contains application-relevant detail.
-
message: string
More details and corrective actions related to the error which can be shown to a client user.
-
reason(required): string
The reason for the error that can be shown to a client user.
-
referenceError: string
(uri)
The URI to the documentation describing the error.
-
status: string
The HTTP error code extension.
405 Response
This method isn't supported for the requested resource.
Root Schema : Error
Type:
object
An error.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
The URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class entity name.
-
code(required): string
The error code, which contains application-relevant detail.
-
message: string
More details and corrective actions related to the error which can be shown to a client user.
-
reason(required): string
The reason for the error that can be shown to a client user.
-
referenceError: string
(uri)
The URI to the documentation describing the error.
-
status: string
The HTTP error code extension.
409 Response
The request couldn't be processed due to a conflict. An item already exists.
Root Schema : Error
Type:
object
An error.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
The URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class entity name.
-
code(required): string
The error code, which contains application-relevant detail.
-
message: string
More details and corrective actions related to the error which can be shown to a client user.
-
reason(required): string
The reason for the error that can be shown to a client user.
-
referenceError: string
(uri)
The URI to the documentation describing the error.
-
status: string
The HTTP error code extension.
500 Response
An internal server error occurred.
Root Schema : Error
Type:
object
An error.
Show Source
-
@baseType: string
When sub-classing, this defines the super-class.
-
@schemaLocation: string
(uri)
The URI to a JSON-schema file that defines additional attributes and relationships.
-
@type: string
When sub-classing, this defines the sub-class entity name.
-
code(required): string
The error code, which contains application-relevant detail.
-
message: string
More details and corrective actions related to the error which can be shown to a client user.
-
reason(required): string
The reason for the error that can be shown to a client user.
-
referenceError: string
(uri)
The URI to the documentation describing the error.
-
status: string
The HTTP error code extension.
Examples
The following example shows how to retrieve a specific usage consumption object by submitting a GET request on the REST resource using cURL. For more information about cURL, see "Use cURL".
curl -X GET "apiroot/queryUsageConsumption/7ce174e0-b00e-41ff-a593-df4cf00af999" -H "accept: */*"
where apiRoot is for accessing the HTTP Gateway server at either http://hostname:httpPort or https://hostname:httpsPort.
Example of Response Body
If successful, the response code 200 is returned with a response body. For example:
{
"id": "7ce174e0-b00e-41ff-a593-df4cf00af999",
"href": "apiroot/queryUsageConsumption/7ce174e0-b00e-41ff-a593-df4cf00af999",
"queryUsageConsumptionDate": "2022-07-12T10:06:55.776+05:30",
"partyAccount": [
{
"id": "6500000427",
"name": "string",
"status": "string"
}
],
"usageConsumption": [
{
"creationDate": "2022-07-12T10:06:55.78+05:30",
"bucketRefOrValue": [
{
"id": "840",
"remainingValueName": "-10000.0 USD",
"logicalResource": [
{
"id": "6500000427"
}
],
"partyAccount": {
"id": "6500000427"
},
"remainingValue": {
"amount": -10000,
"units": "840"
}
}
],
"state": "done"
}
]
}
If the request fails, the response includes the appropriate HTTP code. For a 4xx/5xx code, the message body also contains a ProblemDetails structure with the cause attribute set to the appropriate application error.