Skip to main content

Customer Migrations Guide: Requesting Data

In the previous section, we walked through the steps of validating, staging, and creating an account in Kraken. Throughout this process, you may find it necessary to retrieve information about the ongoing state of the migration, such as which accounts have been successfully imported, which are pending import etc. For such inquiries, the following endpoints are at your disposal.

Retrieving Account Import Status

Overview

Use this endpoint to find out the status of a single account import process.

Possible statuses:

  • UNKNOWN - No account found in Kraken for the external account number and import supplier code. Either a previous process attempt has failed, or the import has never been attempted to be processed.
  • COMPLETED - An account has been created in Kraken for the external account number and import supplier code.
  • IN_PROGRESS - There is currently a migration process attempting to create this account.

GET https://api.octopus.energy/v1/data-import/account-transfer-status/<import-supplier-code>/<external-account-number>/

Responses

The following responses may be returned from the API.

Status codeDescription
200 - OK

If the account import process exists (whether an account has been created or not), a 200 OK response will be returned, detailing the status and kraken_account_number. If an account has not yet been created from the import data, then the kraken_account_number will be an empty string.

For example:

{ "status": "COMPLETED", "kraken_account_number": "A-12AB34CD" }
404 - Not Found

If an account cannot be found for the given import_supplier and external_account_number, a 404 Not Found response will be returned.

To resolve the error, check that the account has been imported and that the import_supplier and external_account_number are correct.

List all account imports

Overview

Use this endpoint to list all accounts for import, whether they are pending (their data has been staged) or have had a Kraken account created.

GET https://api.octopus.energy/v1/data-import/all-account-import-processes/<import-supplier-code>/

Responses

The following responses may be returned from the API.

Status codeDescription
200 - OK

If any pending or imported accounts are found for the given import_supplier code, a 200 OK response will be returned. If the account is pending import then the kraken_account_number and account_created_at will be null. For example:

[ { "external_account_number": "1234", "kraken_account_number": null, "account_created_at": null }, { "external_account_number": "5678", "kraken_account_number": "A-56785678", "account_created_at": "2020-01-01T12:00:00Z" } ]

List pending imports

Overview

Use this endpoint to list all accounts pending import (their data has been staged).

GET https://api.octopus.energy/v1/data-import/pending-account-import-processes/<import-supplier-code>/

Responses

The following responses may be returned from the API.

Status codeDescription
200 - OK

If any accounts pending import are found for the given import_supplier code, a 200 OK response will be returned. For consistency with the other APIs the kraken_account_number and account_created_at fields will be returned but will always be null. For example:

[ { "external_account_number": "1234", "kraken_account_number": null, "account_created_at": null } ]

List all imported accounts

Overview

Use this endpoint to list all accounts that have been imported and now have a Kraken account.

GET https://api.octopus.energy/v1/data-import/imported-account-import-processes/<import-supplier-code>/

Responses

The following responses may be returned from the API.

Status codeDescription
200 - OK

If any imported accounts are found for the given import_supplier code, a 200 OK response will be returned. For example:

[ { "external_account_number": "5678", "kraken_account_number": "A-56785678", "account_created_at": "2020-01-01T12:00:00Z" } ]

List meterpoint statuses

Overview

Use this endpoint to list the status of all meter points for an already imported account in Kraken.

GET https://api.octopus.energy/v1/data-import/meterpoint-statuses-for-account/<import-supplier-code>/<external-account-number>/

Responses

The following responses may be returned from the API.

Status codeDescription
200 - OK

If the request is valid, a 200 OK response will be returned with an array of objects, each detailing the mpxn and status of the meterpoint in Kraken. For example:

[ {"mpxn":"9349409806","status":"PRE_REGISTRATION"} ]
404 - Not Found

If an account is not found, or no meter points are found on the account, then a 404 Not Found response will be returned. To resolve the error, check that the account has been imported (not just staged) and that the import_supplier code and external_account_number in the request are correct. An example 404 response is shown below:

[ {"error": f"No meterpoints found for EXTERNAL-1234"} ]