energyProducts
Get all products for a given brand and postcode. The supplied postcode will ensure that there are tariffs available on the product for the GSP.
Arguments
Filter for available or unavailable products only.
Filter by a specific energy brand.
Filter by these brands.
Energy product direction to filter products by.
Exclude products with these tag codes.
Filter by the type of energy product.
Postcode to search energy products for.
Filter by specific tags which are attached to the product.
Returns
EnergyProductConnectionTypeConnectionThis field is a connection type. Connections are used to implement cursor based pagination.
Possible Errors
- KT-CT-1113: Disabled GraphQL field requested.
- KT-CT-7899: An internal error occurred.
- KT-GB-9516: We were unable to find any products for this brand.
- KT-GB-9517: We were unable to determine the GSP group ID from the postcode.
- KT-GB-9520: Provided tag codes do not exist.
- KT-GB-9521: Invalid energy product direction.
Allowed Viewers
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 EnergyProducts(
$after: String,
$availability: EnergyProductAvailability,
$before: String,
$brand: String,
$brands: [String],
$direction: EnergyProductDirection,
$excludeTags: [String],
$filterBy: [EnergyProductFilters],
$first: Int,
$last: Int,
$postcode: String!,
$tags: [String]
) {
energyProducts(
after: $after,
availability: $availability,
before: $before,
brand: $brand,
brands: $brands,
direction: $direction,
excludeTags: $excludeTags,
filterBy: $filterBy,
first: $first,
last: $last,
postcode: $postcode,
tags: $tags
) {
edgeCount
edges {
...EnergyProductConnectionTypeEdgeFragment
}
pageInfo {
...PageInfoFragment
}
totalCount
}
}
Variables
{
"after": "YXJyYXljb25uZWN0aW9uOjEw=",
"availability": "AVAILABLE",
"before": "YXJyYXljb25uZWN0aW9uOjEw=",
"brand": "information-public-budget-enter-everything",
"brands": "look-soldier-tax-skill-quality",
"direction": "IMPORT",
"excludeTags": "beautiful-hope-protect-family-meet",
"filterBy": "PREPAY",
"first": 10,
"last": 10,
"postcode": "toward-break-take-black-hit",
"tags": "town-cut-minute-indicate-thousand"
}
Response
{
"data": {
"energyProducts": {
"edgeCount": 69,
"edges": [EnergyProductConnectionTypeEdge],
"pageInfo": PageInfo,
"totalCount": 37
}
}
}