Skip to main content

Customer Migrations Guide: Business Import

In this section we will guide you through the process of creating businesses with business contracts in Kraken.

If a business has business contracts, it must be migrated using the create business endpoint with all of its business contracts in the same payload. This must be done before any accounts associated to the business are migrated.

To link accounts to the correct business contract, the business.business_contracts.identifier provided in the business payload must correspond to the business.business_contract_identifier provided in the account payload.

Create Business Endpoint

Overview

Businesses which require business contracts in Kraken can be created by providing a valid JSON payload to the following endpoint.

The business JSON payload must include essential data to uniquely identify and create a business entity and all it's business contracts.

Business uniqueness is established through the use of an external business identifier, combined with a set of key business attributes, such as name, number, and type.

Schema

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

Responses

The following responses may be returned from the API.

Status codeDescription
201 - Created

If the payload is valid, and a business has been created, a 201 Created response will be returned with the body containing the id of the business. For example:

{ "kraken_business_id": 123, "external_business_identifier": "external-123343243" }
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 payload
{ "import_supplier_code": "TENTACLE_ENERGY", "external_business_identifier": "EXTERNAL-1234", "business": { "business_type": "EURL", "company_name": "Test Company", "siret": "60487647400494", "details": [ { "key": "siren", "value": "604876474" } ], "business_contracts": [ { "valid_from_date": "2023-01-01", "signed_at_date": "2023-01-01", "versions": [ { "applicable_at_date": "2023-01-01", "terms": [ { "term_type": "CONTRACT_METADATA", "metadata": { "cee_formula_type": "standard" } }, { "term_type": "PRODUCT_RATE_OVERRIDE_SCHEDULE", "schedules": [ { "effective_from": "2023-01-01", "items": [ { "price_per_unit": "0.2", "rate_band": "CONSUMPTION_STANDARD", "product_code": "ELEC-BUSINESS" } ] } ] }, { "term_type": "TERMINATION_FEE", "amount": 100.0, "supply_type": "ELECTRICITY", "fee_type": "FLAT" }, { "term_type": "ISSUANCE_FREQUENCY", "frequency": "MONTHLY", "multiplier": 2, "period_start_day": 1, "period_start_month": 1 }, { "term_type": "RATE_GROUP_ELIGIBILITY", "schedules": [ { "effective_period": { "start_date": "2023-01-01" }, "product_code": "ELEC-BUSINESS", "rate_group_code": "BUSINESS_RATE_GROUP", "is_eligible": true } ] } ] } ], "identifier": "ABC" } ] } }