Skip to main content

Customer Migrations Guide: Post Business Import

After a business has successfully been created you might need to import additional data. In this section we’ll walk you through the various endpoints you can use to add information to an imported business in Kraken.

Importing business contracts

Overview

Use this endpoint to add contracts to a business.

Schema

Loading...
POST https://api.plenitudefr-kraken.energy/v1/data-import/business-contracts/create/

Responses

The following responses may be returned from the API.

Status codeDescription
201 - Created

If the payload is valid, a 201 Created response will be returned containing the identifier of the created business contracts. For example:

{ "business_contracts": [ { "identifier": "123-12345" }, { "identifier": "456-12346" } ] }
400 - Bad Request

The post business import endpoint does both validation and creation, so you will receive:

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

If there are creation errors, a 400 Bad Request response will be returned, detailing the errors. To resolve these errors, correct the data mentioned in the error messages.

404 - Not Found

If a business is not found, then a 404 Not Found response will be returned. To resolve the error, check that the business has been imported (not just staged) and that the import_supplier_code and external_business_identifier in the request are correct.

500 - Internal Server Error

If an unexpected error occurs, a 500 Internal Server Error response will be returned.

Payloads

Example payload
{ "import_supplier_code": "TENTACLE_ENERGY", "external_business_identifier": "EXTERNAL-1234", "business_contracts": [ { "valid_from_date": "2023-01-01", "signed_at_date": "2023-01-01", "versions": [ { "applicable_at_date": "2023-01-01", "terms": [] } ], "identifier": "ABC" } ] }