Skip to main content

Customer Migrations Guide: Product Import

Once you've prepared your data, and coordinated the setup of an import supplier with us, the next step is to create your products in Kraken. This is important as products must already exist in Kraken before accounts can be created that are associated with them.

During this stage, we'll walk you through the process of validating your product data, creating the product within Kraken, and updating rates for existing products. Here, you'll find all the fields and validation rules accepted by our API, as well as the various responses you may receive throughout this process.

Validate products

Overview

Use this endpoint to validate product data before creating or updating the products in Kraken.

The endpoint accepts a JSON payload containing a list of product objects.

Schema

Loading...
POST https://api.oefr-kraken.energy/v1/data-import/validate-products/

Responses

The following responses may be returned from the API.

Status codeDescription
200 - OK

If the payload is valid, a 200 OK response will be returned with the validated data as its body. You may now move onto the next stage and create the product in Kraken.

400 - Bad Request

If there are validation errors a 400 Bad Request response will be returned detailing the errors. To resolve these errors, refer to the field definitions and validation rules.

Payloads

Example electricity payload
[ { "code": "ELECTRICITY_PRODUCT_V123", "notes": "This electricity product has been migrated from the legacy system.", "brand": "TENTACLE_ENERGY", "full_name": "Electricity product V123 Final", "display_name": "Electricity product", "description": "This product has great value rates.", "available_from_date": "2020-01-01", "is_hidden": false, "market_name": "FRA_ELECTRICITY", "params": { "segments": "C5", "is_variable": true, "cost_stacking": false, "next_product_code": "NEXT_ELECTRICITY_PRODUCT", "is_default": false }, "rates": [ { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "provider_calendar": "BASE", "min_subscribed_max_power": 0, "max_subscribed_max_power": 24 } }, { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "provider_calendar": "HPHC", "min_subscribed_max_power": 0, "max_subscribed_max_power": 24 } }, { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "provider_calendar": "BASE", "min_subscribed_max_power": 24, "max_subscribed_max_power": 37 } }, { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "provider_calendar": "HPHC", "min_subscribed_max_power": 24, "max_subscribed_max_power": 37 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "BASE", "temp_class": "BASE", "min_subscribed_max_power": 0, "max_subscribed_max_power": 24 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "HPHC", "temp_class": "HP", "min_subscribed_max_power": 0, "max_subscribed_max_power": 24 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "HPHC", "temp_class": "HC", "min_subscribed_max_power": 0, "max_subscribed_max_power": 24 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "BASE", "temp_class": "BASE", "min_subscribed_max_power": 24, "max_subscribed_max_power": 37 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "HPHC", "temp_class": "HP", "min_subscribed_max_power": 24, "max_subscribed_max_power": 37 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "HPHC", "temp_class": "HC", "min_subscribed_max_power": 24, "max_subscribed_max_power": 37 } } ] } ]
Example gas payload
[ { "code": "GAS_PRODUCT_V123", "notes": "This gas product has been migrated from the legacy system.", "brand": "TENTACLE_ENERGY", "full_name": "Gas product V123 Final", "display_name": "Gas product", "description": "This product has great value rates.", "available_from_date": "2020-01-01", "is_hidden": false, "market_name": "FRA_GAS", "params": { "is_variable": true, "cost_stacking": false, "next_product_code": "NEXT_GAS_PRODUCT", "is_default": false }, "rates": [ { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 1 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 2 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 3 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 4 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 5 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 6 } }, { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 1 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 2 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 3 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 4 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 5 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 6 } } ] } ]

Create products and update rates

Overview

Now that your data has been validated, you can create new products.

After a product has been created, you may want to update the rates. This can be done by calling the API again with the code of the existing product and the new rates to be added to that product. New rates need to have params that correspond to an existing rate that is active at the time of the new rate's valid_from_date. The existing rate will have it's valid_to value set to midnight on the new rate's valid_from_date so that the rates are continuous.

