openapi: 3.2.0 info: title: Kraken Electricity Meter Points API version: v1 servers: - url: https://api.edfgb-kraken.energy/v1/ description: Base URL declared by the provider in apis.yml (roadmap#122). tags: - name: Electricity Meter Points paths: /v1/electricity-meter-points/{mpan}/: get: operationId: GetElectricityMeterPoint description: Retrieve the details of a meter-point. This endpoint can be used to get the GSP of a given meter-point. parameters: - in: path name: mpan schema: type: string required: true tags: - Electricity Meter Points security: - KeyAuthentication: [] - DRFKrakenTokenAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ElectricityMeterPoint' examples: DetailsOfAnElectricityMeter-point: value: gsp: _H mpan: '2000024512368' profile_class: 1 summary: Details of an electricity meter-point description: '' summary: Get electricity meter point x-summary-source: derived x-operation-id-source: normalized x-operation-id-original: Get Electricity Meter Point /v1/electricity-meter-points/{mpan}/meters/{serial_number}/consumption/: get: operationId: ListConsumptionForAnElectricityMeter description: 'Return a list of consumption values (in kWh) for half-hour periods for a given meter-point and meter. WARNING: Half-hourly consumption data is only available for smart meters. Requests for consumption data for non-smart meters will return an empty response payload.' parameters: - name: group_by required: false in: query description: 'Aggregates consumption over a specified time period. A day is considered to start and end at midnight in the server’s timezone. The default is that consumption is returned in half-hour periods. Accepted values are: * ‘hour’ * ‘day’ * ‘week’ * ‘month’ * ‘quarter’.' schema: type: string - in: path name: mpan schema: type: string required: true - name: order_by required: false in: query description: 'Ordering of results returned. Default is that results are returned in reverse order from latest available figure. Valid values: * ‘period’, to give results ordered forward. * ‘-period’, (default), to give results ordered from most recent backwards.' schema: type: string - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: page_size required: false in: query description: Page size of returned results. Default is 100, maximum is 25000 to give a full year of half-hourly consumption details. schema: type: integer - name: period_from required: false in: query description: Show results from the given datetime (inclusive). This parameter can be provided on its own. schema: type: datetime - name: period_to required: false in: query description: Show results up to the given datetime (exclusive). You must also provide the period_from parameter in order to create a range. schema: type: datetime - in: path name: serial_number schema: type: string required: true tags: - Electricity Meter Points security: - KeyAuthentication: [] - DRFKrakenTokenAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedConsumptionList' examples: ListOfConsumptionValues: value: count: 123 next: https://api.edfgb-kraken.energy/v1/electricity-meter-points/S1212345678901/meters/Z16N389556/consumption/?page=4 previous: https://api.edfgb-kraken.energy/v1/electricity-meter-points/S1212345678901/meters/Z16N389556/consumption/?page=2 results: - - consumption: 0.063 interval_start: 2018-05-19T00:30:00+0100 interval_end: 2018-05-19T01:00:00+0100 - consumption: 0.071 interval_start: 2018-05-19T00:00:00+0100 interval_end: 2018-05-19T00:30:00+0100 - consumption: 0.073 interval_start: 2018-05-18T23:30:00+0100 interval_end: 2018-05-18T00:00:00+0100 summary: List of consumption values description: '' summary: List consumption for an electricity meter x-summary-source: derived x-operation-id-source: normalized x-operation-id-original: List consumption for an electricity meter components: schemas: PaginatedConsumptionList: type: object required: - count - results properties: count: type: integer example: 123 next: type: - string - 'null' format: uri example: https://api.edfgb-kraken.energy/v1/electricity-meter-points/S1212345678901/meters/Z16N389556/consumption/?page=4 previous: type: - string - 'null' format: uri example: https://api.edfgb-kraken.energy/v1/electricity-meter-points/S1212345678901/meters/Z16N389556/consumption/?page=2 results: type: array items: $ref: '#/components/schemas/Consumption' Consumption: type: object properties: consumption: type: string readOnly: true interval_start: type: string format: date-time interval_end: type: string format: date-time required: - consumption - interval_end - interval_start BespokePPSTariffRates: type: object properties: standing_charge: type: string format: decimal pattern: ^-?\d{0,7}(?:\.\d{0,5})?$ title: The value in pence per day of the charge (excluding VAT). unit_rate: type: string format: decimal pattern: ^-?\d{0,7}(?:\.\d{0,5})?$ title: The value in pence per kWh of the charge (excluding VAT). description: This field should be used for gas meters. unit_rates: type: array items: $ref: '#/components/schemas/BespokeElectricityUnitRate' title: List of the value in pence per kWh of the charges (excluding VAT). description: For elec meters, the unit rates are provided on a per register basis in this array. payment_method: enum: - DD - NDD - PP type: string description: '* `DD` - Direct Debit * `NDD` - Non-Direct Debit * `PP` - Prepayment' x-spec-enum-id: 362e54c421bbcaea title: The payment method for the rate. required: - payment_method Address: type: object properties: address_line_1: type: string maxLength: 512 address_line_2: type: string maxLength: 512 address_line_3: type: string maxLength: 512 town: type: string maxLength: 512 county: type: string maxLength: 512 postcode: type: string maxLength: 8 delivery_point_identifier: type: string maxLength: 11 required: - address_line_1 - postcode ElectricityMeterPoint: type: object properties: tariff_code: type: string title: The tariff code as stored by the supplier. description: Must match an available tariff on the 'sold_at' datetime for the authenticating partner. Required if no 'quote_request_code' is supplied. maxLength: 255 quoted_product_id: type: integer description: The ID of the market supply quoted product returned by the 'QuoteNewMeterPoints' or 'QuoteNewMeterPointsOnBespokeProducts' mutation which was selected by the customer for this meter point. Required if a 'quote_request_code' is supplied. address: $ref: '#/components/schemas/Address' current_supplier_name: type: string maxLength: 255 current_supplier_tariff: type: string maxLength: 255 has_smart_meter: type: boolean title: Whether a smart meter is installed. The default is 'false'. consumption_standard: type: integer maximum: 500000 minimum: 1 title: The expected annual consumption for the standard register in kWh. description: Required if standard tariff. unit_rate_uplift: type: string format: decimal pattern: ^-?\d{0,4}(?:\.\d{0,3})?$ title: The amount to be added to the unit rate as commission (a string, pence per kWh). standing_charge_uplift: type: string format: decimal pattern: ^-?\d{0,4}(?:\.\d{0,3})?$ title: The amount to be added to the standing charge as commission (a string, pence per day). fixed_tpi_fee: type: integer minimum: 0 quote: $ref: '#/components/schemas/Quote' bespoke_tariff_rates: allOf: - $ref: '#/components/schemas/BespokeTariffRates' title: A json object containing bespoke tariff rates, if applicable. description: Cannot be used in conjunction with 'bespoke_pps_tariff_rates'. bespoke_pps_tariff_rates: type: array items: $ref: '#/components/schemas/BespokePPSTariffRates' description: 'If applicable, must contain two objects: one for direct debit bespoke and another for non-direct debit bespoke rates. Cannot be used in conjunction with ''bespoke_tariff_rates''.' maxItems: 2 minItems: 0 meter_type: enum: - CREDIT - PREPAYMENT type: string x-spec-enum-id: ebae2e9cf73bc01e default: CREDIT description: 'The default is ''CREDIT'', which represents any kind of traditional credit meter or smart meter. This field is mandatory for traditional prepay meters, for which the value ''PREPAYMENT'' should be used. * `CREDIT` - CREDIT * `PREPAYMENT` - PREPAYMENT' preferred_ssd: type: string format: date mpan: type: string title: The meter-point identifier. maxLength: 13 is_half_hourly: type: boolean title: Whether the meter point should be enrolled as a half hourly meter point description: Required to start the CoS Gain correctly for half hourly customers. consumption_day: type: integer maximum: 500000 minimum: 1 title: The expected annual consumption for the day/peak register in kWh. description: Required if eco7 or three-rate tariff. consumption_night: type: integer maximum: 500000 minimum: 0 title: The expected annual consumption for the night/off-peak register in kWh. description: Required if eco7 or three-rate tariff. consumption_off_peak: type: integer maximum: 500000 minimum: 0 title: The expected annual consumption for the additional off-peak register in kWh. description: Required if three-rate tariff. export_details: allOf: - $ref: '#/components/schemas/ExportDetails' title: The generation details for the meter-point. required: - quote BespokeTariffRates: type: object properties: standing_charge: type: string format: decimal pattern: ^-?\d{0,7}(?:\.\d{0,5})?$ title: The value in pence per day of the charge (excluding VAT). unit_rate: type: string format: decimal pattern: ^-?\d{0,7}(?:\.\d{0,5})?$ title: The value in pence per kWh of the charge (excluding VAT). description: This field should be used for gas meters. unit_rates: type: array items: $ref: '#/components/schemas/BespokeElectricityUnitRate' title: List of the value in pence per kWh of the charges (excluding VAT). description: For elec meters, the unit rates are provided on a per register basis in this array. ExportDetails: type: object properties: import_mpan: type: string description: The import MPAN. maxLength: 13 site_contact_name: type: string description: The name of the site contact. site_contact_phone: type: string description: The phone number of the site contact. site_contact_email: type: string format: email description: The email address of the site contact. installations: type: array items: $ref: '#/components/schemas/Installation' BespokeElectricityUnitRate: type: object properties: rate_type: enum: - STANDARD - ECO7_DAY - ECO7_NIGHT - OFF_PEAK - PEAK - WEEKDAY - OFF_PEAK_WEEKENDS - WEEKENDS_OTHER - SUMMER - SUMMER_PEAK - SUMMER_OFF_PEAK - WINTER - WINTER_PEAK - WINTER_OFF_PEAK - NUCLEAR_RAB - SUMMER_WEEKENDS_OFF_PEAK_WINTER - TNUOS - CAPACITY_MARKET - HMC_GUARANTEE_ADVANCE - HMC_GUARANTEE_FULL - EV_DEVICE - EV_DEVICE_PEAK - EV_DEVICE_OFF_PEAK type: string x-spec-enum-id: 382cc620726bec21 title: The rate type of the unit rate. description: 'If the register_identifier is not provided, the rate type must be provided instead. * `STANDARD` - Standard rate (pence per kWh) * `ECO7_DAY` - Day (or peak) rate (pence per kWh) * `ECO7_NIGHT` - Night (or off-peak) rate (pence per kWh) * `OFF_PEAK` - Additional off-peak rate for three-rate tariffs (pence per kWh) * `PEAK` - Peak rate (pence per kWh) for business tariffs * `WEEKDAY` - Weekday rate (pence per kWh) for business tariffs * `OFF_PEAK_WEEKENDS` - Off peak weekend rate (pence per kWh) for business tariffs * `WEEKENDS_OTHER` - Weekend rate (pence per kWh) for business tariffs * `SUMMER` - Summer rate (pence per kWh) for business tariffs * `SUMMER_PEAK` - Summer peak rate (pence per kWh) for two-rate tariffs * `SUMMER_OFF_PEAK` - Summer off-peak rate (pence per kWh) for two-rate tariffs * `WINTER` - Winter rate (pence per kWh) for business tariffs * `WINTER_PEAK` - Winter peak rate (pence per kWh) for two-rate tariffs * `WINTER_OFF_PEAK` - Winter off-peak rate (pence per kWh) for two-rate tariffs * `NUCLEAR_RAB` - Nuclear RAB rate (pence per day) for business tariffs * `SUMMER_WEEKENDS_OFF_PEAK_WINTER` - A rate that applies during summer, weekends and off-peak in winter periods(pence per kWh) for business tariffs * `TNUOS` - TNUoS rate (pence per day) for business tariffs * `CAPACITY_MARKET` - Capacity Market rate (pence per day) for business tariffs * `HMC_GUARANTEE_ADVANCE` - Hourly Matching Credit Guarantee Advance rate (pence per kWh) for business tariffs * `HMC_GUARANTEE_FULL` - Hourly Matching Credit Guarantee Full rate (pence per kWh) for business tariffs * `EV_DEVICE` - Electric vehicle device rate (pence per kWh) for sub-meter billing * `EV_DEVICE_PEAK` - Electric vehicle device peak rate (pence per kWh) for sub-meter billing * `EV_DEVICE_OFF_PEAK` - Electric vehicle device off-peak rate (pence per kWh) for sub-meter billing' unit_rate: type: string format: decimal pattern: ^-?\d{0,7}(?:\.\d{0,5})?$ title: The value in pence per kWh of the charge (excluding VAT). description: This field should be used for gas meters. payment_method: enum: - DD - NDD - PP type: string x-spec-enum-id: 84f5b0df65c6e1bb title: The value in pence per kWh of the charge (excluding VAT). description: 'This field should be used for gas meters. * `DD` - DD * `NDD` - NDD * `PP` - PP' required: - unit_rate Quote: type: object properties: annual_payment: type: integer minimum: 0 title: The estimated annual payment for this meter-point based on consumption. description: This value must be provided in pence. For business quotes, the price is exclusive of VAT, while for non-business quotes, it should be inclusive of VAT. required: - annual_payment Installation: type: object properties: fit_id: type: string description: The Feed-in Tariff ID. rego_id: type: string description: The REGO accreditation number. technology_type: enum: - LkUp_Generator_TypesCombined - Bio Diesel (Oil) - Bio Diesel (Oil) CHP - Bio Gas (AD) - Bio Gas (AD) CHP - Bio Gas (Landfill) - Bio Mass (Wood) - Bio Mass (Wood) CHP - Bio Methane - Geothermal (Airsource) - Geothermal (Groundsource) - Geothermal (Watersource) - Hydro (Dam - Drinking Water) - Hydro (Dam) - Hydro (Pumped Storage) - Hydro (Run-of-River) - Hydro (Sewerage Treatment) - Hydro (Tidal) - Hydro (Water Treatment) - Hydro (Wave) - Solar PV (Building) - Solar PV (Field - Multi Use) - Solar PV (Field - Single Use) - Solar Thermal - Wind (Offshore) - Wind (Onshore) - AD - CHP - Hydro - Solar - Wind type: string x-spec-enum-id: da0f319a77bff5cf description: 'The technology type for the installation. If there are multiple technologies at one site then provide multiple installations. * `LkUp_Generator_TypesCombined` - LkUp_Generator_TypesCombined * `Bio Diesel (Oil)` - Bio Diesel (Oil) * `Bio Diesel (Oil) CHP` - Bio Diesel (Oil) CHP * `Bio Gas (AD)` - Bio Gas (AD) * `Bio Gas (AD) CHP` - Bio Gas (AD) CHP * `Bio Gas (Landfill)` - Bio Gas (Landfill) * `Bio Mass (Wood)` - Bio Mass (Wood) * `Bio Mass (Wood) CHP` - Bio Mass (Wood) CHP * `Bio Methane` - Bio Methane * `Geothermal (Airsource)` - Geothermal (Airsource) * `Geothermal (Groundsource)` - Geothermal (Groundsource) * `Geothermal (Watersource)` - Geothermal (Watersource) * `Hydro (Dam - Drinking Water)` - Hydro (Dam - Drinking Water) * `Hydro (Dam)` - Hydro (Dam) * `Hydro (Pumped Storage)` - Hydro (Pumped Storage) * `Hydro (Run-of-River)` - Hydro (Run-of-River) * `Hydro (Sewerage Treatment)` - Hydro (Sewerage Treatment) * `Hydro (Tidal)` - Hydro (Tidal) * `Hydro (Water Treatment)` - Hydro (Water Treatment) * `Hydro (Wave)` - Hydro (Wave) * `Solar PV (Building)` - Solar PV (Building) * `Solar PV (Field - Multi Use)` - Solar PV (Field - Multi Use) * `Solar PV (Field - Single Use)` - Solar PV (Field - Single Use) * `Solar Thermal` - Solar Thermal * `Wind (Offshore)` - Wind (Offshore) * `Wind (Onshore)` - Wind (Onshore) * `AD` - AD * `CHP` - CHP * `Hydro` - Hydro * `Solar` - Solar * `Wind` - Wind' capacity_in_kw: type: string format: decimal pattern: ^-?\d{0,11}(?:\.\d{0,2})?$ title: The total capacity of the installation in kW. estimated_annual_generation_in_kwh: type: string format: decimal pattern: ^-?\d{0,11}(?:\.\d{0,2})?$ title: The estimated annual generation of the installation in kWh. required: - capacity_in_kw - estimated_annual_generation_in_kwh - technology_type securitySchemes: AccountUserAPIKeyAuthentication: type: http scheme: basic description: Token-based authentication where token is passed as the username for basic auth AffiliateAuthentication: type: http scheme: basic description: Basic authentication for affiliate organisations DRFKrakenTokenAuthentication: type: apiKey in: header name: Authorization description: JWT-based authentication KeyAuthentication: type: apiKey in: header name: Authorization description: Token-based authentication with required prefix "Token " PartnerUserOnlyAuthentication: type: http scheme: basic description: Basic authentication for partner organisations