@epilot/sdk 2.19.6 → 2.19.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/billing.json +8 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.d.cts +2 -2
- package/dist/apis/billing.d.ts +2 -2
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{billing-MN36KAKQ.cjs → billing-CKCFSK6K.cjs} +1 -1
- package/dist/{billing-UAVEPNBZ.js → billing-UJ6I7FPG.js} +1 -1
- package/dist/{billing.d-Blv16_el.d.cts → billing.d-DA3sViEF.d.cts} +25 -0
- package/dist/{billing.d-Blv16_el.d.ts → billing.d-DA3sViEF.d.ts} +25 -0
- package/dist/{chunk-QVK7PWME.cjs → chunk-NTRNKUXE.cjs} +1 -1
- package/dist/{chunk-2NCWQL55.js → chunk-VV2VFPUQ.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/billing.md +6 -0
- package/package.json +1 -1
package/dist/apis/workflow.cjs
CHANGED
|
@@ -6,25 +6,25 @@ var _chunkPM25LLETcjs = require('../chunk-PM25LLET.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkNTRNKUXEcjs = require('../chunk-NTRNKUXE.cjs');
|
|
10
10
|
require('../chunk-NJK5F5TF.cjs');
|
|
11
11
|
|
|
12
12
|
// src/apis/workflow.ts
|
|
13
13
|
var loadDefinition = () => {
|
|
14
14
|
const mod = _chunkPM25LLETcjs.require_workflow_runtime.call(void 0, );
|
|
15
|
-
return
|
|
15
|
+
return _chunkNTRNKUXEcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
16
16
|
};
|
|
17
17
|
var _instance = null;
|
|
18
18
|
var resolve = () => {
|
|
19
19
|
if (!_instance) {
|
|
20
20
|
const def = loadDefinition();
|
|
21
|
-
_instance =
|
|
21
|
+
_instance = _chunkNTRNKUXEcjs.createApiClient.call(void 0, { definition: def, apiName: "workflow" });
|
|
22
22
|
}
|
|
23
23
|
return _instance;
|
|
24
24
|
};
|
|
25
|
-
var _handle =
|
|
25
|
+
var _handle = _chunkNTRNKUXEcjs.createApiHandle.call(void 0, {
|
|
26
26
|
resolveClient: resolve,
|
|
27
|
-
createClient: () =>
|
|
27
|
+
createClient: () => _chunkNTRNKUXEcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "workflow" }),
|
|
28
28
|
apiName: "workflow"
|
|
29
29
|
});
|
|
30
30
|
var getClient = _handle.getClient;
|
|
@@ -35,4 +35,4 @@ var workflow = _handle;
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.authorize =
|
|
38
|
+
exports.authorize = _chunkNTRNKUXEcjs.authorize; exports.createClient = createClient; exports.getClient = getClient; exports.workflow = workflow;
|
package/dist/apis/workflow.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
2
|
|
|
3
3
|
// src/docs/billing.json
|
|
4
|
-
var billing_default = '# Billing API\n\n- **Base URL:** `https://billing.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/billing](https://docs.epilot.io/api/billing)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.billing.getBillingEvents(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/billing\'\n\nconst billingClient = getClient()\nauthorize(billingClient, () => \'<token>\')\nconst { data } = await billingClient.getBillingEvents(...)\n```\n\n## Operations\n\n**Billing Events**\n- [`getBillingEvents`](#getbillingevents)\n- [`createBillingEvent`](#createbillingevent)\n- [`getBillingEvent`](#getbillingevent)\n- [`updateBillingEvent`](#updatebillingevent)\n- [`deleteBillingEvent`](#deletebillingevent)\n- [`getBillingEventByExternalId`](#getbillingeventbyexternalid)\n\n**Contracts**\n- [`createContractEntity`](#createcontractentity)\n- [`updateContractEntity`](#updatecontractentity)\n- [`deleteContractEntity`](#deletecontractentity)\n\n**Pricing Information**\n- [`getContractPricingInformation`](#getcontractpricinginformation)\n- [`getBillingAccountPricingInformation`](#getbillingaccountpricinginformation)\n\n**Configuration History**\n- [`getContractConfigurationHistory`](#getcontractconfigurationhistory)\n- [`getBillingAccountConfigurationHistory`](#getbillingaccountconfigurationhistory)\n\n**Balance**\n- [`getCustomerBalance`](#getcustomerbalance)\n\n**Schemas**\n- [`Error`](#error)\n- [`BaseEntity`](#baseentity)\n- [`EntityId`](#entityid)\n- [`EntitySlug`](#entityslug)\n- [`EntityRelationItem`](#entityrelationitem)\n- [`BaseBillingEvent`](#basebillingevent)\n- [`BillingEvent`](#billingevent)\n- [`BillingEventUpdate`](#billingeventupdate)\n- [`InstallmentEvent`](#installmentevent)\n- [`PaymentEvent`](#paymentevent)\n- [`ReimbursementEvent`](#reimbursementevent)\n- [`DunningFeeEvent`](#dunningfeeevent)\n- [`InvoiceEvent`](#invoiceevent)\n- [`FinalBillEvent`](#finalbillevent)\n- [`BonusEvent`](#bonusevent)\n- [`CorrectionEvent`](#correctionevent)\n- [`CustomEvent`](#customevent)\n- [`Contract`](#contract)\n- [`ContractItem`](#contractitem)\n- [`InstallmentAmountValue`](#installmentamountvalue)\n- [`PriceContext`](#pricecontext)\n- [`DynamicTariffPriceContext`](#dynamictariffpricecontext)\n- [`ConfigurationHistoryContext`](#configurationhistorycontext)\n- [`ContractTariffContext`](#contracttariffcontext)\n- [`ContractPricingContext`](#contractpricingcontext)\n- [`ConfigurationHistoryRowBase`](#configurationhistoryrowbase)\n- [`InstallmentAmountChangedHistoryRow`](#installmentamountchangedhistoryrow)\n- [`ContractPricingChangedHistoryRow`](#contractpricingchangedhistoryrow)\n- [`ConfigurationHistoryRow`](#configurationhistoryrow)\n- [`ConfigurationHistoryResponse`](#configurationhistoryresponse)\n- [`PricingInformationBalance`](#pricinginformationbalance)\n- [`ContractPricingSchedule`](#contractpricingschedule)\n- [`ContractPricingInformation`](#contractpricinginformation)\n- [`BillingAccountPricingInformation`](#billingaccountpricinginformation)\n- [`Balance`](#balance)\n- [`Currency`](#currency)\n\n### `getBillingEvents`\n\nRetrieve and filter billing events (Buchungss\xE4tze) such as installments (Abschlagszahlungen),\npayments (Zahlungseing\xE4nge), and reimbursements (R\xFCckerstattungen).\n\n`GET /v1/billing/events`\n\n```ts\nconst { data } = await client.getBillingEvents({\n from: 1,\n size: 1,\n entity_id: [\'...\'],\n contact_id: \'example\',\n event_type: \'example\',\n date_after: \'example\',\n date_before: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 42,\n "results": [\n {\n "type": "installment",\n "direction": "debit",\n "note": "July power & gas installment payment",\n "status": "open",\n "booking_date": "2025-07-10",\n "due_date": "2025-07-10",\n "billing_amount": 5000,\n "billing_amount_decimal": "50.00",\n "billing_currency": "EUR"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createBillingEvent`\n\nCreate a new billing event (Buchungssatz) such as an installment (Abschlagszahlung),\npayment (Zahlungseingang), or reimbursement (R\xFCckerstattung).\n\n`POST /v1/billing/events`\n\n```ts\nconst { data } = await client.createBillingEvent(\n null,\n {\n type: \'installment\',\n direction: \'debit\',\n note: \'July power & gas installment payment\',\n status: \'open\',\n booking_date: \'2025-07-10\',\n due_date: \'2025-07-10\',\n billing_amount: 5000,\n billing_amount_decimal: \'50.00\',\n billing_currency: \'EUR\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "installment",\n "direction": "debit",\n "note": "July power & gas installment payment",\n "status": "open",\n "booking_date": "2025-07-10",\n "due_date": "2025-07-10",\n "billing_amount": 5000,\n "billing_amount_decimal": "50.00",\n "billing_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `getBillingEvent`\n\nRetrieve a single billing event (Buchungssatz) by its unique ID.\n\n`GET /v1/billing/events/{id}`\n\n```ts\nconst { data } = await client.getBillingEvent({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "installment",\n "direction": "debit",\n "note": "July power & gas installment payment",\n "status": "open",\n "booking_date": "2025-07-10",\n "due_date": "2025-07-10",\n "billing_amount": 5000,\n "billing_amount_decimal": "50.00",\n "billing_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `updateBillingEvent`\n\nUpdate an existing billing event (Buchungssatz).\n\n`PATCH /v1/billing/events/{id}`\n\n```ts\nconst { data } = await client.updateBillingEvent(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n type: \'installment\',\n direction: \'debit\',\n billing_amount: 10000,\n billing_amount_decimal: \'100.00\',\n billing_currency: \'EUR\',\n external_id: \'SAP-54321\',\n contract: {\n $relation: [\n {\n entity_id: \'f589786b-3024-43cd-9cb3-5a3c953f2896\'\n }\n ]\n },\n booking_date: \'2025-06-15\',\n due_date: \'2025-06-30\',\n paid_date: \'2025-06-15T10:00:00Z\',\n status: \'closed\',\n related_event: \'d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e\',\n external_link: {\n href: \'https://billing.example.com/invoices/12345\',\n title: \'Invoice 12345\'\n },\n attachments: {\n $relation: [\n {\n entity_id: \'f589786b-3024-43cd-9cb3-5a3c953f2896\'\n }\n ]\n },\n note: \'Teilzahlung f\xFCr Abschlag Juni\',\n internal_note: \'R\xFCckmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 \xFCbernommen\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "installment",\n "direction": "debit",\n "note": "July power & gas installment payment",\n "status": "open",\n "booking_date": "2025-07-10",\n "due_date": "2025-07-10",\n "billing_amount": 5000,\n "billing_amount_decimal": "50.00",\n "billing_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `deleteBillingEvent`\n\nDelete an existing billing event (Buchungssatz).\n\n`DELETE /v1/billing/events/{id}`\n\n```ts\nconst { data } = await client.deleteBillingEvent({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getBillingEventByExternalId`\n\nRetrieve a billing event (Buchungssatz) by its external system identifier.\n\n`GET /v1/billing/external/{external_id}`\n\n```ts\nconst { data } = await client.getBillingEventByExternalId({\n external_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "installment",\n "direction": "debit",\n "note": "July power & gas installment payment",\n "status": "open",\n "booking_date": "2025-07-10",\n "due_date": "2025-07-10",\n "billing_amount": 5000,\n "billing_amount_decimal": "50.00",\n "billing_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `createContractEntity`\n\nCreate a new contract entity (Vertrag) for billing purposes.\n\n`POST /v1/billing/contracts`\n\n```ts\nconst { data } = await client.createContractEntity(\n null,\n {\n _id: \'5da0a718-c822-403d-9f5d-20d4584e0528\',\n _title: \'Abschlagszahlung Juli 2025\',\n _org: \'123456\',\n _schema: \'billing_event\',\n _tags: [\'billing\', \'energy\'],\n _created_at: \'2025-06-15T10:30:00Z\',\n _updated_at: \'2025-06-15T14:45:00Z\',\n contract_name: \'Stromvertrag Haushalt\',\n contract_number: \'STR-2025-001234\',\n status: \'active\',\n description: \'Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie\',\n account_number: \'KD-67890\',\n branch: \'power\',\n billing_address: \'Musterstra\xDFe 123, 50667 K\xF6ln\',\n delivery_address: \'Musterstra\xDFe 123, 50667 K\xF6ln\',\n additional_addresses: \'Postfach 456, 50668 K\xF6ln\',\n termination_date: \'2025-12-31\',\n termination_reason: \'Kundenk\xFCndigung\',\n billing_period: \'monthly\',\n billing_duration_amount: 30,\n renewal_duration_amount: 12,\n renewal_duration_unit: \'months\',\n notice_time_amount: 30,\n notice_time_unit: \'months\',\n start_date: \'2025-01-01\',\n billing_due_day: 15,\n installment_amount: 8500,\n balance: 8990,\n balance_currency: \'EUR\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",\n "_title": "Abschlagszahlung Juli 2025",\n "_org": "123456",\n "_schema": "billing_event",\n "_tags": ["billing", "energy"],\n "_created_at": "2025-06-15T10:30:00Z",\n "_updated_at": "2025-06-15T14:45:00Z",\n "contract_name": "Stromvertrag Haushalt",\n "contract_number": "STR-2025-001234",\n "status": "active",\n "description": "Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie",\n "account_number": "KD-67890",\n "branch": "power",\n "billing_address": "Musterstra\xDFe 123, 50667 K\xF6ln",\n "delivery_address": "Musterstra\xDFe 123, 50667 K\xF6ln",\n "additional_addresses": "Postfach 456, 50668 K\xF6ln",\n "termination_date": "2025-12-31",\n "termination_reason": "Kundenk\xFCndigung",\n "billing_period": "monthly",\n "billing_duration_amount": 30,\n "renewal_duration_amount": 12,\n "renewal_duration_unit": "months",\n "notice_time_amount": 30,\n "notice_time_unit": "months",\n "start_date": "2025-01-01",\n "billing_due_day": 15,\n "installment_amount": 8500,\n "balance": 8990,\n "balance_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `updateContractEntity`\n\nUpdate an existing contract entity (Vertrag).\n\n`PATCH /v1/billing/contracts/{id}`\n\n```ts\nconst { data } = await client.updateContractEntity(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n _id: \'5da0a718-c822-403d-9f5d-20d4584e0528\',\n _title: \'Abschlagszahlung Juli 2025\',\n _org: \'123456\',\n _schema: \'billing_event\',\n _tags: [\'billing\', \'energy\'],\n _created_at: \'2025-06-15T10:30:00Z\',\n _updated_at: \'2025-06-15T14:45:00Z\',\n contract_name: \'Stromvertrag Haushalt\',\n contract_number: \'STR-2025-001234\',\n status: \'active\',\n description: \'Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie\',\n account_number: \'KD-67890\',\n branch: \'power\',\n billing_address: \'Musterstra\xDFe 123, 50667 K\xF6ln\',\n delivery_address: \'Musterstra\xDFe 123, 50667 K\xF6ln\',\n additional_addresses: \'Postfach 456, 50668 K\xF6ln\',\n termination_date: \'2025-12-31\',\n termination_reason: \'Kundenk\xFCndigung\',\n billing_period: \'monthly\',\n billing_duration_amount: 30,\n renewal_duration_amount: 12,\n renewal_duration_unit: \'months\',\n notice_time_amount: 30,\n notice_time_unit: \'months\',\n start_date: \'2025-01-01\',\n billing_due_day: 15,\n installment_amount: 8500,\n balance: 8990,\n balance_currency: \'EUR\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",\n "_title": "Abschlagszahlung Juli 2025",\n "_org": "123456",\n "_schema": "billing_event",\n "_tags": ["billing", "energy"],\n "_created_at": "2025-06-15T10:30:00Z",\n "_updated_at": "2025-06-15T14:45:00Z",\n "contract_name": "Stromvertrag Haushalt",\n "contract_number": "STR-2025-001234",\n "status": "active",\n "description": "Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie",\n "account_number": "KD-67890",\n "branch": "power",\n "billing_address": "Musterstra\xDFe 123, 50667 K\xF6ln",\n "delivery_address": "Musterstra\xDFe 123, 50667 K\xF6ln",\n "additional_addresses": "Postfach 456, 50668 K\xF6ln",\n "termination_date": "2025-12-31",\n "termination_reason": "Kundenk\xFCndigung",\n "billing_period": "monthly",\n "billing_duration_amount": 30,\n "renewal_duration_amount": 12,\n "renewal_duration_unit": "months",\n "notice_time_amount": 30,\n "notice_time_unit": "months",\n "start_date": "2025-01-01",\n "billing_due_day": 15,\n "installment_amount": 8500,\n "balance": 8990,\n "balance_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `deleteContractEntity`\n\nDelete an existing contract entity (Vertrag).\n\n`DELETE /v1/billing/contracts/{id}`\n\n```ts\nconst { data } = await client.deleteContractEntity({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getContractPricingInformation`\n\nGet current pricing information and recent configuration history for a Contract.\n\n`GET /v1/billing/contracts/{id}/pricing_information`\n\n```ts\nconst { data } = await client.getContractPricingInformation({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n history_change_types: \'example\',\n include_history: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_type": "contract",\n "entity_id": "string",\n "title": "string",\n "current_installment_amount": {\n "amount": 10050,\n "amount_decimal": "100.50",\n "currency": "EUR"\n },\n "context": {\n "base_price": {\n "price_id": "string",\n "price_title": "string",\n "tariff_type": "string",\n "pricing_model": "string",\n "unit_amount_gross_decimal": "string",\n "unit_amount_net_decimal": "string",\n "before_discount_unit_amount_gross_decimal": "string",\n "before_discount_unit_amount_net_decimal": "string",\n "unit_discount_amount_decimal": "string",\n "unit_discount_amount_net_decimal": "string",\n "currency": "EUR",\n "billing_period": "string",\n "unit": "string",\n "has_discount": true,\n "is_dynamic_tariff": true,\n "dynamic_tariff": {}\n },\n "base_prices": [\n {}\n ],\n "working_price": {\n "price_id": "string",\n "price_title": "string",\n "tariff_type": "string",\n "pricing_model": "string",\n "unit_amount_gross_decimal": "string",\n "unit_amount_net_decimal": "string",\n "before_discount_unit_amount_gross_decimal": "string",\n "before_discount_unit_amount_net_decimal": "string",\n "unit_discount_amount_decimal": "string",\n "unit_discount_amount_net_decimal": "string",\n "currency": "EUR",\n "billing_period": "string",\n "unit": "string",\n "has_discount": true,\n "is_dynamic_tariff": true,\n "dynamic_tariff": {}\n },\n "working_prices": [\n {}\n ]\n },\n "balance": {\n "amount": 8990,\n "amount_decimal": "89.90",\n "currency": "EUR"\n },\n "schedule": {\n "billing_due_day": 0,\n "billing_period": "weekly",\n "installments_per_year": 0,\n "inferred": true\n },\n "pending_installment_change": true,\n "history": [\n {\n "event_id": "string",\n "org_id": "string",\n "entity_type": "contract",\n "entity_id": "string",\n "schema_version": 1,\n "effective_at": "1970-01-01T00:00:00.000Z",\n "changed_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "source": "portal",\n "source_label": "string",\n "source_system": "string",\n "source_reference": "string",\n "change_type": "installment_amount_changed",\n "previous_value": {},\n "new_value": {},\n "context": {}\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getBillingAccountPricingInformation`\n\nGet current pricing information for the active Contracts linked to a Billing Account.\n\n`GET /v1/billing/billing_accounts/{id}/pricing_information`\n\n```ts\nconst { data } = await client.getBillingAccountPricingInformation({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n history_change_types: \'example\',\n include_history: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_type": "billing_account",\n "entity_id": "string",\n "title": "string",\n "balance": {\n "amount": 8990,\n "amount_decimal": "89.90",\n "currency": "EUR"\n },\n "contracts": [\n {\n "entity_type": "contract",\n "entity_id": "string",\n "title": "string",\n "current_installment_amount": {},\n "context": {},\n "balance": {},\n "schedule": {},\n "pending_installment_change": true,\n "history": []\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getContractConfigurationHistory`\n\nGet billing configuration history for a Contract.\n\n`GET /v1/billing/contracts/{id}/configuration_history`\n\n```ts\nconst { data } = await client.getContractConfigurationHistory({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n change_type: \'example\',\n history_change_types: \'example\',\n from: 1,\n size: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "history": [\n {\n "event_id": "string",\n "org_id": "string",\n "entity_type": "contract",\n "entity_id": "string",\n "schema_version": 1,\n "effective_at": "1970-01-01T00:00:00.000Z",\n "changed_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "source": "portal",\n "source_label": "string",\n "source_system": "string",\n "source_reference": "string",\n "change_type": "installment_amount_changed",\n "previous_value": {},\n "new_value": {},\n "context": {}\n }\n ],\n "total": 0\n}\n```\n\n</details>\n\n---\n\n### `getBillingAccountConfigurationHistory`\n\nGet merged billing configuration history for active Contracts linked to a Billing Account.\n\n`GET /v1/billing/billing_accounts/{id}/configuration_history`\n\n```ts\nconst { data } = await client.getBillingAccountConfigurationHistory({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n change_type: \'example\',\n history_change_types: \'example\',\n from: 1,\n size: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "history": [\n {\n "event_id": "string",\n "org_id": "string",\n "entity_type": "contract",\n "entity_id": "string",\n "schema_version": 1,\n "effective_at": "1970-01-01T00:00:00.000Z",\n "changed_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "source": "portal",\n "source_label": "string",\n "source_system": "string",\n "source_reference": "string",\n "change_type": "installment_amount_changed",\n "previous_value": {},\n "new_value": {},\n "context": {}\n }\n ],\n "total": 0\n}\n```\n\n</details>\n\n---\n\n### `getCustomerBalance`\n\nRetrieve the total balance (Kontostand) across all contracts and orders for a customer.\n\n`GET /v1/billing/customers/{id}/balance`\n\n```ts\nconst { data } = await client.getCustomerBalance({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "balance": 8990,\n "balance_decimal": "89.90",\n "balance_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `Error`\n\nStandard error response format\n\n```ts\ntype Error = {\n error: string\n message: string\n}\n```\n\n### `BaseEntity`\n\nBase schema for all epilot entities with common system fields\n\n```ts\ntype BaseEntity = {\n _id?: string\n _title?: string\n _org?: string\n _schema?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n}\n```\n\n### `EntityId`\n\nUnique entity identifier (UUID format)\n\n```ts\ntype EntityId = string\n```\n\n### `EntitySlug`\n\nURL-friendly identifier for the entity schema (Schema-Slug)\n\n```ts\ntype EntitySlug = string\n```\n\n### `EntityRelationItem`\n\nReference to a related entity\n\n```ts\ntype EntityRelationItem = {\n entity_id?: string\n}\n```\n\n### `BaseBillingEvent`\n\nRepresents a single financial transaction entry (Buchungssatz) in the billing ledger.\nEach entry is either a debit or a credit, following double-entry accounting principles.\nCommon types include Abschlagszahlung (installment), Zahlungseingang (payment), R\xFCckerstattung (reimbursement), etc.\n\n\n```ts\ntype BaseBillingEvent = {\n _id?: string\n _title?: string\n _org?: string\n _schema?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n type: string\n direction?: "debit" | "credit"\n billing_amount: number\n billing_amount_decimal: string\n billing_currency: string\n external_id?: string\n contract: {\n $relation?: Array<{\n entity_id?: { ... }\n }>\n }\n booking_date: string // date\n due_date?: string // date\n paid_date?: string // date-time\n status?: "closed" | "open"\n related_event?: string\n external_link?: {\n href?: string // uri\n title?: string\n }\n attachments?: {\n $relation?: Array<{\n entity_id?: { ... }\n }>\n }\n note?: string\n internal_note?: string\n}\n```\n\n### `BillingEvent`\n\nCollection of supported billing event types (Buchungsarten).\nEach type represents a different kind of financial transaction\nthat affects the customer\'s balance.\n\n\n```ts\ntype BillingEvent = {\n type?: "installment"\n} | {\n type?: "payment"\n} | {\n type?: "reimbursement"\n} | {\n type?: "dunning_fee"\n} | {\n type?: "invoice"\n} | {\n type?: "final_bill"\n} | {\n type?: "bonus"\n} | {\n type?: "correction"\n} | {\n type?: string\n}\n```\n\n### `BillingEventUpdate`\n\nFields to update on an existing billing event.\n\n```ts\ntype BillingEventUpdate = {\n type?: string\n direction?: "debit" | "credit"\n billing_amount?: number\n billing_amount_decimal?: string\n billing_currency?: string\n external_id?: string\n contract?: {\n $relation?: Array<{\n entity_id?: { ... }\n }>\n }\n booking_date?: string // date\n due_date?: string // date\n paid_date?: string // date-time\n status?: "closed" | "open"\n related_event?: string\n external_link?: {\n href?: string // uri\n title?: string\n }\n attachments?: {\n $relation?: Array<{\n entity_id?: { ... }\n }>\n }\n note?: string\n internal_note?: string\n}\n```\n\n### `InstallmentEvent`\n\nInstallment billing event (Abschlagszahlung).\nRepresents a scheduled partial payment that the customer owes,\ntypically billed monthly for utilities like electricity or gas.\n\n\n```ts\ntype InstallmentEvent = {\n type?: "installment"\n}\n```\n\n### `PaymentEvent`\n\nPayment received event (Zahlungseingang).\nRepresents money received from the customer, reducing their balance.\nThis is a credit transaction.\n\n\n```ts\ntype PaymentEvent = {\n type?: "payment"\n}\n```\n\n### `ReimbursementEvent`\n\nReimbursement event (R\xFCckerstattung).\nRepresents a refund to the customer, typically after overpayment\nor billing correction. This is a credit transaction.\n\n\n```ts\ntype ReimbursementEvent = {\n type?: "reimbursement"\n}\n```\n\n### `DunningFeeEvent`\n\nDunning fee event (Mahngeb\xFChr).\nRepresents a late payment fee charged to the customer\nafter a payment reminder has been sent. This is a debit transaction.\n\n\n```ts\ntype DunningFeeEvent = {\n type?: "dunning_fee"\n}\n```\n\n### `InvoiceEvent`\n\n```ts\ntype InvoiceEvent = {\n type?: "invoice"\n}\n```\n\n### `FinalBillEvent`\n\nFinal bill event (Endabrechnung/Schlussrechnung).\nRepresents the final settlement when a contract ends,\naccounting for actual consumption vs. paid installments.\nCan be either debit (customer owes more) or credit (customer overpaid).\n\n\n```ts\ntype FinalBillEvent = {\n type?: "final_bill"\n}\n```\n\n### `BonusEvent`\n\nBonus/credit event (Gutschrift/Bonus).\nRepresents a promotional credit or bonus applied to the customer\'s account,\nsuch as welcome bonuses or loyalty rewards. This is a credit transaction.\n\n\n```ts\ntype BonusEvent = {\n type?: "bonus"\n}\n```\n\n### `CorrectionEvent`\n\nCorrection event (Korrekturbuchung).\nRepresents an adjustment to a previous billing entry,\nsuch as correcting an overcharge or undercharge.\nCan be either debit or credit depending on the correction.\n\n\n```ts\ntype CorrectionEvent = {\n type?: "correction"\n}\n```\n\n### `CustomEvent`\n\nCustom billing event (Benutzerdefinierte Buchung).\nAllows for organization-specific billing event types not covered\nby the standard types. Use a descriptive type name.\n\n\n```ts\ntype CustomEvent = {\n type?: string\n}\n```\n\n### `Contract`\n\nRepresents a customer contract (Vertrag) for billing purposes.\nContracts are the parent entities for billing events and contain\nbilling configuration such as installment amounts and billing cycles.\n\n\n```ts\ntype Contract = {\n _id?: string\n _title?: string\n _org?: string\n _schema?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n contract_name?: string\n contract_number?: string\n status?: "draft" | "in_approval_process" | "approved" | "active" | "deactivated" | "revoked" | "terminated" | "expired"\n description?: string\n account_number?: string\n branch?: "power" | "gas" | "water" | "waste_water" | "district_heating"\n billing_address?: string\n delivery_address?: string\n additional_addresses?: string\n termination_date?: string // date\n termination_reason?: string\n billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"\n billing_duration_amount?: number\n renewal_duration_amount?: number\n renewal_duration_unit?: "weeks" | "months" | "years"\n notice_time_amount?: number\n notice_time_unit?: "weeks" | "months" | "years"\n start_date?: string // date\n billing_due_day?: number\n installment_amount?: number\n balance?: number\n balance_currency?: string\n}\n```\n\n### `ContractItem`\n\nContract entity with all required system fields populated\n\n```ts\ntype ContractItem = {\n _id?: string\n _title?: string\n _org?: string\n _schema?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n contract_name?: string\n contract_number?: string\n status?: "draft" | "in_approval_process" | "approved" | "active" | "deactivated" | "revoked" | "terminated" | "expired"\n description?: string\n account_number?: string\n branch?: "power" | "gas" | "water" | "waste_water" | "district_heating"\n billing_address?: string\n delivery_address?: string\n additional_addresses?: string\n termination_date?: string // date\n termination_reason?: string\n billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"\n billing_duration_amount?: number\n renewal_duration_amount?: number\n renewal_duration_unit?: "weeks" | "months" | "years"\n notice_time_amount?: number\n notice_time_unit?: "weeks" | "months" | "years"\n start_date?: string // date\n billing_due_day?: number\n installment_amount?: number\n balance?: number\n balance_currency?: string\n}\n```\n\n### `InstallmentAmountValue`\n\n```ts\ntype InstallmentAmountValue = {\n amount?: number\n amount_decimal?: string\n currency?: string\n}\n```\n\n### `PriceContext`\n\n```ts\ntype PriceContext = {\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: string\n interval?: string\n average_price_decimal?: string\n markup_amount_decimal?: string\n markup_amount_net_decimal?: string\n markup_amount_gross_decimal?: string\n market_price_decimal?: string\n market_price_currency?: string\n market?: string\n bidding_zone?: string\n timestamp?: string\n }\n}\n```\n\n### `DynamicTariffPriceContext`\n\n```ts\ntype DynamicTariffPriceContext = {\n mode?: string\n interval?: string\n average_price_decimal?: string\n markup_amount_decimal?: string\n markup_amount_net_decimal?: string\n markup_amount_gross_decimal?: string\n market_price_decimal?: string\n market_price_currency?: string\n market?: string\n bidding_zone?: string\n timestamp?: string\n}\n```\n\n### `ConfigurationHistoryContext`\n\n```ts\ntype ConfigurationHistoryContext = {\n base_price?: {\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }\n base_prices?: Array<{\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }>\n working_price?: {\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }\n working_prices?: Array<{\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n // ...\n}\n```\n\n### `ContractTariffContext`\n\n```ts\ntype ContractTariffContext = {\n product_id?: string\n product_title?: string\n}\n```\n\n### `ContractPricingContext`\n\n```ts\ntype ContractPricingContext = {\n base_price?: {\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }\n base_prices?: Array<{\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }>\n working_price?: {\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }\n working_prices?: Array<{\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n // ...\n}\n```\n\n### `ConfigurationHistoryRowBase`\n\n```ts\ntype ConfigurationHistoryRowBase = {\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n}\n```\n\n### `InstallmentAmountChangedHistoryRow`\n\n```ts\ntype InstallmentAmountChangedHistoryRow = {\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n change_type: "installment_amount_changed"\n previous_value?: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n new_value: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n context?: {\n base_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n base_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n working_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n working_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n }\n}\n```\n\n### `ContractPricingChangedHistoryRow`\n\n```ts\ntype ContractPricingChangedHistoryRow = {\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n change_type: "contract_pricing_changed"\n previous_context: {\n base_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n base_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n working_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n working_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n tariff?: {\n product_id?: { ... }\n product_title?: { ... }\n }\n tariffs?: Array<{\n product_id?: { ... }\n product_title?: { ... }\n }>\n }\n new_context: {\n base_price?: {\n price_id?: { ... }\n price_title?: { ... }\n // ...\n}\n```\n\n### `ConfigurationHistoryRow`\n\n```ts\ntype ConfigurationHistoryRow = {\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n change_type: "installment_amount_changed"\n previous_value?: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n new_value: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n context?: {\n base_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n base_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n working_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n working_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n }\n} | {\n event_id: string\n // ...\n}\n```\n\n### `ConfigurationHistoryResponse`\n\n```ts\ntype ConfigurationHistoryResponse = {\n history: Array<{\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n change_type: "installment_amount_changed"\n previous_value?: {\n amount?: { ... }\n amount_decimal?: { ... }\n currency?: { ... }\n }\n new_value: {\n amount?: { ... }\n amount_decimal?: { ... }\n currency?: { ... }\n }\n context?: {\n base_price?: { ... }\n base_prices?: { ... }\n working_price?: { ... }\n working_prices?: { ... }\n }\n } | {\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n change_type: "contract_pricing_changed"\n previous_context: {\n base_price?: { ... }\n base_prices?: { ... }\n working_price?: { ... }\n working_prices?: { ... }\n tariff?: { ... }\n tariffs?: { ... }\n }\n new_context: {\n base_price?: { ... }\n base_prices?: { ... }\n working_price?: { ... }\n working_prices?: { ... }\n tariff?: { ... }\n tariffs?: { ... }\n }\n changed_fields: "tariff" | "base_price" | "working_price" | "discount" | "dynamic_tariff_configuration"[]\n }>\n total: number\n}\n```\n\n### `PricingInformationBalance`\n\n```ts\ntype PricingInformationBalance = {\n amount?: number\n amount_decimal?: string\n currency?: string\n}\n```\n\n### `ContractPricingSchedule`\n\n```ts\ntype ContractPricingSchedule = {\n billing_due_day?: number\n billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"\n installments_per_year?: number\n inferred: boolean\n}\n```\n\n### `ContractPricingInformation`\n\n```ts\ntype ContractPricingInformation = {\n entity_type: "contract"\n entity_id: string\n title?: string\n current_installment_amount?: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n context?: {\n base_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n base_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n working_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n working_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n }\n balance?: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n schedule?: {\n billing_due_day?: number\n billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"\n installments_per_year?: number\n inferred: boolean\n }\n pending_installment_change?: boolean\n history: Array<{\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n // ...\n}\n```\n\n### `BillingAccountPricingInformation`\n\n```ts\ntype BillingAccountPricingInformation = {\n entity_type: "billing_account"\n entity_id: string\n title?: string\n balance?: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n contracts: Array<{\n entity_type: "contract"\n entity_id: string\n title?: string\n current_installment_amount?: {\n amount?: { ... }\n amount_decimal?: { ... }\n currency?: { ... }\n }\n context?: {\n base_price?: { ... }\n base_prices?: { ... }\n working_price?: { ... }\n working_prices?: { ... }\n }\n balance?: {\n amount?: { ... }\n amount_decimal?: { ... }\n currency?: { ... }\n }\n schedule?: {\n billing_due_day?: { ... }\n billing_period?: { ... }\n installments_per_year?: { ... }\n inferred: { ... }\n }\n pending_installment_change?: boolean\n history: Array<{\n event_id: { ... }\n org_id: { ... }\n entity_type: { ... }\n entity_id: { ... }\n schema_version: { ... }\n effective_at?: { ... }\n changed_at: { ... }\n created_at: { ... }\n source: { ... }\n source_label?: { ... }\n source_system?: { ... }\n source_reference?: { ... }\n change_type: { ... }\n previous_value?: { ... }\n new_value: { ... }\n context?: { ... }\n } | {\n event_id: { ... }\n org_id: { ... }\n entity_type: { ... }\n entity_id: { ... }\n schema_version: { ... }\n effective_at?: { ... }\n changed_at: { ... }\n created_at: { ... }\n source: { ... }\n source_label?: { ... }\n source_system?: { ... }\n source_reference?: { ... }\n change_type: { ... }\n previous_context: { ... }\n new_context: { ... }\n changed_fields: { ... }\n }>\n }>\n}\n```\n\n### `Balance`\n\nCustomer balance summary (Kontostand\xFCbersicht).\nRepresents the aggregated balance across all contracts and orders for a customer.\n\n\n```ts\ntype Balance = {\n balance?: number\n balance_decimal?: string\n balance_currency?: string\n}\n```\n\n### `Currency`\n\nCurrency code in ISO 4217 format (W\xE4hrungscode).\nCommon values: EUR (Euro), CHF (Swiss Franc)\n\n\n```ts\ntype Currency = string\n```\n';
|
|
4
|
+
var billing_default = '# Billing API\n\n- **Base URL:** `https://billing.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/billing](https://docs.epilot.io/api/billing)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.billing.getBillingEvents(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/billing\'\n\nconst billingClient = getClient()\nauthorize(billingClient, () => \'<token>\')\nconst { data } = await billingClient.getBillingEvents(...)\n```\n\n## Operations\n\n**Billing Events**\n- [`getBillingEvents`](#getbillingevents)\n- [`createBillingEvent`](#createbillingevent)\n- [`getBillingEvent`](#getbillingevent)\n- [`updateBillingEvent`](#updatebillingevent)\n- [`deleteBillingEvent`](#deletebillingevent)\n- [`getBillingEventByExternalId`](#getbillingeventbyexternalid)\n\n**Contracts**\n- [`createContractEntity`](#createcontractentity)\n- [`updateContractEntity`](#updatecontractentity)\n- [`deleteContractEntity`](#deletecontractentity)\n\n**Pricing Information**\n- [`getContractPricingInformation`](#getcontractpricinginformation)\n- [`getBillingAccountPricingInformation`](#getbillingaccountpricinginformation)\n\n**Configuration History**\n- [`getContractConfigurationHistory`](#getcontractconfigurationhistory)\n- [`getBillingAccountConfigurationHistory`](#getbillingaccountconfigurationhistory)\n\n**Balance**\n- [`getCustomerBalance`](#getcustomerbalance)\n\n**Schemas**\n- [`Error`](#error)\n- [`BaseEntity`](#baseentity)\n- [`EntityId`](#entityid)\n- [`EntitySlug`](#entityslug)\n- [`EntityRelationItem`](#entityrelationitem)\n- [`BaseBillingEvent`](#basebillingevent)\n- [`BillingEvent`](#billingevent)\n- [`BillingEventUpdate`](#billingeventupdate)\n- [`InstallmentEvent`](#installmentevent)\n- [`PaymentEvent`](#paymentevent)\n- [`ReimbursementEvent`](#reimbursementevent)\n- [`DunningFeeEvent`](#dunningfeeevent)\n- [`InvoiceEvent`](#invoiceevent)\n- [`FinalBillEvent`](#finalbillevent)\n- [`BonusEvent`](#bonusevent)\n- [`CorrectionEvent`](#correctionevent)\n- [`CustomEvent`](#customevent)\n- [`Contract`](#contract)\n- [`ContractItem`](#contractitem)\n- [`InstallmentAmountValue`](#installmentamountvalue)\n- [`PriceContext`](#pricecontext)\n- [`DynamicTariffPriceContext`](#dynamictariffpricecontext)\n- [`ConfigurationHistoryContext`](#configurationhistorycontext)\n- [`ContractTariffContext`](#contracttariffcontext)\n- [`ContractPricingContext`](#contractpricingcontext)\n- [`ConfigurationHistoryRowBase`](#configurationhistoryrowbase)\n- [`InstallmentAmountChangedHistoryRow`](#installmentamountchangedhistoryrow)\n- [`ContractPricingChangedHistoryRow`](#contractpricingchangedhistoryrow)\n- [`ConfigurationHistoryRow`](#configurationhistoryrow)\n- [`ConfigurationHistoryResponse`](#configurationhistoryresponse)\n- [`PricingInformationBalance`](#pricinginformationbalance)\n- [`ContractPricingSchedule`](#contractpricingschedule)\n- [`ContractPricingInformation`](#contractpricinginformation)\n- [`BillingAccountPricingInformation`](#billingaccountpricinginformation)\n- [`Balance`](#balance)\n- [`Currency`](#currency)\n\n### `getBillingEvents`\n\nRetrieve and filter billing events (Buchungss\xE4tze) such as installments (Abschlagszahlungen),\npayments (Zahlungseing\xE4nge), and reimbursements (R\xFCckerstattungen).\n\n`GET /v1/billing/events`\n\n```ts\nconst { data } = await client.getBillingEvents({\n from: 1,\n size: 1,\n entity_id: [\'...\'],\n contact_id: \'example\',\n event_type: \'example\',\n date_after: \'example\',\n date_before: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 42,\n "results": [\n {\n "type": "installment",\n "direction": "debit",\n "note": "July power & gas installment payment",\n "status": "open",\n "booking_date": "2025-07-10",\n "due_date": "2025-07-10",\n "billing_amount": 5000,\n "billing_amount_decimal": "50.00",\n "billing_currency": "EUR"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createBillingEvent`\n\nCreate a new billing event (Buchungssatz) such as an installment (Abschlagszahlung),\npayment (Zahlungseingang), or reimbursement (R\xFCckerstattung).\n\n`POST /v1/billing/events`\n\n```ts\nconst { data } = await client.createBillingEvent(\n null,\n {\n type: \'installment\',\n direction: \'debit\',\n note: \'July power & gas installment payment\',\n status: \'open\',\n booking_date: \'2025-07-10\',\n due_date: \'2025-07-10\',\n billing_amount: 5000,\n billing_amount_decimal: \'50.00\',\n billing_currency: \'EUR\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "installment",\n "direction": "debit",\n "note": "July power & gas installment payment",\n "status": "open",\n "booking_date": "2025-07-10",\n "due_date": "2025-07-10",\n "billing_amount": 5000,\n "billing_amount_decimal": "50.00",\n "billing_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `getBillingEvent`\n\nRetrieve a single billing event (Buchungssatz) by its unique ID.\n\n`GET /v1/billing/events/{id}`\n\n```ts\nconst { data } = await client.getBillingEvent({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "installment",\n "direction": "debit",\n "note": "July power & gas installment payment",\n "status": "open",\n "booking_date": "2025-07-10",\n "due_date": "2025-07-10",\n "billing_amount": 5000,\n "billing_amount_decimal": "50.00",\n "billing_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `updateBillingEvent`\n\nUpdate an existing billing event (Buchungssatz).\n\n`PATCH /v1/billing/events/{id}`\n\n```ts\nconst { data } = await client.updateBillingEvent(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n type: \'installment\',\n direction: \'debit\',\n billing_amount: 10000,\n billing_amount_decimal: \'100.00\',\n billing_currency: \'EUR\',\n external_id: \'SAP-54321\',\n contract: {\n $relation: [\n {\n entity_id: \'f589786b-3024-43cd-9cb3-5a3c953f2896\'\n }\n ]\n },\n booking_date: \'2025-06-15\',\n due_date: \'2025-06-30\',\n paid_date: \'2025-06-15T10:00:00Z\',\n status: \'closed\',\n related_event: \'d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e\',\n external_link: {\n href: \'https://billing.example.com/invoices/12345\',\n title: \'Invoice 12345\'\n },\n attachments: {\n $relation: [\n {\n entity_id: \'f589786b-3024-43cd-9cb3-5a3c953f2896\'\n }\n ]\n },\n note: \'Teilzahlung f\xFCr Abschlag Juni\',\n internal_note: \'R\xFCckmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 \xFCbernommen\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "installment",\n "direction": "debit",\n "note": "July power & gas installment payment",\n "status": "open",\n "booking_date": "2025-07-10",\n "due_date": "2025-07-10",\n "billing_amount": 5000,\n "billing_amount_decimal": "50.00",\n "billing_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `deleteBillingEvent`\n\nDelete an existing billing event (Buchungssatz).\n\n`DELETE /v1/billing/events/{id}`\n\n```ts\nconst { data } = await client.deleteBillingEvent({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getBillingEventByExternalId`\n\nRetrieve a billing event (Buchungssatz) by its external system identifier.\n\n`GET /v1/billing/external/{external_id}`\n\n```ts\nconst { data } = await client.getBillingEventByExternalId({\n external_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "installment",\n "direction": "debit",\n "note": "July power & gas installment payment",\n "status": "open",\n "booking_date": "2025-07-10",\n "due_date": "2025-07-10",\n "billing_amount": 5000,\n "billing_amount_decimal": "50.00",\n "billing_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `createContractEntity`\n\nCreate a new contract entity (Vertrag) for billing purposes.\n\n`POST /v1/billing/contracts`\n\n```ts\nconst { data } = await client.createContractEntity(\n null,\n {\n _id: \'5da0a718-c822-403d-9f5d-20d4584e0528\',\n _title: \'Abschlagszahlung Juli 2025\',\n _org: \'123456\',\n _schema: \'billing_event\',\n _tags: [\'billing\', \'energy\'],\n _created_at: \'2025-06-15T10:30:00Z\',\n _updated_at: \'2025-06-15T14:45:00Z\',\n contract_name: \'Stromvertrag Haushalt\',\n contract_number: \'STR-2025-001234\',\n status: \'active\',\n description: \'Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie\',\n account_number: \'KD-67890\',\n branch: \'power\',\n billing_address: \'Musterstra\xDFe 123, 50667 K\xF6ln\',\n delivery_address: \'Musterstra\xDFe 123, 50667 K\xF6ln\',\n additional_addresses: \'Postfach 456, 50668 K\xF6ln\',\n termination_date: \'2025-12-31\',\n termination_reason: \'Kundenk\xFCndigung\',\n billing_period: \'monthly\',\n billing_duration_amount: 30,\n renewal_duration_amount: 12,\n renewal_duration_unit: \'months\',\n notice_time_amount: 30,\n notice_time_unit: \'months\',\n start_date: \'2025-01-01\',\n billing_due_day: 15,\n installment_amount: 8500,\n balance: 8990,\n balance_currency: \'EUR\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",\n "_title": "Abschlagszahlung Juli 2025",\n "_org": "123456",\n "_schema": "billing_event",\n "_tags": ["billing", "energy"],\n "_created_at": "2025-06-15T10:30:00Z",\n "_updated_at": "2025-06-15T14:45:00Z",\n "contract_name": "Stromvertrag Haushalt",\n "contract_number": "STR-2025-001234",\n "status": "active",\n "description": "Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie",\n "account_number": "KD-67890",\n "branch": "power",\n "billing_address": "Musterstra\xDFe 123, 50667 K\xF6ln",\n "delivery_address": "Musterstra\xDFe 123, 50667 K\xF6ln",\n "additional_addresses": "Postfach 456, 50668 K\xF6ln",\n "termination_date": "2025-12-31",\n "termination_reason": "Kundenk\xFCndigung",\n "billing_period": "monthly",\n "billing_duration_amount": 30,\n "renewal_duration_amount": 12,\n "renewal_duration_unit": "months",\n "notice_time_amount": 30,\n "notice_time_unit": "months",\n "start_date": "2025-01-01",\n "billing_due_day": 15,\n "installment_amount": 8500,\n "balance": 8990,\n "balance_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `updateContractEntity`\n\nUpdate an existing contract entity (Vertrag).\n\n`PATCH /v1/billing/contracts/{id}`\n\n```ts\nconst { data } = await client.updateContractEntity(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n _id: \'5da0a718-c822-403d-9f5d-20d4584e0528\',\n _title: \'Abschlagszahlung Juli 2025\',\n _org: \'123456\',\n _schema: \'billing_event\',\n _tags: [\'billing\', \'energy\'],\n _created_at: \'2025-06-15T10:30:00Z\',\n _updated_at: \'2025-06-15T14:45:00Z\',\n contract_name: \'Stromvertrag Haushalt\',\n contract_number: \'STR-2025-001234\',\n status: \'active\',\n description: \'Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie\',\n account_number: \'KD-67890\',\n branch: \'power\',\n billing_address: \'Musterstra\xDFe 123, 50667 K\xF6ln\',\n delivery_address: \'Musterstra\xDFe 123, 50667 K\xF6ln\',\n additional_addresses: \'Postfach 456, 50668 K\xF6ln\',\n termination_date: \'2025-12-31\',\n termination_reason: \'Kundenk\xFCndigung\',\n billing_period: \'monthly\',\n billing_duration_amount: 30,\n renewal_duration_amount: 12,\n renewal_duration_unit: \'months\',\n notice_time_amount: 30,\n notice_time_unit: \'months\',\n start_date: \'2025-01-01\',\n billing_due_day: 15,\n installment_amount: 8500,\n balance: 8990,\n balance_currency: \'EUR\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",\n "_title": "Abschlagszahlung Juli 2025",\n "_org": "123456",\n "_schema": "billing_event",\n "_tags": ["billing", "energy"],\n "_created_at": "2025-06-15T10:30:00Z",\n "_updated_at": "2025-06-15T14:45:00Z",\n "contract_name": "Stromvertrag Haushalt",\n "contract_number": "STR-2025-001234",\n "status": "active",\n "description": "Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie",\n "account_number": "KD-67890",\n "branch": "power",\n "billing_address": "Musterstra\xDFe 123, 50667 K\xF6ln",\n "delivery_address": "Musterstra\xDFe 123, 50667 K\xF6ln",\n "additional_addresses": "Postfach 456, 50668 K\xF6ln",\n "termination_date": "2025-12-31",\n "termination_reason": "Kundenk\xFCndigung",\n "billing_period": "monthly",\n "billing_duration_amount": 30,\n "renewal_duration_amount": 12,\n "renewal_duration_unit": "months",\n "notice_time_amount": 30,\n "notice_time_unit": "months",\n "start_date": "2025-01-01",\n "billing_due_day": 15,\n "installment_amount": 8500,\n "balance": 8990,\n "balance_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n### `deleteContractEntity`\n\nDelete an existing contract entity (Vertrag).\n\n`DELETE /v1/billing/contracts/{id}`\n\n```ts\nconst { data } = await client.deleteContractEntity({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getContractPricingInformation`\n\nGet current pricing information and recent configuration history for a Contract.\n\n`GET /v1/billing/contracts/{id}/pricing_information`\n\n```ts\nconst { data } = await client.getContractPricingInformation({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n history_change_types: \'example\',\n include_history: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_type": "contract",\n "entity_id": "string",\n "title": "string",\n "current_installment_amount": {\n "amount": 10050,\n "amount_decimal": "100.50",\n "currency": "EUR"\n },\n "context": {\n "base_price": {\n "price_id": "string",\n "price_title": "string",\n "tariff_type": "string",\n "pricing_model": "string",\n "unit_amount_gross_decimal": "string",\n "unit_amount_net_decimal": "string",\n "before_discount_unit_amount_gross_decimal": "string",\n "before_discount_unit_amount_net_decimal": "string",\n "unit_discount_amount_decimal": "string",\n "unit_discount_amount_net_decimal": "string",\n "currency": "EUR",\n "billing_period": "string",\n "unit": "string",\n "has_discount": true,\n "is_dynamic_tariff": true,\n "dynamic_tariff": {}\n },\n "base_prices": [\n {}\n ],\n "working_price": {\n "price_id": "string",\n "price_title": "string",\n "tariff_type": "string",\n "pricing_model": "string",\n "unit_amount_gross_decimal": "string",\n "unit_amount_net_decimal": "string",\n "before_discount_unit_amount_gross_decimal": "string",\n "before_discount_unit_amount_net_decimal": "string",\n "unit_discount_amount_decimal": "string",\n "unit_discount_amount_net_decimal": "string",\n "currency": "EUR",\n "billing_period": "string",\n "unit": "string",\n "has_discount": true,\n "is_dynamic_tariff": true,\n "dynamic_tariff": {}\n },\n "working_prices": [\n {}\n ]\n },\n "balance": {\n "amount": 8990,\n "amount_decimal": "89.90",\n "currency": "EUR"\n },\n "schedule": {\n "billing_due_day": 0,\n "billing_period": "weekly",\n "installments_per_year": 0,\n "inferred": true\n },\n "pending_installment_change": true,\n "history": [\n {\n "event_id": "string",\n "org_id": "string",\n "entity_type": "contract",\n "entity_id": "string",\n "schema_version": 1,\n "effective_at": "1970-01-01T00:00:00.000Z",\n "changed_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "source": "portal",\n "source_label": "string",\n "source_system": "string",\n "source_reference": "string",\n "change_type": "installment_amount_changed",\n "previous_value": {},\n "new_value": {},\n "context": {}\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getBillingAccountPricingInformation`\n\nGet current pricing information for the active Contracts linked to a Billing Account.\n\n`GET /v1/billing/billing_accounts/{id}/pricing_information`\n\n```ts\nconst { data } = await client.getBillingAccountPricingInformation({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n history_change_types: \'example\',\n include_history: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_type": "billing_account",\n "entity_id": "string",\n "title": "string",\n "balance": {\n "amount": 8990,\n "amount_decimal": "89.90",\n "currency": "EUR"\n },\n "contracts": [\n {\n "entity_type": "contract",\n "entity_id": "string",\n "title": "string",\n "current_installment_amount": {},\n "context": {},\n "balance": {},\n "schedule": {},\n "pending_installment_change": true,\n "history": []\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getContractConfigurationHistory`\n\nGet billing configuration history for a Contract.\n\n`GET /v1/billing/contracts/{id}/configuration_history`\n\n```ts\nconst { data } = await client.getContractConfigurationHistory({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n change_type: \'example\',\n history_change_types: \'example\',\n from: 1,\n size: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "history": [\n {\n "event_id": "string",\n "org_id": "string",\n "entity_type": "contract",\n "entity_id": "string",\n "schema_version": 1,\n "effective_at": "1970-01-01T00:00:00.000Z",\n "changed_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "source": "portal",\n "source_label": "string",\n "source_system": "string",\n "source_reference": "string",\n "change_type": "installment_amount_changed",\n "previous_value": {},\n "new_value": {},\n "context": {}\n }\n ],\n "total": 0\n}\n```\n\n</details>\n\n---\n\n### `getBillingAccountConfigurationHistory`\n\nGet merged billing configuration history for active Contracts linked to a Billing Account.\n\n`GET /v1/billing/billing_accounts/{id}/configuration_history`\n\n```ts\nconst { data } = await client.getBillingAccountConfigurationHistory({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n change_type: \'example\',\n history_change_types: \'example\',\n from: 1,\n size: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "history": [\n {\n "event_id": "string",\n "org_id": "string",\n "entity_type": "contract",\n "entity_id": "string",\n "schema_version": 1,\n "effective_at": "1970-01-01T00:00:00.000Z",\n "changed_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "source": "portal",\n "source_label": "string",\n "source_system": "string",\n "source_reference": "string",\n "change_type": "installment_amount_changed",\n "previous_value": {},\n "new_value": {},\n "context": {}\n }\n ],\n "total": 0\n}\n```\n\n</details>\n\n---\n\n### `getCustomerBalance`\n\nRetrieve the total balance (Kontostand) across all contracts and orders for a customer.\n\n`GET /v1/billing/customers/{id}/balance`\n\n```ts\nconst { data } = await client.getCustomerBalance({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "balance": 8990,\n "balance_decimal": "89.90",\n "balance_currency": "EUR"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `Error`\n\nStandard error response format\n\n```ts\ntype Error = {\n error: string\n message: string\n}\n```\n\n### `BaseEntity`\n\nBase schema for all epilot entities with common system fields\n\n```ts\ntype BaseEntity = {\n _id?: string\n _title?: string\n _org?: string\n _schema?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n}\n```\n\n### `EntityId`\n\nUnique entity identifier (UUID format)\n\n```ts\ntype EntityId = string\n```\n\n### `EntitySlug`\n\nURL-friendly identifier for the entity schema (Schema-Slug)\n\n```ts\ntype EntitySlug = string\n```\n\n### `EntityRelationItem`\n\nReference to a related entity\n\n```ts\ntype EntityRelationItem = {\n entity_id?: string\n}\n```\n\n### `BaseBillingEvent`\n\nRepresents a single financial transaction entry (Buchungssatz) in the billing ledger.\nEach entry is either a debit or a credit, following double-entry accounting principles.\nCommon types include Abschlagszahlung (installment), Zahlungseingang (payment), R\xFCckerstattung (reimbursement), etc.\n\n\n```ts\ntype BaseBillingEvent = {\n _id?: string\n _title?: string\n _org?: string\n _schema?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n type: string\n direction?: "debit" | "credit"\n billing_amount: number\n billing_amount_decimal: string\n billing_currency: string\n external_id?: string\n contract: {\n $relation?: Array<{\n entity_id?: { ... }\n }>\n }\n booking_date: string // date\n due_date?: string // date\n paid_date?: string // date-time\n status?: "closed" | "open"\n related_event?: string\n external_link?: {\n href?: string // uri\n title?: string\n }\n attachments?: {\n $relation?: Array<{\n entity_id?: { ... }\n }>\n }\n note?: string\n internal_note?: string\n}\n```\n\n### `BillingEvent`\n\nCollection of supported billing event types (Buchungsarten).\nEach type represents a different kind of financial transaction\nthat affects the customer\'s balance.\n\n\n```ts\ntype BillingEvent = {\n type?: "installment"\n} | {\n type?: "payment"\n} | {\n type?: "reimbursement"\n} | {\n type?: "dunning_fee"\n} | {\n type?: "invoice"\n} | {\n type?: "final_bill"\n} | {\n type?: "bonus"\n} | {\n type?: "correction"\n} | {\n type?: string\n}\n```\n\n### `BillingEventUpdate`\n\nFields to update on an existing billing event.\n\n```ts\ntype BillingEventUpdate = {\n type?: string\n direction?: "debit" | "credit"\n billing_amount?: number\n billing_amount_decimal?: string\n billing_currency?: string\n external_id?: string\n contract?: {\n $relation?: Array<{\n entity_id?: { ... }\n }>\n }\n booking_date?: string // date\n due_date?: string // date\n paid_date?: string // date-time\n status?: "closed" | "open"\n related_event?: string\n external_link?: {\n href?: string // uri\n title?: string\n }\n attachments?: {\n $relation?: Array<{\n entity_id?: { ... }\n }>\n }\n note?: string\n internal_note?: string\n}\n```\n\n### `InstallmentEvent`\n\nInstallment billing event (Abschlagszahlung).\nRepresents a scheduled partial payment that the customer owes,\ntypically billed monthly for utilities like electricity or gas.\n\n\n```ts\ntype InstallmentEvent = {\n type?: "installment"\n}\n```\n\n### `PaymentEvent`\n\nPayment received event (Zahlungseingang).\nRepresents money received from the customer, reducing their balance.\nThis is a credit transaction.\n\n\n```ts\ntype PaymentEvent = {\n type?: "payment"\n}\n```\n\n### `ReimbursementEvent`\n\nReimbursement event (R\xFCckerstattung).\nRepresents a refund to the customer, typically after overpayment\nor billing correction. This is a credit transaction.\n\n\n```ts\ntype ReimbursementEvent = {\n type?: "reimbursement"\n}\n```\n\n### `DunningFeeEvent`\n\nDunning fee event (Mahngeb\xFChr).\nRepresents a late payment fee charged to the customer\nafter a payment reminder has been sent. This is a debit transaction.\n\n\n```ts\ntype DunningFeeEvent = {\n type?: "dunning_fee"\n}\n```\n\n### `InvoiceEvent`\n\n```ts\ntype InvoiceEvent = {\n type?: "invoice"\n}\n```\n\n### `FinalBillEvent`\n\nFinal bill event (Endabrechnung/Schlussrechnung).\nRepresents the final settlement when a contract ends,\naccounting for actual consumption vs. paid installments.\nCan be either debit (customer owes more) or credit (customer overpaid).\n\n\n```ts\ntype FinalBillEvent = {\n type?: "final_bill"\n}\n```\n\n### `BonusEvent`\n\nBonus/credit event (Gutschrift/Bonus).\nRepresents a promotional credit or bonus applied to the customer\'s account,\nsuch as welcome bonuses or loyalty rewards. This is a credit transaction.\n\n\n```ts\ntype BonusEvent = {\n type?: "bonus"\n}\n```\n\n### `CorrectionEvent`\n\nCorrection event (Korrekturbuchung).\nRepresents an adjustment to a previous billing entry,\nsuch as correcting an overcharge or undercharge.\nCan be either debit or credit depending on the correction.\n\n\n```ts\ntype CorrectionEvent = {\n type?: "correction"\n}\n```\n\n### `CustomEvent`\n\nCustom billing event (Benutzerdefinierte Buchung).\nAllows for organization-specific billing event types not covered\nby the standard types. Use a descriptive type name.\n\n\n```ts\ntype CustomEvent = {\n type?: string\n}\n```\n\n### `Contract`\n\nRepresents a customer contract (Vertrag) for billing purposes.\nContracts are the parent entities for billing events and contain\nbilling configuration such as installment amounts and billing cycles.\n\n\n```ts\ntype Contract = {\n _id?: string\n _title?: string\n _org?: string\n _schema?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n contract_name?: string\n contract_number?: string\n status?: "draft" | "in_approval_process" | "approved" | "active" | "deactivated" | "revoked" | "terminated" | "expired"\n description?: string\n account_number?: string\n branch?: "power" | "gas" | "water" | "waste_water" | "district_heating"\n billing_address?: string\n delivery_address?: string\n additional_addresses?: string\n termination_date?: string // date\n termination_reason?: string\n billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"\n billing_duration_amount?: number\n renewal_duration_amount?: number\n renewal_duration_unit?: "weeks" | "months" | "years"\n notice_time_amount?: number\n notice_time_unit?: "weeks" | "months" | "years"\n start_date?: string // date\n billing_due_day?: number\n installment_amount?: number\n balance?: number\n balance_currency?: string\n}\n```\n\n### `ContractItem`\n\nContract entity with all required system fields populated\n\n```ts\ntype ContractItem = {\n _id?: string\n _title?: string\n _org?: string\n _schema?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n contract_name?: string\n contract_number?: string\n status?: "draft" | "in_approval_process" | "approved" | "active" | "deactivated" | "revoked" | "terminated" | "expired"\n description?: string\n account_number?: string\n branch?: "power" | "gas" | "water" | "waste_water" | "district_heating"\n billing_address?: string\n delivery_address?: string\n additional_addresses?: string\n termination_date?: string // date\n termination_reason?: string\n billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"\n billing_duration_amount?: number\n renewal_duration_amount?: number\n renewal_duration_unit?: "weeks" | "months" | "years"\n notice_time_amount?: number\n notice_time_unit?: "weeks" | "months" | "years"\n start_date?: string // date\n billing_due_day?: number\n installment_amount?: number\n balance?: number\n balance_currency?: string\n}\n```\n\n### `InstallmentAmountValue`\n\n```ts\ntype InstallmentAmountValue = {\n amount?: number\n amount_decimal?: string\n currency?: string\n}\n```\n\n### `PriceContext`\n\n```ts\ntype PriceContext = {\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: string\n interval?: string\n average_price_decimal?: string\n markup_amount_decimal?: string\n markup_amount_net_decimal?: string\n markup_amount_gross_decimal?: string\n market_price_decimal?: string\n market_price_currency?: string\n market?: string\n bidding_zone?: string\n timestamp?: string\n }\n}\n```\n\n### `DynamicTariffPriceContext`\n\n```ts\ntype DynamicTariffPriceContext = {\n mode?: string\n interval?: string\n average_price_decimal?: string\n markup_amount_decimal?: string\n markup_amount_net_decimal?: string\n markup_amount_gross_decimal?: string\n market_price_decimal?: string\n market_price_currency?: string\n market?: string\n bidding_zone?: string\n timestamp?: string\n}\n```\n\n### `ConfigurationHistoryContext`\n\n```ts\ntype ConfigurationHistoryContext = {\n base_price?: {\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }\n base_prices?: Array<{\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }>\n working_price?: {\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }\n working_prices?: Array<{\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n // ...\n}\n```\n\n### `ContractTariffContext`\n\n```ts\ntype ContractTariffContext = {\n product_id?: string\n product_title?: string\n}\n```\n\n### `ContractPricingContext`\n\n```ts\ntype ContractPricingContext = {\n base_price?: {\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }\n base_prices?: Array<{\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }>\n working_price?: {\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n unit_discount_amount_decimal?: string\n unit_discount_amount_net_decimal?: string\n currency?: string\n billing_period?: string\n unit?: string\n has_discount?: boolean\n is_dynamic_tariff?: boolean\n dynamic_tariff?: {\n mode?: { ... }\n interval?: { ... }\n average_price_decimal?: { ... }\n markup_amount_decimal?: { ... }\n markup_amount_net_decimal?: { ... }\n markup_amount_gross_decimal?: { ... }\n market_price_decimal?: { ... }\n market_price_currency?: { ... }\n market?: { ... }\n bidding_zone?: { ... }\n timestamp?: { ... }\n }\n }\n working_prices?: Array<{\n price_id?: string\n price_title?: string\n tariff_type?: string\n pricing_model?: string\n unit_amount_gross_decimal?: string\n unit_amount_net_decimal?: string\n before_discount_unit_amount_gross_decimal?: string\n before_discount_unit_amount_net_decimal?: string\n // ...\n}\n```\n\n### `ConfigurationHistoryRowBase`\n\n```ts\ntype ConfigurationHistoryRowBase = {\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n}\n```\n\n### `InstallmentAmountChangedHistoryRow`\n\n```ts\ntype InstallmentAmountChangedHistoryRow = {\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n change_type: "installment_amount_changed"\n previous_value?: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n new_value: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n context?: {\n base_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n base_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n working_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n working_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n }\n}\n```\n\n### `ContractPricingChangedHistoryRow`\n\n```ts\ntype ContractPricingChangedHistoryRow = {\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n change_type: "contract_pricing_changed"\n previous_context: {\n base_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n base_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n working_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n working_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n tariff?: {\n product_id?: { ... }\n product_title?: { ... }\n }\n tariffs?: Array<{\n product_id?: { ... }\n product_title?: { ... }\n }>\n }\n new_context: {\n base_price?: {\n price_id?: { ... }\n price_title?: { ... }\n // ...\n}\n```\n\n### `ConfigurationHistoryRow`\n\n```ts\ntype ConfigurationHistoryRow = {\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n change_type: "installment_amount_changed"\n previous_value?: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n new_value: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n context?: {\n base_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n base_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n working_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n working_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n }\n} | {\n event_id: string\n // ...\n}\n```\n\n### `ConfigurationHistoryResponse`\n\n```ts\ntype ConfigurationHistoryResponse = {\n history: Array<{\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n change_type: "installment_amount_changed"\n previous_value?: {\n amount?: { ... }\n amount_decimal?: { ... }\n currency?: { ... }\n }\n new_value: {\n amount?: { ... }\n amount_decimal?: { ... }\n currency?: { ... }\n }\n context?: {\n base_price?: { ... }\n base_prices?: { ... }\n working_price?: { ... }\n working_prices?: { ... }\n }\n } | {\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n schema_version: number\n effective_at?: string // date-time\n changed_at: string // date-time\n created_at: string // date-time\n source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"\n source_label?: string\n source_system?: string\n source_reference?: string\n change_type: "contract_pricing_changed"\n previous_context: {\n base_price?: { ... }\n base_prices?: { ... }\n working_price?: { ... }\n working_prices?: { ... }\n tariff?: { ... }\n tariffs?: { ... }\n }\n new_context: {\n base_price?: { ... }\n base_prices?: { ... }\n working_price?: { ... }\n working_prices?: { ... }\n tariff?: { ... }\n tariffs?: { ... }\n }\n changed_fields: "tariff" | "base_price" | "working_price" | "discount" | "dynamic_tariff_configuration"[]\n installment_amount?: {\n amount?: { ... }\n amount_decimal?: { ... }\n currency?: { ... }\n }\n }>\n total: number\n}\n```\n\n### `PricingInformationBalance`\n\n```ts\ntype PricingInformationBalance = {\n amount?: number\n amount_decimal?: string\n currency?: string\n}\n```\n\n### `ContractPricingSchedule`\n\n```ts\ntype ContractPricingSchedule = {\n billing_due_day?: number\n billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"\n installments_per_year?: number\n inferred: boolean\n}\n```\n\n### `ContractPricingInformation`\n\n```ts\ntype ContractPricingInformation = {\n entity_type: "contract"\n entity_id: string\n title?: string\n current_installment_amount?: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n context?: {\n base_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n base_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n working_price?: {\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }\n working_prices?: Array<{\n price_id?: { ... }\n price_title?: { ... }\n tariff_type?: { ... }\n pricing_model?: { ... }\n unit_amount_gross_decimal?: { ... }\n unit_amount_net_decimal?: { ... }\n before_discount_unit_amount_gross_decimal?: { ... }\n before_discount_unit_amount_net_decimal?: { ... }\n unit_discount_amount_decimal?: { ... }\n unit_discount_amount_net_decimal?: { ... }\n currency?: { ... }\n billing_period?: { ... }\n unit?: { ... }\n has_discount?: { ... }\n is_dynamic_tariff?: { ... }\n dynamic_tariff?: { ... }\n }>\n }\n balance?: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n schedule?: {\n billing_due_day?: number\n billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"\n installments_per_year?: number\n inferred: boolean\n }\n pending_installment_change?: boolean\n history: Array<{\n event_id: string\n org_id: string\n entity_type: "contract" | "billing_account"\n entity_id: string\n // ...\n}\n```\n\n### `BillingAccountPricingInformation`\n\n```ts\ntype BillingAccountPricingInformation = {\n entity_type: "billing_account"\n entity_id: string\n title?: string\n balance?: {\n amount?: number\n amount_decimal?: string\n currency?: string\n }\n contracts: Array<{\n entity_type: "contract"\n entity_id: string\n title?: string\n current_installment_amount?: {\n amount?: { ... }\n amount_decimal?: { ... }\n currency?: { ... }\n }\n context?: {\n base_price?: { ... }\n base_prices?: { ... }\n working_price?: { ... }\n working_prices?: { ... }\n }\n balance?: {\n amount?: { ... }\n amount_decimal?: { ... }\n currency?: { ... }\n }\n schedule?: {\n billing_due_day?: { ... }\n billing_period?: { ... }\n installments_per_year?: { ... }\n inferred: { ... }\n }\n pending_installment_change?: boolean\n history: Array<{\n event_id: { ... }\n org_id: { ... }\n entity_type: { ... }\n entity_id: { ... }\n schema_version: { ... }\n effective_at?: { ... }\n changed_at: { ... }\n created_at: { ... }\n source: { ... }\n source_label?: { ... }\n source_system?: { ... }\n source_reference?: { ... }\n change_type: { ... }\n previous_value?: { ... }\n new_value: { ... }\n context?: { ... }\n } | {\n event_id: { ... }\n org_id: { ... }\n entity_type: { ... }\n entity_id: { ... }\n schema_version: { ... }\n effective_at?: { ... }\n changed_at: { ... }\n created_at: { ... }\n source: { ... }\n source_label?: { ... }\n source_system?: { ... }\n source_reference?: { ... }\n change_type: { ... }\n previous_context: { ... }\n new_context: { ... }\n changed_fields: { ... }\n installment_amount?: { ... }\n }>\n }>\n}\n```\n\n### `Balance`\n\nCustomer balance summary (Kontostand\xFCbersicht).\nRepresents the aggregated balance across all contracts and orders for a customer.\n\n\n```ts\ntype Balance = {\n balance?: number\n balance_decimal?: string\n balance_currency?: string\n}\n```\n\n### `Currency`\n\nCurrency code in ISO 4217 format (W\xE4hrungscode).\nCommon values: EUR (Euro), CHF (Swiss Franc)\n\n\n```ts\ntype Currency = string\n```\n';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
exports.default = billing_default;
|