@epilot/sdk 2.11.4 → 2.11.6

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.
Files changed (145) hide show
  1. package/definitions/billing-runtime.json +1 -1
  2. package/definitions/billing.json +1571 -198
  3. package/definitions/snapshot-runtime.json +1 -1
  4. package/definitions/snapshot.json +214 -46
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +6 -6
  18. package/dist/apis/automation.js +1 -1
  19. package/dist/apis/billing.cjs +8 -8
  20. package/dist/apis/billing.d.cts +2 -2
  21. package/dist/apis/billing.d.ts +2 -2
  22. package/dist/apis/billing.js +2 -2
  23. package/dist/apis/blueprint-manifest.cjs +6 -6
  24. package/dist/apis/blueprint-manifest.js +1 -1
  25. package/dist/apis/calendar.cjs +6 -6
  26. package/dist/apis/calendar.js +1 -1
  27. package/dist/apis/configuration-hub.cjs +6 -6
  28. package/dist/apis/configuration-hub.js +1 -1
  29. package/dist/apis/consent.cjs +6 -6
  30. package/dist/apis/consent.js +1 -1
  31. package/dist/apis/customer-portal.cjs +6 -6
  32. package/dist/apis/customer-portal.js +1 -1
  33. package/dist/apis/dashboard.cjs +6 -6
  34. package/dist/apis/dashboard.js +1 -1
  35. package/dist/apis/data-governance.cjs +6 -6
  36. package/dist/apis/data-governance.js +1 -1
  37. package/dist/apis/deduplication.cjs +6 -6
  38. package/dist/apis/deduplication.js +1 -1
  39. package/dist/apis/design.cjs +6 -6
  40. package/dist/apis/design.js +1 -1
  41. package/dist/apis/document.cjs +6 -6
  42. package/dist/apis/document.js +1 -1
  43. package/dist/apis/email-settings.cjs +6 -6
  44. package/dist/apis/email-settings.js +1 -1
  45. package/dist/apis/email-template.cjs +6 -6
  46. package/dist/apis/email-template.js +1 -1
  47. package/dist/apis/entity-mapping.cjs +6 -6
  48. package/dist/apis/entity-mapping.js +1 -1
  49. package/dist/apis/entity.cjs +6 -6
  50. package/dist/apis/entity.js +1 -1
  51. package/dist/apis/environments.cjs +6 -6
  52. package/dist/apis/environments.js +1 -1
  53. package/dist/apis/event-catalog.cjs +6 -6
  54. package/dist/apis/event-catalog.js +1 -1
  55. package/dist/apis/file.cjs +6 -6
  56. package/dist/apis/file.js +1 -1
  57. package/dist/apis/iban.cjs +6 -6
  58. package/dist/apis/iban.js +1 -1
  59. package/dist/apis/integration-toolkit.cjs +6 -6
  60. package/dist/apis/integration-toolkit.js +1 -1
  61. package/dist/apis/journey.cjs +6 -6
  62. package/dist/apis/journey.js +1 -1
  63. package/dist/apis/kanban.cjs +6 -6
  64. package/dist/apis/kanban.js +1 -1
  65. package/dist/apis/message.cjs +6 -6
  66. package/dist/apis/message.js +1 -1
  67. package/dist/apis/metering.cjs +6 -6
  68. package/dist/apis/metering.js +1 -1
  69. package/dist/apis/notes.cjs +6 -6
  70. package/dist/apis/notes.js +1 -1
  71. package/dist/apis/notification.cjs +6 -6
  72. package/dist/apis/notification.js +1 -1
  73. package/dist/apis/organization.cjs +6 -6
  74. package/dist/apis/organization.js +1 -1
  75. package/dist/apis/partner-directory.cjs +6 -6
  76. package/dist/apis/partner-directory.js +1 -1
  77. package/dist/apis/permissions.cjs +6 -6
  78. package/dist/apis/permissions.js +1 -1
  79. package/dist/apis/pricing-tier.cjs +6 -6
  80. package/dist/apis/pricing-tier.js +1 -1
  81. package/dist/apis/pricing.cjs +6 -6
  82. package/dist/apis/pricing.js +1 -1
  83. package/dist/apis/purpose.cjs +6 -6
  84. package/dist/apis/purpose.js +1 -1
  85. package/dist/apis/query.cjs +6 -6
  86. package/dist/apis/query.js +1 -1
  87. package/dist/apis/sandbox.cjs +6 -6
  88. package/dist/apis/sandbox.js +1 -1
  89. package/dist/apis/sharing.cjs +6 -6
  90. package/dist/apis/sharing.js +1 -1
  91. package/dist/apis/snapshot.cjs +8 -8
  92. package/dist/apis/snapshot.d.cts +2 -2
  93. package/dist/apis/snapshot.d.ts +2 -2
  94. package/dist/apis/snapshot.js +2 -2
  95. package/dist/apis/submission.cjs +6 -6
  96. package/dist/apis/submission.js +1 -1
  97. package/dist/apis/target.cjs +6 -6
  98. package/dist/apis/target.js +1 -1
  99. package/dist/apis/targeting.cjs +6 -6
  100. package/dist/apis/targeting.js +1 -1
  101. package/dist/apis/template-variables.cjs +6 -6
  102. package/dist/apis/template-variables.js +1 -1
  103. package/dist/apis/user.cjs +6 -6
  104. package/dist/apis/user.js +1 -1
  105. package/dist/apis/validation-rules.cjs +6 -6
  106. package/dist/apis/validation-rules.js +1 -1
  107. package/dist/apis/webhooks.cjs +6 -6
  108. package/dist/apis/webhooks.js +1 -1
  109. package/dist/apis/workflow-definition.cjs +6 -6
  110. package/dist/apis/workflow-definition.js +1 -1
  111. package/dist/apis/workflow.cjs +6 -6
  112. package/dist/apis/workflow.js +1 -1
  113. package/dist/billing-C45UEPBV.cjs +7 -0
  114. package/dist/billing-IV5ABNW4.js +7 -0
  115. package/dist/{billing-runtime-C6BMGWCX.js → billing-runtime-3OCFZU2K.js} +1 -1
  116. package/dist/{billing-runtime-L4Y7MLM3.cjs → billing-runtime-PKKLWPQY.cjs} +2 -2
  117. package/dist/billing.d-N_1F759g.d.cts +3673 -0
  118. package/dist/billing.d-N_1F759g.d.ts +3673 -0
  119. package/dist/chunk-4XOJVIUQ.cjs +14 -0
  120. package/dist/{chunk-O4C7IU7J.cjs → chunk-F4KDYDCB.cjs} +4 -4
  121. package/dist/{chunk-PCK46M32.js → chunk-H72QGQR6.js} +4 -4
  122. package/dist/chunk-U5XZ4ERL.js +14 -0
  123. package/dist/{chunk-54QNWEPZ.js → chunk-UXY7SWNP.js} +1 -1
  124. package/dist/{chunk-YXJ4PBFQ.cjs → chunk-VDMPIKAN.cjs} +1 -1
  125. package/dist/index.cjs +12 -12
  126. package/dist/index.d.cts +2 -2
  127. package/dist/index.d.ts +2 -2
  128. package/dist/index.js +3 -3
  129. package/dist/snapshot-5XHTEB2U.js +7 -0
  130. package/dist/snapshot-NKK6BNQB.cjs +7 -0
  131. package/dist/{snapshot-runtime-6DV42FVY.cjs → snapshot-runtime-AQJSSXRV.cjs} +2 -2
  132. package/dist/{snapshot-runtime-IW57MINC.js → snapshot-runtime-AY7YYSFQ.js} +1 -1
  133. package/dist/{snapshot.d-CqefmvuB.d.ts → snapshot.d-DT0zg2CS.d.cts} +258 -39
  134. package/dist/{snapshot.d-CqefmvuB.d.cts → snapshot.d-DT0zg2CS.d.ts} +258 -39
  135. package/docs/billing.md +1200 -292
  136. package/docs/snapshot.md +179 -21
  137. package/package.json +1 -1
  138. package/dist/billing-DUWDISHP.cjs +0 -7
  139. package/dist/billing-IPALEAG2.js +0 -7
  140. package/dist/billing.d-Bs8Ku9qE.d.cts +0 -993
  141. package/dist/billing.d-Bs8Ku9qE.d.ts +0 -993
  142. package/dist/chunk-CSK5ZUTS.js +0 -14
  143. package/dist/chunk-G5FKTWUC.cjs +0 -14
  144. package/dist/snapshot-2HFERXRQ.js +0 -7
  145. package/dist/snapshot-UHCQAT4R.cjs +0 -7
