openapi: 3.2.0 info: title: Kraken Business Import API version: v1 description: APIs for importing businesses with business contracts servers: - url: https://api.origin-kraken.energy/v1 description: Base URL declared by the provider in apis.yml (roadmap#122). tags: - name: business_import x-title: Business Import description: APIs for importing businesses with business contracts x-documentation-order: 2 paths: /v1/data-import/business/: post: operationId: V1 Create Business description: Use this endpoint to import business to Kraken. summary: Import business to Kraken tags: - business_import requestBody: content: application/json: schema: $ref: '#/components/schemas/BusinessImportProcess' required: true security: - DataImportViewerAPIKeyAuthentication: [] - DRFKrakenTokenAuthentication: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/BusinessImportProcessCreation' examples: SuccessfulBusinessImport: value: kraken_business_id: Business ID summary: Successful business import description: The business has been successfully imported in Kraken. '400': content: application/json: schema: $ref: '#/components/schemas/DRFError' description: ' If there are validation errors, they will be detailed in the body of the response. To resolve these errors, refer to the field definitions and validation rules. ' x-doc-alerts: [] components: schemas: ProductRateOverrideItemByRateBand: type: object properties: price_per_unit: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,5})?$ description:
The price per unit of the item.
product_code: type: string description:The product code of the item.
x-validators: - name: Validate product code exists description: Validate that the product code exists in Kraken. possible_errors: - product_code_does_not_exist rate_band: type: string description:The override rate of the item.
required: - price_per_unit - product_code - rate_band x-validators: - name: Validate that the rate band is valid for the product code description: Validate that the rate band provided matches the rate band for the product's rates with the provided product code. possible_errors: - rate_band_not_found_for_product BespokeRateSchedule: type: object properties: identifier: type: - string - 'null' description:A unique identifier for the bespoke rate schedule.
items: type: array items: $ref: '#/components/schemas/BespokeRateItem' description:A list of bespoke rates.
minItems: 1 x-validators: - name: Validate bespoke rate items are unique description: Validate that no two bespoke rate items in a schedule share the same rate specification code, rate specification type, and variant profile. possible_errors: - duplicate_bespoke_rate_items product_code: type: string description:A product code for the schedule of bespoke rate.
x-validators: - name: Validate product code exists description: Validate that the product code exists in Kraken. possible_errors: - product_code_does_not_exist supply_point_identifier: type: - string - 'null' description:The external identifier of the supply point that this bespoke rate schedule targets.
minLength: 1 valid_from: type: string format: date-time description:The date the schedule of bespoke rates is valid from (inclusive).
valid_to: type: - string - 'null' format: date-time description:The date the schedule of bespoke rates is valid to (exclusive).
required: - items - product_code - valid_from x-validators: - name: Validatevalid_to not before or equal to valid_from
description: Validates that valid_to, if given, is strictly later than valid_from.
possible_errors:
- start_date_same_as_end_date
- name: Validate each item represents a possible rate for the product
description: Validate each item's rate specification, characteristic values, and scheme labels represent a rate defned on the product.
possible_errors:
- characteristic_code_not_found
- invalid_characteristic_value
- invalid_profile_variant_for_specification
- product_specification_not_found_for_product
- rate_specification_not_found_for_product
- shared_rate_not_found
- shared_rate_not_found_for_product
- name: Validate that all required bespoke rates are present and no non-overridable rates are supplied
description: Validates that bespoke rate schedules include all rate specifications marked as must-be-overridden and mandatory, and do not include any rate specifications marked as cannot-be-overridden.
possible_errors:
- bespoke_rate_cannot_be_overridden
- missing_required_bespoke_rate
AusPropertyRichAddress:
type: object
properties:
administrative_area:
enum:
- ACT
- NSW
- NT
- QLD
- SA
- TAS
- VIC
- WA
type: string
x-spec-enum-id: 0083aa6c13849f88
description: Australian state.
x-enum-descriptions: ACT: ACT NSW: NSW NT: NT QLD: QLD SA: SA TAS: TAS VIC: VIC WA: WA country: type: string description:The ISO 3166-1-alpha-2 code of the country that this address belongs to, for example AU (Australia) or GB (Great Britain).
maxLength: 2 delivery_point_identifier: type: string description:The unique country specific identifier for an address. For example the UPRN in the UK or G-NAF ID in Australia.
maxLength: 11 x-validators: - name: Validate delivery point identifier description: Validate that the delivery point identifier contains only capital letters and numbers. possible_errors: - invalid_delivery_point_identifier dependent_locality: type: string default: '' description:Dependent localities, neighbourhoods or boroughs. These are sometimes included in an address when the delivery point is outside the boundary of the main postal town that serves it.
maxLength: 512 locality: type: string description:Australian suburb or town.
maxLength: 46 name: type: string default: '' description:The recipient's name.
deprecated: true organization: type: string default: '' description:The company or organization to which the address belongs.
deprecated: true postal_code: type: string description:Australian postal code.
maxLength: 4 x-validators: - name: Validate and normalize postcode description: Validate the postal code and normalize it to a standard format. possible_errors: - invalid_postcode sorting_code: type: string default: '' description:This is a non-geographic code used for recipients of large quantities of post, such as companies or government departments. An example is the French CEDEX code.
maxLength: 512 street_address: type: string default: '' description:Free text field for the address. Either this field or the structured_address field should be provided, not both.
Structured address object. Fields for this object are territory dependent. Please speak to the tech team about uses of this field. Either this field or the street_address should be provided, not both.
The affiliate organisation name associated with the contract.
maxLength: 128 x-validators: - name: Validate affiliate organisation exists description: Validate that an affiliate organisation exists in Kraken for the given name. possible_errors: - affiliate_organisation_does_not_exist sales_channel: enum: - DIRECT - PRICE_COMPARISON - TELESALES - DIGI_TELESALES - EVENTS - FIELD_SALES - AGGREGATOR - PARTNERSHIPS - NEW_TENANT - MOVE_IN - WORKPLACE_POP_UP - BROKER - PARENT_POWER - PEOPLE_POWER - GIFT_OF_KIT - HIGH_REFERRER - SUPPLIER_OF_LAST_RESORT - ACQUISITION - WORKS_WITH_OCTOPUS - LANDLORD - DEBT_COLLECTION_AGENCY type: string x-spec-enum-id: f4ccf4dcda60c174 description:The sales channel associated with the contract
x-enum-descriptions: DIRECT: Direct PRICE_COMPARISON: Price comparison TELESALES: Telesales DIGI_TELESALES: Digital telesales EVENTS: Events FIELD_SALES: Field sales AGGREGATOR: Aggregator PARTNERSHIPS: Partnerships NEW_TENANT: New tenant MOVE_IN: Move in WORKPLACE_POP_UP: Workplace pop-up BROKER: Broker PARENT_POWER: Parent power PEOPLE_POWER: People power GIFT_OF_KIT: Gift of kit HIGH_REFERRER: High referrer SUPPLIER_OF_LAST_RESORT: Supplier of last resort ACQUISITION: Acquisition WORKS_WITH_OCTOPUS: Works with octopus LANDLORD: Landlord DEBT_COLLECTION_AGENCY: Debt collection agency x-validators: - name: Sales channel matches affiliate organisation description: Validates that when an affiliate_organisation_name is provided, the sales_channel is in the set of channels configured for that organisation. possible_errors: - sales_channel_does_not_match_affiliate_organisation PartnerCommissionConfig: type: object properties: apply_uplift: type: boolean default: false description:Whether to apply a product uplift for this partner commission. Defaults to false.
Optional override for the trailing commission percentage. Overrides the default percentage on the partner commission.
override_unit_amount: type: - string - 'null' format: decimal pattern: ^-?\d{0,8}(?:\.\d{0,8})?$ description:Optional override for the unit-based commission rate. Overrides the default unit amount on the partner commission.
partner_commission_number: type: string description:The unique identifier of the partner commission (e.g. OPC-XXXXXXXX or TPC-XXXXXXXX).
A dictionary of characteristic values which the rate applies to.
x-validators: - name: Validate provided dictionary content types description: Validates that provided dictionary contents are of the specified key type and value type. possible_errors: [] scheme_labels: type: object description:A dictionary of scheme labels which the rate applies to.
x-validators: - name: Validate provided dictionary content types description: Validates that provided dictionary contents are of the specified key type and value type. possible_errors: [] - name: Validate that scheme labels have the correct format description: Validate that scheme labels have the the following format 'scheme-type:identifier' where 'scheme-type' is one of 'time_of_use', 'register'. possible_errors: - invalid_scheme_label_format CorrectivePeriodMarketConfig: type: object properties: length: type: integer minimum: 1 description:Length of the corrective period.
length_unit: enum: - DAY - WEEK - MONTH - YEAR type: string x-spec-enum-id: aaeac18e78076e3b description:Unit of time for the corrective period length (DAY, WEEK, MONTH, YEAR).
x-enum-descriptions: DAY: DAY WEEK: WEEK MONTH: MONTH YEAR: YEAR market_name: enum: - AUS_EMBEDDED_GAS - AUS_EMBEDDED_UNMETERED_ELECTRICITY - AUS_SOLAR_PPA - AUS_EMBEDDED_UNMETERED_GAS - AUS_EMBEDDED_ELECTRICITY - SIMPLE_SERVICES - AUS_ELECTRICITY - AUS_EMBEDDED_WATER - AUS_GAS type: string x-spec-enum-id: 2efb600dcd89ea97 description:Market name (e.g., ELECTRICITY, GAS) the corrective period applies to.
x-enum-descriptions: AUS_EMBEDDED_GAS: AUS_EMBEDDED_GAS AUS_EMBEDDED_UNMETERED_ELECTRICITY: AUS_EMBEDDED_UNMETERED_ELECTRICITY AUS_SOLAR_PPA: AUS_SOLAR_PPA AUS_EMBEDDED_UNMETERED_GAS: AUS_EMBEDDED_UNMETERED_GAS AUS_EMBEDDED_ELECTRICITY: AUS_EMBEDDED_ELECTRICITY SIMPLE_SERVICES: SIMPLE_SERVICES AUS_ELECTRICITY: AUS_ELECTRICITY AUS_EMBEDDED_WATER: AUS_EMBEDDED_WATER AUS_GAS: AUS_GAS supply_point_ids: type: - array - 'null' items: type: integer minimum: 1 description:Supply Point IDs the corrective period applies to.
minItems: 1 required: - length - length_unit - market_name AusEEPAExportContractedVolumePeriod: type: object properties: supply_point_external_identifiers: type: - array - 'null' items: type: string description:The external identifiers (NMIs) of the supply points this period applies to. Leave null to apply to all supply points not covered by a more specific period; when provided the list must not be empty.
minItems: 1 unit: type: string description:The unit for the contracted export volume (e.g. kWh).
valid_from_date: type: string format: date description:The date the period is valid from (inclusive).
valid_to_date: type: string format: date description:The date the period is valid to (exclusive; the period ends before this date).
value: type: string format: decimal pattern: ^-?\d{0,7}(?:\.\d{0,4})?$ description:The contracted export volume cap for the period.
required: - supply_point_external_identifiers - unit - valid_from_date - valid_to_date - value x-validators: - name: Convert supply point external identifiers to IDs description: Convert each supply point external identifier (NMI) to the internal supply point ID by looking up the supply point in the database. A null value is left unchanged and applies the period to all supply points. possible_errors: - supply_point_not_found - name: Validatevalid_to not before valid_from
description: Validates that valid_to, if given, is on or later than valid_from.
possible_errors:
- start_date_later_than_end_date
ProductRateOverrideSchedule:
type: object
properties:
effective_from:
type: string
format: date-time
description: 'The date on which the schedule goes into effect. This is an inclusive date. Example: If the effective_from is October 1, 2024, then the schedule is valid on October 1, 2024 and following dates.
The items specified by rate band affected by the override during this schedule.
variant_items: type: array items: $ref: '#/components/schemas/ProductRateOverrideItemByVariantProfile' description:The items specified by characteristic values affected by the override during this schedule.
required: - effective_from x-validators: - name: Validate that rate override schedule item must include rate overrides. description: Validate that rate override schedule item must include at least 'items' or 'characteristic_items' values. possible_errors: - rate_override_items_required CardAndBankAccountPaymentInstruction: type: object properties: bank_account: allOf: - $ref: '#/components/schemas/PaymentInstructionBankAccount' description:Bank account payment instruction details.
card: allOf: - $ref: '#/components/schemas/PaymentInstructionCard' description:Card payment instruction details.
customer_reference: type: string description:The customer reference of the payment instruction.
Although not required for payment instructions to take payments, if provided it keeps Kraken's data in sync with the customer's account in the payment vendor's systems.
maxLength: 512 instruction_identifier: type: string description:Unique identifier for the payment instruction. Used for cross referencing the payment instruction within other parts of the payload.
ledger_code: type: string description:The code of the relevant Kraken ledger type for the payment instruction. This code must exist in Kraken.
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:The reference of the mandate as known by the vendor.
maxLength: 512 type: enum: - BPAY - CARD - CUSTOM - DIRECT_DEBIT - GMO_REFUND - PAYMENT_SLIP type: string x-spec-enum-id: 601d0b035869d4dd description:The payment type of the payment instruction.
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 description: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.
valid_from: type: - string - 'null' format: date description:The date from which the payment instruction is valid.
vendor: enum: - WESTPAC type: string x-spec-enum-id: 19baa89b6ef9d00c description:The vendor for the payment instruction.
x-enum-descriptions: WESTPAC: Westpac required: - reference - type - vendor x-validators: - name: null description: null possible_errors: - incomplete_payments_not_enabled - name: Validate card details are provided for card payment instruction description: Validate that if the payment instruction is of type CARD then card payment details are provided in the payload. This may not be enforced if client is using cashflow instructions as card details are obtained from the vendor in this case. possible_errors: - card_details_not_provided_for_card_payment_instruction TrancheTargetResidualFeeMarket: type: object properties: amount: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,8})?$ description:Residual fee amount
market_name: type: string description:The market the residual fee applies to
unit: type: string description:Residual fee unit
required: - amount - market_name - unit BusinessImportProcess: type: object properties: business: allOf: - $ref: '#/components/schemas/BusinessWithContracts' description:The business's information
external_business_identifier: type: string description:The unique identifier of a business in the external system. This id is used to link an imported business in Kraken to the external system
maxLength: 128 import_supplier_code: 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: The code of an existing ImportSupplier in the database. 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 required: - business - external_business_identifier - import_supplier_code PromotionAssignmentSchedule: type: object properties: discount_targets: type: object additionalProperties: type: array items: $ref: '#/components/schemas/PromotionAssignmentTarget' description:Mapping of discount code to a list of targets the discount applies to.
params: type: object description: 'Optional parameters for the promotion assignment schedule. Supports the following keys: promotion_start_date — an ISO 8601 datetime string (e.g. 2024-01-15T00:00:00+00:00) that overrides the date used when calculating promotion eligibility (e.g. months since sign-up). If omitted, the date is derived from the customer''s agreement.
The promotion code to apply.
required: - discount_targets - promotion_code x-validators: - name: Promotion assignment discount targets are valid description: Validates that the promotion exists, discounts are defined in the promotion, target types match the discount target type, and target identifiers are valid. possible_errors: - discount_not_in_promotion - invalid_input_data - promotion_not_registered - rate_source_provider_not_registered - source_data_not_supported_for_fixed_rate - source_data_reference_mismatch - target_identifier_invalid - target_type_mismatch - target_type_not_registered - name: Promotion assignment params are valid description: Validates that the params field contains only valid values. If promotion_start_date is provided, it must be a valid ISO 8601 datetime string. possible_errors: - invalid_promotion_start_date PartnerCommission: type: object properties: term_type: type: string description:The type of the contract term.
configurations: type: array items: $ref: '#/components/schemas/PartnerCommissionConfig' description:List of partner commission configurations to associate with this contract term.
minItems: 1 x-validators: - name: Validate partner commission numbers exist description: Validate that all partner commission numbers in the term configurations exist in Kraken. possible_errors: - not_found is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
required: - configurations - term_type Address: type: object properties: administrative_area: type: string default: '' description:The top-level administrative subdivision. For example a US state, Australian state/territory, Italian region, UK constituent nation or Japanese prefecture.
maxLength: 512 country: type: string description:The ISO 3166-1-alpha-2 code of the country that this address belongs to, for example AU (Australia) or GB (Great Britain).
maxLength: 2 delivery_point_identifier: type: string description:The unique country specific identifier for an address. For example the UPRN in the UK or G-NAF ID in Australia.
maxLength: 11 x-validators: - name: Validate delivery point identifier description: Validate that the delivery point identifier contains only capital letters and numbers. possible_errors: - invalid_delivery_point_identifier dependent_locality: type: string default: '' description:Dependent localities, neighbourhoods or boroughs. These are sometimes included in an address when the delivery point is outside the boundary of the main postal town that serves it.
maxLength: 512 locality: type: string default: '' description:The city/town portion of an address. For example a US city, Australian suburb/town, Italian comune or UK postal town.
maxLength: 512 name: type: string default: '' description:The recipient's name.
deprecated: true organization: type: string default: '' description:The company or organization to which the address belongs.
deprecated: true postal_code: type: string default: '' description:The code assigned to a geographical area representing a group of addresses. For example a US ZIP code, Australian postcode, Italian CAP code or UK postcode.
maxLength: 512 sorting_code: type: string default: '' description:This is a non-geographic code used for recipients of large quantities of post, such as companies or government departments. An example is the French CEDEX code.
maxLength: 512 street_address: type: string default: '' description:Free text field for the address. Either this field or the structured_address field should be provided, not both.
Structured address object. Fields for this object are territory dependent. Please speak to the tech team about uses of this field. Either this field or the street_address should be provided, not both.
The card payment network for the payment instruction.
x-enum-descriptions: MASTERCARD: Mastercard VISA: Visa AMEX: American Express JCB: JCB DISCOVER: Discover DANKORT: Dankort card_type: enum: - CREDIT - DEBIT - PREPAID type: string x-spec-enum-id: 90bbc4bed8c0c0e8 description:The card type for the payment instruction.
x-enum-descriptions: CREDIT: Credit DEBIT: Debit PREPAID: Prepaid expiry_month: type: integer maximum: 12 minimum: 1 description:The expiry month of the card in MM format.
expiry_year: type: integer minimum: 1000 description:The expiry year of the card in YYYY format.
last_digits: type: string description:The last 3 or 4 digits of the card number.
pattern: ^[0-9]{3,4}$ required: - card_payment_network - card_type Terms: oneOf: - $ref: '#/components/schemas/BespokeRateConfiguration' - $ref: '#/components/schemas/BillDueDate' - $ref: '#/components/schemas/BillingDocumentIssuanceFrequencyTerm' - $ref: '#/components/schemas/CharacteristicOverrideConfiguration' - $ref: '#/components/schemas/CollateralRequired' - $ref: '#/components/schemas/ContractMetaData' - $ref: '#/components/schemas/ContractedVolumeConfiguration' - $ref: '#/components/schemas/CorrectivePeriod' - $ref: '#/components/schemas/DelayerDays' - $ref: '#/components/schemas/GuaranteeOfOriginConfiguration' - $ref: '#/components/schemas/LatePaymentFees' - $ref: '#/components/schemas/MinimumContractLength' - $ref: '#/components/schemas/PartnerCommission' - $ref: '#/components/schemas/PaysByDirectDebitTerm' - $ref: '#/components/schemas/ProductRateOverrideConfiguration' - $ref: '#/components/schemas/PromotionAssignmentTerm' - $ref: '#/components/schemas/RateGroupEligibilityConfiguration' - $ref: '#/components/schemas/TrancheTargetResidualFee' - $ref: '#/components/schemas/TaxAdjustmentConfiguration' - $ref: '#/components/schemas/TerminationFee' - $ref: '#/components/schemas/AusEEPAExportContractedVolumeConfiguration' discriminator: propertyName: term_type mapping: BESPOKE_RATE_CONFIGURATION: '#/components/schemas/BespokeRateConfiguration' BILL_DUE_DATE: '#/components/schemas/BillDueDate' ISSUANCE_FREQUENCY: '#/components/schemas/BillingDocumentIssuanceFrequencyTerm' CHARACTERISTIC_OVERRIDE: '#/components/schemas/CharacteristicOverrideConfiguration' COLLATERAL_REQUIRED: '#/components/schemas/CollateralRequired' CONTRACT_METADATA: '#/components/schemas/ContractMetaData' CONTRACTED_VOLUME_CONFIGURATION: '#/components/schemas/ContractedVolumeConfiguration' CORRECTIVE_PERIOD: '#/components/schemas/CorrectivePeriod' DELAYER_DAYS: '#/components/schemas/DelayerDays' GUARANTEE_OF_ORIGIN_CONFIGURATION: '#/components/schemas/GuaranteeOfOriginConfiguration' LATE_PAYMENT_FEES: '#/components/schemas/LatePaymentFees' MINIMUM_CONTRACT_LENGTH: '#/components/schemas/MinimumContractLength' PARTNER_COMMISSION: '#/components/schemas/PartnerCommission' PAYS_BY_DIRECT_DEBIT: '#/components/schemas/PaysByDirectDebitTerm' PRODUCT_RATE_OVERRIDE_SCHEDULE: '#/components/schemas/ProductRateOverrideConfiguration' PROMOTION_ASSIGNMENT: '#/components/schemas/PromotionAssignmentTerm' RATE_GROUP_ELIGIBILITY: '#/components/schemas/RateGroupEligibilityConfiguration' TRANCHE_TARGET_RESIDUAL_FEE: '#/components/schemas/TrancheTargetResidualFee' TAX_ADJUSTMENT_CONFIGURATION: '#/components/schemas/TaxAdjustmentConfiguration' TERMINATION_FEE: '#/components/schemas/TerminationFee' EEPA_EXPORT_CONTRACTED_VOLUME: '#/components/schemas/AusEEPAExportContractedVolumeConfiguration' PromotionAssignmentTerm: type: object properties: term_type: type: string description:The type of the contract term.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
schedules: type: array items: $ref: '#/components/schemas/PromotionAssignmentSchedule' description:The list of promotion assignment schedules.
minItems: 1 required: - schedules - term_type PortfolioSettings: type: object properties: collective_billing: type: boolean default: false description:Set all accounts on the portfolio to be billed collectively. This value can only be provided if the account is the portfolio lead account.
collective_payments: type: boolean default: false description:Set all accounts on the portfolio to pay collectively. This value can only be provided if the account is the portfolio lead account.
delegate_billing_schedule_to_children: type: boolean default: false description:When using collective billing, use the child account's billing options to determine when we charge and prepare billing documents (as opposed to using the lead account's options). This value can only be provided if the account is the portfolio lead account.
send_collective_bill_constituent_messages: type: boolean default: false description:When using collective billing, send collective bill constituent messages to each member of the collective bill. This value can only be provided if the account is the portfolio lead account.
AusEEPAExportContractedVolumeConfiguration: type: object properties: term_type: type: string description:The type of the contract term.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
periods: type: array items: $ref: '#/components/schemas/AusEEPAExportContractedVolumePeriod' description:A list of EEPA export contracted volume periods.
minItems: 1 x-validators: - name: Validate EEPA export contracted volume periods description: 'Validate that the EEPA export contracted volume periods form a valid term: no overlapping general periods, and no supply point repeated across overlapping periods.' possible_errors: - invalid_eepa_export_contracted_volume required: - periods - term_type GuaranteeOfOriginConfiguration: type: object properties: term_type: type: string description:The type of the contract term.
guarantee_of_origin_percentage: enum: - 0 - 25 - 50 - 75 - 100 type: integer x-spec-enum-id: fb9427e17f642d36 description: data-import--field-definition--guarantee-of-origin-configuration--guarantee-of-origin-percentage-help x-enum-descriptions: '0': '0' '25': '25' '50': '50' '75': '75' '100': '100' is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
required: - guarantee_of_origin_percentage - term_type PartnerFileAttachment: type: object properties: category: enum: - LETTER_OF_AUTHORITY type: string x-spec-enum-id: 23434383040d8c62 description:The category of the partner file attachment.
x-enum-descriptions: LETTER_OF_AUTHORITY: Letter of Authority filename: type: string description:The filename of the partner file attachment.
maxLength: 255 partner_number: type: string description:The partner number of the organisation the file attachment belongs to.
maxLength: 128 x-validators: - name: Validateorganisation_number
description: Validate that the given organisation_number has a corresponding organisation registered in the database.
possible_errors:
- partner_organisation_does_not_exist
s3_key:
type: string
description: The S3 key of the partner file attachment.
maxLength: 1024 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 correct file store. possible_errors: - path_does_not_exist_in_file_store required: - category - filename - partner_number - s3_key NoteDocument: type: object properties: document_path: type: string description:The S3 relative path to the document to be attached to the note.
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 AusStructuredStreetAddress: type: object properties: building_or_property_name: type: string description:Building or property name. No longer than 60 chars as two lines of 30 chars each. If more than 30 chars, there must be a \n after 30 chars.
if supplied, flat_or_unit_type must be as well. limit of 7 characters, numbers and . with optional alphabetical prefix and suffix.
Flat or unit type.
x-enum-descriptions: ANT: Antenna APT: Apartment ATM: ATM BBQ: Barbeque BLCK: Block BTSD: Boatshed BLDG: Building BNGW: Bungalow CAGE: Cage CARP: Carpark CARS: Carspace CLUB: Club COOL: Coolroom CTGE: Cottage DUP: Duplex FY: Factory F: Flat GRGE: Garage HALL: Hall HSE: House KSK: Kiosk LSE: Lease LBBY: Lobby LOFT: Loft LOT: Lot MSNT: Maisonette MB: Marine Berth 'OFF': Office PTHS: Penthouse REAR: Rear RESV: Reserve RM: Room SEC: Section SHED: Shed SHOP: Shop SHRM: Showroom SIGN: Sign SITE: Site SL: Stall STOR: Store STR: Strata Unit STU: Studio SUBS: Substation SE: Suite TNCY: Tenancy TWR: Tower TNHS: Townhouse U: Unit VLT: Vault VLLA: Villa WARD: Ward WE: Warehouse WKSH: Workshop floor_or_level_number: type: string description:if supplied, floor_or_level_type must be as well. limit of 5 characters, numbers and . with optional alphabetical prefix and suffix
Floor or level type.
x-enum-descriptions: B: Basement FL: Floor G: Ground L: Level LG: Lower Ground M: Mezzanine LL: Lower Level OD: Observation Deck P: Parking PTHS: Penthouse PLF: Platform PDM: Podium RT: Rooftop SB: Sub-Basement UG: Upper Ground LB: Lobby house_number_1: type: integer description:House number 1. If provided, street_name must be as well.
House number 2. If provided, house_number_1 must be as well.
House number suffix 1. If provided, house_number_1 must be as well.
House number suffix 2. If provided, house_number_2 must be as well.
A description of the location.
lot_number: type: string description:Letters, numbers and ..
Postal delivery number prefix. Alphabetical (Uppercase). If provided, postal_delivery_number_value must be as well.
Postal delivery number suffix. Alphabetical (Uppercase). If provided, postal_delivery_number_value must be as well.
Postal delivery number value. If provided, postal_delivery_typ must be as well.
Postal delivery type.
x-enum-descriptions: CARE PO: CARE PO CMA: CMA CMB: CMB CPA: CPA GPO BOX: GPO BOX LOCKED BAG: LOCKED BAG MS: MS PO BOX: PO BOX PRIVATE BAG: PRIVATE BAG RSD: RSD RMB: RMB RMS: RMS street_name: type: string description:Street name.
maxLength: 45 street_suffix: enum: - CN - DE - E - EX - IN - LR - ML - N - NE - NW - OF - 'ON' - OT - OP - S - SE - SW - UP - W type: string x-spec-enum-id: f105f3c67a4f2af4 description:Street suffix. If provided, street_name must be as well.
Street type. If provided, street_name must be as well.
The effective period of the schedule.
is_eligible: type: boolean description:Whether the rate group is eligible for charging to the customer.
product_code: type: string description:Product code.
x-validators: - name: Validate product code exists description: Validate that the product code exists in Kraken. possible_errors: - product_code_does_not_exist supply_point_identifier: type: string description:Optional supply point identifier to restrict this schedule to a specific supply point.
time_series_specification_code: type: string description:The unique shared rate code for the product.
required: - effective_period - is_eligible - product_code - time_series_specification_code x-validators: - name: data-import--validation--shared-rate-exists-for-product description: Validate that the shared rate code provided matches the shared rate for the product with the provided product code. possible_errors: - product_specification_not_found_for_product - time_series_not_found_for_product CustomerUserDetail: type: object properties: namespace: enum: - external_user_id type: string x-spec-enum-id: 6bb07f5044ea9b8a description:The namespace of the customer user detail.
x-enum-descriptions: external_user_id: external_user_id value: description:The value of the customer user detail.
required: - namespace - value x-validators: - name: Validate user details description: Validates that the user detail namespace and value are allowed for the customer. The user detail namespace (the key in the JSON object) must already have been set up in Kraken. The value (the value in the JSON object) must be the correct data type. possible_errors: - customer_detail_failed_validation - customer_detail_incorrect_value_type - customer_detail_not_registered BillingDocumentIssuanceFrequencyTerm: type: object properties: term_type: type: string description:The type of the contract term.
frequency: enum: - DAILY - MONTHLY type: string x-spec-enum-id: 74dcc34556834abd description:The rate at which a billing document is issued. For example, this can be daily or monthly.
x-enum-descriptions: DAILY: Daily MONTHLY: Monthly is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
multiplier: type: integer description:The multiplier for the issuance frequency. For example, for a frequency of monthly and a multiplier of 2, a billing document should be issued every 2 months.
period_start_day: type: integer description:The day of the month on which the billing period starts in Kraken.
period_start_month: type: integer description:The month of the year on which the billing period starts in Kraken.
required: - frequency - multiplier - period_start_day - period_start_month - term_type BusinessUser: type: object properties: address: allOf: - $ref: '#/components/schemas/AusPropertyRichAddress' description:The customer's address. If provided, this will be stored on the account user record.
alternative_phone_numbers: type: array items: $ref: '#/components/schemas/CustomerAlternativeNumber' description:A list of the customer's alternative phone numbers.
business_roles: type: array items: enum: - EZ_CUSTOMER - TRUSTEE_MAND - MSP_USER - BUSI_FINANCIALLY - EZ_DFPP_RW - NOMINATED_NONE - ADMIN - RECEIVES_SALES - EZ_ADMIN - LIFE_SUPPORT_CONTACT - RECEIVES_DUNNING - FLAGGED_LS - RECEIVES_SERVICE - NO_EMAIL - MSBG_COMMS - EZ_DFPP_RO - TRUSTEE_BILL - RECEIVES_INVOICES - TRUSTEE_NONE - RESI_SECONDARY - BUSINESS_NO_COMMS - NOMINATED_MAND - MSBG_NO_COMMS - BSP_USER - OUTAGE_CONTACT - NOMINATED_BILL - EZ_BROKER - TRUSTEE - PRIMARY_NO_COMMS - CDR_REPRESENTATIVE - BUSINESS_COMMS type: string description: '* `EZ_CUSTOMER` - EZ_CUSTOMER * `TRUSTEE_MAND` - TRUSTEE_MAND * `MSP_USER` - MSP_USER * `BUSI_FINANCIALLY` - BUSI_FINANCIALLY * `EZ_DFPP_RW` - EZ_DFPP_RW * `NOMINATED_NONE` - NOMINATED_NONE * `ADMIN` - ADMIN * `RECEIVES_SALES` - RECEIVES_SALES * `EZ_ADMIN` - EZ_ADMIN * `LIFE_SUPPORT_CONTACT` - LIFE_SUPPORT_CONTACT * `RECEIVES_DUNNING` - RECEIVES_DUNNING * `FLAGGED_LS` - FLAGGED_LS * `RECEIVES_SERVICE` - RECEIVES_SERVICE * `NO_EMAIL` - NO_EMAIL * `MSBG_COMMS` - MSBG_COMMS * `EZ_DFPP_RO` - EZ_DFPP_RO * `TRUSTEE_BILL` - TRUSTEE_BILL * `RECEIVES_INVOICES` - RECEIVES_INVOICES * `TRUSTEE_NONE` - TRUSTEE_NONE * `RESI_SECONDARY` - RESI_SECONDARY * `BUSINESS_NO_COMMS` - BUSINESS_NO_COMMS * `NOMINATED_MAND` - NOMINATED_MAND * `MSBG_NO_COMMS` - MSBG_NO_COMMS * `BSP_USER` - BSP_USER * `OUTAGE_CONTACT` - OUTAGE_CONTACT * `NOMINATED_BILL` - NOMINATED_BILL * `EZ_BROKER` - EZ_BROKER * `TRUSTEE` - TRUSTEE * `PRIMARY_NO_COMMS` - PRIMARY_NO_COMMS * `CDR_REPRESENTATIVE` - CDR_REPRESENTATIVE * `BUSINESS_COMMS` - BUSINESS_COMMS' x-spec-enum-id: a9dfece01fff4a96 x-enum-descriptions: EZ_CUSTOMER: EZ_CUSTOMER TRUSTEE_MAND: TRUSTEE_MAND MSP_USER: MSP_USER BUSI_FINANCIALLY: BUSI_FINANCIALLY EZ_DFPP_RW: EZ_DFPP_RW NOMINATED_NONE: NOMINATED_NONE ADMIN: ADMIN RECEIVES_SALES: RECEIVES_SALES EZ_ADMIN: EZ_ADMIN LIFE_SUPPORT_CONTACT: LIFE_SUPPORT_CONTACT RECEIVES_DUNNING: RECEIVES_DUNNING FLAGGED_LS: FLAGGED_LS RECEIVES_SERVICE: RECEIVES_SERVICE NO_EMAIL: NO_EMAIL MSBG_COMMS: MSBG_COMMS EZ_DFPP_RO: EZ_DFPP_RO TRUSTEE_BILL: TRUSTEE_BILL RECEIVES_INVOICES: RECEIVES_INVOICES TRUSTEE_NONE: TRUSTEE_NONE RESI_SECONDARY: RESI_SECONDARY BUSINESS_NO_COMMS: BUSINESS_NO_COMMS NOMINATED_MAND: NOMINATED_MAND MSBG_NO_COMMS: MSBG_NO_COMMS BSP_USER: BSP_USER OUTAGE_CONTACT: OUTAGE_CONTACT NOMINATED_BILL: NOMINATED_BILL EZ_BROKER: EZ_BROKER TRUSTEE: TRUSTEE PRIMARY_NO_COMMS: PRIMARY_NO_COMMS CDR_REPRESENTATIVE: CDR_REPRESENTATIVE BUSINESS_COMMS: BUSINESS_COMMS description:A list of business roles to be assigned to the customer. These apply to all accounts the business has access to.
contact_emails: type: array items: type: string format: email description:A list of additional email addresses to associate with the customer account. These can be used for sending communications to the customer. Each email must be a valid email address.
credit_assessment_id: type: - string - 'null' description:Customers credit assessment id.
credit_result: type: - string - 'null' description:The credit result from the provider.
credit_risk_bracket: enum: - LOW - MID - HIGH - UNKNOWN - '' - null type: - string - 'null' x-spec-enum-id: e6b98b6c312ff7bf description:The deemed credit risk bracket for this customer.
x-enum-descriptions: LOW: Low MID: Medium HIGH: High UNKNOWN: Unknown ? '' : '' None: None credit_score: type: - integer - 'null' maximum: 9999 minimum: 0 description:Customers credit score.
date_of_birth: type: - string - 'null' format: date description:The customer's date of birth.
deceased: enum: - Reported - Confirmed - '' type: string x-spec-enum-id: f90e7d899a971044 default: '' description:Whether the customer is deceased or not. Defaults to an empty string if not provided.
x-enum-descriptions: Reported: Reported Confirmed: Confirmed ? '' : '' details: description:Generic solution for storing additional customer data that is not covered by the other fields in the payload. This is often in the form of market or territory specific information. For example, in much of Europe it is a requirement to store the user's fiscal code. Namespaces (the keys in the object) need to be registered before import. If a value is provided for a namespace that is not registered then an error will be raised.
deprecated: true x-use-instead: user_details x-validators: - name: Validate user details description: Validates that the user detail namespace and value are allowed for the customer. The user detail namespace (the key in the JSON object) must already have been set up in Kraken. The value (the value in the JSON object) must be the correct data type. possible_errors: - customer_detail_failed_validation - customer_detail_incorrect_value_type - customer_detail_not_registered email: type: - string - 'null' format: email description:The customer's email address. This is the email address they will use to log into their online portal. Defaults to an empty string if not provided. Cannot be longer that 254 characters.
maxLength: 254 x-validators: - name: Validate email address is not test address description: Validates that a customer email address is not a test email address. An email address is considered a test address if it starts with "test@"" or "xxx@"" or ends with "@test.com", "@test.co.uk", ".xxx" or ".xx". possible_errors: - possible_test_email_address - name: Validate email is not internal description: Validates that a customer email address does not use an internal Kraken handler. For example, if an instance of Kraken has registeredinfo@kraken.info as an internal email address, then the customer email address must not match this.
possible_errors:
- internal_email_address
family_name:
type: string
default: ''
description: The customer's family name.
maxLength: 255 given_name: type: string default: '' description:The customer's given name.
maxLength: 255 label: type: - string - 'null' description:A free text field to help identify the user (e.g. a job title).
landline: type: - string - 'null' default: '' description:The customer's landline phone number.
maxLength: 32 x-validators: - name: Validate phone number description: Validates that a phone number conforms to the norms of the region from which the migration is taking place. possible_errors: - invalid_phone_number mobile: type: - string - 'null' default: '' description:The customer's personal mobile number.
maxLength: 32 x-validators: - name: Validate phone number description: Validates that a phone number conforms to the norms of the region from which the migration is taking place. possible_errors: - invalid_phone_number salutation: type: - string - 'null' default: '' description:The customer's preferred salutation.
maxLength: 128 title: type: - string - 'null' default: '' description:The customer's preferred title.
maxLength: 20 unable_to_read_meters: type: boolean default: false description:Whether the customer is unable to read their meters themselves. Defaults to False.
user_details: type: array items: $ref: '#/components/schemas/CustomerUserDetail' description:Generic solution for storing additional customer data that is not covered by the other fields in the payload. This is often in the form of market or territory specific information. For example, in much of Europe it is a requirement to store the user's fiscal code. Namespaces (the keys in the object) need to be registered before import. If a value is provided for a namespace that is not registered then an error will be raised.
x-validators: - name: Validate required customer details namespaces provided description: No required namespaces configured. Validation skipped. possible_errors: - required_customer_details_namespace_missing required: - business_roles x-validators: - name: Ensures onlyuser_details or details are provided
description: Ensures that only user_details or details are provided, not both.
possible_errors:
- customer_details_and_user_details_both_provided
- name: Validate no contact details for occupier
description: Validates that a customer identified as "The Occupier" does not have contact details. If contact details are provided it implies that the identity of the customer is known, and it therefore not an unknown occupier.
possible_errors:
- contact_details_for_occupier
- name: Validate that the customer's name is not "The Occupier"
description: Validate that the customer's name is not "The Occupier". To indicate an occupier account, use the unknown_occupier flag at the account-level.
possible_errors:
- customer_may_not_be_named_the_occupier
BusinessImportProcessCreation:
type: object
properties:
external_business_identifier:
type: string
description: The unique identifier of a business in the external system. This id is used to link an imported business in Kraken to the external system
kraken_business_id: type: integer description:The unique identifier of a business in Kraken. This id can be used to identify a business in Kraken
BespokeRateConfiguration: type: object properties: term_type: type: string description:The type of the contract term.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
schedules: type: array items: $ref: '#/components/schemas/BespokeRateSchedule' description:The schedules of bespoke rates.
minItems: 1 x-validators: - name: Validate bespoke rates do not conflict description: Validate bespoke rates for the same target and rate do not conflict during the same period. The target of a bespoke rate is determined by the supply point identifier and product code. possible_errors: - overlapping_bespoke_rate_schedules - name: Validate bespoke rate schedules target consistently description: Validate that bespoke rate schedules either all target supply points via the supply_point_identifier field or none do. possible_errors: - inconsistent_bespoke_rate_schedule_targeting required: - schedules - term_type RateGroupEligibilitySchedule: type: object properties: effective_period: allOf: - $ref: '#/components/schemas/EffectivePeriod' description:The effective period of the schedule.
is_eligible: type: boolean description:Whether the rate group is eligible for charging to the customer.
product_code: type: string description:Product code.
x-validators: - name: Validate product code exists description: Validate that the product code exists in Kraken. possible_errors: - product_code_does_not_exist rate_group_code: type: string description:The unique rate group code for the product.
supply_point_identifier: type: string description:Optional supply point identifier to restrict this schedule to a specific supply point.
required: - effective_period - is_eligible - product_code - rate_group_code x-validators: - name: Validate that the rate group code is valid for the product code description: Validate that the rate group code provided matches the rate group for the product with the provided product code. possible_errors: - rate_group_not_found_for_product PaysByDirectDebitTerm: type: object properties: term_type: type: string description:The type of the contract term.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
pays_by_direct_debit: type: boolean description:Whether the customer pays by direct debit.
required: - pays_by_direct_debit - term_type ContractMetaData: type: object properties: term_type: type: string description:The type of the contract term.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
metadata: type: object description:Additional metadata about the contract.
x-validators: - name: Validate provided dictionary content types description: Validates that provided dictionary contents are of the specified key type and value type. possible_errors: [] required: - metadata - term_type TaxAdjustmentConfiguration: type: object properties: term_type: type: string description:The type of the contract term.
adjustments: type: array items: $ref: '#/components/schemas/SupplyPointTaxAdjustment' description:A list of tax adjustments for supply points.
minItems: 0 x-validators: - name: Validate tax adjustments do not overlap description: Validate that tax adjustments for the same supply point, adjustment type, tax category, and tax subcategory do not have overlapping effective periods. possible_errors: - overlapping_tax_adjustments is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
required: - adjustments - term_type BusinessDetail: type: object properties: key: enum: - abn - acn - frmp - anzsic type: string x-spec-enum-id: cf8b0ced1c78b621 description:The key for the business detail. Keys need to be registered before import. If a value is provided for a key that is not registered then an error will be raised.
x-enum-descriptions: abn: abn acn: acn frmp: frmp anzsic: anzsic value: description:The value for the business detail. This must match the type the registered key is expecting.
required: - key - value x-validators: - name: Validate that the value for the business details key has the correct type description: Validate that the value given has the type that matches the type configured for the registered business detail key. possible_errors: - business_detail_incorrect_value_type - name: Validate the business details value description: Validate that business detail value complies with any validation required by their corresponding detail key. possible_errors: - business_detail_failed_validation BusinessWithContracts: type: object properties: billing_address: allOf: - $ref: '#/components/schemas/Address' description:The billing address for the business.
business_contracts: type: array items: $ref: '#/components/schemas/BusinessContract' description:List of business contracts associated with the business.
x-validators: - name: Validate no duplicate contract identifiers description: Validates that no duplicate contract identifiers have been provided in the payload. possible_errors: - duplicate_contract_identifiers business_type: enum: - SOLE_TRADER - LTD - PTY_LTD - PARTNERSHIP - CHARITY - PLC - LLP - TRUST - TRADING_AS - GOVERNMENT - NON_PROFIT - CHURCH - HOMEOWNER_ASSOCIATION - TBD type: string x-spec-enum-id: 8cd3a9d2ed8d5378 description:The type of business this account related to. The business type can only be provided for business accounts.
x-enum-descriptions: SOLE_TRADER: Sole trader LTD: Limited PTY_LTD: Proprietary Limited Company PARTNERSHIP: Partnership CHARITY: Charity PLC: Public limited company LLP: Limited liability partnership TRUST: Trust TRADING_AS: Trading as GOVERNMENT: Government NON_PROFIT: Non profit CHURCH: Church HOMEOWNER_ASSOCIATION: Homeowner association TBD: To be determined company_name: type: string description:The company name for a business account.
maxLength: 255 company_number: type: string description:The company number for a business account.
maxLength: 100 x-validators: - name: Validate company number description: Validate the company number and standardize its format. possible_errors: - invalid_company_number details: type: array items: $ref: '#/components/schemas/BusinessDetail' description:Generic solution for storing additional business data that is not covered by the other fields in the payload. This is often in the form of market or territory specific information. Keys must be registered in Kraken and will have a value type the value for the key must confirm to.
x-validators: - name: Validate that each child has unique values for thekey field
description: Validate that each child has unique values for the key field.
possible_errors:
- children_with_duplicate_values
legal_address:
allOf:
- $ref: '#/components/schemas/Address'
description: The legal address for the business.
partner_file_attachments: type: array items: $ref: '#/components/schemas/PartnerFileAttachment' description:The list of S3 paths for documents to be attached to the Partner Organisation. These files must already be uploaded to S3
partner_organisations: type: array items: $ref: '#/components/schemas/PartnerOrganisation' description:List of partner organisations associated with the business.
payment_instructions: type: array items: $ref: '#/components/schemas/CardAndBankAccountPaymentInstruction' description:List of payment instructions to create for the business.
portfolios: type: array items: $ref: '#/components/schemas/BusinessPortfolio' description:Information about the portfolios associated with this business.
segment_name: x-spec-enum-id: 4f53cda18c2baa0c description:The segment to which the business belongs.
x-comment: Choices for this field are dynamic, once appropriate values have been configured they will be rendered here. users: type: array items: $ref: '#/components/schemas/BusinessUser' description:List of the business users associated with the business.
required: - business_contracts x-validators: - name: Validate that values are unique in Kraken for unique registered keys description: Validate that keys with unique constraints do not already have provided value in Kraken. possible_errors: - business_detail_value_exists_for_unique_key CharacteristicOverrideConfiguration: type: object properties: term_type: type: string description:The type of the contract term.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
overrides: type: array items: $ref: '#/components/schemas/CharacteristicOverride' description:The characterisctics associated with the characterisctic override.
required: - overrides - term_type LatePaymentFees: type: object properties: term_type: type: string description:The type of the contract term.
flat_fee_amount: type: integer minimum: 0 description:The flat amount added to each late payment fee, in the lowest denomination for the currency.
interest_policy_name: enum: - '' - RBA type: string x-spec-enum-id: 755d70bd45dbabbb description:The interest policy to use for late payment fee calculations.
x-enum-descriptions: ? '' : '---------' RBA: RBA is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
percentage_fee: type: string format: decimal pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ description:The percentage fee to be applied as part of the late payment fee calculations.
percentage_interval_days: type: integer minimum: 0 description:The interval the percentage fee rate represents in days (365 = annual).
required: - flat_fee_amount - percentage_fee - percentage_interval_days - term_type Note: type: object properties: body: type: string description:The body of the note. Should include who/what created the note if this is required.
created_at: type: string format: date-time description:The date and time the note was created.
document_paths: type: array items: $ref: '#/components/schemas/NoteDocument' description:A list of relative paths in S3 for documents to be attached to the note.
More details on document path parameters can be found here.
external_id: type: string description:Unique identifier for this note to avoid duplicate entries.
is_archived: type: boolean description:If set to true, this will archive the note in the Kraken account support site page.
is_pinned: type: boolean description:If set to true, this will pin the note to the top of the Kraken account support site page.
unpin_at: type: string format: date-time description:When the pinned note should be unpinned. Has to be later than created_at if this is provided. Has no effect if the note is not pinned.
The type of tax adjustment (EXEMPTION or REDUCTION).
x-enum-descriptions: EXEMPTION: Exemption REDUCTION: Reduction effective_from_date: type: string format: date description:The date the tax adjustment is effective from.
effective_to_date: type: - string - 'null' format: date description:The date the tax adjustment is effective to (inclusive, optional).
qualifying_usage: type: string format: decimal pattern: ^-?\d{0,1}(?:\.\d{0,2})?$ description:The normalised percentage of energy use on the supply point that qualifies for the tax adjustment (between 0 and 1).
supply_point_external_identifier: type: string description:The external identifier of the supply point this tax adjustment applies to.
maxLength: 255 tax_category: type: string description:The category of tax this adjustment applies to.
maxLength: 50 tax_subcategory: type: string default: '' description:The subcategory of tax this adjustment applies to (optional).
maxLength: 50 required: - adjustment_type - effective_from_date - qualifying_usage - supply_point_external_identifier - tax_category x-validators: - name: Convert supply point external identifier to ID description: Convert the supply point external identifier to the internal supply point ID by looking up the supply point in the database. possible_errors: - supply_point_not_found - name: Validateeffective_to not before effective_from
description: Validates that effective_to, if given, is on or later than effective_from.
possible_errors:
- start_date_later_than_end_date
CustomerAlternativeNumber:
type: object
properties:
phone_number:
type:
- string
- 'null'
default: ''
description: A customer's alternative phone number.
maxLength: 32 x-validators: - name: Validate phone number description: Validates that a phone number conforms to the norms of the region from which the migration is taking place. possible_errors: - invalid_phone_number PartnerOrganisation: type: object properties: organisation_number: type: string description:Identifier of the partner organisation.
maxLength: 128 x-validators: - name: Validateorganisation_number
description: Validate that the given organisation_number has a corresponding organisation registered in the database.
possible_errors:
- partner_organisation_does_not_exist
role:
enum:
- G_LOA
type: string
x-spec-enum-id: 7e197ea5273e96fb
description: The type of role the partner organisation plays.
x-enum-descriptions: G_LOA: General Letter of Authority source_reference_s3_key: type: string description:The s3 key of the partner file attachment that governs this organisation relationship.
valid_from: type: string format: date-time description:The beginning of the validity period of this organisation relationship.
valid_to: type: string format: date-time description:The end of the validity period of this organisation relationship.
required: - organisation_number - role - valid_from - valid_to x-validators: - name: Validatevalid_to not before valid_from
description: Validates that valid_to, if given, is on or later than valid_from.
possible_errors:
- start_date_later_than_end_date
BusinessContract:
type: object
properties:
identifier:
type: string
description: The contract's unique identifier.
x-validators: - name: Validates that a contract with the given identifier does not exist description: Validates that there is not an existing contract in Kraken with the same identifier provided in the payload. possible_errors: - contract_with_identifier_exists sales_record: allOf: - $ref: '#/components/schemas/ContractSalesRecord' description:Sales record details about the contract.
signed_at_date: type: string format: date description:The date on which the contract was signed.
valid_from_date: type: string format: date description: 'The date from which the contract is valid. This is an inclusive date. Example: If valid_from is October 1, 2024, then the contract is valid on October 1, 2024 and following dates.
The date on which the contract expires. This is an exclusive date. Example: If valid_to is October 1, 2025, then the contract is not valid on October 1, 2025 or following dates.
The versions of this contract, each version is a collection of terms and the date they are applicable. Only two versions can be provided, one which starts on the same date as the contract is valid from and one other future dated version to be scheduled.
required: - identifier - signed_at_date - valid_from_date x-validators: - name: Validate that contract versions include a version for the current terms description: Validate that the earliest version in the list of contract versions provided has anapplicable_at_date that is equal to the contract valid_from_date.
possible_errors:
- contract_versions_does_not_include_current
ContractedVolumePeriod:
type: object
properties:
market_name:
enum:
- AUS_EMBEDDED_GAS
- AUS_EMBEDDED_UNMETERED_ELECTRICITY
- AUS_SOLAR_PPA
- AUS_EMBEDDED_UNMETERED_GAS
- AUS_EMBEDDED_ELECTRICITY
- SIMPLE_SERVICES
- AUS_ELECTRICITY
- AUS_EMBEDDED_WATER
- AUS_GAS
type: string
x-spec-enum-id: 2efb600dcd89ea97
description: The market name for the contracted volume.
x-enum-descriptions: AUS_EMBEDDED_GAS: AUS_EMBEDDED_GAS AUS_EMBEDDED_UNMETERED_ELECTRICITY: AUS_EMBEDDED_UNMETERED_ELECTRICITY AUS_SOLAR_PPA: AUS_SOLAR_PPA AUS_EMBEDDED_UNMETERED_GAS: AUS_EMBEDDED_UNMETERED_GAS AUS_EMBEDDED_ELECTRICITY: AUS_EMBEDDED_ELECTRICITY SIMPLE_SERVICES: SIMPLE_SERVICES AUS_ELECTRICITY: AUS_ELECTRICITY AUS_EMBEDDED_WATER: AUS_EMBEDDED_WATER AUS_GAS: AUS_GAS unit: type: string description:The units for the contracted volume.
valid_from_date: type: string format: date description:The datetime the contracted volume is valid from.
valid_to_date: type: string format: date description:The datetime the contracted volume is valid to.
value: type: string format: decimal pattern: ^-?\d{0,7}(?:\.\d{0,4})?$ description:The value of the contracted volume.
required: - market_name - unit - valid_from_date - valid_to_date - value x-validators: - name: Validatevalid_to not before valid_from
description: Validates that valid_to, if given, is on or later than valid_from.
possible_errors:
- start_date_later_than_end_date
BusinessPortfolio:
type: object
properties:
billing_name:
type: string
description: Optional billing name to be used on the account. If provided, it will be used for producing statements. If not, the customer names will be used.
maxLength: 510 notes: type: array items: $ref: '#/components/schemas/Note' description:List of notes that should be applied at the portfolio level instead of the individual account.
portfolio_references: type: array items: $ref: '#/components/schemas/PortfolioReference' description:List of references to the portfolio that this account belongs to.
minItems: 1 portfolio_settings: allOf: - $ref: '#/components/schemas/PortfolioSettings' description:This object allows for setting portfolio settings during data migration. This object is only available where the is_portfolio_lead flag is true. Any other account type will fail validation.
The type of the contract term.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
market_configs: type: array items: $ref: '#/components/schemas/CorrectivePeriodMarketConfig' description:Market configurations for corrective periods
minItems: 1 required: - market_configs - term_type BillDueDate: type: object properties: term_type: type: string description:The type of the contract term.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
number_of_days: type: integer minimum: 0 description:The number of days added to the issuance date to determine the due date.
type_of_days: enum: - WORKING - CALENDAR type: string x-spec-enum-id: ca64884b18199022 description: data-import--field-definition--bill-due-date--type-of-days--html x-enum-descriptions: WORKING: Working days CALENDAR: Calendar days required: - number_of_days - term_type - type_of_days ProductRateOverrideItemByVariantProfile: type: object properties: characteristic_values: type: object description:The characteristic values of the product rate override item.
x-validators: - name: Validate provided dictionary content types description: Validates that provided dictionary contents are of the specified key type and value type. possible_errors: [] price_per_unit: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,5})?$ description:The override rate of the item.
product_code: type: string description:The product code of the item.
x-validators: - name: Validate product code exists description: Validate that the product code exists in Kraken. possible_errors: - product_code_does_not_exist rate_specification_code: type: string description:The rate specification code of the item.
scheme_labels: type: object description:The scheme labels of the product rate override item.
x-validators: - name: Validate provided dictionary content types description: Validates that provided dictionary contents are of the specified key type and value type. possible_errors: [] required: - price_per_unit - product_code - rate_specification_code x-validators: - name: Validate that the rate band is valid for the product code description: Validate that the rate band provided matches the rate band for the product's rates with the provided product code. possible_errors: - characteristic_code_not_found - invalid_characteristic_value - invalid_variant_profile_for_product - product_specification_not_found_for_product - rate_specification_not_found_for_product RateGroupEligibilityConfiguration: type: object properties: term_type: type: string description:The type of the contract term.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
schedules: type: array items: $ref: '#/components/schemas/RateGroupEligibilitySchedule' description:Rate group eligibility schedules.
time_series_specification_schedules: type: array items: $ref: '#/components/schemas/TimeSeriesSpecificationEligibilitySchedule' description:Shared rate eligibility schedules.
required: - schedules - term_type - time_series_specification_schedules TerminationFee: type: object properties: term_type: type: string description:The type of the contract term.
amount: type: integer description:The fee amount in the lowest currency unit. For example, this amount could be represented in cents, pence, etc.
fee_type: enum: - FLAT - WHOLE_MONTHS_REMAINING - WHOLE_DAYS_REMAINING type: string x-spec-enum-id: ac778cd433d63345 description:The type, or nature, of the fee. For example, the fee can be flat or pertain to the amount of time remaining in the contract.
x-enum-descriptions: FLAT: contracts--terms--termination-fee-fee-type-flat WHOLE_MONTHS_REMAINING: Per month remaining WHOLE_DAYS_REMAINING: Per day remaining is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
supply_type: enum: - ELECTRICITY - GAS - UNMETERED_GAS - UNMETERED_ELECTRICITY - EMBEDDED_WATER - EMBEDDED_ELECTRICITY - EMBEDDED_GAS - SOLAR_PPA type: string x-spec-enum-id: b30233ba99cda713 description:The supply type being terminated.
x-enum-descriptions: ELECTRICITY: Electricity GAS: Gas UNMETERED_GAS: Unmetered Gas UNMETERED_ELECTRICITY: Unmetered Electricity EMBEDDED_WATER: Embedded Water EMBEDDED_ELECTRICITY: Embedded Electricity EMBEDDED_GAS: Embedded Gas SOLAR_PPA: Solar PPA required: - amount - fee_type - term_type x-validators: - name: Validate thatsupply_type and market_name are not both provided
description: Validate that supply_type and market_name are not both provided.
possible_errors:
- fields_are_mutually_exclusive
PaymentInstructionBankAccount:
type: object
properties:
account_holder:
type: string
description: The name of the account holder on the bank account.
maxLength: 255 account_number: type: string description:The account number for the bank account.
iban: type: string description:The iban code for the bank account.
sort_code: type: string description:The sort code for the bank account.
required: - account_holder - account_number MinimumContractLength: type: object properties: term_type: type: string description:The type of the contract term.
contract_identifier: type: string description:Unique identifier of the contract.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
length: type: integer minimum: 1 description:Minimum length of the contract.
unit_of_time: enum: - WEEK - MONTH - YEAR type: string x-spec-enum-id: 2dd8361d760ce9df description:Unit of time used to measure the length of the contract.
x-enum-descriptions: WEEK: Week MONTH: Month YEAR: Year required: - contract_identifier - length - term_type - unit_of_time ContractedVolumeConfiguration: type: object properties: term_type: type: string description:The type of the contract term.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
periods: type: array items: $ref: '#/components/schemas/ContractedVolumePeriod' description:A list of contracted volume periods.
minItems: 1 x-validators: - name: Validate periods do not overlap per market description: Validate that sequential contracted volume periods for the same market do not overlap possible_errors: - overlapping_contracted_volume_periods required: - periods - term_type ProductRateOverrideConfiguration: type: object properties: term_type: type: string description:The type of the contract term.
indexation_options: allOf: - $ref: '#/components/schemas/IndexationOption' description:The indexation options for the product rate override.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
schedules: type: array items: $ref: '#/components/schemas/ProductRateOverrideSchedule' description:The schedule associated with the product rate override.
required: - schedules - term_type ContractVersion: type: object properties: applicable_at_date: type: string format: date description:The date on which this contract version become applicable at.
terms: type: array items: $ref: '#/components/schemas/Terms' description:The terms for this version of the contract.
required: - applicable_at_date - terms IndexationOption: type: object properties: escalation_start_date: type: string format: date description:Date the indexation applies from.
index_code: type: string description:The code for the relevant index.
required: - escalation_start_date - index_code EffectivePeriod: type: object properties: end_date: type: string format: date description:The effective period end date (exclusive).
start_date: type: string format: date description:The effective period start date (inclusive).
required: - start_date PromotionAssignmentTarget: type: object properties: displayed_on_bill: type: boolean default: true description:Whether this discount should be displayed as a line item on customer bills. Defaults to true. Set to false to hide the discount from bills while still applying it.
The identifier for the target. Format is <product_specification_identifier>:<specification_code> (e.g., for rate specifications or shared rates).
Optional configuration data used by rate providers to resolve discount rates. The structure depends on the rate provider (e.g., {"bespoke_amount": "0.05"} for bespoke rates).
The type of target being discounted. Use rate_specification to target a product catalog rate specification, or shared_rate to target a shared rate.
The type of the contract term.
amount: type: integer minimum: 0 description:The amount set up as collateral as condition for account creation.
interest_policy: type: string description:The type of interest policy of required collateral.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
reason: type: string description:The reason for setting up required collateral.
required: - amount - reason - term_type DelayerDays: type: object properties: term_type: type: string description:The type of the contract term.
days: type: integer minimum: 1 description:The number of days between when a reactive payment is triggered and when it should be taken.
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
strategy: enum: - FIXED - WORKING_DAYS type: string x-spec-enum-id: b62f1d43e0839f86 description:The strategy used to count the delayer days.
x-enum-descriptions: FIXED: Calendar days WORKING_DAYS: Working days required: - days - strategy - term_type CharacteristicOverride: type: object properties: characteristic_code: type: string description:The code for the characteristic.
override_value: description:The override value for the characteristic.
product_code: type: - string - 'null' description:Optional product code. If specified, the override applies only to this product.
x-validators: - name: Validate product code exists description: Validate that the product code exists in Kraken. possible_errors: - product_code_does_not_exist required: - characteristic_code - override_value x-validators: - name: Validate characterisctic code exist description: Validate that the characterisctic code exists in Kraken. possible_errors: - characteristic_code_not_found - name: null description: null possible_errors: - invalid_characteristic_for_product BespokeRateItem: type: object properties: identifier: type: - string - 'null' description:A unique identifier for the bespoke rate item.
price_per_unit: type: string format: decimal pattern: ^-?\d{0,11}(?:\.\d{0,8})?$ description:The price per unit of the bespoke rate.
rate_specification_code: type: string description:The rate specification code for the bespoke rate.
rate_specification_type: enum: - PRODUCT_RATE - SHARED_RATE - null type: - string - 'null' x-spec-enum-id: 94c4191a865cda34 default: PRODUCT_RATE description:The rate specification type for the bespoke rate.
x-enum-descriptions: PRODUCT_RATE: Product rate SHARED_RATE: Shared rate None: None variant_profile: allOf: - $ref: '#/components/schemas/VariantProfile' description:The variant profile which the rate applies to.
required: - price_per_unit - rate_specification_code - variant_profile PortfolioReference: type: object properties: namespace: enum: - external-portfolio-reference-id - portfolio-label type: string x-spec-enum-id: 9c7783add2be9a67 description:The namespace refers to the particular context the reference exists in. This must be one of the following options below if a portfolio reference is being provided.
x-enum-descriptions: external-portfolio-reference-id: external-portfolio-reference-id portfolio-label: portfolio-label value: type: string description:The unique identifier for the portfolio.
maxLength: 100 required: - namespace - value DRFError: type: object description: Simplistic and mostly inaccurate Serializer that should represent DRF's ValidationError details properties: field_name: type: array items: type: string description: Validation error messages. TrancheTargetResidualFee: type: object properties: term_type: type: string description:The type of the contract term.
contract_identifier: type: string description:Contract identifier
is_variable: type: boolean default: true description:Whether the contract term is variable in Kraken or not. If not, it must be amended by a new contract.
markets: type: array items: $ref: '#/components/schemas/TrancheTargetResidualFeeMarket' description:Markets
required: - contract_identifier - markets - term_type securitySchemes: DRFKrakenTokenAuthentication: type: apiKey in: header name: Authorization description: JWT-based authentication DataImportViewerAPIKeyAuthentication: type: apiKey in: header name: Authorization description: Token-based authentication with required prefix "Token "