gbrCostOfUsage
Cost of usage for some period of charging.
Note: Currently only SMB products are supported for this query.
Arguments
Account number to calculate costs for.
Provide costs for the first 'X' amount of consumption, measured in kWh.
Flex device ID to filter costs for.
Periods to calculate costs for.
Filter results to a specific supply point.
Returns
CostOfUsageResponseThis output type represents the costs/consumption for multiple time periods.
Possible Errors
- KT-CT-1111: Unauthorized.
- KT-CT-1113: Disabled GraphQL field requested.
- KT-CT-1605: Invalid input.
- KT-CT-7899: An internal error occurred.
- KT-GB-4301: No agreements found during the specified time period.
- KT-GB-4302: No costing definition was found for the product attached to the agreement.
- KT-GB-4303: The product during the specified period is not set up for sub-meter billing.
- KT-GB-4304: The costing definition for the product is not set up for cost of usage.
- KT-GB-4305: There was an exception during costing.
Allowed Viewers
Rate Limits
| Key | Steps |
|---|---|
ip |
['10/m'] |
Query Complexity
1Examples
The example data in the variables and responses below are autogenerated values designed to resemble real inputs. They do not represent actual customer data, and in some cases may require additional validation.
query GbrCostOfUsage(
$accountNumber: String!,
$consumption: Decimal,
$deviceId: ID,
$periods: [DateTimeRangeInput]!,
$supplyPointId: ID
) {
gbrCostOfUsage(
accountNumber: $accountNumber,
consumption: $consumption,
deviceId: $deviceId,
periods: $periods,
supplyPointId: $supplyPointId
) {
periods {
...CostOfUsagePeriodFragment
}
}
}
Variables
{
"accountNumber": "A-EAD39E94",
"consumption": "1.0",
"deviceId": "19271060",
"periods": DateTimeRangeInput,
"supplyPointId": "97834934"
}
Response
{
"data": {
"gbrCostOfUsage": {
"periods": [CostOfUsagePeriod]
}
}
}