package/docs/billing.md CHANGED
@@ -37,26 +37,54 @@ const { data } = await billingClient.getBillingEvents(...)
37
37
  - [`updateContractEntity`](#updatecontractentity)
38
38
  - [`deleteContractEntity`](#deletecontractentity)
39
39
 
40
+ **Pricing Information**
41
+ - [`getContractPricingInformation`](#getcontractpricinginformation)
42
+ - [`getBillingAccountPricingInformation`](#getbillingaccountpricinginformation)
43
+
44
+ **Configuration History**
45
+ - [`getContractConfigurationHistory`](#getcontractconfigurationhistory)
46
+ - [`getBillingAccountConfigurationHistory`](#getbillingaccountconfigurationhistory)
47
+
40
48
  **Balance**
41
49
  - [`getCustomerBalance`](#getcustomerbalance)
42
50
 
43
51
  **Schemas**
52
+ - [`Error`](#error)
44
53
  - [`BaseEntity`](#baseentity)
45
54
  - [`EntityId`](#entityid)
46
55
  - [`EntitySlug`](#entityslug)
47
56
  - [`EntityRelationItem`](#entityrelationitem)
48
57
  - [`BaseBillingEvent`](#basebillingevent)
58
+ - [`BillingEvent`](#billingevent)
59
+ - [`BillingEventUpdate`](#billingeventupdate)
49
60
  - [`InstallmentEvent`](#installmentevent)
61
+ - [`PaymentEvent`](#paymentevent)
50
62
  - [`ReimbursementEvent`](#reimbursementevent)
51
- - [`BillingEvent`](#billingevent)
63
+ - [`DunningFeeEvent`](#dunningfeeevent)
64
+ - [`InvoiceEvent`](#invoiceevent)
65
+ - [`FinalBillEvent`](#finalbillevent)
66
+ - [`BonusEvent`](#bonusevent)
67
+ - [`CorrectionEvent`](#correctionevent)
68
+ - [`CustomEvent`](#customevent)
52
69
  - [`Contract`](#contract)
53
70
  - [`ContractItem`](#contractitem)
71
+ - [`InstallmentAmountValue`](#installmentamountvalue)
72
+ - [`PriceContext`](#pricecontext)
73
+ - [`DynamicTariffPriceContext`](#dynamictariffpricecontext)
74
+ - [`ConfigurationHistoryContext`](#configurationhistorycontext)
75
+ - [`ConfigurationHistoryRow`](#configurationhistoryrow)
76
+ - [`ConfigurationHistoryResponse`](#configurationhistoryresponse)
77
+ - [`PricingInformationBalance`](#pricinginformationbalance)
78
+ - [`ContractPricingSchedule`](#contractpricingschedule)
79
+ - [`ContractPricingInformation`](#contractpricinginformation)
80
+ - [`BillingAccountPricingInformation`](#billingaccountpricinginformation)
54
81
  - [`Balance`](#balance)
55
82
  - [`Currency`](#currency)
56
83
 
57
84
  ### `getBillingEvents`
58
85
 
59
- Get and filter billing events such as installments and reimbursements.
86
+ Retrieve and filter billing events (Buchungssätze) such as installments (Abschlagszahlungen),
87
+ payments (Zahlungseingänge), and reimbursements (Rückerstattungen).
60
88
 
61
89
  `GET /v1/billing/events`
62
90
 
@@ -65,6 +93,7 @@ const { data } = await client.getBillingEvents({
65
93
  from: 1,
66
94
  size: 1,
67
95
  entity_id: ['...'],
96
+ contact_id: 'example',
68
97
  event_type: 'example',
69
98
  date_after: 'example',
70
99
  date_before: 'example',
@@ -76,30 +105,18 @@ const { data } = await client.getBillingEvents({
76
105
 
77
106
  ```json
78
107
  {
79
- "hits": 0,
108
+ "hits": 42,
80
109
  "results": [
81
110
  {
82
- "billing_amount": 10050,
83
- "billing_amount_decimal": "100.50",
84
- "billing_currency": "EUR",
85
- "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e",
86
- "contract": {
87
- "$relation": [
88
- {
89
- "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896"
90
- }
91
- ]
92
- },
93
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
94
- "_title": "string",
95
- "_org": "string",
96
- "_schema": "contact",
97
- "_tags": ["string"],
98
- "_created_at": "string",
99
- "_updated_at": "string",
100
111
  "type": "installment",
101
- "due_date": "1970-01-01T00:00:00.000Z",
102
- "paid_date": "1970-01-01T00:00:00.000Z"
112
+ "direction": "debit",
113
+ "note": "July power & gas installment payment",
114
+ "status": "open",
115
+ "booking_date": "2025-07-10",
116
+ "due_date": "2025-07-10",
117
+ "billing_amount": 5000,
118
+ "billing_amount_decimal": "50.00",
119
+ "billing_currency": "EUR"
103
120
  }
104
121
  ]
105
122
  }
@@ -111,7 +128,8 @@ const { data } = await client.getBillingEvents({
111
128
 
112
129
  ### `createBillingEvent`
113
130
 
114
- Create a new billing event.
131
+ Create a new billing event (Buchungssatz) such as an installment (Abschlagszahlung),
132
+ payment (Zahlungseingang), or reimbursement (Rückerstattung).
115
133
 
116
134
  `POST /v1/billing/events`
117
135
 
@@ -119,27 +137,15 @@ Create a new billing event.
119
137
  const { data } = await client.createBillingEvent(
120
138
  null,
121
139
  {
122
- billing_amount: 10050,
123
- billing_amount_decimal: '100.50',
124
- billing_currency: 'EUR',
125
- external_id: 'd4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e',
126
- contract: {
127
- $relation: [
128
- {
129
- entity_id: 'f589786b-3024-43cd-9cb3-5a3c953f2896'
130
- }
131
- ]
132
- },
133
- _id: '5da0a718-c822-403d-9f5d-20d4584e0528',
134
- _title: 'string',
135
- _org: 'string',
136
- _schema: 'contact',
137
- _tags: ['string'],
138
- _created_at: 'string',
139
- _updated_at: 'string',
140
140
  type: 'installment',
141
- due_date: '1970-01-01T00:00:00.000Z',
142
- paid_date: '1970-01-01T00:00:00.000Z'
141
+ direction: 'debit',
142
+ note: 'July power & gas installment payment',
143
+ status: 'open',
144
+ booking_date: '2025-07-10',
145
+ due_date: '2025-07-10',
146
+ billing_amount: 5000,
147
+ billing_amount_decimal: '50.00',
148
+ billing_currency: 'EUR'
143
149
  },
144
150
  )
145
151
  ```
@@ -149,27 +155,15 @@ const { data } = await client.createBillingEvent(
149
155
 
150
156
  ```json
151
157
  {
152
- "billing_amount": 10050,
153
- "billing_amount_decimal": "100.50",
154
- "billing_currency": "EUR",
155
- "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e",
156
- "contract": {
157
- "$relation": [
158
- {
159
- "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896"
160
- }
161
- ]
162
- },
163
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
164
- "_title": "string",
165
- "_org": "string",
166
- "_schema": "contact",
167
- "_tags": ["string"],
168
- "_created_at": "string",
169
- "_updated_at": "string",
170
158
  "type": "installment",
171
- "due_date": "1970-01-01T00:00:00.000Z",
172
- "paid_date": "1970-01-01T00:00:00.000Z"
159
+ "direction": "debit",
160
+ "note": "July power & gas installment payment",
161
+ "status": "open",
162
+ "booking_date": "2025-07-10",
163
+ "due_date": "2025-07-10",
164
+ "billing_amount": 5000,
165
+ "billing_amount_decimal": "50.00",
166
+ "billing_currency": "EUR"
173
167
  }
174
168
  ```
175
169
 
@@ -179,7 +173,7 @@ const { data } = await client.createBillingEvent(
179
173
 
180
174
  ### `getBillingEvent`
181
175
 
182
- Get a single billing event by ID.
176
+ Retrieve a single billing event (Buchungssatz) by its unique ID.
183
177
 
184
178
  `GET /v1/billing/events/{id}`
185
179
 
@@ -194,27 +188,15 @@ const { data } = await client.getBillingEvent({
194
188
 
195
189
  ```json
196
190
  {
197
- "billing_amount": 10050,
198
- "billing_amount_decimal": "100.50",
199
- "billing_currency": "EUR",
200
- "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e",
201
- "contract": {
202
- "$relation": [
203
- {
204
- "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896"
205
- }
206
- ]
207
- },
208
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
209
- "_title": "string",
210
- "_org": "string",
211
- "_schema": "contact",
212
- "_tags": ["string"],
213
- "_created_at": "string",
214
- "_updated_at": "string",
215
191
  "type": "installment",
216
- "due_date": "1970-01-01T00:00:00.000Z",
217
- "paid_date": "1970-01-01T00:00:00.000Z"
192
+ "direction": "debit",
193
+ "note": "July power & gas installment payment",
194
+ "status": "open",
195
+ "booking_date": "2025-07-10",
196
+ "due_date": "2025-07-10",
197
+ "billing_amount": 5000,
198
+ "billing_amount_decimal": "50.00",
199
+ "billing_currency": "EUR"
218
200
  }
219
201
  ```
220
202
 
@@ -224,7 +206,7 @@ const { data } = await client.getBillingEvent({
224
206
 
225
207
  ### `updateBillingEvent`
226
208
 
227
- Update an existing billing event.
209
+ Update an existing billing event (Buchungssatz).
228
210
 
229
211
  `PATCH /v1/billing/events/{id}`
230
212
 
@@ -234,10 +216,12 @@ const { data } = await client.updateBillingEvent(
234
216
  id: '123e4567-e89b-12d3-a456-426614174000',
235
217
  },
236
218
  {
237
- billing_amount: 10050,
238
- billing_amount_decimal: '100.50',
219
+ type: 'installment',
220
+ direction: 'debit',
221
+ billing_amount: 10000,
222
+ billing_amount_decimal: '100.00',
239
223
  billing_currency: 'EUR',
240
- external_id: 'd4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e',
224
+ external_id: 'SAP-54321',
241
225
  contract: {
242
226
  $relation: [
243
227
  {
@@ -245,16 +229,24 @@ const { data } = await client.updateBillingEvent(
245
229
  }
246
230
  ]
247
231
  },
248
- _id: '5da0a718-c822-403d-9f5d-20d4584e0528',
249
- _title: 'string',
250
- _org: 'string',
251
- _schema: 'contact',
252
- _tags: ['string'],
253
- _created_at: 'string',
254
- _updated_at: 'string',
255
- type: 'installment',
256
- due_date: '1970-01-01T00:00:00.000Z',
257
- paid_date: '1970-01-01T00:00:00.000Z'
232
+ booking_date: '2025-06-15',
233
+ due_date: '2025-06-30',
234
+ paid_date: '2025-06-15T10:00:00Z',
235
+ status: 'closed',
236
+ related_event: 'd4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e',
237
+ external_link: {
238
+ href: 'https://billing.example.com/invoices/12345',
239
+ title: 'Invoice 12345'
240
+ },
241
+ attachments: {
242
+ $relation: [
243
+ {
244
+ entity_id: 'f589786b-3024-43cd-9cb3-5a3c953f2896'
245
+ }
246
+ ]
247
+ },
248
+ note: 'Teilzahlung für Abschlag Juni',
249
+ internal_note: 'Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen'
258
250
  },
259
251
  )
260
252
  ```
@@ -264,27 +256,15 @@ const { data } = await client.updateBillingEvent(
264
256
 
265
257
  ```json
266
258
  {
267
- "billing_amount": 10050,
268
- "billing_amount_decimal": "100.50",
269
- "billing_currency": "EUR",
270
- "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e",
271
- "contract": {
272
- "$relation": [
273
- {
274
- "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896"
275
- }
276
- ]
277
- },
278
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
279
- "_title": "string",
280
- "_org": "string",
281
- "_schema": "contact",
282
- "_tags": ["string"],
283
- "_created_at": "string",
284
- "_updated_at": "string",
285
259
  "type": "installment",
286
- "due_date": "1970-01-01T00:00:00.000Z",
287
- "paid_date": "1970-01-01T00:00:00.000Z"
260
+ "direction": "debit",
261
+ "note": "July power & gas installment payment",
262
+ "status": "open",
263
+ "booking_date": "2025-07-10",
264
+ "due_date": "2025-07-10",
265
+ "billing_amount": 5000,
266
+ "billing_amount_decimal": "50.00",
267
+ "billing_currency": "EUR"
288
268
  }
289
269
  ```
290
270
 
@@ -294,7 +274,7 @@ const { data } = await client.updateBillingEvent(
294
274
 
295
275
  ### `deleteBillingEvent`
296
276
 
297
- Delete an existing billing event.
277
+ Delete an existing billing event (Buchungssatz).
298
278
 
299
279
  `DELETE /v1/billing/events/{id}`
300
280
 
@@ -308,7 +288,7 @@ const { data } = await client.deleteBillingEvent({
308
288
 
309
289
  ### `getBillingEventByExternalId`
310
290
 
311
- Get a single billing event by External ID.
291
+ Retrieve a billing event (Buchungssatz) by its external system identifier.
312
292
 
313
293
  `GET /v1/billing/external/{external_id}`
314
294
 
@@ -323,27 +303,15 @@ const { data } = await client.getBillingEventByExternalId({
323
303
 
324
304
  ```json
325
305
  {
326
- "billing_amount": 10050,
327
- "billing_amount_decimal": "100.50",
328
- "billing_currency": "EUR",
329
- "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e",
330
- "contract": {
331
- "$relation": [
332
- {
333
- "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896"
334
- }
335
- ]
336
- },
337
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
338
- "_title": "string",
339
- "_org": "string",
340
- "_schema": "contact",
341
- "_tags": ["string"],
342
- "_created_at": "string",
343
- "_updated_at": "string",
344
306
  "type": "installment",
345
- "due_date": "1970-01-01T00:00:00.000Z",
346
- "paid_date": "1970-01-01T00:00:00.000Z"
307
+ "direction": "debit",
308
+ "note": "July power & gas installment payment",
309
+ "status": "open",
310
+ "booking_date": "2025-07-10",
311
+ "due_date": "2025-07-10",
312
+ "billing_amount": 5000,
313
+ "billing_amount_decimal": "50.00",
314
+ "billing_currency": "EUR"
347
315
  }
348
316
  ```
349
317
 
@@ -353,7 +321,7 @@ const { data } = await client.getBillingEventByExternalId({
353
321
 
354
322
  ### `createContractEntity`
355
323
 
356
- Create a new contract entity.
324
+ Create a new contract entity (Vertrag) for billing purposes.
357
325
 
358
326
  `POST /v1/billing/contracts`
359
327
 
@@ -362,32 +330,32 @@ const { data } = await client.createContractEntity(
362
330
  null,
363
331
  {
364
332
  _id: '5da0a718-c822-403d-9f5d-20d4584e0528',
365
- _title: 'string',
366
- _org: 'string',
367
- _schema: 'contact',
368
- _tags: ['string'],
369
- _created_at: 'string',
370
- _updated_at: 'string',
371
- contract_name: 'Grid Contract',
372
- contract_number: '12345',
373
- status: 'approved',
374
- description: 'This contract is for the supply of widgets.',
375
- account_number: '67890',
333
+ _title: 'Abschlagszahlung Juli 2025',
334
+ _org: '123456',
335
+ _schema: 'billing_event',
336
+ _tags: ['billing', 'energy'],
337
+ _created_at: '2025-06-15T10:30:00Z',
338
+ _updated_at: '2025-06-15T14:45:00Z',
339
+ contract_name: 'Stromvertrag Haushalt',
340
+ contract_number: 'STR-2025-001234',
341
+ status: 'active',
342
+ description: 'Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie',
343
+ account_number: 'KD-67890',
376
344
  branch: 'power',
377
- billing_address: '123 Main St, Anytown',
378
- delivery_address: '456 Elm St, Anytown',
379
- additional_addresses: '789 Oak St, Anytown',
380
- termination_date: '2022-01-01',
381
- termination_reason: 'Non-payment',
345
+ billing_address: 'Musterstraße 123, 50667 Köln',
346
+ delivery_address: 'Musterstraße 123, 50667 Köln',
347
+ additional_addresses: 'Postfach 456, 50668 Köln',
348
+ termination_date: '2025-12-31',
349
+ termination_reason: 'Kundenkündigung',
382
350
  billing_period: 'monthly',
383
351
  billing_duration_amount: 30,
384
- renewal_duration_amount: 365,
385
- renewal_duration_unit: 'years',
352
+ renewal_duration_amount: 12,
353
+ renewal_duration_unit: 'months',
386
354
  notice_time_amount: 30,
387
355
  notice_time_unit: 'months',
388
- start_date: '2021-01-01',
389
- billing_due_day: 2,
390
- installment_amount: 10050,
356
+ start_date: '2025-01-01',
357
+ billing_due_day: 15,
358
+ installment_amount: 8500,
391
359
  balance: 8990,
392
360
  balance_currency: 'EUR'
393
361
  },
@@ -400,32 +368,32 @@ const { data } = await client.createContractEntity(
400
368
  ```json
401
369
  {
402
370
  "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
403
- "_title": "string",
404
- "_org": "string",
405
- "_schema": "contact",
406
- "_tags": ["string"],
407
- "_created_at": "string",
408
- "_updated_at": "string",
409
- "contract_name": "Grid Contract",
410
- "contract_number": "12345",
411
- "status": "approved",
412
- "description": "This contract is for the supply of widgets.",
413
- "account_number": "67890",
371
+ "_title": "Abschlagszahlung Juli 2025",
372
+ "_org": "123456",
373
+ "_schema": "billing_event",
374
+ "_tags": ["billing", "energy"],
375
+ "_created_at": "2025-06-15T10:30:00Z",
376
+ "_updated_at": "2025-06-15T14:45:00Z",
377
+ "contract_name": "Stromvertrag Haushalt",
378
+ "contract_number": "STR-2025-001234",
379
+ "status": "active",
380
+ "description": "Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie",
381
+ "account_number": "KD-67890",
414
382
  "branch": "power",
415
- "billing_address": "123 Main St, Anytown",
416
- "delivery_address": "456 Elm St, Anytown",
417
- "additional_addresses": "789 Oak St, Anytown",
418
- "termination_date": "2022-01-01",
419
- "termination_reason": "Non-payment",
383
+ "billing_address": "Musterstraße 123, 50667 Köln",
384
+ "delivery_address": "Musterstraße 123, 50667 Köln",
385
+ "additional_addresses": "Postfach 456, 50668 Köln",
386
+ "termination_date": "2025-12-31",
387
+ "termination_reason": "Kundenkündigung",
420
388
  "billing_period": "monthly",
421
389
  "billing_duration_amount": 30,
422
- "renewal_duration_amount": 365,
423
- "renewal_duration_unit": "years",
390
+ "renewal_duration_amount": 12,
391
+ "renewal_duration_unit": "months",
424
392
  "notice_time_amount": 30,
425
393
  "notice_time_unit": "months",
426
- "start_date": "2021-01-01",
427
- "billing_due_day": 2,
428
- "installment_amount": 10050,
394
+ "start_date": "2025-01-01",
395
+ "billing_due_day": 15,
396
+ "installment_amount": 8500,
429
397
  "balance": 8990,
430
398
  "balance_currency": "EUR"
431
399
  }
@@ -437,7 +405,7 @@ const { data } = await client.createContractEntity(
437
405
 
438
406
  ### `updateContractEntity`
439
407
 
440
- Update an existing contract entity.
408
+ Update an existing contract entity (Vertrag).
441
409
 
442
410
  `PATCH /v1/billing/contracts/{id}`
443
411
 
@@ -448,32 +416,32 @@ const { data } = await client.updateContractEntity(
448
416
  },
449
417
  {
450
418
  _id: '5da0a718-c822-403d-9f5d-20d4584e0528',
451
- _title: 'string',
452
- _org: 'string',
453
- _schema: 'contact',
454
- _tags: ['string'],
455
- _created_at: 'string',
456
- _updated_at: 'string',
457
- contract_name: 'Grid Contract',
458
- contract_number: '12345',
459
- status: 'approved',
460
- description: 'This contract is for the supply of widgets.',
461
- account_number: '67890',
419
+ _title: 'Abschlagszahlung Juli 2025',
420
+ _org: '123456',
421
+ _schema: 'billing_event',
422
+ _tags: ['billing', 'energy'],
423
+ _created_at: '2025-06-15T10:30:00Z',
424
+ _updated_at: '2025-06-15T14:45:00Z',
425
+ contract_name: 'Stromvertrag Haushalt',
426
+ contract_number: 'STR-2025-001234',
427
+ status: 'active',
428
+ description: 'Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie',
429
+ account_number: 'KD-67890',
462
430
  branch: 'power',
463
- billing_address: '123 Main St, Anytown',
464
- delivery_address: '456 Elm St, Anytown',
465
- additional_addresses: '789 Oak St, Anytown',
466
- termination_date: '2022-01-01',
467
- termination_reason: 'Non-payment',
431
+ billing_address: 'Musterstraße 123, 50667 Köln',
432
+ delivery_address: 'Musterstraße 123, 50667 Köln',
433
+ additional_addresses: 'Postfach 456, 50668 Köln',
434
+ termination_date: '2025-12-31',
435
+ termination_reason: 'Kundenkündigung',
468
436
  billing_period: 'monthly',
469
437
  billing_duration_amount: 30,
470
- renewal_duration_amount: 365,
471
- renewal_duration_unit: 'years',
438
+ renewal_duration_amount: 12,
439
+ renewal_duration_unit: 'months',
472
440
  notice_time_amount: 30,
473
441
  notice_time_unit: 'months',
474
- start_date: '2021-01-01',
475
- billing_due_day: 2,
476
- installment_amount: 10050,
442
+ start_date: '2025-01-01',
443
+ billing_due_day: 15,
444
+ installment_amount: 8500,
477
445
  balance: 8990,
478
446
  balance_currency: 'EUR'
479
447
  },
@@ -486,32 +454,32 @@ const { data } = await client.updateContractEntity(
486
454
  ```json
487
455
  {
488
456
  "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
489
- "_title": "string",
490
- "_org": "string",
491
- "_schema": "contact",
492
- "_tags": ["string"],
493
- "_created_at": "string",
494
- "_updated_at": "string",
495
- "contract_name": "Grid Contract",
496
- "contract_number": "12345",
497
- "status": "approved",
498
- "description": "This contract is for the supply of widgets.",
499
- "account_number": "67890",
457
+ "_title": "Abschlagszahlung Juli 2025",
458
+ "_org": "123456",
459
+ "_schema": "billing_event",
460
+ "_tags": ["billing", "energy"],
461
+ "_created_at": "2025-06-15T10:30:00Z",
462
+ "_updated_at": "2025-06-15T14:45:00Z",
463
+ "contract_name": "Stromvertrag Haushalt",
464
+ "contract_number": "STR-2025-001234",
465
+ "status": "active",
466
+ "description": "Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie",
467
+ "account_number": "KD-67890",
500
468
  "branch": "power",
501
- "billing_address": "123 Main St, Anytown",
502
- "delivery_address": "456 Elm St, Anytown",
503
- "additional_addresses": "789 Oak St, Anytown",
504
- "termination_date": "2022-01-01",
505
- "termination_reason": "Non-payment",
469
+ "billing_address": "Musterstraße 123, 50667 Köln",
470
+ "delivery_address": "Musterstraße 123, 50667 Köln",
471
+ "additional_addresses": "Postfach 456, 50668 Köln",
472
+ "termination_date": "2025-12-31",
473
+ "termination_reason": "Kundenkündigung",
506
474
  "billing_period": "monthly",
507
475
  "billing_duration_amount": 30,
508
- "renewal_duration_amount": 365,
509
- "renewal_duration_unit": "years",
476
+ "renewal_duration_amount": 12,
477
+ "renewal_duration_unit": "months",
510
478
  "notice_time_amount": 30,
511
479
  "notice_time_unit": "months",
512
- "start_date": "2021-01-01",
513
- "billing_due_day": 2,
514
- "installment_amount": 10050,
480
+ "start_date": "2025-01-01",
481
+ "billing_due_day": 15,
482
+ "installment_amount": 8500,
515
483
  "balance": 8990,
516
484
  "balance_currency": "EUR"
517
485
  }
@@ -523,7 +491,7 @@ const { data } = await client.updateContractEntity(
523
491
 
524
492
  ### `deleteContractEntity`
525
493
 
526
- Delete an existing contract entity.
494
+ Delete an existing contract entity (Vertrag).
527
495
 
528
496
  `DELETE /v1/billing/contracts/{id}`
529
497
 
@@ -535,9 +503,384 @@ const { data } = await client.deleteContractEntity({
535
503
 
536
504
  ---
537
505
 
506
+ ### `getContractPricingInformation`
507
+
508
+ Get current pricing information and recent configuration history for a Contract.
509
+
510
+ `GET /v1/billing/contracts/{id}/pricing_information`
511
+
512
+ ```ts
513
+ const { data } = await client.getContractPricingInformation({
514
+ id: '123e4567-e89b-12d3-a456-426614174000',
515
+ })
516
+ ```
517
+
518
+ <details>
519
+ <summary>Response</summary>
520
+
521
+ ```json
522
+ {
523
+ "entity_type": "contract",
524
+ "entity_id": "string",
525
+ "title": "string",
526
+ "current_installment_amount": {
527
+ "amount": 10050,
528
+ "amount_decimal": "100.50",
529
+ "currency": "EUR"
530
+ },
531
+ "context": {
532
+ "base_price": {
533
+ "price_id": "string",
534
+ "price_title": "string",
535
+ "pricing_model": "string",
536
+ "unit_amount_gross_decimal": "string",
537
+ "unit_amount_net_decimal": "string",
538
+ "before_discount_unit_amount_gross_decimal": "string",
539
+ "before_discount_unit_amount_net_decimal": "string",
540
+ "unit_discount_amount_decimal": "string",
541
+ "unit_discount_amount_net_decimal": "string",
542
+ "currency": "EUR",
543
+ "billing_period": "string",
544
+ "unit": "string",
545
+ "has_discount": true,
546
+ "is_dynamic_tariff": true,
547
+ "dynamic_tariff": {}
548
+ },
549
+ "working_price": {
550
+ "price_id": "string",
551
+ "price_title": "string",
552
+ "pricing_model": "string",
553
+ "unit_amount_gross_decimal": "string",
554
+ "unit_amount_net_decimal": "string",
555
+ "before_discount_unit_amount_gross_decimal": "string",
556
+ "before_discount_unit_amount_net_decimal": "string",
557
+ "unit_discount_amount_decimal": "string",
558
+ "unit_discount_amount_net_decimal": "string",
559
+ "currency": "EUR",
560
+ "billing_period": "string",
561
+ "unit": "string",
562
+ "has_discount": true,
563
+ "is_dynamic_tariff": true,
564
+ "dynamic_tariff": {}
565
+ }
566
+ },
567
+ "balance": {
568
+ "amount": 8990,
569
+ "amount_decimal": "89.90",
570
+ "currency": "EUR"
571
+ },
572
+ "schedule": {
573
+ "billing_due_day": 0,
574
+ "billing_period": "weekly",
575
+ "installments_per_year": 0,
576
+ "inferred": true
577
+ },
578
+ "pending_installment_change": true,
579
+ "history": [
580
+ {
581
+ "event_id": "string",
582
+ "org_id": "string",
583
+ "entity_type": "contract",
584
+ "entity_id": "string",
585
+ "change_type": "installment_amount_changed",
586
+ "schema_version": 1,
587
+ "effective_at": "1970-01-01T00:00:00.000Z",
588
+ "changed_at": "1970-01-01T00:00:00.000Z",
589
+ "created_at": "1970-01-01T00:00:00.000Z",
590
+ "source": "portal",
591
+ "source_label": "string",
592
+ "source_system": "string",
593
+ "source_reference": "string",
594
+ "previous_value": {},
595
+ "new_value": {},
596
+ "context": {}
597
+ }
598
+ ]
599
+ }
600
+ ```
601
+
602
+ </details>
603
+
604
+ ---
605
+
606
+ ### `getBillingAccountPricingInformation`
607
+
608
+ Get current pricing information for the active Contracts linked to a Billing Account.
609
+
610
+ `GET /v1/billing/billing_accounts/{id}/pricing_information`
611
+
612
+ ```ts
613
+ const { data } = await client.getBillingAccountPricingInformation({
614
+ id: '123e4567-e89b-12d3-a456-426614174000',
615
+ })
616
+ ```
617
+
618
+ <details>
619
+ <summary>Response</summary>
620
+
621
+ ```json
622
+ {
623
+ "entity_type": "billing_account",
624
+ "entity_id": "string",
625
+ "title": "string",
626
+ "balance": {
627
+ "amount": 8990,
628
+ "amount_decimal": "89.90",
629
+ "currency": "EUR"
630
+ },
631
+ "contracts": [
632
+ {
633
+ "entity_type": "contract",
634
+ "entity_id": "string",
635
+ "title": "string",
636
+ "current_installment_amount": {},
637
+ "context": {},
638
+ "balance": {},
639
+ "schedule": {},
640
+ "pending_installment_change": true,
641
+ "history": []
642
+ }
643
+ ]
644
+ }
645
+ ```
646
+
647
+ </details>
648
+
649
+ ---
650
+
651
+ ### `getContractConfigurationHistory`
652
+
653
+ Get billing configuration history for a Contract.
654
+
655
+ `GET /v1/billing/contracts/{id}/configuration_history`
656
+
657
+ ```ts
658
+ const { data } = await client.getContractConfigurationHistory({
659
+ id: '123e4567-e89b-12d3-a456-426614174000',
660
+ change_type: 'example',
661
+ from: 1,
662
+ size: 1,
663
+ })
664
+ ```
665
+
666
+ <details>
667
+ <summary>Response</summary>
668
+
669
+ ```json
670
+ {
671
+ "history": [
672
+ {
673
+ "event_id": "string",
674
+ "org_id": "string",
675
+ "entity_type": "contract",
676
+ "entity_id": "string",
677
+ "change_type": "installment_amount_changed",
678
+ "schema_version": 1,
679
+ "effective_at": "1970-01-01T00:00:00.000Z",
680
+ "changed_at": "1970-01-01T00:00:00.000Z",
681
+ "created_at": "1970-01-01T00:00:00.000Z",
682
+ "source": "portal",
683
+ "source_label": "string",
684
+ "source_system": "string",
685
+ "source_reference": "string",
686
+ "previous_value": {
687
+ "amount": 10050,
688
+ "amount_decimal": "100.50",
689
+ "currency": "EUR"
690
+ },
691
+ "new_value": {
692
+ "amount": 10050,
693
+ "amount_decimal": "100.50",
694
+ "currency": "EUR"
695
+ },
696
+ "context": {
697
+ "base_price": {
698
+ "price_id": "string",
699
+ "price_title": "string",
700
+ "pricing_model": "string",
701
+ "unit_amount_gross_decimal": "string",
702
+ "unit_amount_net_decimal": "string",
703
+ "before_discount_unit_amount_gross_decimal": "string",
704
+ "before_discount_unit_amount_net_decimal": "string",
705
+ "unit_discount_amount_decimal": "string",
706
+ "unit_discount_amount_net_decimal": "string",
707
+ "currency": "EUR",
708
+ "billing_period": "string",
709
+ "unit": "string",
710
+ "has_discount": true,
711
+ "is_dynamic_tariff": true,
712
+ "dynamic_tariff": {
713
+ "mode": "string",
714
+ "interval": "string",
715
+ "average_price_decimal": "string",
716
+ "markup_amount_decimal": "string",
717
+ "markup_amount_net_decimal": "string",
718
+ "markup_amount_gross_decimal": "string",
719
+ "market_price_decimal": "string",
720
+ "market_price_currency": "EUR",
721
+ "market": "string",
722
+ "bidding_zone": "string",
723
+ "timestamp": "string"
724
+ }
725
+ },
726
+ "working_price": {
727
+ "price_id": "string",
728
+ "price_title": "string",
729
+ "pricing_model": "string",
730
+ "unit_amount_gross_decimal": "string",
731
+ "unit_amount_net_decimal": "string",
732
+ "before_discount_unit_amount_gross_decimal": "string",
733
+ "before_discount_unit_amount_net_decimal": "string",
734
+ "unit_discount_amount_decimal": "string",
735
+ "unit_discount_amount_net_decimal": "string",
736
+ "currency": "EUR",
737
+ "billing_period": "string",
738
+ "unit": "string",
739
+ "has_discount": true,
740
+ "is_dynamic_tariff": true,
741
+ "dynamic_tariff": {
742
+ "mode": "string",
743
+ "interval": "string",
744
+ "average_price_decimal": "string",
745
+ "markup_amount_decimal": "string",
746
+ "markup_amount_net_decimal": "string",
747
+ "markup_amount_gross_decimal": "string",
748
+ "market_price_decimal": "string",
749
+ "market_price_currency": "EUR",
750
+ "market": "string",
751
+ "bidding_zone": "string",
752
+ "timestamp": "string"
753
+ }
754
+ }
755
+ }
756
+ }
757
+ ],
758
+ "total": 0
759
+ }
760
+ ```
761
+
762
+ </details>
763
+
764
+ ---
765
+
766
+ ### `getBillingAccountConfigurationHistory`
767
+
768
+ Get merged billing configuration history for active Contracts linked to a Billing Account.
769
+
770
+ `GET /v1/billing/billing_accounts/{id}/configuration_history`
771
+
772
+ ```ts
773
+ const { data } = await client.getBillingAccountConfigurationHistory({
774
+ id: '123e4567-e89b-12d3-a456-426614174000',
775
+ change_type: 'example',
776
+ from: 1,
777
+ size: 1,
778
+ })
779
+ ```
780
+
781
+ <details>
782
+ <summary>Response</summary>
783
+
784
+ ```json
785
+ {
786
+ "history": [
787
+ {
788
+ "event_id": "string",
789
+ "org_id": "string",
790
+ "entity_type": "contract",
791
+ "entity_id": "string",
792
+ "change_type": "installment_amount_changed",
793
+ "schema_version": 1,
794
+ "effective_at": "1970-01-01T00:00:00.000Z",
795
+ "changed_at": "1970-01-01T00:00:00.000Z",
796
+ "created_at": "1970-01-01T00:00:00.000Z",
797
+ "source": "portal",
798
+ "source_label": "string",
799
+ "source_system": "string",
800
+ "source_reference": "string",
801
+ "previous_value": {
802
+ "amount": 10050,
803
+ "amount_decimal": "100.50",
804
+ "currency": "EUR"
805
+ },
806
+ "new_value": {
807
+ "amount": 10050,
808
+ "amount_decimal": "100.50",
809
+ "currency": "EUR"
810
+ },
811
+ "context": {
812
+ "base_price": {
813
+ "price_id": "string",
814
+ "price_title": "string",
815
+ "pricing_model": "string",
816
+ "unit_amount_gross_decimal": "string",
817
+ "unit_amount_net_decimal": "string",
818
+ "before_discount_unit_amount_gross_decimal": "string",
819
+ "before_discount_unit_amount_net_decimal": "string",
820
+ "unit_discount_amount_decimal": "string",
821
+ "unit_discount_amount_net_decimal": "string",
822
+ "currency": "EUR",
823
+ "billing_period": "string",
824
+ "unit": "string",
825
+ "has_discount": true,
826
+ "is_dynamic_tariff": true,
827
+ "dynamic_tariff": {
828
+ "mode": "string",
829
+ "interval": "string",
830
+ "average_price_decimal": "string",
831
+ "markup_amount_decimal": "string",
832
+ "markup_amount_net_decimal": "string",
833
+ "markup_amount_gross_decimal": "string",
834
+ "market_price_decimal": "string",
835
+ "market_price_currency": "EUR",
836
+ "market": "string",
837
+ "bidding_zone": "string",
838
+ "timestamp": "string"
839
+ }
840
+ },
841
+ "working_price": {
842
+ "price_id": "string",
843
+ "price_title": "string",
844
+ "pricing_model": "string",
845
+ "unit_amount_gross_decimal": "string",
846
+ "unit_amount_net_decimal": "string",
847
+ "before_discount_unit_amount_gross_decimal": "string",
848
+ "before_discount_unit_amount_net_decimal": "string",
849
+ "unit_discount_amount_decimal": "string",
850
+ "unit_discount_amount_net_decimal": "string",
851
+ "currency": "EUR",
852
+ "billing_period": "string",
853
+ "unit": "string",
854
+ "has_discount": true,
855
+ "is_dynamic_tariff": true,
856
+ "dynamic_tariff": {
857
+ "mode": "string",
858
+ "interval": "string",
859
+ "average_price_decimal": "string",
860
+ "markup_amount_decimal": "string",
861
+ "markup_amount_net_decimal": "string",
862
+ "markup_amount_gross_decimal": "string",
863
+ "market_price_decimal": "string",
864
+ "market_price_currency": "EUR",
865
+ "market": "string",
866
+ "bidding_zone": "string",
867
+ "timestamp": "string"
868
+ }
869
+ }
870
+ }
871
+ }
872
+ ],
873
+ "total": 0
874
+ }
875
+ ```
876
+
877
+ </details>
878
+
879
+ ---
880
+
538
881
  ### `getCustomerBalance`
539
882
 
540
- Get total balance across all contracts and orders of a customer entity.
883
+ Retrieve the total balance (Kontostand) across all contracts and orders for a customer.
541
884
 
542
885
  `GET /v1/billing/customers/{id}/balance`
543
886
 
@@ -564,23 +907,36 @@ const { data } = await client.getCustomerBalance({
564
907
 
565
908
  ## Schemas
566
909
 
910
+ ### `Error`
911
+
912
+ Standard error response format
913
+
914
+ ```ts
915
+ type Error = {
916
+ error: string
917
+ message: string
918
+ }
919
+ ```
920
+
567
921
  ### `BaseEntity`
568
922
 
923
+ Base schema for all epilot entities with common system fields
924
+
569
925
  ```ts
570
926
  type BaseEntity = {
571
927
  _id?: string
572
928
  _title?: string
573
929
  _org?: string
574
- _schema?: "contact" | "contract" | "file" | "order" | "opportunity" | "product" | "price" | "meter" | "meter_counter" | "billing_event"
930
+ _schema?: string
575
931
  _tags?: string[]
576
- _created_at?: string
577
- _updated_at?: string
932
+ _created_at?: string // date-time
933
+ _updated_at?: string // date-time
578
934
  }
579
935
  ```
580
936
 
581
937
  ### `EntityId`
582
938
 
583
- Entity ID
939
+ Unique entity identifier (UUID format)
584
940
 
585
941
  ```ts
586
942
  type EntityId = string
@@ -588,14 +944,16 @@ type EntityId = string
588
944
 
589
945
  ### `EntitySlug`
590
946
 
591
- URL-friendly identifier for the entity schema
947
+ URL-friendly identifier for the entity schema (Schema-Slug)
592
948
 
593
949
  ```ts
594
- type EntitySlug = "contact" | "contract" | "file" | "order" | "opportunity" | "product" | "price" | "meter" | "meter_counter" | "billing_event"
950
+ type EntitySlug = string
595
951
  ```
596
952
 
597
953
  ### `EntityRelationItem`
598
954
 
955
+ Reference to a related entity
956
+
599
957
  ```ts
600
958
  type EntityRelationItem = {
601
959
  entity_id?: string
@@ -604,26 +962,22 @@ type EntityRelationItem = {
604
962
 
605
963
  ### `BaseBillingEvent`
606
964
 
607
- A base billing event to be inherited by all billing events.
965
+ Represents a single financial transaction entry (Buchungssatz) in the billing ledger.
966
+ Each entry is either a debit or a credit, following double-entry accounting principles.
967
+ Common types include Abschlagszahlung (installment), Zahlungseingang (payment), Rückerstattung (reimbursement), etc.
968
+
608
969
 
609
970
  ```ts
610
971
  type BaseBillingEvent = {
611
972
  _id?: string
612
973
  _title?: string
613
974
  _org?: string
614
- _schema?: "contact" | "contract" | "file" | "order" | "opportunity" | "product" | "price" | "meter" | "meter_counter" | "billing_event"
975
+ _schema?: string
615
976
  _tags?: string[]
616
- _created_at?: string
617
- _updated_at?: string
618
- }
619
- ```
620
-
621
- ### `InstallmentEvent`
622
-
623
- An entity that describes an installment billing event.
624
-
625
- ```ts
626
- type InstallmentEvent = {
977
+ _created_at?: string // date-time
978
+ _updated_at?: string // date-time
979
+ type: string
980
+ direction?: "debit" | "credit"
627
981
  billing_amount: number
628
982
  billing_amount_decimal: string
629
983
  billing_currency: string
@@ -633,76 +987,220 @@ type InstallmentEvent = {
633
987
  entity_id?: { ... }
634
988
  }>
635
989
  }
636
- type: "installment"
637
- due_date: string // date-time
990
+ booking_date: string // date
991
+ due_date?: string // date
638
992
  paid_date?: string // date-time
639
- }
640
- ```
641
-
642
- ### `ReimbursementEvent`
643
-
644
- An entity that describes a reimbursement billing event.
645
-
646
- ```ts
647
- type ReimbursementEvent = {
648
- billing_amount: number
649
- billing_amount_decimal: string
650
- billing_currency: string
651
- external_id?: string
652
- contract: {
993
+ status?: "closed" | "open"
994
+ related_event?: string
995
+ external_link?: {
996
+ href?: string // uri
997
+ title?: string
998
+ }
999
+ attachments?: {
653
1000
  $relation?: Array<{
654
1001
  entity_id?: { ... }
655
1002
  }>
656
1003
  }
657
- type: "reimbursement"
658
- paid_date?: string // date-time
1004
+ note?: string
1005
+ internal_note?: string
659
1006
  }
660
1007
  ```
661
1008
 
662
1009
  ### `BillingEvent`
663
1010
 
664
- An entity that describes a billing event such as a future installment or a reimbursement back to the customer.
1011
+ Collection of supported billing event types (Buchungsarten).
1012
+ Each type represents a different kind of financial transaction
1013
+ that affects the customer's balance.
1014
+
665
1015
 
666
1016
  ```ts
667
1017
  type BillingEvent = {
668
- billing_amount: number
669
- billing_amount_decimal: string
670
- billing_currency: string
1018
+ type?: "installment"
1019
+ } | {
1020
+ type?: "payment"
1021
+ } | {
1022
+ type?: "reimbursement"
1023
+ } | {
1024
+ type?: "dunning_fee"
1025
+ } | {
1026
+ type?: "invoice"
1027
+ } | {
1028
+ type?: "final_bill"
1029
+ } | {
1030
+ type?: "bonus"
1031
+ } | {
1032
+ type?: "correction"
1033
+ } | {
1034
+ type?: string
1035
+ }
1036
+ ```
1037
+
1038
+ ### `BillingEventUpdate`
1039
+
1040
+ Fields to update on an existing billing event.
1041
+
1042
+ ```ts
1043
+ type BillingEventUpdate = {
1044
+ type?: string
1045
+ direction?: "debit" | "credit"
1046
+ billing_amount?: number
1047
+ billing_amount_decimal?: string
1048
+ billing_currency?: string
671
1049
  external_id?: string
672
- contract: {
1050
+ contract?: {
673
1051
  $relation?: Array<{
674
1052
  entity_id?: { ... }
675
1053
  }>
676
1054
  }
677
- type: "installment"
678
- due_date: string // date-time
1055
+ booking_date?: string // date
1056
+ due_date?: string // date
679
1057
  paid_date?: string // date-time
680
- } | {
681
- billing_amount: number
682
- billing_amount_decimal: string
683
- billing_currency: string
684
- external_id?: string
685
- contract: {
1058
+ status?: "closed" | "open"
1059
+ related_event?: string
1060
+ external_link?: {
1061
+ href?: string // uri
1062
+ title?: string
1063
+ }
1064
+ attachments?: {
686
1065
  $relation?: Array<{
687
1066
  entity_id?: { ... }
688
1067
  }>
689
1068
  }
690
- type: "reimbursement"
691
- paid_date?: string // date-time
1069
+ note?: string
1070
+ internal_note?: string
1071
+ }
1072
+ ```
1073
+
1074
+ ### `InstallmentEvent`
1075
+
1076
+ Installment billing event (Abschlagszahlung).
1077
+ Represents a scheduled partial payment that the customer owes,
1078
+ typically billed monthly for utilities like electricity or gas.
1079
+
1080
+
1081
+ ```ts
1082
+ type InstallmentEvent = {
1083
+ type?: "installment"
1084
+ }
1085
+ ```
1086
+
1087
+ ### `PaymentEvent`
1088
+
1089
+ Payment received event (Zahlungseingang).
1090
+ Represents money received from the customer, reducing their balance.
1091
+ This is a credit transaction.
1092
+
1093
+
1094
+ ```ts
1095
+ type PaymentEvent = {
1096
+ type?: "payment"
1097
+ }
1098
+ ```
1099
+
1100
+ ### `ReimbursementEvent`
1101
+
1102
+ Reimbursement event (Rückerstattung).
1103
+ Represents a refund to the customer, typically after overpayment
1104
+ or billing correction. This is a credit transaction.
1105
+
1106
+
1107
+ ```ts
1108
+ type ReimbursementEvent = {
1109
+ type?: "reimbursement"
1110
+ }
1111
+ ```
1112
+
1113
+ ### `DunningFeeEvent`
1114
+
1115
+ Dunning fee event (Mahngebühr).
1116
+ Represents a late payment fee charged to the customer
1117
+ after a payment reminder has been sent. This is a debit transaction.
1118
+
1119
+
1120
+ ```ts
1121
+ type DunningFeeEvent = {
1122
+ type?: "dunning_fee"
1123
+ }
1124
+ ```
1125
+
1126
+ ### `InvoiceEvent`
1127
+
1128
+ ```ts
1129
+ type InvoiceEvent = {
1130
+ type?: "invoice"
1131
+ }
1132
+ ```
1133
+
1134
+ ### `FinalBillEvent`
1135
+
1136
+ Final bill event (Endabrechnung/Schlussrechnung).
1137
+ Represents the final settlement when a contract ends,
1138
+ accounting for actual consumption vs. paid installments.
1139
+ Can be either debit (customer owes more) or credit (customer overpaid).
1140
+
1141
+
1142
+ ```ts
1143
+ type FinalBillEvent = {
1144
+ type?: "final_bill"
1145
+ }
1146
+ ```
1147
+
1148
+ ### `BonusEvent`
1149
+
1150
+ Bonus/credit event (Gutschrift/Bonus).
1151
+ Represents a promotional credit or bonus applied to the customer's account,
1152
+ such as welcome bonuses or loyalty rewards. This is a credit transaction.
1153
+
1154
+
1155
+ ```ts
1156
+ type BonusEvent = {
1157
+ type?: "bonus"
1158
+ }
1159
+ ```
1160
+
1161
+ ### `CorrectionEvent`
1162
+
1163
+ Correction event (Korrekturbuchung).
1164
+ Represents an adjustment to a previous billing entry,
1165
+ such as correcting an overcharge or undercharge.
1166
+ Can be either debit or credit depending on the correction.
1167
+
1168
+
1169
+ ```ts
1170
+ type CorrectionEvent = {
1171
+ type?: "correction"
1172
+ }
1173
+ ```
1174
+
1175
+ ### `CustomEvent`
1176
+
1177
+ Custom billing event (Benutzerdefinierte Buchung).
1178
+ Allows for organization-specific billing event types not covered
1179
+ by the standard types. Use a descriptive type name.
1180
+
1181
+
1182
+ ```ts
1183
+ type CustomEvent = {
1184
+ type?: string
692
1185
  }
693
1186
  ```
694
1187
 
695
1188
  ### `Contract`
696
1189
 
1190
+ Represents a customer contract (Vertrag) for billing purposes.
1191
+ Contracts are the parent entities for billing events and contain
1192
+ billing configuration such as installment amounts and billing cycles.
1193
+
1194
+
697
1195
  ```ts
698
1196
  type Contract = {
699
1197
  _id?: string
700
1198
  _title?: string
701
1199
  _org?: string
702
- _schema?: "contact" | "contract" | "file" | "order" | "opportunity" | "product" | "price" | "meter" | "meter_counter" | "billing_event"
1200
+ _schema?: string
703
1201
  _tags?: string[]
704
- _created_at?: string
705
- _updated_at?: string
1202
+ _created_at?: string // date-time
1203
+ _updated_at?: string // date-time
706
1204
  contract_name?: string
707
1205
  contract_number?: string
708
1206
  status?: "draft" | "in_approval_process" | "approved" | "active" | "deactivated" | "revoked" | "terminated" | "expired"
@@ -712,7 +1210,7 @@ type Contract = {
712
1210
  billing_address?: string
713
1211
  delivery_address?: string
714
1212
  additional_addresses?: string
715
- termination_date?: string
1213
+ termination_date?: string // date
716
1214
  termination_reason?: string
717
1215
  billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"
718
1216
  billing_duration_amount?: number
@@ -720,7 +1218,7 @@ type Contract = {
720
1218
  renewal_duration_unit?: "weeks" | "months" | "years"
721
1219
  notice_time_amount?: number
722
1220
  notice_time_unit?: "weeks" | "months" | "years"
723
- start_date?: string
1221
+ start_date?: string // date
724
1222
  billing_due_day?: number
725
1223
  installment_amount?: number
726
1224
  balance?: number
@@ -730,15 +1228,17 @@ type Contract = {
730
1228
 
731
1229
  ### `ContractItem`
732
1230
 
1231
+ Contract entity with all required system fields populated
1232
+
733
1233
  ```ts
734
1234
  type ContractItem = {
735
1235
  _id?: string
736
1236
  _title?: string
737
1237
  _org?: string
738
- _schema?: "contact" | "contract" | "file" | "order" | "opportunity" | "product" | "price" | "meter" | "meter_counter" | "billing_event"
1238
+ _schema?: string
739
1239
  _tags?: string[]
740
- _created_at?: string
741
- _updated_at?: string
1240
+ _created_at?: string // date-time
1241
+ _updated_at?: string // date-time
742
1242
  contract_name?: string
743
1243
  contract_number?: string
744
1244
  status?: "draft" | "in_approval_process" | "approved" | "active" | "deactivated" | "revoked" | "terminated" | "expired"
@@ -748,7 +1248,7 @@ type ContractItem = {
748
1248
  billing_address?: string
749
1249
  delivery_address?: string
750
1250
  additional_addresses?: string
751
- termination_date?: string
1251
+ termination_date?: string // date
752
1252
  termination_reason?: string
753
1253
  billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"
754
1254
  billing_duration_amount?: number
@@ -756,7 +1256,7 @@ type ContractItem = {
756
1256
  renewal_duration_unit?: "weeks" | "months" | "years"
757
1257
  notice_time_amount?: number
758
1258
  notice_time_unit?: "weeks" | "months" | "years"
759
- start_date?: string
1259
+ start_date?: string // date
760
1260
  billing_due_day?: number
761
1261
  installment_amount?: number
762
1262
  balance?: number
@@ -764,8 +1264,414 @@ type ContractItem = {
764
1264
  }
765
1265
  ```
766
1266
 
1267
+ ### `InstallmentAmountValue`
1268
+
1269
+ ```ts
1270
+ type InstallmentAmountValue = {
1271
+ amount?: number
1272
+ amount_decimal?: string
1273
+ currency?: string
1274
+ }
1275
+ ```
1276
+
1277
+ ### `PriceContext`
1278
+
1279
+ ```ts
1280
+ type PriceContext = {
1281
+ price_id?: string
1282
+ price_title?: string
1283
+ pricing_model?: string
1284
+ unit_amount_gross_decimal?: string
1285
+ unit_amount_net_decimal?: string
1286
+ before_discount_unit_amount_gross_decimal?: string
1287
+ before_discount_unit_amount_net_decimal?: string
1288
+ unit_discount_amount_decimal?: string
1289
+ unit_discount_amount_net_decimal?: string
1290
+ currency?: string
1291
+ billing_period?: string
1292
+ unit?: string
1293
+ has_discount?: boolean
1294
+ is_dynamic_tariff?: boolean
1295
+ dynamic_tariff?: {
1296
+ mode?: string
1297
+ interval?: string
1298
+ average_price_decimal?: string
1299
+ markup_amount_decimal?: string
1300
+ markup_amount_net_decimal?: string
1301
+ markup_amount_gross_decimal?: string
1302
+ market_price_decimal?: string
1303
+ market_price_currency?: string
1304
+ market?: string
1305
+ bidding_zone?: string
1306
+ timestamp?: string
1307
+ }
1308
+ }
1309
+ ```
1310
+
1311
+ ### `DynamicTariffPriceContext`
1312
+
1313
+ ```ts
1314
+ type DynamicTariffPriceContext = {
1315
+ mode?: string
1316
+ interval?: string
1317
+ average_price_decimal?: string
1318
+ markup_amount_decimal?: string
1319
+ markup_amount_net_decimal?: string
1320
+ markup_amount_gross_decimal?: string
1321
+ market_price_decimal?: string
1322
+ market_price_currency?: string
1323
+ market?: string
1324
+ bidding_zone?: string
1325
+ timestamp?: string
1326
+ }
1327
+ ```
1328
+
1329
+ ### `ConfigurationHistoryContext`
1330
+
1331
+ ```ts
1332
+ type ConfigurationHistoryContext = {
1333
+ base_price?: {
1334
+ price_id?: string
1335
+ price_title?: string
1336
+ pricing_model?: string
1337
+ unit_amount_gross_decimal?: string
1338
+ unit_amount_net_decimal?: string
1339
+ before_discount_unit_amount_gross_decimal?: string
1340
+ before_discount_unit_amount_net_decimal?: string
1341
+ unit_discount_amount_decimal?: string
1342
+ unit_discount_amount_net_decimal?: string
1343
+ currency?: string
1344
+ billing_period?: string
1345
+ unit?: string
1346
+ has_discount?: boolean
1347
+ is_dynamic_tariff?: boolean
1348
+ dynamic_tariff?: {
1349
+ mode?: { ... }
1350
+ interval?: { ... }
1351
+ average_price_decimal?: { ... }
1352
+ markup_amount_decimal?: { ... }
1353
+ markup_amount_net_decimal?: { ... }
1354
+ markup_amount_gross_decimal?: { ... }
1355
+ market_price_decimal?: { ... }
1356
+ market_price_currency?: { ... }
1357
+ market?: { ... }
1358
+ bidding_zone?: { ... }
1359
+ timestamp?: { ... }
1360
+ }
1361
+ }
1362
+ working_price?: {
1363
+ price_id?: string
1364
+ price_title?: string
1365
+ pricing_model?: string
1366
+ unit_amount_gross_decimal?: string
1367
+ unit_amount_net_decimal?: string
1368
+ before_discount_unit_amount_gross_decimal?: string
1369
+ before_discount_unit_amount_net_decimal?: string
1370
+ unit_discount_amount_decimal?: string
1371
+ unit_discount_amount_net_decimal?: string
1372
+ currency?: string
1373
+ billing_period?: string
1374
+ unit?: string
1375
+ has_discount?: boolean
1376
+ is_dynamic_tariff?: boolean
1377
+ dynamic_tariff?: {
1378
+ mode?: { ... }
1379
+ interval?: { ... }
1380
+ average_price_decimal?: { ... }
1381
+ markup_amount_decimal?: { ... }
1382
+ markup_amount_net_decimal?: { ... }
1383
+ markup_amount_gross_decimal?: { ... }
1384
+ market_price_decimal?: { ... }
1385
+ market_price_currency?: { ... }
1386
+ market?: { ... }
1387
+ bidding_zone?: { ... }
1388
+ timestamp?: { ... }
1389
+ }
1390
+ }
1391
+ }
1392
+ ```
1393
+
1394
+ ### `ConfigurationHistoryRow`
1395
+
1396
+ ```ts
1397
+ type ConfigurationHistoryRow = {
1398
+ event_id: string
1399
+ org_id: string
1400
+ entity_type: "contract" | "billing_account"
1401
+ entity_id: string
1402
+ change_type: "installment_amount_changed"
1403
+ schema_version: number
1404
+ effective_at?: string // date-time
1405
+ changed_at: string // date-time
1406
+ created_at: string // date-time
1407
+ source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"
1408
+ source_label?: string
1409
+ source_system?: string
1410
+ source_reference?: string
1411
+ previous_value?: {
1412
+ amount?: number
1413
+ amount_decimal?: string
1414
+ currency?: string
1415
+ }
1416
+ new_value: {
1417
+ amount?: number
1418
+ amount_decimal?: string
1419
+ currency?: string
1420
+ }
1421
+ context?: {
1422
+ base_price?: {
1423
+ price_id?: { ... }
1424
+ price_title?: { ... }
1425
+ pricing_model?: { ... }
1426
+ unit_amount_gross_decimal?: { ... }
1427
+ unit_amount_net_decimal?: { ... }
1428
+ before_discount_unit_amount_gross_decimal?: { ... }
1429
+ before_discount_unit_amount_net_decimal?: { ... }
1430
+ unit_discount_amount_decimal?: { ... }
1431
+ unit_discount_amount_net_decimal?: { ... }
1432
+ currency?: { ... }
1433
+ billing_period?: { ... }
1434
+ unit?: { ... }
1435
+ has_discount?: { ... }
1436
+ is_dynamic_tariff?: { ... }
1437
+ dynamic_tariff?: { ... }
1438
+ }
1439
+ working_price?: {
1440
+ price_id?: { ... }
1441
+ price_title?: { ... }
1442
+ pricing_model?: { ... }
1443
+ unit_amount_gross_decimal?: { ... }
1444
+ unit_amount_net_decimal?: { ... }
1445
+ before_discount_unit_amount_gross_decimal?: { ... }
1446
+ before_discount_unit_amount_net_decimal?: { ... }
1447
+ unit_discount_amount_decimal?: { ... }
1448
+ unit_discount_amount_net_decimal?: { ... }
1449
+ currency?: { ... }
1450
+ billing_period?: { ... }
1451
+ unit?: { ... }
1452
+ has_discount?: { ... }
1453
+ is_dynamic_tariff?: { ... }
1454
+ dynamic_tariff?: { ... }
1455
+ }
1456
+ }
1457
+ }
1458
+ ```
1459
+
1460
+ ### `ConfigurationHistoryResponse`
1461
+
1462
+ ```ts
1463
+ type ConfigurationHistoryResponse = {
1464
+ history: Array<{
1465
+ event_id: string
1466
+ org_id: string
1467
+ entity_type: "contract" | "billing_account"
1468
+ entity_id: string
1469
+ change_type: "installment_amount_changed"
1470
+ schema_version: number
1471
+ effective_at?: string // date-time
1472
+ changed_at: string // date-time
1473
+ created_at: string // date-time
1474
+ source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"
1475
+ source_label?: string
1476
+ source_system?: string
1477
+ source_reference?: string
1478
+ previous_value?: {
1479
+ amount?: { ... }
1480
+ amount_decimal?: { ... }
1481
+ currency?: { ... }
1482
+ }
1483
+ new_value: {
1484
+ amount?: { ... }
1485
+ amount_decimal?: { ... }
1486
+ currency?: { ... }
1487
+ }
1488
+ context?: {
1489
+ base_price?: { ... }
1490
+ working_price?: { ... }
1491
+ }
1492
+ }>
1493
+ total: number
1494
+ }
1495
+ ```
1496
+
1497
+ ### `PricingInformationBalance`
1498
+
1499
+ ```ts
1500
+ type PricingInformationBalance = {
1501
+ amount?: number
1502
+ amount_decimal?: string
1503
+ currency?: string
1504
+ }
1505
+ ```
1506
+
1507
+ ### `ContractPricingSchedule`
1508
+
1509
+ ```ts
1510
+ type ContractPricingSchedule = {
1511
+ billing_due_day?: number
1512
+ billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"
1513
+ installments_per_year?: number
1514
+ inferred: boolean
1515
+ }
1516
+ ```
1517
+
1518
+ ### `ContractPricingInformation`
1519
+
1520
+ ```ts
1521
+ type ContractPricingInformation = {
1522
+ entity_type: "contract"
1523
+ entity_id: string
1524
+ title?: string
1525
+ current_installment_amount?: {
1526
+ amount?: number
1527
+ amount_decimal?: string
1528
+ currency?: string
1529
+ }
1530
+ context?: {
1531
+ base_price?: {
1532
+ price_id?: { ... }
1533
+ price_title?: { ... }
1534
+ pricing_model?: { ... }
1535
+ unit_amount_gross_decimal?: { ... }
1536
+ unit_amount_net_decimal?: { ... }
1537
+ before_discount_unit_amount_gross_decimal?: { ... }
1538
+ before_discount_unit_amount_net_decimal?: { ... }
1539
+ unit_discount_amount_decimal?: { ... }
1540
+ unit_discount_amount_net_decimal?: { ... }
1541
+ currency?: { ... }
1542
+ billing_period?: { ... }
1543
+ unit?: { ... }
1544
+ has_discount?: { ... }
1545
+ is_dynamic_tariff?: { ... }
1546
+ dynamic_tariff?: { ... }
1547
+ }
1548
+ working_price?: {
1549
+ price_id?: { ... }
1550
+ price_title?: { ... }
1551
+ pricing_model?: { ... }
1552
+ unit_amount_gross_decimal?: { ... }
1553
+ unit_amount_net_decimal?: { ... }
1554
+ before_discount_unit_amount_gross_decimal?: { ... }
1555
+ before_discount_unit_amount_net_decimal?: { ... }
1556
+ unit_discount_amount_decimal?: { ... }
1557
+ unit_discount_amount_net_decimal?: { ... }
1558
+ currency?: { ... }
1559
+ billing_period?: { ... }
1560
+ unit?: { ... }
1561
+ has_discount?: { ... }
1562
+ is_dynamic_tariff?: { ... }
1563
+ dynamic_tariff?: { ... }
1564
+ }
1565
+ }
1566
+ balance?: {
1567
+ amount?: number
1568
+ amount_decimal?: string
1569
+ currency?: string
1570
+ }
1571
+ schedule?: {
1572
+ billing_due_day?: number
1573
+ billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"
1574
+ installments_per_year?: number
1575
+ inferred: boolean
1576
+ }
1577
+ pending_installment_change?: boolean
1578
+ history: Array<{
1579
+ event_id: string
1580
+ org_id: string
1581
+ entity_type: "contract" | "billing_account"
1582
+ entity_id: string
1583
+ change_type: "installment_amount_changed"
1584
+ schema_version: number
1585
+ effective_at?: string // date-time
1586
+ changed_at: string // date-time
1587
+ created_at: string // date-time
1588
+ source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown"
1589
+ source_label?: string
1590
+ source_system?: string
1591
+ source_reference?: string
1592
+ previous_value?: {
1593
+ amount?: { ... }
1594
+ amount_decimal?: { ... }
1595
+ currency?: { ... }
1596
+ }
1597
+ new_value: {
1598
+ amount?: { ... }
1599
+ amount_decimal?: { ... }
1600
+ currency?: { ... }
1601
+ }
1602
+ context?: {
1603
+ base_price?: { ... }
1604
+ working_price?: { ... }
1605
+ }
1606
+ }>
1607
+ }
1608
+ ```
1609
+
1610
+ ### `BillingAccountPricingInformation`
1611
+
1612
+ ```ts
1613
+ type BillingAccountPricingInformation = {
1614
+ entity_type: "billing_account"
1615
+ entity_id: string
1616
+ title?: string
1617
+ balance?: {
1618
+ amount?: number
1619
+ amount_decimal?: string
1620
+ currency?: string
1621
+ }
1622
+ contracts: Array<{
1623
+ entity_type: "contract"
1624
+ entity_id: string
1625
+ title?: string
1626
+ current_installment_amount?: {
1627
+ amount?: { ... }
1628
+ amount_decimal?: { ... }
1629
+ currency?: { ... }
1630
+ }
1631
+ context?: {
1632
+ base_price?: { ... }
1633
+ working_price?: { ... }
1634
+ }
1635
+ balance?: {
1636
+ amount?: { ... }
1637
+ amount_decimal?: { ... }
1638
+ currency?: { ... }
1639
+ }
1640
+ schedule?: {
1641
+ billing_due_day?: { ... }
1642
+ billing_period?: { ... }
1643
+ installments_per_year?: { ... }
1644
+ inferred: { ... }
1645
+ }
1646
+ pending_installment_change?: boolean
1647
+ history: Array<{
1648
+ event_id: { ... }
1649
+ org_id: { ... }
1650
+ entity_type: { ... }
1651
+ entity_id: { ... }
1652
+ change_type: { ... }
1653
+ schema_version: { ... }
1654
+ effective_at?: { ... }
1655
+ changed_at: { ... }
1656
+ created_at: { ... }
1657
+ source: { ... }
1658
+ source_label?: { ... }
1659
+ source_system?: { ... }
1660
+ source_reference?: { ... }
1661
+ previous_value?: { ... }
1662
+ new_value: { ... }
1663
+ context?: { ... }
1664
+ }>
1665
+ }>
1666
+ }
1667
+ ```
1668
+
767
1669
  ### `Balance`
768
1670
 
1671
+ Customer balance summary (Kontostandübersicht).
1672
+ Represents the aggregated balance across all contracts and orders for a customer.
1673
+
1674
+
769
1675
  ```ts
770
1676
  type Balance = {
771
1677
  balance?: number
@@ -776,7 +1682,9 @@ type Balance = {
776
1682
 
777
1683
  ### `Currency`
778
1684
 
779
- Currency code in ISO 4217 format
1685
+ Currency code in ISO 4217 format (Währungscode).
1686
+ Common values: EUR (Euro), CHF (Swiss Franc)
1687
+
780
1688
 
781
1689
  ```ts
782
1690
  type Currency = string