Customer Migrations Guide: Account Import
API Endpoints
Overview
Use this endpoint to validate account data before creating an account.
Schema
Responses
The following responses may be returned from the API.
| Status code | Description |
|---|---|
200 - OK | If the payload is valid, a 200 OK response will be returned with the empty payload as its body. Example:{} |
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. Example:{
"detail": "Could not validate account data.",
"code": "account_failed_validation",
"errors": [
{
"detail": "abcde is not a valid phone number",
"code": "invalid_phone_number",
"attr": "customers.0.landline"
}
]
} |
Payloads
Example domestic account payload
{
"import_supplier": "ENIPLENITUDEPT_IMPORT_SUPPLIER",
"external_account_number": "EXTERNAL-TEST001",
"account_type": "DOMESTIC",
"operations_team_name": "Team A",
"customers": [
{
"user_details": [
{
"namespace": "first_family_name",
"value": "Abreu"
},
{
"namespace": "second_family_name",
"value": "Rodrigues"
},
{
"namespace": "fiscal_code",
"value": "234254718"
}
],
"given_name": "Duarte",
"family_name": "Abreu Rodrigues",
"email": "duarte@example.org",
"mobile": "600000000"
}
],
"supply_addresses": [
{
"supply_points": [
{
"identifier": "PT0000000000000001TR",
"supply_type": "ELECTRICITY",
"agreements": [
{
"tariff_code": "TEST001",
"effective_from": "2025-01-01",
"effective_to": "2027-01-01"
}
]
}
],
"customer_at_supply_address_from_date": "2023-01-01",
"supply_address": {
"locality": "Lisboa",
"postal_code": "1000-001",
"country": "PT",
"structured_street_address": {
"street_type": "R",
"street_name": "Gomes Freire",
"street_number": "1",
"floor": "1º",
"door": "B",
"direction": "esq"
}
}
}
]
}Overview
Use this endpoint to process account data into an account in Kraken.
Schema
Responses
The following responses may be returned from the API.
| Status code | Description |
|---|---|
201 | If the payload is valid and an account creation has been scheduled, a 201 Created response will be returned with the empty payload as its body. Example:{} |
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. Example:{
"code": "import_process_failed_validation",
"detail": "Import process validation failed during account creation. Please validate the import process to get full details of the validation errors.",
"domain": "import_process"
}If an account has already been imported, a 400 Bad Request response will be returned with account_id representing existing Kraken account number. Example:{
"non_field_errors": {
"detail": "The account import process with the account number 1234567890 has already been imported.",
"code": "account_import_process_already_imported"
},
"account_id": "A-12345678"
} |
Payloads
Example domestic account payload
{
"import_supplier": "ENIPLENITUDEPT_IMPORT_SUPPLIER",
"external_account_number": "EXTERNAL-TEST001",
"account_type": "DOMESTIC",
"operations_team_name": "Team A",
"customers": [
{
"user_details": [
{
"namespace": "first_family_name",
"value": "Abreu"
},
{
"namespace": "second_family_name",
"value": "Rodrigues"
},
{
"namespace": "fiscal_code",
"value": "234254718"
}
],
"given_name": "Duarte",
"family_name": "Abreu Rodrigues",
"email": "duarte@example.org",
"mobile": "600000000"
}
],
"supply_addresses": [
{
"supply_points": [
{
"identifier": "PT0000000000000001TR",
"supply_type": "ELECTRICITY",
"agreements": [
{
"tariff_code": "TEST001",
"effective_from": "2025-01-01",
"effective_to": "2027-01-01"
}
]
}
],
"customer_at_supply_address_from_date": "2023-01-01",
"supply_address": {
"locality": "Lisboa",
"postal_code": "1000-001",
"country": "PT",
"structured_street_address": {
"street_type": "R",
"street_name": "Gomes Freire",
"street_number": "1",
"floor": "1º",
"door": "B",
"direction": "esq"
}
}
}
]
}Overview
Use this endpoint to retrieve the current status of an account import.
Responses
The following responses may be returned from the API.
| Status code | Description |
|---|---|
200 - OK |
If the account import process exists, a For example when there is no error in processing: {
"status": "PENDING | DRY_RUN_SUCCEEDED | IN_PROGRESS | PROCESSED | CANCELLED",
"kraken_identifier": null,
"created_at": "2025-10-07T09:00:21.179194+02:00",
"modified_at": "2025-10-07T09:06:38.078396+02:00",
"latest_error": null
}For example when the import process is processed we have an internal kraken id: {
"status": "PROCESSED",
"kraken_identifier": "INTERNAL-KRAKEN-IDENTIFIER",
"created_at": "2025-10-07T09:00:21.179194+02:00",
"modified_at": "2025-10-07T09:06:38.078396+02:00",
"latest_error": null
}For example when there is an error in processing: {
"status": "ERRORED | DRY_RUN_ERRORED",
"kraken_identifier": null,
"created_at": "2025-10-07T09:00:21.179194+02:00",
"modified_at": "2025-10-07T09:06:38.078396+02:00",
"latest_error": {
"code": "some_error_code",
"detail": "A detailed error message",
"domain": "account_import"
}
} |
404 - Not Found |
If the account import process does not exist, a {
"detail": "The requested resource was not found.",
"code": "not_found"
} |