Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/origin-energy-post-account-import-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no email required.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Kraken Post Account Import API
version: v1
description: APIs for importing additional data after an account has been imported.
servers:
- url: https://api.origin-kraken.energy/v1
description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: post_account_import
x-title: Post Account Import
description: APIs for importing additional data after an account has been imported.
x-documentation-order: 6
paths:
/v1/data-import/historical-statements/create/:
post:
operationId: V1 Create Historical Statements
description: Use this endpoint to import historical PDF statements onto an account.
summary: Use this endpoint to import historical PDF statements onto an account.
tags:
- post_account_import
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/HistoricalStatements'
examples:
ExamplePayload:
value:
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
summary: Example payload
required: true
security:
- DataImportViewerAPIKeyAuthentication: []
- DRFKrakenTokenAuthentication: []
responses:
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/NonFieldErrors'
examples:
AccountNumberOrExternalAccountNumberMustBeProvided:
value:
non_field_errors:
- Either account_number or external_account_number must be provided.
summary: account_number or external_account_number must be provided
description: Validation error.
'404':
description: The account import process or account have not been found. To resolve the error, check that the account has been imported (not just staged) and that the `import_supplier code` and `external_account_number` are correct.
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/HistoricalStatements'
description: If the payload is valid, the validated data will be returned in the body of the response.
x-doc-alerts: []
/v1/data-import/notes/create/:
post:
operationId: V1 Create Account Notes
description: 'Some points to note:
- A note must contain at least one of the fields `body` or `document_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.
- 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.'
summary: Use this endpoint to add notes to an account.
tags:
- post_account_import
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountNote'
examples:
ExamplePayload:
value:
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
summary: Example payload
required: true
security:
- DataImportViewerAPIKeyAuthentication: []
- DRFKrakenTokenAuthentication: []
responses:
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/NonFieldErrors'
examples:
AccountNumberOrExternalAccountNumberMustBeProvided:
value:
non_field_errors:
- Either account_number or external_account_number must be provided.
summary: account_number or external_account_number must be provided
description: Validation error.
'404':
description: The account import process or account have not been found. To resolve the error, check that the account has been imported (not just staged) and that the `import_supplier code` and `external_account_number` are correct.
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAccountNotesResponse'
examples:
CreateNoteSuccessExample:
value:
- created_at: '2020-01-01T12:00:00Z'
body: Something very important to import.
status: NOTE_CREATION_SUCCESS
- created_at: '2020-02-01T12:00:00Z'
body: Something else very important to import.
status: NOTE_ALREADY_EXISTS
summary: Create note success example
description: If the payload is valid, a list of the posted notes and their creation status will be returned in the response. A new note will only be created if a note on the account with the same body (and `created_at`, if provided) does not already exist.
x-doc-alerts: []
/v1/data-import/payment-instruction/create/:
post:
operationId: V1 Create Payment Instruction
description: Create a payment instruction.
summary: Create a payment instruction.
tags:
- post_account_import
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LegacyPaymentInstruction'
examples:
ExamplePayload:
value:
import_supplier: TENTACLE_ENERGY
external_account_number: EXTERNAL-1234
vendor: STRIPE
reference: THIS-IS-A-FAKE-REFERENCE
type: CARD
summary: Example payload
required: true
security:
- DataImportViewerAPIKeyAuthentication: []
- DRFKrakenTokenAuthentication: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/CreatePaymentInstructionResponse'
examples:
CreatedPaymentInstruction.:
value:
kraken_account_number: A-C90DC431
reference: THIS-IS-A-FAKE-REFERENCE
summary: Created payment instruction.
description: If the payload is valid, the Kraken account number and the reference will be returned.
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/CreatePaymentInstructionError'
examples:
AccountAlreadyHasAnActiveInstructionError.:
value:
error_detail: Account already has an active instruction
external_account_number: '7654321'
import_supplier: SOME_IMPORT_SUPPLIER
reference: THIS-IS-A-FAKE-REFERENCE
summary: Account already has an active instruction error.
description: '
If there are validation errors, the errors will be detailed in the body of the response. To
resolve the error, refer to the field definitions and validation rules.
This error can be returned if we have persistent issues communicating with the upstream payment
vendor (we call their API to verify the instruction exists, and retrieve the details to store in
Kraken). In this case, **the request should not be retried in its current form**.
'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/CreatePaymentInstructionError'
description: '
This error can be returned if we have intermittent issues communicating with the upstream payment
vendor (we call their API to verify the instruction exists, and retrieve the details to store in
Kraken). In this case, **the request should be retried as-is**.
'
x-doc-alerts: []
/v1/data-import/transactions/create/:
post:
operationId: V1 Create Transactions
description: Use this endpoint to import financial transactions to an account.
summary: Use this endpoint to import financial transactions to an account.
parameters:
- in: query
name: check_previously_added
schema:
type: boolean
default: true
description: Boolean flag indicating whether to check if a transaction has already been added.
- in: query
name: force_add_to_current_statement
schema:
type: boolean
default: true
description: 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.
tags:
- post_account_import
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Transactions'
examples:
ExamplePayload:
value:
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: 53.24
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
summary: Example payload
required: true
security:
- DataImportViewerAPIKeyAuthentication: []
- DRFKrakenTokenAuthentication: []
responses:
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/BadCreateTransactionsRequest'
examples:
BadTransactionPayload:
value:
transactions:
'0':
reason:
- Not a valid string.
summary: Bad transaction payload
ErrorCreatingTheTransaction:
value:
status: TRANSACTION_IMPORT_ERROR
error_detail: 'UnableToCreateTransaction - 2019-09-28 of Payment #1 of 7100 on 2019-09-28 (ThirdParty) is not within the statement A-00000001 2019-10-01 - 2019-10-15 (OPEN) period'
transaction_data:
transaction_id: '1'
transaction_date: '2019-09-28'
amount: '71.00'
type: PAYMENT
reason: GENERAL_CREDIT
reference: reference 1
payment_type: DEBIT_CARD
summary: Error creating the transaction
description: Could not create transactions
'404':
description: The account import process or account have not been found. To resolve the error, check that the account has been imported (not just staged) and that the `import_supplier code` and `external_account_number` are correct.
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionsCreated'
examples:
TransactionCreationResponseExample:
value:
results:
- status: TRANSACTION_ALREADY_EXISTS
transaction_data:
transaction_id: '1'
transaction_date: '2019-10-01'
amount: '71.00'
type: PAYMENT
reason: GENERAL_CREDIT
reference: reference 1
payment_type: DEBIT_CARD
status: TRANSACTION_IMPORT_SUCCESS
- status: TRANSACTION_ADDED_TO_ACCOUNT
transaction_data:
transaction_id: '2'
transaction_date: '2019-10-04'
amount: '180.00'
type: PAYMENT
reason: GENERAL_CREDIT
reference: reference 2
payment_type: DEBIT_CARD
summary: Transaction creation response example
description: If the payload is valid, and there were no errors while importing the transactions, an object will be returned with a list of transactions that were passed in along with their creation statuses.
x-doc-alerts: []
components:
schemas:
AusStatement:
type: object
properties:
average_daily_usage:
type: string
format: decimal
pattern: ^-?\d{0,10}(?:\.\d{0,10})?$
description: <p>The average daily usage of the statement.</p>
bill_period_from_date:
type: string
format: date
description: <p>The statement start date (inclusive).</p>
bill_period_to_date:
type: string
format: date
description: <p>The statement end date (inclusive).</p>
gross_amount:
type:
- integer
- 'null'
description: <p>The gross amount of the statement, in the lowest denomination for the currency.</p>
is_reversed:
type: boolean
description: <p>Whether or not is reversed.</p>
issued_date:
type:
- string
- 'null'
format: date
description: <p>The date the statement was issued.</p>
net_emissions:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/AusNetEmissions'
description: <p>List of net emissions.</p>
number:
type: string
description: <p>The external customer-facing statement number.</p>
statement_id:
type: string
description: <p>The ID of the statement.</p>
statement_path:
type: string
description: <p>The relative path in S3 of the statement PDF file.</p>
x-validators:
- name: Validate path exists in file store
description: Validate that the given path corresponds to a file that has previously been uploaded to the migration file store. Note that this validation is disabled by default and can be enabled using the relevant feature flag.
possible_errors:
- path_does_not_exist_in_file_store
total_consumption:
type: string
format: decimal
pattern: ^-?\d{0,10}(?:\.\d{0,10})?$
description: <p>The total consumption of the statement.</p>
total_consumption_cost:
type: string
format: decimal
pattern: ^-?\d{0,10}(?:\.\d{0,10})?$
description: <p>The total consunption cost of the statement.</p>
total_feed_in_cost:
type: string
format: decimal
pattern: ^-?\d{0,10}(?:\.\d{0,10})?$
description: <p>The total feed in cost of the statement.</p>
total_feed_in_energy:
type: string
format: decimal
pattern: ^-?\d{0,10}(?:\.\d{0,10})?$
description: <p>The total feed in energy of the statement.</p>
total_supply_cost:
type: string
format: decimal
pattern: ^-?\d{0,10}(?:\.\d{0,10})?$
description: <p>The total supply cost of the statement.</p>
required:
- bill_period_from_date
- bill_period_to_date
- statement_id
x-validators:
- name: null
description: null
possible_errors:
- missing_statement_path_or_pdf_context
- received_statement_path_and_pdf_context
BadCreateTransactionsRequest:
oneOf:
- $ref: '#/components/schemas/NonFieldErrors'
- $ref: '#/components/schemas/ErrorCreatingTransactions'
CreatePaymentInstructionResponse:
type: object
properties:
account_number:
type: string
description: <p>The account number in the source system. This, along with the <code>import_supplier</code>, will be used to find the account in Kraken.</p>
maxLength: 128
kraken_account_number:
type: string
description: <p>The account number in the source system. This, along with the <code>import_supplier</code>, will be used to find the account in Kraken.</p>
maxLength: 128
reference:
type: string
description: <p>The reference of the mandate as known by the vendor.</p>
maxLength: 128
required:
- account_number
- kraken_account_number
- reference
Repayment:
type: object
properties:
type:
enum:
- CHARGE
- PAYMENT
- REPAYMENT
- CREDIT
- SUPPLY_CHARGE
type: string
x-spec-enum-id: 06d6aba5cee32f9a
description: <p>The type of the transaction.</p>
x-enum-descriptions:
CHARGE: Charge
PAYMENT: Payment
REPAYMENT: Repayment
CREDIT: Credit
SUPPLY_CHARGE: Supply Charge
amount:
type: string
format: decimal
pattern: ^-?\d{0,10}(?:\.\d{0,10})?$
description: <p>The amount of the transaction. e.g. if the customer has a consumption charge worth 23.43, this equates to a transaction of type <code>CHARGE</code> of 23.43. Payments and repayments must be positive numbers. Generally charges and credits are also positive, but may be negative to represent reversed charges or credits, or if an incorrect estimated reading has resulted in a negative consumption charge. Provide this amount in the currency's major unit rather than its minor unit (for example euros rather than cents, or pounds rather than pence). These examples are illustrative only; the same applies to any currency that has a major and minor unit. For currencies without a minor unit, such as the Japanese yen, pass the value as-is.</p>
billing_document_identifier:
type: string
description: <p>The identifier from the source system that groups a set of transactions together. This will be used in Kraken during the migration of historical statement transactions to create an archived billing document. For now this field is only required if <code>HISTORICAL_STATEMENT_REQUIRE_SINGLE_BILLING_DOCUMENT_IDENTIFIER</code> settings is ON and is meant for only <code>historical_statements_transactions</code>. Passing this to other transactions like <code>current_statement_transactions</code> or <code>transactions_in_open_settlement_period</code> will raise validation error.</p>
display_note:
type: string
description: <p>The customer-facing note that can be displayed in a statement or email to the customer.</p>
deprecated: true
note:
type: string
description: <p>Any additional notes about the transaction.</p>
payment_type:
enum:
- DIRECT_CREDIT
- CARD_REFUND
- BACS
- CHEQUE
- BPAY
- ''
type: string
x-spec-enum-id: d2c4d6e823ed27aa
description: <p>The payment type for the transaction.</p>
x-enum-descriptions:
DIRECT_CREDIT: DIRECT_CREDIT
CARD_REFUND: CARD_REFUND
BACS: BACS
CHEQUE: CHEQUE
BPAY: BPAY
? ''
: ''
reason:
type: string
description: <p>The reason for the transaction.</p>
reference:
type: string
description: <p>The reference for the transaction. This could be an external id to help identify this transaction.</p>
transaction_date:
type: string
format: date
description: <p>The date of the transaction.</p>
x-validators:
- name: Validate transaction date
description: Validates that the transaction date provided in the payload is not in the future.
possible_errors:
- transaction_in_future
transaction_id:
type: string
description: <p>The unique internal identifier for the transaction.</p>
required:
- amount
- transaction_date
- transaction_id
- type
HistoricalStatements:
type: object
properties:
external_account_number:
type: string
description: <p>The account number in the source system. This, along with the <code>import_supplier</code>, will be used to find the account in Kraken.</p>
import_supplier:
enum:
- ORIGIN_SOLARFLEX_INACTIVE
- ORIGIN
- WIN_CONNECT_PARENT
- ORIGIN_CNI
- ORIGIN_BUSINESS
- WIN_CONNECT
- ORIGIN_SOLARFLEX
- ORIGIN_BUSINESS_NO_CONTRACT
type: string
x-spec-enum-id: 9572ea198e3a9787
description: <p>The import supplier code that the account was imported on to. This, along with the <code>external_account_number</code>, will be used to find the account in Kraken.</p>
x-enum-descriptions:
ORIGIN_SOLARFLEX_INACTIVE: Origin SolarFlex Inactive
ORIGIN: Origin
WIN_CONNECT_PARENT: Win Connect Parent
ORIGIN_CNI: Origin CNI
ORIGIN_BUSINESS: Origin Zero Business Import Supplier
WIN_CONNECT: WinConnect
ORIGIN_SOLARFLEX: Origin SolarFlex
ORIGIN_BUSINESS_NO_CONTRACT: Origin Business - No Contracts e.g. trustee
statements:
type: array
items:
$ref: '#/components/schemas/AusStatement'
description: <p>List of historical statements for the account.</p>
required:
- external_account_number
- import_supplier
- statements
x-validators:
- name: Validate that account data is staged and account created
description: Validate that an account exists for the <code>external_account_number</code> and <code>import_supplier</code> code. This means that the import data must already have been staged and processed into an account.
possible_errors:
- account_not_found
- import_process_does_not_exist
- name: Validate that migration is ongoing
description: Validate whether or not an import supplier is open for further data migration.
possible_errors:
- import_supplier_migration_not_ongoing
- name: Validate that the account doesn't have historical statements
description: Validate the the historical statements that are being imported do not already exist on the account. To check this the <code>statement_id</code>'s in the payload are checked against any historical statement IDs already associated with the account.
possible_errors:
- account_not_found
- historical_statement_already_exists
LegacyPaymentInstruction:
type: object
properties:
external_account_number:
type: string
description: <p>The account number in the source system. This, along with the <code>import_supplier</code>, will be used to find the account in Kraken.</p>
import_supplier:
enum:
- ORIGIN_SOLARFLEX_INACTIVE
- ORIGIN
- WIN_CONNECT_PARENT
- ORIGIN_CNI
- ORIGIN_BUSINESS
- WIN_CONNECT
- ORIGIN_SOLARFLEX
- ORIGIN_BUSINESS_NO_CONTRACT
type: string
x-spec-enum-id: 9572ea198e3a9787
description: <p>The import supplier code that the account was imported on to. This, along with the <code>external_account_number</code>, will be used to find the account in Kraken.</p>
x-enum-descriptions:
ORIGIN_SOLARFLEX_INACTIVE: Origin SolarFlex Inactive
ORIGIN: Origin
WIN_CONNECT_PARENT: Win Connect Parent
ORIGIN_CNI: Origin CNI
ORIGIN_BUSINESS: Origin Zero Business Import Supplier
WIN_CONNECT: WinConnect
ORIGIN_SOLARFLEX: Origin SolarFlex
ORIGIN_BUSINESS_NO_CONTRACT: Origin Business - No Contracts e.g. trustee
instruction_reference:
type: string
description: <p>The reference of the mandate as known by the vendor.</p>
deprecated: true
x-use-instead: reference
maxLength: 128
ledger_code:
type: string
description: <p>The code of the relevant Kraken ledger type for the payment instruction. This code must exist in Kraken.</p>
x-validators:
- name: Validate ledger code
description: Validates that the ledger code provided in the payload matches an available ledger type in Kraken.
possible_errors:
- ledger_code_does_not_exist
reference:
type: string
description: <p>The reference of the mandate as known by the vendor.</p>
maxLength: 512
type:
enum:
- BPAY
- CARD
- CUSTOM
- DIRECT_DEBIT
- GMO_REFUND
- PAYMENT_SLIP
type: string
x-spec-enum-id: 601d0b035869d4dd
description: <p>The payment type of the payment instruction.</p>
x-enum-descriptions:
BPAY: BPAY
CARD: Card
CUSTOM: Custom
DIRECT_DEBIT: Direct Debit
GMO_REFUND: GMO Refund
PAYMENT_SLIP: Payment slip
use_for_scheduled_payments:
type:
- boolean
- 'null'
description: <p>Whether this payment instruction should be used for scheduled payments on a given ledger. If true, this instruction will be set as the payment method for the account's payment schedule.</p>
valid_from:
type:
- string
- 'null'
format: date
description: <p>The date from which the payment instruction is valid.</p>
vendor:
enum:
- WESTPAC
type: string
x-spec-enum-id: 19baa89b6ef9d00c
description: <p>The vendor for the payment instruction.</p>
x-enum-descriptions:
WESTPAC: Westpac
required:
- external_account_number
- import_supplier
- type
- vendor
x-validators:
- name: Validate that account data is staged and account created
description: Validate that an account exists for the <code>external_account_number</code> and <code>import_supplier</code> code. This means that the import data must already have been staged and processed into an account.
possible_errors:
- account_not_found
- import_process_does_not_exist
- name: Validate that migration is ongoing
description: Validate whether or not an import supplier is open for further data migration.
possible_errors:
- import_supplier_migration_not_ongoing
- name: Validate that either <code>instruction_reference</code> or <code>reference</code> are provided
description: Validate that exactly one of <code>instruction_reference</code> or <code>reference</code> is provided.
possible_errors:
- mutually_exclusive_field_required
NonFieldErrors:
type: object
properties:
non_field_errors:
type: array
items:
type: string
description: Description of the error.
description: Validation error messages.
required:
- non_field_errors
NoteDocument:
type: object
properties:
document_path:
type: string
description: <p>The S3 relative path to the document to be attached to the note.</p>
x-validators:
- name: Validate path exists in file store
description: Validate that the given path corresponds to a file that has previously been uploaded to the migration file store. Note that this validation is disabled by default and can be enabled using the relevant feature flag.
possible_errors:
- path_does_not_exist_in_file_store
required:
- document_path
TransactionData:
oneOf:
- $ref: '#/components/schemas/Credit'
- $ref: '#/components/schemas/AusCharge'
- $ref: '#/components/schemas/Payment'
- $ref: '#/components/schemas/Repayment'
- $ref: '#/components/schemas/OriginSupplyCharge'
discriminator:
propertyName: type
mapping:
CREDIT: '#/components/schemas/Credit'
CHARGE: '#/components/schemas/AusCharge'
PAYMENT: '#/components/schemas/Payment'
REPAYMENT: '#/components/schemas/Repayment'
SUPPLY_CHARGE: '#/components/schemas/OriginSupplyCharge'
Transactions:
type: object
properties:
account_number:
type: string
description: <p>The account number in the source system. This, along with the <code>import_supplier</code>, will be used to find the account in Kraken.</p>
deprecated: t
# --- truncated at 32 KB (72 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/origin-energy/refs/heads/main/openapi/origin-energy-post-account-import-api-openapi.yml