Customer Migrations Guide: Post Account Import
Overview
Use this endpoint to add notes to an account.
Some points to note:
-
A note must contain at least one of the fields
body
ordocument_paths
. -
A
created_at
datetime may optionally be provided. Otherwise, it will default to the current local time. -
The
document_paths
refer to the locations in S3 where attached documents are stored. More details on document paths can be found here. -
An optional
is_pinned
boolean can be passed in the payload to control whether this note will be pinned to the top of the Kraken account support site page.
Schema
Responses
The following responses may be returned from the API.
Status code | Description |
---|
Payloads
Example payload
{
"import_supplier": "TENTACLE_ENERGY",
"external_account_number": "EXTERNAL-1234",
"notes": [
{
"body": "Some important pinned note.",
"is_pinned": true,
"unpin_at": "2020-06-01T12:00:00Z"
},
{
"created_at": "2020-02-01T12:00:00Z",
"body": "Some important note with an attachment.",
"document_paths": [
{
"document_path": "some/path/to/a/document.pdf"
}
]
}
]
}
Overview
Use this endpoint to import financial transactions to an account.
The following optional URL params are available to tweak the behaviour of the API:
check_previously_added
: boolean flag indicating whether to check if a transaction has already been added. Defaults to true.force_add_to_current_statement
: boolean flag. If set to true and the payload contains a transaction that is outside the currently-open statement period, this will modify the transaction date so that it is within the currently-open statement period. This then allows the transaction to be added to the statement instead of throwing an error. A description is added to the transaction to explain this, and a note is pinned to the account. Defaults to true.
Schema
Responses
The following responses may be returned from the API.
Status code | Description |
---|
Payloads
Example payload
{
"import_supplier": "TENTACLE_ENERGY",
"external_account_number": "EXTERNAL-1234",
"transactions": [
{
"transaction_id": "1",
"transaction_date": "2019-10-01",
"amount": 10.0,
"type": "CHARGE",
"reason": "IMPORTED_CHARGE",
"display_note": "Some customer facing note about the charge.",
"note": "Some internal note about the charge."
},
{
"transaction_id": "2",
"transaction_date": "2019-10-01",
"amount": 10.0,
"type": "CREDIT",
"reason": "IMPORTED_CREDIT",
"display_note": "Some customer facing note about the credit.",
"note": "Some internal note about the credit."
},
{
"transaction_id": "3",
"transaction_date": "2019-10-01",
"amount": 10.0,
"type": "PAYMENT",
"reason": "ACCOUNT_CHARGE_PAYMENT",
"reference": "payment-reference-1",
"payment_type": "DD_REGULAR_COLLECTION",
"note": "Some internal note about the payment."
},
{
"transaction_id": "4",
"transaction_date": "2019-10-01",
"amount": 10.0,
"type": "REPAYMENT",
"reason": "FULL_CREDIT_REFUND",
"reference": "repayment-reference-1",
"payment_type": "DIRECT_CREDIT",
"note": "Some internal note about the repayment."
},
{
"transaction_id": "5",
"transaction_date": "2019-10-01",
"amount": 10.0,
"type": "SUPPLY_CHARGE",
"display_note": "Some customer facing note about the supply charge.",
"product_code": "SOME-PRODUCT-CODE-4321",
"line_items": [
{
"rate_band": "CONSUMPTION_STANDARD",
"start_date": "2019-10-01",
"end_date": "2019-11-01",
"number_of_units": 4.0,
"net_amount": 44.0,
"price_per_unit": 11.0,
"units": [
4.0,
8.0
]
}
],
"tax_items": [
{
"amount": 9.24,
"tax_type": "VAT",
"value_taxed": 44.0,
"rate": 0.21,
"unit_type": "PROPORTION"
}
]
}
]
}
Overview
Use this endpoint to import historical PDF statements onto an account. The historical statements payload contains an optional statement_path
field that points to a location for the PDF statement in S3. For more information on document path parameters, see document paths section.
Schema
Responses
The following responses may be returned from the API.
Status code | Description |
---|---|
201 - Created | If the payload is valid, a 200 OK response will be returned with the validated data as its body. |
400 - Bad Request |
If there are validation errors, a |
Payloads
Example payload
{
"import_supplier": "TENTACLE_ENERGY",
"external_account_number": "EXTERNAL-1234",
"statements": [
{
"bill_period_from_date": "2022-01-01",
"bill_period_to_date": "2022-01-31",
"statement_id": "1",
"issued_date": "2022-02-02",
"number": "1",
"gross_amount": 100,
"statement_path": "path/to/statement-1.pdf",
"supply_type": "ELECTRICITY",
"is_annulled": false
}
]
}
Overview
Use this endpoint to create a payment instruction for an account.
Schema
Responses
The following responses may be returned from the API.
Status code | Description |
---|
Payloads
Example payload
{
"import_supplier": "TENTACLE_ENERGY",
"external_account_number": "EXTERNAL-1234",
"vendor": "STRIPE",
"instruction_reference": "THIS-IS-A-FAKE-REFERENCE",
"type": "CARD"
}