Note: when calling the API to update an existing product's rates, only new rates can be added and any updates to the product attributes or params will be ignored. Updating an existing product's rates is done in an "append only" way to limit the caller's ability to rewrite the history of a product's rates. New rates must have their valid_from_date either be active during the latest existing rate of the same band or equal the date of that rate's valid_to. If required, the latest existing rate of the same band will have it's valid_to field set to the new rate's valid_from_date to prevent overlaps.

To create new products and update rates for existing products, use the following endpoint.

The endpoint accepts a JSON payload containing a list of product objects, the same as the validate endpoint.

Before a product is created, it is validated according to the same rules as the validate endpoint above. This is an extra safety check to make sure nothing has changed between preparing the data and submitting it for creation in Kraken.

Schema

Loading...
POST https://api.oefr-kraken.energy/v1/data-import/products/

Responses

The following responses may be returned from the API.

docs--rest--api-guides--data-import--product-creation-guide--creation--api-responses--html
Status codeDescription

Payloads

Example electricity payload
[ { "code": "ELECTRICITY_PRODUCT_V123", "notes": "This electricity product has been migrated from the legacy system.", "brand": "TENTACLE_ENERGY", "full_name": "Electricity product V123 Final", "display_name": "Electricity product", "description": "This product has great value rates.", "available_from_date": "2020-01-01", "is_hidden": false, "market_name": "FRA_ELECTRICITY", "params": { "segments": "C5", "is_variable": true, "cost_stacking": false, "next_product_code": "NEXT_ELECTRICITY_PRODUCT", "is_default": false }, "rates": [ { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "provider_calendar": "BASE", "min_subscribed_max_power": 0, "max_subscribed_max_power": 24 } }, { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "provider_calendar": "HPHC", "min_subscribed_max_power": 0, "max_subscribed_max_power": 24 } }, { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "provider_calendar": "BASE", "min_subscribed_max_power": 24, "max_subscribed_max_power": 37 } }, { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "provider_calendar": "HPHC", "min_subscribed_max_power": 24, "max_subscribed_max_power": 37 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "BASE", "temp_class": "BASE", "min_subscribed_max_power": 0, "max_subscribed_max_power": 24 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "HPHC", "temp_class": "HP", "min_subscribed_max_power": 0, "max_subscribed_max_power": 24 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "HPHC", "temp_class": "HC", "min_subscribed_max_power": 0, "max_subscribed_max_power": 24 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "BASE", "temp_class": "BASE", "min_subscribed_max_power": 24, "max_subscribed_max_power": 37 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "HPHC", "temp_class": "HP", "min_subscribed_max_power": 24, "max_subscribed_max_power": 37 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "provider_calendar": "HPHC", "temp_class": "HC", "min_subscribed_max_power": 24, "max_subscribed_max_power": 37 } } ] } ]
Example gas payload
[ { "code": "GAS_PRODUCT_V123", "notes": "This gas product has been migrated from the legacy system.", "brand": "TENTACLE_ENERGY", "full_name": "Gas product V123 Final", "display_name": "Gas product", "description": "This product has great value rates.", "available_from_date": "2020-01-01", "is_hidden": false, "market_name": "FRA_GAS", "params": { "is_variable": true, "cost_stacking": false, "next_product_code": "NEXT_GAS_PRODUCT", "is_default": false }, "rates": [ { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 1 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 2 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 3 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 4 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 5 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B1", "min_annual_consumption": 0, "max_annual_consumption": 4000, "price_level": 6 } }, { "band_category": "STANDING_CHARGE", "unit_type": "YEARS_ON_SUPPLY_PER_DIEM", "valid_from_date": "2022-01-01", "price_per_unit": 123, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 1 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 2 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 3 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 4 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 5 } }, { "band_category": "CONSUMPTION_CHARGE", "unit_type": "KWH_CONSUMPION", "valid_from_date": "2022-01-01", "price_per_unit": 987, "params": { "consumption_class_id": "B2", "min_annual_consumption": 4000, "max_annual_consumption": 40000, "price_level": 6 } } ] } ]