Skip to main content

Pricing API

Usage​

import { epilot } from '@epilot/sdk'

epilot.authorize(() => '<token>')
const { data } = await epilot.pricing.$calculatePricingDetails(...)

Tree-shakeable import​

import { getClient, authorize } from '@epilot/sdk/pricing'

const pricingClient = getClient()
authorize(pricingClient, () => '<token>')
const { data } = await pricingClient.$calculatePricingDetails(...)

Operations​

Order API

Cart API

Catalog API

Promo Codes API

Availability API

Spot Market API

External Integrations API

External Catalog API

Product Recommendations API

Conditional Pricing API

Schemas

$calculatePricingDetails​

Computes a set of pricing details that can be persisted on an entity with the pricing capability enabled, e.g: Orders or Contracts.

POST /v1/pricing:compute

const { data } = await client.$calculatePricingDetails(
null,
{
line_items: [
{
external_fees_mappings: [ /* ... */ ],
external_fees_metadata: { /* ... */ },
external_location_metadata: { /* ... */ },
external_price_metadata: { /* ... */ },
_immutable_pricing_details: { /* ... */ },
coupon_ids: ['string'],
taxes: [ /* ... */ ],
recurrences: [ /* ... */ ],
_coupons: [ /* ... */ ],
metadata: [ /* ... */ ],
quantity: 0,
product_id: 'string',
price_id: 'string',
description: 'string',
product_description: 'string',
product_name: 'string',
price_mappings: [ /* ... */ ],
is_tax_inclusive: true,
_product: { /* ... */ },
catalog_reference: { /* ... */ },
type: 'one_time',
billing_period: 'weekly',
unit_amount: 0,
unit_amount_gross: 0,
unit_amount_currency: 'EUR',
unit_amount_decimal: 'string',
is_composite_price: false,
pricing_model: 'per_unit',
_price: { /* ... */ }
},
{
external_fees_mappings: [ /* ... */ ],
external_fees_metadata: { /* ... */ },
external_location_metadata: { /* ... */ },
external_price_metadata: { /* ... */ },
_immutable_pricing_details: { /* ... */ },
coupon_ids: ['string'],
taxes: [ /* ... */ ],
recurrences: [ /* ... */ ],
_coupons: [ /* ... */ ],
metadata: [ /* ... */ ],
quantity: 0,
product_id: 'string',
price_id: 'string',
description: 'string',
product_description: 'string',
product_name: 'string',
price_mappings: [ /* ... */ ],
is_tax_inclusive: true,
_product: { /* ... */ },
catalog_reference: { /* ... */ },
is_composite_price: true,
item_components: [ /* ... */ ],
selected_price_component_ids: ['string'],
price_component_coupon_ids: {},
_price: { /* ... */ }
}
],
redeemed_promos: [
{
code: 'string',
coupons: [ /* ... */ ]
}
]
},
)
Response
{
"items": [
{
"amount_subtotal": 10000,
"amount_total": 10600,
"currency": "EUR",
"description": "Annual internet service",
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"taxes": [],
"unit_amount": 10000,
"unit_amount_net": 10000,
"pricing_model": "per_unit",
"_price": {},
"_product": {}
},
{
"amount_subtotal": 10000,
"amount_total": 10600,
"currency": "EUR",
"description": "Annual internet service",
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"taxes": [],
"unit_amount": 10000,
"unit_amount_net": 10000,
"pricing_model": "per_unit",
"_price": {},
"_product": {}
}
],
"amount_subtotal": 0,
"amount_total": 0,
"unit_amount_gross": 0,
"unit_amount_net": 0,
"amount_tax": 0,
"total_details": {
"amount_shipping": 0,
"amount_tax": 0,
"breakdown": {
"taxes": [],
"recurrences": [],
"cashbacks": [],
"recurrencesByTax": []
}
},
"currency": "EUR",
"redeemed_promos": [
{
"code": "string",
"coupons": []
}
]
}

createOrder​

Create an order

POST /v1/order

const { data } = await client.createOrder(
null,
{
status: 'draft',
line_items: [
{
external_fees_mappings: [ /* ... */ ],
external_fees_metadata: { /* ... */ },
external_location_metadata: { /* ... */ },
external_price_metadata: { /* ... */ },
_immutable_pricing_details: { /* ... */ },
coupon_ids: ['string'],
taxes: [ /* ... */ ],
recurrences: [ /* ... */ ],
_coupons: [ /* ... */ ],
metadata: [ /* ... */ ],
quantity: 0,
product_id: 'string',
price_id: 'string',
description: 'string',
product_description: 'string',
product_name: 'string',
price_mappings: [ /* ... */ ],
is_tax_inclusive: true,
_product: { /* ... */ },
catalog_reference: { /* ... */ },
type: 'one_time',
billing_period: 'weekly',
unit_amount: 0,
unit_amount_gross: 0,
unit_amount_currency: 'EUR',
unit_amount_decimal: 'string',
is_composite_price: false,
pricing_model: 'per_unit',
_price: { /* ... */ }
},
{
external_fees_mappings: [ /* ... */ ],
external_fees_metadata: { /* ... */ },
external_location_metadata: { /* ... */ },
external_price_metadata: { /* ... */ },
_immutable_pricing_details: { /* ... */ },
coupon_ids: ['string'],
taxes: [ /* ... */ ],
recurrences: [ /* ... */ ],
_coupons: [ /* ... */ ],
metadata: [ /* ... */ ],
quantity: 0,
product_id: 'string',
price_id: 'string',
description: 'string',
product_description: 'string',
product_name: 'string',
price_mappings: [ /* ... */ ],
is_tax_inclusive: true,
_product: { /* ... */ },
catalog_reference: { /* ... */ },
is_composite_price: true,
item_components: [ /* ... */ ],
selected_price_component_ids: ['string'],
price_component_coupon_ids: {},
_price: { /* ... */ }
}
],
source_type: 'journey',
currency: 'EUR',
contact: 'string',
billing_first_name: 'string',
billing_last_name: 'string',
billing_company_name: 'string',
billing_vat: 'string',
billing_email: 'string',
billing_phone: 'string',
billing_address: [
{
_tags: ['billing'],
street: 'string',
street_number: 'string',
postal_code: 'string',
city: 'string',
country: 'string',
additional_info: 'string',
company_name: 'string',
first_name: 'string',
last_name: 'string',
salutation: 'string',
title: 'string'
}
],
delivery_address: [
{
_tags: ['billing'],
street: 'string',
street_number: 'string',
postal_code: 'string',
city: 'string',
country: 'string',
additional_info: 'string',
company_name: 'string',
first_name: 'string',
last_name: 'string',
salutation: 'string',
title: 'string'
}
],
payment_method: [
{
type: 'string',
details: {}
}
],
redeemed_promos: [
{
code: 'string',
coupons: [ /* ... */ ]
}
],
_tags: ['string']
},
)
Response
{
"order_number": "OR 2022/742701",
"status": "quote",
"source": {
"title": "manual",
"href": null
},
"source_type": "manual",
"_schema": "order",
"_title": "OR 2022/742701",
"expires_at": "2022-06-30T16:17:00.000Z",
"line_items": [
{
"price_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
"product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5",
"pricing_model": "per_unit",
"is_composite_price": false,
"taxes": [],
"_price": {},
"_product": {},
"quantity": 16,
"currency": "EUR",
"description": "Solar Panel Module",
"unit_amount": 100000,
"unit_amount_net": 84034,
"amount_subtotal": 1344538,
"amount_total": 1600000
},
{
"price_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741",
"product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5",
"pricing_model": "per_unit",
"is_composite_price": false,
"taxes": [],
"_price": {},
"_product": {},
"quantity": 4,
"currency": "EUR",
"description": "Battery Module 500amps",
"unit_amount": 50000,
"unit_amount_net": 42017,
"amount_subtotal": 168067,
"amount_total": 200000
}
],
"amount_subtotal": 1532191,
"amount_total": 1821955,
"total_details": {
"amount_tax": 289764,
"breakdown": {
"taxes": [],
"recurrences": []
}
},
"currency": "EUR",
"payment_method": [
{
"type": "IBAN",
"details": {}
}
],
"billing_contact": {
"$relation": [
{}
]
},
"billing_first_name": "Joao",
"billing_last_name": "Pinho",
"billing_email": "j.pinho@epilot.cloud",
"billing_company_name": "epilot cloud",
"billing_address": [
{
"_tags": [],
"street": "Im Media Park",
"street_number": "8a",
"postal_code": "52000",
"city": "Cologne",
"country": "DE",
"additional_info": ""
}
],
"delivery_address": [],
"dates": [
{
"_tags": ["Instalation Date"],
"dates": "",
"value": "2022-06-30T16:29:00.000Z"
}
],
"_id": "4c7c9562-f8f0-4af0-a3a6-6aebc5571a6e",
"_org": "728",
"_created_at": "2022-06-03T16:29:46.303Z",
"_updated_at": "2022-06-03T16:29:46.303Z"
}

putOrder​

Update an existing Order

PUT /v1/order/{id}

const { data } = await client.putOrder(
{
id: '123e4567-e89b-12d3-a456-426614174000',
},
{
status: 'draft',
line_items: [
{
external_fees_mappings: [ /* ... */ ],
external_fees_metadata: { /* ... */ },
external_location_metadata: { /* ... */ },
external_price_metadata: { /* ... */ },
_immutable_pricing_details: { /* ... */ },
coupon_ids: ['string'],
taxes: [ /* ... */ ],
recurrences: [ /* ... */ ],
_coupons: [ /* ... */ ],
metadata: [ /* ... */ ],
quantity: 0,
product_id: 'string',
price_id: 'string',
description: 'string',
product_description: 'string',
product_name: 'string',
price_mappings: [ /* ... */ ],
is_tax_inclusive: true,
_product: { /* ... */ },
catalog_reference: { /* ... */ },
type: 'one_time',
billing_period: 'weekly',
unit_amount: 0,
unit_amount_gross: 0,
unit_amount_currency: 'EUR',
unit_amount_decimal: 'string',
is_composite_price: false,
pricing_model: 'per_unit',
_price: { /* ... */ }
},
{
external_fees_mappings: [ /* ... */ ],
external_fees_metadata: { /* ... */ },
external_location_metadata: { /* ... */ },
external_price_metadata: { /* ... */ },
_immutable_pricing_details: { /* ... */ },
coupon_ids: ['string'],
taxes: [ /* ... */ ],
recurrences: [ /* ... */ ],
_coupons: [ /* ... */ ],
metadata: [ /* ... */ ],
quantity: 0,
product_id: 'string',
price_id: 'string',
description: 'string',
product_description: 'string',
product_name: 'string',
price_mappings: [ /* ... */ ],
is_tax_inclusive: true,
_product: { /* ... */ },
catalog_reference: { /* ... */ },
is_composite_price: true,
item_components: [ /* ... */ ],
selected_price_component_ids: ['string'],
price_component_coupon_ids: {},
_price: { /* ... */ }
}
],
source_type: 'journey',
currency: 'EUR',
contact: 'string',
billing_first_name: 'string',
billing_last_name: 'string',
billing_company_name: 'string',
billing_vat: 'string',
billing_email: 'string',
billing_phone: 'string',
billing_address: [
{
_tags: ['billing'],
street: 'string',
street_number: 'string',
postal_code: 'string',
city: 'string',
country: 'string',
additional_info: 'string',
company_name: 'string',
first_name: 'string',
last_name: 'string',
salutation: 'string',
title: 'string'
}
],
delivery_address: [
{
_tags: ['billing'],
street: 'string',
street_number: 'string',
postal_code: 'string',
city: 'string',
country: 'string',
additional_info: 'string',
company_name: 'string',
first_name: 'string',
last_name: 'string',
salutation: 'string',
title: 'string'
}
],
payment_method: [
{
type: 'string',
details: {}
}
],
redeemed_promos: [
{
code: 'string',
coupons: [ /* ... */ ]
}
],
_tags: ['string']
},
)
Response
{
"order_number": "OR 2022/742701",
"status": "quote",
"source": {
"title": "manual",
"href": null
},
"source_type": "manual",
"_schema": "order",
"_title": "OR 2022/742701",
"expires_at": "2022-06-30T16:17:00.000Z",
"line_items": [
{
"price_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
"product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5",
"pricing_model": "per_unit",
"is_composite_price": false,
"taxes": [],
"_price": {},
"_product": {},
"quantity": 16,
"currency": "EUR",
"description": "Solar Panel Module",
"unit_amount": 100000,
"unit_amount_net": 84034,
"amount_subtotal": 1344538,
"amount_total": 1600000
},
{
"price_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741",
"product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5",
"pricing_model": "per_unit",
"is_composite_price": false,
"taxes": [],
"_price": {},
"_product": {},
"quantity": 4,
"currency": "EUR",
"description": "Battery Module 500amps",
"unit_amount": 50000,
"unit_amount_net": 42017,
"amount_subtotal": 168067,
"amount_total": 200000
}
],
"amount_subtotal": 1532191,
"amount_total": 1821955,
"total_details": {
"amount_tax": 289764,
"breakdown": {
"taxes": [],
"recurrences": []
}
},
"currency": "EUR",
"payment_method": [
{
"type": "IBAN",
"details": {}
}
],
"billing_contact": {
"$relation": [
{}
]
},
"billing_first_name": "Joao",
"billing_last_name": "Pinho",
"billing_email": "j.pinho@epilot.cloud",
"billing_company_name": "epilot cloud",
"billing_address": [
{
"_tags": [],
"street": "Im Media Park",
"street_number": "8a",
"postal_code": "52000",
"city": "Cologne",
"country": "DE",
"additional_info": ""
}
],
"delivery_address": [],
"dates": [
{
"_tags": ["Instalation Date"],
"dates": "",
"value": "2022-06-30T16:29:00.000Z"
}
],
"_id": "4c7c9562-f8f0-4af0-a3a6-6aebc5571a6e",
"_org": "728",
"_created_at": "2022-06-03T16:29:46.303Z",
"_updated_at": "2022-06-03T16:29:46.303Z"
}

$checkoutCart​

Checkouts a cart and executes the specified checkout mode process.

POST /v1/public/cart:checkout

const { data } = await client.$checkoutCart(
{
X-Ivy-Org-ID: 'example',
},
{
cart: 'string',
redeemed_promos: [
{
code: 'string',
coupons: [
{
_id: '123e4567-e89b-12d3-a456-426614174000',
_schema: 'coupon',
_org: 'org_12345',
_created_at: '2024-01-15T10:00:00.000Z',
_updated_at: '2024-01-20T12:00:00.000Z',
_title: 'Sample Coupon',
name: 'Sample Coupon',
type: 'fixed',
fixed_value: 555,
fixed_value_currency: 'USD',
fixed_value_decimal: '5.55',
active: true,
category: 'cashback',
prices: {
$relation: [
{
entity_id: 'abc12345-def6-7890-gh12-ijklmnopqrst',
_tags: ['discount', 'special'],
_schema: 'price'
}
]
}
}
]
}
],
mode: 'create_order'
},
)
Response
{
"order": {
"order_number": "OR 2022/742701",
"status": "quote",
"source": {
"title": "manual",
"href": null
},
"source_type": "manual",
"_schema": "order",
"_title": "OR 2022/742701",
"expires_at": "2022-06-30T16:17:00.000Z",
"line_items": [
{},
{}
],
"amount_subtotal": 1532191,
"amount_total": 1821955,
"total_details": {
"amount_tax": 289764,
"breakdown": {}
},
"currency": "EUR",
"payment_method": [
{}
],
"billing_contact": {
"$relation": []
},
"billing_first_name": "Joao",
"billing_last_name": "Pinho",
"billing_email": "j.pinho@epilot.cloud",
"billing_company_name": "epilot cloud",
"billing_address": [
{}
],
"delivery_address": [],
"dates": [
{}
],
"_id": "4c7c9562-f8f0-4af0-a3a6-6aebc5571a6e",
"_org": "728",
"_created_at": "2022-06-03T16:29:46.303Z",
"_updated_at": "2022-06-03T16:29:46.303Z"
}
}

$searchCatalog​

Provides a querying functionalities over products and prices of the Catalog for a given organization.

POST /v1/public/catalog

const { data } = await client.$searchCatalog(
{
X-Ivy-Org-ID: 'example',
Authorization: 'example',
},
{
q: '_id:1233432 OR _id:123432454 OR _id:23445433',
sort: 'description ASC',
from: 0,
size: 200
},
)
Response
{
"hits": 2,
"results": [
{
"schema": "product",
"description": "product a"
},
{
"schema": "price",
"unit_amount_decimal": "124.342343434"
}
]
}

$privateSearchCatalog​

Provides a querying functionalities over products and prices of the Catalog for a given organization.

POST /v1/catalog

const { data } = await client.$privateSearchCatalog(
null,
{
q: '_id:1233432 OR _id:123432454 OR _id:23445433',
sort: 'description ASC',
from: 0,
size: 200
},
)
Response
{
"hits": 2,
"results": [
{
"schema": "product",
"description": "product a"
},
{
"schema": "price",
"unit_amount_decimal": "124.342343434"
}
]
}

$resolveCatalog​

Returns the products and prices a journey block shows as catalog pairs, each member resolved for its own entity type's context at as_of. A pair carries the product, one of its prices, the coupons th

POST /v2/public/catalog

const { data } = await client.$resolveCatalog(
null,
{
entries: [
{
product_id: 'product-pv-2027',
price_id: 'price-sp26d1yo'
}
],
context: {
product: {
postal_code: '46045',
channel: 'direct'
},
price: {
postal_code: '46045'
}
},
as_of: '2026-12-20T10:15:00Z'
},
)
Response
{
"pairs": [
{
"product": {},
"price": {},
"coupons": [],
"catalog_reference": {}
}
]
}

$validatePromoCodes​

Validate a list of promo codes against a list of coupons

POST /v1/public/validate-promo-codes

const { data } = await client.$validatePromoCodes(
{
X-Ivy-Org-ID: 'example',
},
{},
)
Response
{
"matched_coupons": [
{
"_id": "123e4567-e89b-12d3-a456-426614174000",
"_schema": "coupon",
"_org": "org_12345",
"_created_at": "2024-01-15T10:00:00.000Z",
"_updated_at": "2024-01-20T12:00:00.000Z",
"_title": "Sample Coupon",
"name": "Sample Coupon",
"type": "fixed",
"fixed_value": 555,
"fixed_value_currency": "USD",
"fixed_value_decimal": "5.55",
"active": true,
"category": "cashback",
"prices": {
"$relation": [
{
"entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
"_tags": ["discount", "special"],
"_schema": "price"
}
]
}
}
]
}

$availabilityCheck​

The availability check endpoint

POST /v1/public/availability:check

const { data } = await client.$availabilityCheck(
{
X-Ivy-Org-ID: 'example',
},
{
products: ['string'],
filters: {
location: {
street: 'string',
street_number: 'string',
postal_code: 'string',
city: 'string',
country: 'string'
},
available_date: '2017-07-21'
}
},
)
Response
{
"available_products": [],
"check_results": [
{
"product_id": "my-product-id-123-1",
"matching_hits": 0
},
{
"product_id": "my-product-id-123-2",
"matching_hits": 0
}
]
}

$validateAvailabilityFile​

Validates an availability file, it returns an array of errors if the file is invalid

GET /v1/validate-availability/{id}

const { data } = await client.$validateAvailabilityFile({
id: '123e4567-e89b-12d3-a456-426614174000',
X-Epilot-Org-ID: 'example',
})
Response
{
"status": "success",
"rules_parsed_count": 10,
"errors": []
}

$historicMarketPrices​

Get a series of historic energy prices for a given time period, market and bidding zone.

GET /v1/public/historicMarketPrices

const { data } = await client.$historicMarketPrices({
market: 'example',
bidding_zone: 'example',
frequency: 'example',
from: 'example',
to: 'example',
})
Response
{
"market": "day_ahead",
"bidding_zone": "AT",
"prices": [
{
"unit_amount": 12.3,
"unit_amount_decimal": "0.123",
"unit_amount_currency": "EUR",
"timestamp": "1970-01-01T00:00:00.000Z"
}
]
}

$averageMarketPrice​

Get the average energy prices for a given time period, market and bidding zone.

GET /v1/public/averageMarketPrice

const { data } = await client.$averageMarketPrice({
market: 'example',
bidding_zone: 'example',
from: 'example',
to: 'example',
})
Response
{
"market": "day_ahead",
"bidding_zone": "AT",
"price": {
"unit_amount": 12.3,
"unit_amount_decimal": "0.123",
"unit_amount_currency": "EUR",
"timestamp": "2025-01-01T00:00:00Z/2025-01-31T23:59:59Z"
},
"_meta": {
"signature": "string",
"timestamp": 0
}
}

$searchExternalProducts​

Returns the list of available products with computed prices based on a given context and for a given org integration.

POST /v1/public/integration/{integrationId}/products

const { data } = await client.$searchExternalProducts(
{
integrationId: 'example',
},
{
context: {
journey_id: '8d0a2235-97ce-42d0-88a3-e374634ca44e',
entity_id: '8d0a2235-97ce-42d0-88a3-e374634ca44e',
journey_name: 'journey name',
journey_tags: ['string'],
journey_url_params: {},
current_step_name: 'step name',
current_block_name: 'block name',
steps_data: [
{
step_name: 'string',
step_index: 0,
blocks: {
Adresse: {
countryCode: 'DE',
city: 'Koblenz',
zipCode: '56068',
streetName: 'Am Alten Hospital',
houseNumber: '123'
}
}
}
]
}
},
)
Response
{
"hits": 0,
"results": [
{
"pricing_details": {},
"_meta": {}
}
]
}

$searchExternalProductRecommendations​

Returns the list of available product recommendations with computed prices based on a given context and for a given org integration.

POST /v1/public/integration/{integrationId}/product-recommendations

const { data } = await client.$searchExternalProductRecommendations(
{
integrationId: 'example',
},
{
context: {
journey_id: '8d0a2235-97ce-42d0-88a3-e374634ca44e',
entity_id: '8d0a2235-97ce-42d0-88a3-e374634ca44e',
journey_name: 'journey name',
journey_tags: ['string'],
journey_url_params: {},
current_step_name: 'step name',
current_block_name: 'block name',
steps_data: [
{
step_name: 'string',
step_index: 0,
blocks: {
Adresse: {
countryCode: 'DE',
city: 'Koblenz',
zipCode: '56068',
streetName: 'Am Alten Hospital',
houseNumber: '123'
}
}
}
]
}
},
)
Response
{
"source": {
"pricing_details": {
"items": [],
"amount_subtotal": 0,
"amount_total": 0,
"unit_amount_gross": 0,
"unit_amount_net": 0,
"amount_tax": 0,
"total_details": {},
"currency": "EUR",
"redeemed_promos": []
},
"_meta": {
"signature": "string",
"timestamp": 0
}
},
"offers": [
{
"pricing_details": {},
"_meta": {}
}
]
}

$searchProviders​

Returns the list of providers available based on a given location

POST /v1/public/integration/{integrationId}/providers:search

const { data } = await client.$searchProviders(
{
X-Epilot-Org-ID: 'example',
integrationId: 'example',
},
{
type: 'power',
postal_code: 'string',
city: 'string',
street: 'string',
street_number: 'string',
grid_filter: 'all'
},
)
Response
[
{
"name": "string",
"code": "string",
"type": "gas",
"additionalData": {
"gridOperators": [
{
"name": "string",
"codeNumber": "string",
"validFrom": "1970-01-01",
"validUntil": "1970-01-01"
}
],
"defaultSuppliers": [
{
"name": "string",
"codeNumber": "string",
"validFrom": "1970-01-01",
"validUntil": "1970-01-01"
}
],
"marketAreaDetails": {
"gasType": "L-Gas",
"marketArea": "string",
"virtualTradingPoint": "string"
}
},
"_meta": {
"signature": "string",
"timestamp": 0
}
}
]

$searchStreets​

Returns the list of streets available for a given postal code and city

POST /v1/public/integration/{integrationId}/streets:search

const { data } = await client.$searchStreets(
{
X-Epilot-Org-ID: 'example',
integrationId: 'example',
},
{
postal_code: 'string',
city: 'string'
},
)
Response
[
{
"street": "string"
}
]

$computePrice​

Returns the price for a given product type based on location and consumption

POST /v1/public/integration/{integrationId}/compute-price

const { data } = await client.$computePrice(
{
X-Epilot-Org-ID: 'example',
integrationId: 'example',
},
{
postal_code: 'string',
consumption_type: 'household',
consumption: 0,
consumption_HT: 0,
consumption_NT: 0,
association_id: 'string',
billing_period: 'monthly',
reference_date: '1970-01-01',
city: 'string',
type: 'power',
meter_type: 'classic'
},
)
Response
{
"amount_total": 0,
"amount_total_decimal": "string",
"amount_static": 0,
"amount_static_decimal": {},
"amount_variable_ht": 0,
"amount_variable_decimal_ht": "string",
"unit_amount_variable_ht": 0,
"unit_amount_variable_decimal_ht": "string",
"amount_variable_nt": 0,
"amount_variable_decimal_nt": "string",
"unit_amount_variable_nt": 0,
"unit_amount_variable_decimal_nt": "string",
"currency": "EUR",
"billing_period": "weekly",
"breakdown": {
"static": {},
"variable": {},
"variable_ht": {},
"variable_nt": {}
},
"inputs": {
"type": "power",
"consumptionHT": 0,
"consumptionNT": 0,
"consumptionType": "household",
"zipCode": "string",
"city": "string",
"providerId": "string",
"billingPeriod": "weekly",
"referenceDate": "1970-01-01"
},
"_meta": {
"signature": "string",
"timestamp": 0
}
}

$getCredentials​

Gets the credentials for a given integration / organization

GET /v1/integration/{integrationId}/credentials

const { data } = await client.$getCredentials({
integrationId: 'example',
})
Response
{}

$saveCredentials​

Saves the credentials for a given integration / organization

PUT /v1/integration/{integrationId}/credentials:save

const { data } = await client.$saveCredentials(
{
integrationId: 'example',
},
{},
)

$deleteCredentials​

Delete the credentials for a given integration / organization

DELETE /v1/integration/{integrationId}/credentials:delete

const { data } = await client.$deleteCredentials({
integrationId: 'example',
})

$getExternalCatalogProducts​

Returns the list of available external catalog products with computed prices based on a given context

POST /v1/public/external-catalog/products

const { data } = await client.$getExternalCatalogProducts(
{
x-epilot-org-id: 'example',
},
{
config: {
appId: '1234567890',
componentId: '1234567890',
hookId: '1234567890'
},
origin: 'journey',
context: {
journey_id: '8d0a2235-97ce-42d0-88a3-e374634ca44e',
entity_id: '9e1b3346-a8df-53e1-99b4-f485745db55f',
journey_name: 'Product Selection Journey',
journey_tags: ['electricity', 'residential'],
journey_url_params: {
utm_source: 'google',
utm_campaign: 'spring2024'
},
current_step_name: 'Product Selection',
current_block_name: 'Energy Products',
steps_data: [
{
step_name: 'Address Information',
step_index: 0,
blocks: {
Adresse: {
countryCode: 'DE',
city: 'Koblenz',
zipCode: '56068',
streetName: 'Am Alten Hospital',
houseNumber: '123'
}
}
}
]
}
},
)
Response
{
"hits": 0,
"results": [
{
"pricing_details": {},
"_meta": {}
}
]
}

$getExternalCatalogProductRecommendations​

Returns the list of available external catalog products recommendations based on a given context

POST /v1/public/external-catalog/product-recommendations

const { data } = await client.$getExternalCatalogProductRecommendations(
{
x-epilot-org-id: 'example',
},
{
config: {
appId: '1234567890',
componentId: '1234567890',
hookId: '1234567890'
},
origin: 'journey',
context: {
journey_id: '8d0a2235-97ce-42d0-88a3-e374634ca44e',
entity_id: '9e1b3346-a8df-53e1-99b4-f485745db55f',
journey_name: 'Product Selection Journey',
journey_tags: ['electricity', 'residential'],
journey_url_params: {
utm_source: 'google',
utm_campaign: 'spring2024'
},
current_step_name: 'Product Selection',
current_block_name: 'Energy Products',
steps_data: [
{
step_name: 'Address Information',
step_index: 0,
blocks: {
Adresse: {
countryCode: 'DE',
city: 'Koblenz',
zipCode: '56068',
streetName: 'Am Alten Hospital',
houseNumber: '123'
}
}
}
]
}
},
)
Response
{
"source": {
"pricing_details": {
"items": [],
"amount_subtotal": 0,
"amount_total": 0,
"unit_amount_gross": 0,
"unit_amount_net": 0,
"amount_tax": 0,
"total_details": {},
"currency": "EUR",
"redeemed_promos": []
},
"_meta": {
"signature": "string",
"timestamp": 0
}
},
"offers": [
{
"pricing_details": {},
"_meta": {}
}
]
}

$productRecommendations​

Get a list of product recommendations based on the search parameters.

POST /v1/public/product-recommendations

const { data } = await client.$productRecommendations(
{
X-Ivy-Org-ID: 'example',
},
{
product_recommendation_ids: ['string'],
catalog_item: {
product_id: 'string',
price_id: 'string'
},
contract_id: 'string',
filters: {
location: {
street: 'string',
street_number: 'string',
postal_code: 'string',
city: 'string',
country: 'string'
},
available_date: '2017-07-21'
}
},
)
Response
{
"hits": 0,
"results": [
{
"_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6",
"_title": "Cool box",
"_org": "728",
"_schema": "order",
"_created_at": "2022-06-03T16:04:10.000Z",
"_updated_at": "2022-06-03T16:04:10.000Z",
"amount_subtotal": 10000,
"amount_total": 10600,
"currency": "EUR",
"description": "Annual internet service",
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"taxes": [],
"unit_amount": 10000,
"unit_amount_net": 10000,
"pricing_model": "per_unit",
"_price": {},
"_product": {}
}
],
"source": {
"item": {
"amount_subtotal": 10000,
"amount_total": 10600,
"currency": "EUR",
"description": "Annual internet service",
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"taxes": [],
"unit_amount": 10000,
"unit_amount_net": 10000,
"pricing_model": "per_unit",
"_price": {},
"_product": {}
}
}
}

$getConditionSets​

Returns the condition sets built in for one conditional entity type, ready to copy into that schema's conditions array. Read-only, and the same for every organization.

GET /v1/conditional-pricing/{slug}/condition-sets

const { data } = await client.$getConditionSets({
slug: 'example',
})
Response
{
"results": [
{
"id": "delivery_area",
"label": "Delivery Area",
"description": "string",
"conditions": [
{
"id": "d5839b94-ba20-4225-a78e-76951d352bd6",
"name": "postal_code",
"label": "Postal Code",
"type": "string",
"options": [
"private",
{
"value": "commercial",
"title": "Commercial customers"
}
],
"format": "postal_code"
}
]
}
]
}

$getConditionUsage​

Returns, for each condition the schema declares and each option a select condition declares, how many variants pin it, and for the schema as a whole how many conditional entities and variants it has

GET /v1/conditional-pricing/{slug}/conditions:usage

const { data } = await client.$getConditionUsage({
slug: 'example',
})
Response
{
"total": {
"variants": 1252,
"entities": 38
},
"conditions": [
{
"name": "delivery_area",
"variants": 1240,
"entities": 37
},
{
"name": "customer_type",
"variants": 12,
"entities": 3,
"options": [
{
"value": "private",
"variants": 12
},
{
"value": "business",
"variants": 0
}
],
"undeclared_options": []
}
],
"undeclared": [
{
"name": "legacy_customer_type",
"type": "select",
"variants": 1,
"entities": 1,
"options": [
{
"value": "private",
"variants": 1
}
]
}
]
}

$getConditionalPricingOrganization​

Returns whether the calling organization has Conditional Pricing on, whether its search collection is ready or still being deleted, and, once it is on, whether it is in use. While it is in use, or whi

GET /v1/conditional-pricing/organization

const { data } = await client.$getConditionalPricingOrganization()
Response
{
"status": "NOT_ENABLED"
}

$resolveConditionalEntity​

Returns the variants of one conditional entity that apply, each composed: the base entity overlaid with the version in effect at as_of.

POST /v1/conditional-pricing:resolve

const { data } = await client.$resolveConditionalEntity(
null,
{
schema: 'product',
entity_id: 'price-sp26d1yo',
context: {
postal_code: '46045',
consumption: {
lt: 5000
}
},
as_of: '2027-03-15T00:00:00Z',
options: {
resolve_one: false,
hydrate: false
}
},
)
Response
{
"results": [
{
"_id": "price-sp26d1yo",
"_variant_id": "var-46045",
"_version_valid_from": "2027-01-01",
"_conditions": {
"postal_code": "46045",
"default": false
},
"_inert_overrides": [
{
"attribute": "unit_amount",
"reason": "ATTRIBUTE_NOT_OVERRIDABLE"
}
]
}
]
}

$createConditionalVariant​

Creates one variant together with its first version.

POST /v1/conditional-pricing/{slug}/entities/{entity_id}/variants

const { data } = await client.$createConditionalVariant(
{
slug: 'example',
entity_id: 'example',
},
{
conditions: {
postal_code: '46045'
},
default: false,
valid_from: '2027-01-01',
values: {
unit_amount: 2499,
unit_amount_decimal: '24.99'
}
},
)
Response
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"valid_from": "2027-01-01",
"values": {
"unit_amount": 2499,
"unit_amount_decimal": "24.99"
},
"_created_at": "string",
"_updated_at": "string",
"_revision": 0,
"warnings": [
{
"code": "VARIANT_COUNT_APPROACHING_CAP",
"message": "string",
"details": {
"variant_count": 0,
"cap": 0
}
}
]
}

$listConditionalVariants​

Lists a conditional entity's variants and the conditions each one pins. A POST because the condition filter is a structured object; nothing is written. The body is required, so send {} for the fir

POST /v1/conditional-pricing/{slug}/entities/{entity_id}/variants:list

const { data } = await client.$listConditionalVariants(
{
slug: 'example',
entity_id: 'example',
},
{
conditions: {
postal_code: '46045',
consumption: {
lt: 5000
}
},
search: '460',
sort: 'conditions.postal_code:asc',
from: 0,
size: 10,
cursor: 'eyJmcm9tIjoyNSwibGlzdGluZyI6IjNmOWMxZTJhIn0'
},
)
Response
{
"hits": 8128,
"results": [
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
}
}
],
"next": "eyJmcm9tIjoyNSwibGlzdGluZyI6IjNmOWMxZTJhIn0"
}

$getConditionalVariantTree​

The variants list, each row carrying the version in effect at as_of and a status saying whether that version is active or still scheduled.

POST /v1/conditional-pricing/{slug}/entities/{entity_id}/variants:tree

const { data } = await client.$getConditionalVariantTree(
{
slug: 'example',
entity_id: 'example',
},
{
conditions: {
postal_code: '46045',
consumption: {
lt: 5000
}
},
search: '460',
sort: 'conditions.postal_code:asc',
from: 0,
size: 10,
cursor: 'eyJmcm9tIjoyNSwibGlzdGluZyI6IjNmOWMxZTJhIn0',
as_of: '2027-03-15T00:00:00Z'
},
)
Response
{
"hits": 8128,
"results": [
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"status": "active",
"version": {
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"valid_from": "2027-01-01",
"values": {
"unit_amount": 2499,
"unit_amount_decimal": "24.99"
},
"_created_at": "string",
"_updated_at": "string"
}
}
],
"next": "eyJmcm9tIjoyNSwibGlzdGluZyI6IjNmOWMxZTJhIn0"
}

$getActiveConditionalVariantVersion​

Returns the version of this variant in effect today in the organization's timezone — the latest valid_from on or before today — with the _revision a write to it must carry.

GET /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}

const { data } = await client.$getActiveConditionalVariantVersion({
slug: 'example',
entity_id: 'example',
variant_id: 'example',
})
Response
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"valid_from": "2027-01-01",
"values": {
"unit_amount": 2499,
"unit_amount_decimal": "24.99"
},
"_created_at": "string",
"_updated_at": "string",
"_revision": 3
}

$replaceActiveConditionalVariantVersion​

Replaces the values of the version in effect. The body is the complete set of overrides: an overridable attribute absent from it stops being overridden, and one the variant may not override keeps its

PUT /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}

const { data } = await client.$replaceActiveConditionalVariantVersion(
{
slug: 'example',
entity_id: 'example',
variant_id: 'example',
},
{
values: {
unit_amount: 2499,
unit_amount_decimal: '24.99'
},
_revision: 3,
valid_from: '1970-01-01',
conditions: {
postal_code: '46045'
}
},
)
Response
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"valid_from": "2027-01-01",
"values": {
"unit_amount": 2499,
"unit_amount_decimal": "24.99"
},
"_created_at": "string",
"_updated_at": "string",
"_revision": 3,
"warnings": [
{
"code": "VARIANT_COUNT_APPROACHING_CAP",
"message": "string",
"details": {
"variant_count": 0,
"cap": 0
}
}
]
}

$patchActiveConditionalVariantVersion​

Changes only the fields it names on the version in effect. null sets a value rather than removing an override; use the replace operation to remove one.

PATCH /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}

const { data } = await client.$patchActiveConditionalVariantVersion(
{
slug: 'example',
entity_id: 'example',
variant_id: 'example',
},
{
values: {
unit_amount: 2499,
unit_amount_decimal: '24.99'
},
_revision: 3,
valid_from: '1970-01-01',
conditions: {
postal_code: '46045'
}
},
)
Response
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"valid_from": "2027-01-01",
"values": {
"unit_amount": 2499,
"unit_amount_decimal": "24.99"
},
"_created_at": "string",
"_updated_at": "string",
"_revision": 3,
"warnings": [
{
"code": "VARIANT_COUNT_APPROACHING_CAP",
"message": "string",
"details": {
"variant_count": 0,
"cap": 0
}
}
]
}

$deleteConditionalVariant​

Removes one variant: its condition tuple, its index entry and all its versions. The tuple becomes reusable, and an interrupted delete is safe to send again.

DELETE /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}

const { data } = await client.$deleteConditionalVariant({
slug: 'example',
entity_id: 'example',
variant_id: 'example',
})
Response
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"tuple_released": true,
"versions_deleted": 0
}

$listConditionalVariantVersions​

Lists one variant's versions. Cursor paging only: a page may be short or empty and still carry a next, so page until next is absent. A cursor is bound to one variant and one order.

GET /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions

const { data } = await client.$listConditionalVariantVersions({
slug: 'example',
entity_id: 'example',
variant_id: 'example',
limit: 1,
order: 'example',
cursor: 'example',
})
Response
{
"results": [
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"valid_from": "2027-01-01",
"values": {
"unit_amount": 2499,
"unit_amount_decimal": "24.99"
},
"_created_at": "string",
"_updated_at": "string"
}
],
"next": "eyJzayI6IlYjcHJpY2Utc3AyNmQxeW8jdmFyLTQ2MDQ1IzIwMjYtMDEtMDFUMDA6MDA6MDAuMDAwWiIsIm9yZGVyIjoiYXNjIn0"
}

$appendConditionalVariantVersion​

Appends a version taking effect on its own date. A variant has at most one version per day. The version in effect at any as_of is the one with the latest valid_from on or before its date in the or

POST /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions

const { data } = await client.$appendConditionalVariantVersion(
{
slug: 'example',
entity_id: 'example',
variant_id: 'example',
},
{
valid_from: '2027-01-01',
values: {
unit_amount: 2499,
unit_amount_decimal: '24.99'
},
conditions: {
postal_code: '46045'
}
},
)
Response
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"valid_from": "2027-01-01",
"values": {
"unit_amount": 2499,
"unit_amount_decimal": "24.99"
},
"_created_at": "string",
"_updated_at": "string",
"_revision": 3,
"warnings": [
{
"code": "VARIANT_COUNT_APPROACHING_CAP",
"message": "string",
"details": {
"variant_count": 0,
"cap": 0
}
}
]
}

$getConditionalVariantVersion​

Returns one version by the date it takes effect. Exact, never nearest.

GET /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions/{valid_from}

const { data } = await client.$getConditionalVariantVersion({
slug: 'example',
entity_id: 'example',
variant_id: 'example',
valid_from: 'example',
})
Response
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"valid_from": "2027-01-01",
"values": {
"unit_amount": 2499,
"unit_amount_decimal": "24.99"
},
"_created_at": "string",
"_updated_at": "string",
"_revision": 3
}

$replaceConditionalVariantVersion​

Replaces one version's values, whatever its date. Attributes the variant may not override keep their stored value. Writing a superseded version is reported in warnings.

PUT /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions/{valid_from}

const { data } = await client.$replaceConditionalVariantVersion(
{
slug: 'example',
entity_id: 'example',
variant_id: 'example',
valid_from: 'example',
},
{
values: {
unit_amount: 2499,
unit_amount_decimal: '24.99'
},
_revision: 3,
valid_from: '1970-01-01',
conditions: {
postal_code: '46045'
}
},
)
Response
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"valid_from": "2027-01-01",
"values": {
"unit_amount": 2499,
"unit_amount_decimal": "24.99"
},
"_created_at": "string",
"_updated_at": "string",
"_revision": 3,
"warnings": [
{
"code": "VARIANT_COUNT_APPROACHING_CAP",
"message": "string",
"details": {
"variant_count": 0,
"cap": 0
}
}
]
}

$patchConditionalVariantVersion​

Changes only the fields it names on one version.

PATCH /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions/{valid_from}

const { data } = await client.$patchConditionalVariantVersion(
{
slug: 'example',
entity_id: 'example',
variant_id: 'example',
valid_from: 'example',
},
{
values: {
unit_amount: 2499,
unit_amount_decimal: '24.99'
},
_revision: 3,
valid_from: '1970-01-01',
conditions: {
postal_code: '46045'
}
},
)
Response
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"conditions": {
"postal_code": "46045",
"default": false
},
"valid_from": "2027-01-01",
"values": {
"unit_amount": 2499,
"unit_amount_decimal": "24.99"
},
"_created_at": "string",
"_updated_at": "string",
"_revision": 3,
"warnings": [
{
"code": "VARIANT_COUNT_APPROACHING_CAP",
"message": "string",
"details": {
"variant_count": 0,
"cap": 0
}
}
]
}

$deleteConditionalVariantVersion​

Removes one version. What the removal moves is reported in warnings. A variant's last remaining version cannot be removed — delete the variant instead.

DELETE /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions/{valid_from}

const { data } = await client.$deleteConditionalVariantVersion({
slug: 'example',
entity_id: 'example',
variant_id: 'example',
valid_from: 'example',
_revision: 1,
})
Response
{
"variant_id": "var-46045",
"entity_id": "price-sp26d1yo",
"schema": "product",
"valid_from": "2027-01-01",
"warnings": [
{
"code": "VARIANT_COUNT_APPROACHING_CAP",
"message": "string",
"details": {
"variant_count": 0,
"cap": 0
}
}
]
}

$batchUpsertConditionalVariants​

Writes up to 100 variants or versions in one call. Each item names its own entity, so one call can span a tariff hierarchy, and addresses a variant by condition tuple rather than by id — the id it cre

POST /v1/conditional-pricing/{slug}/variants:batchUpsert

const { data } = await client.$batchUpsertConditionalVariants(
{
slug: 'example',
},
{
correlation_id: 'tariff-refresh-2027-01',
items: [
{
entity_id: 'price-sp26d1yo',
conditions: {
postal_code: '46045'
},
default: false,
valid_from: '2027-01-01',
values: {
unit_amount: 2499,
unit_amount_decimal: '24.99'
}
}
]
},
)
Response
{
"correlation_id": "tariff-refresh-2027-01",
"counts": {
"variant_created": 1,
"version_created": 1,
"updated": 1,
"skipped": 1,
"error": 1
},
"results": [
{
"outcome": "variant_created",
"entity_id": "price-sp26d1yo",
"variant_id": "var-46045",
"valid_from": "2027-01-01",
"warnings": [
{
"code": "VARIANT_COUNT_APPROACHING_CAP",
"message": "string",
"details": {
"variant_count": 0,
"cap": 0
}
}
],
"error": {
"code": "SCHEMA_NOT_FOUND",
"details": {
"schema": "price"
}
}
}
]
}

$batchDeleteConditionalVariants​

Removes up to 100 variants or versions in one call. An item carrying valid_from removes that version; one without it removes the whole variant.

POST /v1/conditional-pricing/{slug}/variants:batchDelete

const { data } = await client.$batchDeleteConditionalVariants(
{
slug: 'example',
},
{
correlation_id: 'postal-code-cleanup-2026-09',
items: [
{
entity_id: 'price-sp26d1yo',
variant_id: 'var-46045',
valid_from: '2027-01-01'
}
]
},
)
Response
{
"correlation_id": "postal-code-cleanup-2026-09",
"counts": {
"deleted": 1,
"skipped": 1,
"error": 1
},
"results": [
{
"outcome": "deleted",
"entity_id": "price-sp26d1yo",
"variant_id": "var-46045",
"valid_from": "2027-01-01",
"warnings": [
{
"code": "VARIANT_COUNT_APPROACHING_CAP",
"message": "string",
"details": {
"variant_count": 0,
"cap": 0
}
}
],
"error": {
"code": "SCHEMA_NOT_FOUND",
"details": {
"schema": "price"
}
}
}
]
}

Schemas​

IntegrationId​

type IntegrationId = "getag" | "external-catalog"

ConditionalEntitySlug​

Schema slug of an entity type that can be conditional — the {slug} of every conditional-pricing route.

type ConditionalEntitySlug = "product" | "price" | "coupon"

ConditionType​

The kind of value a condition holds, which decides how a pinned value is matched against a resolve context.

  • string: an arbitrary string, matched exactly and case-sensitively
  • number: a numeric value
  • date: a single date
  • daterange: a window from a from to an until, both included; e
type ConditionType = "string" | "number" | "date" | "daterange" | "boolean" | "select" | "location"

LocationFormat​

The value shape of a location condition. Absent for every other type.

  • postal_code: a postal code
  • postal_code_city: a postal code and a city
  • power_grid_operator: the code number of the power grid operator an address is connected to
  • gas_grid_operator: the code number of the gas grid
type LocationFormat = "postal_code" | "postal_code_city" | "power_grid_operator" | "gas_grid_operator"

ConditionDefinition​

One condition dimension, in the shape a schema's conditions array holds it — copy it in verbatim.

type ConditionDefinition = {
id: string // uuid
name: string
label: string
type: "string" | "number" | "date" | "daterange" | "boolean" | "select" | "location"
options?: Array<string | {
value: string
title?: string
}>
format?: "postal_code" | "postal_code_city" | "power_grid_operator" | "gas_grid_operator"
}

ConditionSet​

A named bundle of condition definitions, built in for one entity type.

type ConditionSet = {
id: string
label: string
description: string
conditions: Array<{
id: string // uuid
name: string
label: string
type: "string" | "number" | "date" | "daterange" | "boolean" | "select" | "location"
options?: Array<string | {
value: { ... }
title?: { ... }
}>
format?: "postal_code" | "postal_code_city" | "power_grid_operator" | "gas_grid_operator"
}>
}

ConditionSetCatalog​

type ConditionSetCatalog = {
results: Array<{
id: string
label: string
description: string
conditions: Array<{
id: { ... }
name: { ... }
label: { ... }
type: { ... }
options?: { ... }
format?: { ... }
}>
}>
}

ConditionalPricingOptIn​

type ConditionalPricingOptIn = {
status: "PROVISIONING" | "ACTIVE"
}

ConditionUsage​

type ConditionUsage = {
total: {
variants: number
entities: number
}
conditions: Array<{
name: string
variants: number
entities: number
options?: Array<{
value: { ... }
variants: { ... }
}>
undeclared_options?: Array<{
value: { ... }
variants: { ... }
}>
}>
undeclared: Array<{
name: string
type: "string" | "number" | "date" | "daterange" | "boolean" | "select" | "location"
format?: "postal_code" | "postal_code_city" | "power_grid_operator" | "gas_grid_operator"
variants: number
entities: number
options?: Array<{
value: { ... }
variants: { ... }
}>
}>
}

DeclaredConditionUsage​

A select condition always carries options and undeclared_options. A condition of any other type carries neither.

type DeclaredConditionUsage = {
name: string
variants: number
entities: number
options?: Array<{
value: string
variants: number
}>
undeclared_options?: Array<{
value: string
variants: number
}>
}

UndeclaredConditionUsage​

A condition variants pin under this name and type that the schema does not declare. A name pinned under two types is listed once for each.

type UndeclaredConditionUsage = {
name: string
type: "string" | "number" | "date" | "daterange" | "boolean" | "select" | "location"
format?: "postal_code" | "postal_code_city" | "power_grid_operator" | "gas_grid_operator"
variants: number
entities: number
options?: Array<{
value: string
variants: number
}>
}

ConditionOptionUsage​

type ConditionOptionUsage = {
value: string
variants: number
}

ConditionalPricingOrganization​

type ConditionalPricingOrganization = {
status: "NOT_ENABLED" | "DEPROVISIONING"
} | {
status: "PROVISIONING" | "ACTIVE"
in_use: boolean
}

ConditionalPricingErrorCode​

Machine-readable failure mode of a conditional-pricing operation, so a client can branch on the kind of failure instead of parsing the message. A 400 is about the request; a 409 is about what is already stored. Refusals raised by request validation carry no code at all.

  • SCHEMA_NOT_FOUND (
type ConditionalPricingErrorCode = "SCHEMA_NOT_FOUND" | "ENTITY_NOT_FOUND" | "ENTITY_TYPE_MISMATCH" | "ENTITY_SOFT_DELETED" | "ENTITY_NOT_CONDITIONAL" | "VARIANT_NOT_FOUND" | "VERSION_NOT_FOUND" | "NO_MATCHES" | "NO_ACTIVE_VERSION" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "CONDITION_UNDEFINED" | "VARIANT_PIN_UNDECLARED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "CONDITION_VALUE_INVALID" | "CONDITION_UNCONFIGURED" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT" | "OFFSET_WINDOW_EXCEEDED" | "CURSOR_INVALID" | "VARIANT_LIMIT_REACHED" | "PIN_FORMAT_INVALID" | "VARIANT_UNPINNED" | "LAST_VERSION_UNDELETABLE" | "CONDITION_UNREADABLE" | "SORT_INVALID" | "DEFAULT_MARKER_RESERVED" | "DEFAULT_VARIANT_PINS_CONDITIONS" | "VALID_FROM_IMMUTABLE" | "VARIANT_CONDITIONS_IMMUTABLE" | "IDENTIFIER_INVALID" | "VALID_FROM_INVALID" | "VALUE_UNSTORABLE" | "OVERRIDE_VALUE_INVALID" | "CONDITIONAL_PRICING_NOT_ENABLED" | "CONDITIONAL_PRICING_NOT_READY" | "CONDITIONAL_PRICING_IN_USE" | "CONDITIONAL_PRICING_OPT_OUT_IN_PROGRESS" | "CONDITIONAL_PRICING_OPT_IN_IN_PROGRESS"

ResolveConditionalEntityRequest​

A resolve names one conditional entity and selects its variants either by context or by variant_id, never both. context: {} matches nothing and so returns the default variant, which is how to ask for it without knowing its id.

type ResolveConditionalEntityRequest = {
schema: "product" | "price" | "coupon"
entity_id: string
context: Record<string, string | number | boolean | {
postal_code: string
city: string
} | {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
}>
as_of?: string
options?: {
resolve_one?: boolean
hydrate?: boolean
}
} | {
schema: "product" | "price" | "coupon"
entity_id: string
variant_id: string
as_of?: string
options?: {
hydrate?: boolean
}
}

ResolveByContextRequest​

Resolve by matching a situation: which of this entity's variants apply to context, each composed with the version in effect at as_of.

type ResolveByContextRequest = {
schema: "product" | "price" | "coupon"
entity_id: string
context: Record<string, string | number | boolean | {
postal_code: string
city: string
} | {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
}>
as_of?: string
options?: {
resolve_one?: boolean
hydrate?: boolean
}
}

ResolveByPinRequest​

Resolve by naming a variant: compose this one, whatever a context would have matched.

type ResolveByPinRequest = {
schema: "product" | "price" | "coupon"
entity_id: string
variant_id: string
as_of?: string
options?: {
hydrate?: boolean
}
}

ResolveContext​

The situation to resolve for: a flat map keyed by condition name. A condition left out matches only variants that leave it unpinned; an empty map therefore returns the default variant. A key naming no condition the schema declares is ignored, as if it were left out.

Each value is an exact value,

type ResolveContext = Record<string, string | number | boolean | {
postal_code: string
city: string
} | {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
}>

ResolveOptions​

The options a context resolve accepts. A pin takes PinnedResolveOptions instead.

type ResolveOptions = {
resolve_one?: boolean
hydrate?: boolean
}

PinnedResolveOptions​

The options a pinned resolve accepts — hydrate and nothing else. resolve_one has nothing to change where the answer is one result or a 404, so a body sending it is a 400.

type PinnedResolveOptions = {
hydrate?: boolean
}

ResolvedVariants​

type ResolvedVariants = {
results: Array<{
_id: string
_variant_id: string
_version_valid_from: string // date
_conditions: {
default: { ... }
}
_inert_overrides: Array<{
attribute: { ... }
reason: { ... }
}>
}>
}

ResolvedVariant​

The entity as this variant leaves it — every attribute of a plain entity read with the applicable version's overrides applied — plus the discriminators below.

type ResolvedVariant = {
_id: string
_variant_id: string
_version_valid_from: string // date
_conditions: {
default: boolean
}
_inert_overrides: Array<{
attribute: string
reason: "ATTRIBUTE_NOT_OVERRIDABLE" | "ATTRIBUTE_READONLY" | "ATTRIBUTE_HIDDEN" | "ATTRIBUTE_COMPUTED" | "ATTRIBUTE_UNDECLARED" | "TYPE_NOT_OVERRIDABLE" | "CAPABILITY_NOT_OVERRIDABLE"
}>
}

CreateVariantRequest​

type CreateVariantRequest = {
conditions?: Record<string, string | number | boolean | {
from?: string
until?: string
} | {
postal_code: string
city: string
}>
default?: boolean
valid_from?: string // date
values: Record<string, unknown>
}

VariantConditions​

A variant's pinned conditions as a reader sees them: the pins the schema declares, plus a boolean default saying whether this is the entity's fallback.

type VariantConditions = {
default: boolean
}

PinnedConditions​

The situation this variant applies to: a flat map keyed by condition name. A condition left out is a wildcard, which is what makes adding a condition to a schema non-breaking for existing variants.

Exact values only; predicates belong to reads. Values are stored canonicalized for their type: a `dat

type PinnedConditions = Record<string, string | number | boolean | {
from?: string
until?: string
} | {
postal_code: string
city: string
}>

PinnedConditionValue​

One condition's exact value. Which of these shapes a condition takes is set by its type in the entity's schema, and a value of another shape is refused with PIN_FORMAT_INVALID. A location of format power_grid_operator or gas_grid_operator takes a string of exactly 13 digits.

type PinnedConditionValue = string | number | boolean | {
from?: string
until?: string
} | {
postal_code: string
city: string
}

PostalCodeFilter​

A listing filter on a location of format postal_code_city by its postal code alone: it matches the variants pinned to that postal code, whatever their city. Only a listing filter takes it; a resolve context must name the city too.

type PostalCodeFilter = {
postal_code: string
}

ConditionDateRange​

The value of a daterange condition. Each bound is an RFC 3339 date or date-time, and both are included. A date names the whole day in the organization's timezone: as from it starts at midnight, as until it runs to the day's last millisecond. So { "from": "2026-10-01", "until": "2026-10-31" }

type ConditionDateRange = {
from?: string
until?: string
}

PostalCodeCity​

The value of a location condition of format postal_code_city, its parts named as an entity address names them.

type PostalCodeCity = {
postal_code: string
city: string
}

ContextConditionValue​

One condition's value in a resolve context or listing filter: an exact value, or a predicate. Which of these a condition takes is set by its type in the entity's schema, and a value of another shape is refused with CONTEXT_FORMAT_INVALID, or OPERATOR_UNSUPPORTED for a predicate its type does not

type ContextConditionValue = string | number | boolean | {
postal_code: string
city: string
} | {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
}

ConditionPredicate​

A single-operator predicate.

type ConditionPredicate = {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
}

OrderedConditionOperand​

A number, or a date as an RFC 3339 date or date-time. A date is midnight of that day in the organization's timezone.

type OrderedConditionOperand = number | string

VariantValues​

The values this version overrides on the base entity, keyed by entity field name.

A field is overridable if its attribute declares overridable_attribute — which readonly, hidden, computed and metadata fields, and types no variant may override, cannot be given — or if a capability declaring `overr

type VariantValues = Record<string, unknown>

CreatedVariant​

type CreatedVariant = {
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
conditions: {
default: boolean
}
valid_from: string // date
values: Record<string, unknown>
_created_at: string
_updated_at: string
_revision: number
warnings: Array<{
code: "VARIANT_COUNT_APPROACHING_CAP"
message: string
details: {
variant_count: { ... }
cap: { ... }
}
} | {
code: "ACTIVE_VERSION_CHANGED"
message: string
details: {
valid_from: { ... }
active_valid_from?: { ... }
}
} | {
code: "SUPERSEDED_VERSION_WRITTEN"
message: string
details: {
valid_from: { ... }
active_valid_from?: { ... }
}
} | {
code: "ATTRIBUTES_NOT_APPLIED"
message: string
details: {
attributes: { ... }
}
} | {
code: "VARIANT_NOT_INDEXED"
message: string
details: {
reason: { ... }
}
}>
}

WriteWarning​

Something worth knowing that did not stop a write. One vocabulary for every write; details is typed per code, and a write raises each code at most once.

type WriteWarning = {
code: "VARIANT_COUNT_APPROACHING_CAP"
message: string
details: {
variant_count: number
cap: number
}
} | {
code: "ACTIVE_VERSION_CHANGED"
message: string
details: {
valid_from: string // date
active_valid_from?: string // date
}
} | {
code: "SUPERSEDED_VERSION_WRITTEN"
message: string
details: {
valid_from: string // date
active_valid_from?: string // date
}
} | {
code: "ATTRIBUTES_NOT_APPLIED"
message: string
details: {
attributes: Array<{
attribute: { ... }
reason: { ... }
}>
}
} | {
code: "VARIANT_NOT_INDEXED"
message: string
details: {
reason: "INDEX_WRITE_FAILED"
}
}

VersionMoved​

Which version a write moved, and which one was in effect while it did.

type VersionMoved = {
valid_from: string // date
active_valid_from?: string // date
}

InertOverride​

One override that did not apply, and why — reported by a write for the attributes in its body, and by a resolved payload for the stored overrides composition passed over.

type InertOverride = {
attribute: string
reason: "ATTRIBUTE_NOT_OVERRIDABLE" | "ATTRIBUTE_READONLY" | "ATTRIBUTE_HIDDEN" | "ATTRIBUTE_COMPUTED" | "ATTRIBUTE_UNDECLARED" | "TYPE_NOT_OVERRIDABLE" | "CAPABILITY_NOT_OVERRIDABLE"
}

InertOverrideReason​

Why one override did not apply.

  • ATTRIBUTE_NOT_OVERRIDABLE: the schema declares the attribute without overridable_attribute, which is an ordinary schema edit away
  • ATTRIBUTE_READONLY: the attribute is readonly, and cannot be granted the flag
  • ATTRIBUTE_HIDDEN: the attribute is hidden,
type InertOverrideReason = "ATTRIBUTE_NOT_OVERRIDABLE" | "ATTRIBUTE_READONLY" | "ATTRIBUTE_HIDDEN" | "ATTRIBUTE_COMPUTED" | "ATTRIBUTE_UNDECLARED" | "TYPE_NOT_OVERRIDABLE" | "CAPABILITY_NOT_OVERRIDABLE"

DeletedVariant​

type DeletedVariant = {
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
tuple_released: boolean
versions_deleted: number
}

VariantVersion​

One version of one variant: the overrides it carries, the date it takes effect, and the variant it belongs to. These are the version's own overrides; :resolve composes them onto the entity.

type VariantVersion = {
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
conditions: {
default: boolean
}
valid_from: string // date
values: Record<string, unknown>
_created_at: string
_updated_at: string
_revision: number
}

WrittenVariantVersion​

A version as a write left it, together with anything the write moved.

type WrittenVariantVersion = {
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
conditions: {
default: boolean
}
valid_from: string // date
values: Record<string, unknown>
_created_at: string
_updated_at: string
_revision: number
warnings: Array<{
code: "VARIANT_COUNT_APPROACHING_CAP"
message: string
details: {
variant_count: { ... }
cap: { ... }
}
} | {
code: "ACTIVE_VERSION_CHANGED"
message: string
details: {
valid_from: { ... }
active_valid_from?: { ... }
}
} | {
code: "SUPERSEDED_VERSION_WRITTEN"
message: string
details: {
valid_from: { ... }
active_valid_from?: { ... }
}
} | {
code: "ATTRIBUTES_NOT_APPLIED"
message: string
details: {
attributes: { ... }
}
} | {
code: "VARIANT_NOT_INDEXED"
message: string
details: {
reason: { ... }
}
}>
}

DeletedVariantVersion​

type DeletedVariantVersion = {
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
valid_from: string // date
warnings: Array<{
code: "VARIANT_COUNT_APPROACHING_CAP"
message: string
details: {
variant_count: { ... }
cap: { ... }
}
} | {
code: "ACTIVE_VERSION_CHANGED"
message: string
details: {
valid_from: { ... }
active_valid_from?: { ... }
}
} | {
code: "SUPERSEDED_VERSION_WRITTEN"
message: string
details: {
valid_from: { ... }
active_valid_from?: { ... }
}
} | {
code: "ATTRIBUTES_NOT_APPLIED"
message: string
details: {
attributes: { ... }
}
} | {
code: "VARIANT_NOT_INDEXED"
message: string
details: {
reason: { ... }
}
}>
}

AppendVersionRequest​

type AppendVersionRequest = {
valid_from?: string // date
values: Record<string, unknown>
conditions?: Record<string, string | number | boolean | {
from?: string
until?: string
} | {
postal_code: string
city: string
}>
}

ReplaceVersionRequest​

type ReplaceVersionRequest = {
values: Record<string, unknown>
_revision: number
valid_from?: string // date
conditions?: Record<string, string | number | boolean | {
from?: string
until?: string
} | {
postal_code: string
city: string
}>
}

PatchVersionRequest​

type PatchVersionRequest = {
values: Record<string, unknown>
_revision: number
valid_from?: string // date
conditions?: Record<string, string | number | boolean | {
from?: string
until?: string
} | {
postal_code: string
city: string
}>
}

ListVariantsRequest​

How to narrow and page a variant listing. Every property is optional, so {} asks for the first ten variants in variant_id order, but the body itself is required. conditions and search narrow independently and a variant must satisfy both.

type ListVariantsRequest = {
conditions?: Record<string, string | number | boolean | {
postal_code: string
city: string
} | {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
} | {
postal_code: string
}>
search?: string
sort?: string
from?: number
size?: number
cursor?: string
}

VariantTreeRequest​

The variants list's request plus as_of, the instant each row's version is selected at. size is clamped at 100 here; every other property means what it means on the list.

type VariantTreeRequest = {
conditions?: Record<string, string | number | boolean | {
postal_code: string
city: string
} | {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
} | {
postal_code: string
}>
search?: string
sort?: string
from?: number
size?: number
cursor?: string
as_of?: string
}

VariantConditionFilter​

Which pins a variant must carry to be listed: a flat map keyed by condition name, taking the same exact values and predicates a resolve context does. A condition left out is not filtered on. An in list carries at most 50,000 values.

A variant matches only where it pins the condition — unlike `:re

type VariantConditionFilter = Record<string, string | number | boolean | {
postal_code: string
city: string
} | {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
} | {
postal_code: string
}>

VariantList​

type VariantList = {
hits: number
results: Array<{
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
conditions: {
default: { ... }
}
}>
next?: string
}

VariantListRow​

One variant as a listing reports it: which variant it is and what it pins.

type VariantListRow = {
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
conditions: {
default: boolean
}
}

VariantTree​

type VariantTree = {
hits: number
results: Array<{
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
conditions: {
default: { ... }
}
status: "active" | "scheduled"
version: {
variant_id: { ... }
entity_id: { ... }
schema: { ... }
conditions: { ... }
valid_from: { ... }
values: { ... }
_created_at: { ... }
_updated_at: { ... }
}
}>
next?: string
}

VariantTreeRow​

A listing row plus the one version the tree shows for it, and the status saying which.

type VariantTreeRow = {
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
conditions: {
default: boolean
}
status: "active" | "scheduled"
version: {
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
conditions: {
default: { ... }
}
valid_from: string // date
values: Record<string, unknown>
_created_at: string
_updated_at: string
}
}

VariantTreeRowStatus​

Whether a tree row's version is the one in effect at as_of, or one still ahead of it.

  • active: the version with the latest valid_from on or before as_of's date in the organization's timezone
  • scheduled: the variant's first version, which is later than that date
type VariantTreeRowStatus = "active" | "scheduled"

VariantVersionSnapshot​

One version of one variant as a listing reports it: VariantVersion without _revision. Read the version through its own GET to get the revision a write must carry.

type VariantVersionSnapshot = {
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
conditions: {
default: boolean
}
valid_from: string // date
values: Record<string, unknown>
_created_at: string
_updated_at: string
}

VariantVersionList​

type VariantVersionList = {
results: Array<{
variant_id: string
entity_id: string
schema: "product" | "price" | "coupon"
conditions: {
default: { ... }
}
valid_from: string // date
values: Record<string, unknown>
_created_at: string
_updated_at: string
}>
next?: string
}

BatchUpsertVariantsRequest​

A batch of variant writes under one schema, each item naming the entity it writes to.

type BatchUpsertVariantsRequest = {
correlation_id?: string
items: Array<{
entity_id: string
conditions?: Record<string, string | number | boolean | {
from?: { ... }
until?: { ... }
} | {
postal_code: { ... }
city: { ... }
}>
default?: boolean
valid_from?: string // date
values: Record<string, unknown>
}>
}

BatchUpsertItem​

One variant write: the single-item create's body plus entity_id, and no variant_id. An existing condition tuple appends a version to the variant holding it rather than conflicting.

type BatchUpsertItem = {
entity_id: string
conditions?: Record<string, string | number | boolean | {
from?: string
until?: string
} | {
postal_code: string
city: string
}>
default?: boolean
valid_from?: string // date
values: Record<string, unknown>
}

BatchDeleteVariantsRequest​

A batch of variant and version deletes under one schema, each item naming the entity it removes from.

type BatchDeleteVariantsRequest = {
correlation_id?: string
items: Array<{
entity_id: string
variant_id: string
valid_from?: string // date
} | {
entity_id: string
conditions?: Record<string, string | number | boolean | {
from?: { ... }
until?: { ... }
} | {
postal_code: { ... }
city: { ... }
}>
default?: boolean
valid_from?: string // date
}>
}

BatchDeleteItem​

One delete: the variant, addressed by id or by the condition tuple it pins, and optionally the one version of it to remove. An item carrying both matches neither branch and is an envelope 400.

type BatchDeleteItem = {
entity_id: string
variant_id: string
valid_from?: string // date
} | {
entity_id: string
conditions?: Record<string, string | number | boolean | {
from?: string
until?: string
} | {
postal_code: string
city: string
}>
default?: boolean
valid_from?: string // date
}

BatchDeleteByVariantId​

A delete addressing its variant by id.

type BatchDeleteByVariantId = {
entity_id: string
variant_id: string
valid_from?: string // date
}

BatchDeleteByConditions​

A delete addressing its variant by the situation it applies to.

conditions is optional because the fallback variant pins nothing: address it with default: true and no conditions. An item that ends up addressing no variant at all is a per-item VARIANT_UNPINNED, and one marking default besi

type BatchDeleteByConditions = {
entity_id: string
conditions?: Record<string, string | number | boolean | {
from?: string
until?: string
} | {
postal_code: string
city: string
}>
default?: boolean
valid_from?: string // date
}

BatchUpsertResult​

What a batch upsert did: one entry per item, in request order, and a count per outcome.

type BatchUpsertResult = {
correlation_id?: string
counts: {
variant_created: number
version_created: number
updated: number
skipped: number
error: number
}
results: Array<{
outcome: "variant_created" | "version_created" | "updated" | "skipped" | "error"
entity_id: string
variant_id?: string
valid_from?: string // date
warnings: Array<{
code: { ... }
message: { ... }
details: { ... }
} | {
code: { ... }
message: { ... }
details: { ... }
} | {
code: { ... }
message: { ... }
details: { ... }
} | {
code: { ... }
message: { ... }
details: { ... }
} | {
code: { ... }
message: { ... }
details: { ... }
}>
error?: {
message: { ... }
status?: { ... }
cause?: { ... }
error?: { ... }
}
}>
}

BatchDeleteResult​

What a batch delete did: one entry per item, in request order, and a count per outcome.

type BatchDeleteResult = {
correlation_id?: string
counts: {
deleted: number
skipped: number
error: number
}
results: Array<{
outcome: "deleted" | "skipped" | "error"
entity_id: string
variant_id?: string
valid_from?: string // date
warnings: Array<{
code: { ... }
message: { ... }
details: { ... }
} | {
code: { ... }
message: { ... }
details: { ... }
} | {
code: { ... }
message: { ... }
details: { ... }
} | {
code: { ... }
message: { ... }
details: { ... }
} | {
code: { ... }
message: { ... }
details: { ... }
}>
error?: {
message: { ... }
status?: { ... }
cause?: { ... }
error?: { ... }
}
}>
}

BatchUpsertOutcome​

What one upsert item did, derived from what was stored.

  • variant_created: the condition tuple was unknown, so a variant and its first version were created
  • version_created: the tuple was known and had no version at the item's valid_from
  • updated: a version existed on that exact date an
type BatchUpsertOutcome = "variant_created" | "version_created" | "updated" | "skipped" | "error"

BatchDeleteOutcome​

What one delete item did.

  • deleted: the variant, or the one version the item named, is gone
  • skipped: the item addressed no such variant or version; a missing entity is an error
  • error: this item alone failed, and the entry's error says why
type BatchDeleteOutcome = "deleted" | "skipped" | "error"

BatchUpsertCounts​

How many items reached each outcome. Keyed by exactly the values of BatchUpsertOutcome, all present, and summing to the length of results.

type BatchUpsertCounts = {
variant_created: number
version_created: number
updated: number
skipped: number
error: number
}

BatchDeleteCounts​

How many items reached each outcome. Keyed by exactly the values of BatchDeleteOutcome, all present, and summing to the length of results.

type BatchDeleteCounts = {
deleted: number
skipped: number
error: number
}

BatchUpsertResultEntry​

What one upsert item did. Position in results maps it back to its source row.

type BatchUpsertResultEntry = {
outcome: "variant_created" | "version_created" | "updated" | "skipped" | "error"
entity_id: string
variant_id?: string
valid_from?: string // date
warnings: Array<{
code: "VARIANT_COUNT_APPROACHING_CAP"
message: string
details: {
variant_count: { ... }
cap: { ... }
}
} | {
code: "ACTIVE_VERSION_CHANGED"
message: string
details: {
valid_from: { ... }
active_valid_from?: { ... }
}
} | {
code: "SUPERSEDED_VERSION_WRITTEN"
message: string
details: {
valid_from: { ... }
active_valid_from?: { ... }
}
} | {
code: "ATTRIBUTES_NOT_APPLIED"
message: string
details: {
attributes: { ... }
}
} | {
code: "VARIANT_NOT_INDEXED"
message: string
details: {
reason: { ... }
}
}>
error?: {
message: string
status?: number
cause?: string
error?: string | Record<string, unknown>[]
}
}

BatchDeleteResultEntry​

What one delete item did. Position in results maps it back to its source row.

type BatchDeleteResultEntry = {
outcome: "deleted" | "skipped" | "error"
entity_id: string
variant_id?: string
valid_from?: string // date
warnings: Array<{
code: "VARIANT_COUNT_APPROACHING_CAP"
message: string
details: {
variant_count: { ... }
cap: { ... }
}
} | {
code: "ACTIVE_VERSION_CHANGED"
message: string
details: {
valid_from: { ... }
active_valid_from?: { ... }
}
} | {
code: "SUPERSEDED_VERSION_WRITTEN"
message: string
details: {
valid_from: { ... }
active_valid_from?: { ... }
}
} | {
code: "ATTRIBUTES_NOT_APPLIED"
message: string
details: {
attributes: { ... }
}
} | {
code: "VARIANT_NOT_INDEXED"
message: string
details: {
reason: { ... }
}
}>
error?: {
message: string
status?: number
cause?: string
error?: string | Record<string, unknown>[]
}
}

Error​

type Error = {
message: string
status?: number
cause?: string
}

RefusedLineItem​

The line item a checkout refusal is about, named as the item names itself.

type RefusedLineItem = {
price_id: string
product_id?: string
}

ReportedError​

The error field of an error response: the message, or — where the request failed validation before any handler ran — the validation errors themselves.

type ReportedError = string | Record<string, unknown>[]

ConditionalPricingError​

An error from a conditional-pricing operation, carrying a code plus the structured data that code explains. details is typed per code: narrow on code and the object under it declares exactly the fields that code sends.

A request these schemas reject is answered by the request validator with a

type ConditionalPricingError = {
message: string
status?: number
cause?: string
error?: string | Record<string, unknown>[]
}

CatalogReferenceErrorCode​

Why an order operation refused a catalog reference. Other refusals carry no code.

  • CATALOG_REFERENCE_MISSING (400): a line item whose product or price is conditional carries no catalog_reference, or one with no variant for that member
  • CATALOG_REFERENCE_SIGNATURE_INVALID (400): a `catalog
type CatalogReferenceErrorCode = "CATALOG_REFERENCE_MISSING" | "CATALOG_REFERENCE_SIGNATURE_INVALID" | "CATALOG_REFERENCE_UNRESOLVABLE"

CatalogReferenceError​

An error from an order operation that prices line items. A catalog-reference refusal carries code and details, typed per code. Every other refusal carries neither.

type CatalogReferenceError = {
message: string
status?: number
cause?: string
error?: string | Record<string, unknown>[]
}

BaseProduct​

The product's own attributes — everything but the two relations whose shape depends on whether the product was hydrated, which Product and HydratedProduct add.

type BaseProduct = {
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: string[]
feature?: string
}>
product_images?: {
$relation?: Array<{
entity_id?: { ... }
_tags?: { ... }
}>
} | Array<{
_id: string
filename: string
mime_type: string
versions: Array<{
s3ref: { ... }
}>
_schema: string
_org: string
_created_at: string // date-time
_updated_at: string // date-time
_title?: string
$relation?: {
entity_id?: { ... }
_tags?: { ... }
}
}>
product_downloads?: {
$relation?: Array<{
entity_id?: { ... }
_tags?: { ... }
}>
} | Array<{
_id: string
filename: string
mime_type: string
versions: Array<{
s3ref: { ... }
}>
_schema: string
_org: string
_created_at: string // date-time
_updated_at: string // date-time
_title?: string
$relation?: {
entity_id?: { ... }
_tags?: { ... }
}
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: string
filename: string
mime_type: string
versions: Array<{
s3ref: { ... }
}>
_schema: string
_org: string
_created_at: string // date-time
_updated_at: string // date-time
_title?: string
$relation?: {
entity_id?: { ... }
_tags?: { ... }
}
}>
_id?: string
_title?: string
_org_id?: string
_created_at?: string
_updated_at?: string
}

Product​

The product entity, its relations as stored.

type Product = {
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: string[]
feature?: string
}>
product_images?: {
$relation?: Array<{
entity_id?: { ... }
_tags?: { ... }
}>
} | Array<{
_id: string
filename: string
mime_type: string
versions: Array<{
s3ref: { ... }
}>
_schema: string
_org: string
_created_at: string // date-time
_updated_at: string // date-time
_title?: string
$relation?: {
entity_id?: { ... }
_tags?: { ... }
}
}>
product_downloads?: {
$relation?: Array<{
entity_id?: { ... }
_tags?: { ... }
}>
} | Array<{
_id: string
filename: string
mime_type: string
versions: Array<{
s3ref: { ... }
}>
_schema: string
_org: string
_created_at: string // date-time
_updated_at: string // date-time
_title?: string
$relation?: {
entity_id?: { ... }
_tags?: { ... }
}
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: string
filename: string
mime_type: string
versions: Array<{
s3ref: { ... }
}>
_schema: string
_org: string
_created_at: string // date-time
_updated_at: string // date-time
_title?: string
$relation?: {
entity_id?: { ... }
_tags?: { ... }
}
}>
_id?: string
_title?: string
_org_id?: string
_created_at?: string
_updated_at?: string
}

HydratedProduct​

The product entity hydrated one level deep, as the v2 public catalog serves it: each relation holds the entities it referenced, sanitised, with their own relations as stored.

type HydratedProduct = {
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: string[]
feature?: string
}>
product_images?: {
$relation?: Array<{
entity_id?: { ... }
_tags?: { ... }
}>
} | Array<{
_id: string
filename: string
mime_type: string
versions: Array<{
s3ref: { ... }
}>
_schema: string
_org: string
_created_at: string // date-time
_updated_at: string // date-time
_title?: string
$relation?: {
entity_id?: { ... }
_tags?: { ... }
}
}>
product_downloads?: {
$relation?: Array<{
entity_id?: { ... }
_tags?: { ... }
}>
} | Array<{
_id: string
filename: string
mime_type: string
versions: Array<{
s3ref: { ... }
}>
_schema: string
_org: string
_created_at: string // date-time
_updated_at: string // date-time
_title?: string
$relation?: {
entity_id?: { ... }
_tags?: { ... }
}
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: string
filename: string
mime_type: string
versions: Array<{
s3ref: { ... }
}>
_schema: string
_org: string
_created_at: string // date-time
_updated_at: string // date-time
_title?: string
$relation?: {
entity_id?: { ... }
_tags?: { ... }
}
}>
_id?: string
_title?: string
_org_id?: string
_created_at?: string
_updated_at?: string
}

Opportunity​

The opportunity entity

type Opportunity = {
opportunity_number?: string
opportunity_title?: string
description?: string
status?: string
due_date?: string
assignee?: Array<{
id?: string
email?: string
display_name?: string
token?: string
image_uri?: string
organization_id?: string
department?: string
preferred_language?: string
status?: string
phone?: string
email_notification_settings?: object
is_signature_enabled?: boolean
created_at?: string
}>
customer?: {
$relation?: Array<{
entity_id?: { ... }
_tags?: { ... }
}>
}
dates?: Array<{
_tags?: string[]
value?: string
}>
billing_address?: {
$relation_ref?: Array<{
entity_id?: { ... }
path?: { ... }
}>
}
delivery_address?: {
$relation_ref?: Array<{
entity_id?: { ... }
path?: { ... }
}>
}
address?: {
$relation_ref?: Array<{
entity_id?: { ... }
path?: { ... }
}>
}
items?: {
$relation?: Array<{
entity_id?: { ... }
_tags?: { ... }
}>
}
_org_id?: string
_id?: string
_created_at?: string
_updated_at?: string
source_type?: string
source_id?: string
source?: {
http?: string
title?: string
}
_tags?: string[]
}

Order​

The order entity

type Order = {
order_number?: string
cart_id?: string
status?: "draft" | "quote" | "placed" | "cancelled" | "completed"
source_type?: string
source_id?: string
source?: {
http?: string
title?: string
}
metadata?: Array<{
key?: string
value?: string
}>
customer?: {
$relation?: Array<{
entity_id?: { ... }
_tags?: { ... }
}>
}
billing_first_name?: string
billing_last_name?: string
billing_company_name?: string
billing_vat?: string
billing_email?: string
billing_phone?: string
billing_address?: Array<{
_tags?: string[]
street?: string
street_number?: string
postal_code?: string
city?: string
country?: string
additional_info?: string
company_name?: string
first_name?: string
last_name?: string
salutation?: string
title?: string
}>
currency?: string
delivery_address?: Array<{
_tags?: string[]
street?: string
street_number?: string
postal_code?: string
city?: string
country?: string
additional_info?: string
company_name?: string
first_name?: string
last_name?: string
salutation?: string
title?: string
}>
payment_method?: Array<{
type?: string
details?: Record<string, unknown>
}>
line_items?: Array<{
metadata?: Array<{
key?: { ... }
value?: { ... }
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: { ... }
frequency_unit?: { ... }
name?: { ... }
value?: { ... }
metadata?: { ... }
}>
is_tax_inclusive?: boolean
_product?: {
description?: { ... }
code?: { ... }
type?: { ... }
name?: { ... }
categories?: { ... }
feature?: { ... }
product_images?: { ... }
product_downloads?: { ... }
is_conditional?: { ... }
_availability_files?: { ... }
_id?: { ... }
_title?: { ... }
_org_id?: { ... }
_created_at?: { ... }
_updated_at?: { ... }
}
catalog_reference?: {
product: { ... }
price: { ... }
price_components?: { ... }
coupons?: { ... }
// ...
}

Price​

The price entity schema for simple pricing

type Price = {
billing_duration_amount?: number
billing_duration_unit?: "days" | "weeks" | "months" | "years"
notice_time_amount?: number
notice_time_unit?: "days" | "weeks" | "months" | "years"
termination_time_amount?: number
termination_time_unit?: "days" | "weeks" | "months" | "years"
renewal_duration_amount?: number
renewal_duration_unit?: "days" | "weeks" | "months" | "years"
}

BaseCompositePrice​

The common properties for a composite price entity, without the price components

type BaseCompositePrice = {
billing_duration_amount?: number
billing_duration_unit?: "days" | "weeks" | "months" | "years"
notice_time_amount?: number
notice_time_unit?: "days" | "weeks" | "months" | "years"
termination_time_amount?: number
termination_time_unit?: "days" | "weeks" | "months" | "years"
renewal_duration_amount?: number
renewal_duration_unit?: "days" | "weeks" | "months" | "years"
}

NonHydratedCompositePrice​

The composite price entity

type NonHydratedCompositePrice = {
billing_duration_amount?: number
billing_duration_unit?: "days" | "weeks" | "months" | "years"
notice_time_amount?: number
notice_time_unit?: "days" | "weeks" | "months" | "years"
termination_time_amount?: number
termination_time_unit?: "days" | "weeks" | "months" | "years"
renewal_duration_amount?: number
renewal_duration_unit?: "days" | "weeks" | "months" | "years"
}

HydratedCompositePrice​

The composite price entity

type HydratedCompositePrice = {
billing_duration_amount?: number
billing_duration_unit?: "days" | "weeks" | "months" | "years"
notice_time_amount?: number
notice_time_unit?: "days" | "weeks" | "months" | "years"
termination_time_amount?: number
termination_time_unit?: "days" | "weeks" | "months" | "years"
renewal_duration_amount?: number
renewal_duration_unit?: "days" | "weeks" | "months" | "years"
}

CompositePrice​

The composite price entity

type CompositePrice = {
billing_duration_amount?: number
billing_duration_unit?: "days" | "weeks" | "months" | "years"
notice_time_amount?: number
notice_time_unit?: "days" | "weeks" | "months" | "years"
termination_time_amount?: number
termination_time_unit?: "days" | "weeks" | "months" | "years"
renewal_duration_amount?: number
renewal_duration_unit?: "days" | "weeks" | "months" | "years"
} | {
billing_duration_amount?: number
billing_duration_unit?: "days" | "weeks" | "months" | "years"
notice_time_amount?: number
notice_time_unit?: "days" | "weeks" | "months" | "years"
termination_time_amount?: number
termination_time_unit?: "days" | "weeks" | "months" | "years"
renewal_duration_amount?: number
renewal_duration_unit?: "days" | "weeks" | "months" | "years"
}

PriceComponentRelation​

type PriceComponentRelation = {
entity_id?: string
quantity?: number
_tags?: string[]
}

MetaData​

A set of key-value pairs used to store meta data information about an entity.

type MetaData = Array<{
key?: string
value?: string
}>

PriceInputMappings​

type PriceInputMappings = Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
name?: string
value?: number
metadata?: Record<string, string>
}>

PriceInputMapping​

type PriceInputMapping = {
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
name?: string
value?: number
metadata?: Record<string, string>
}

PriceConditions​

type PriceConditions = {
billing_duration_amount?: number
billing_duration_unit?: "days" | "weeks" | "months" | "years"
notice_time_amount?: number
notice_time_unit?: "days" | "weeks" | "months" | "years"
termination_time_amount?: number
termination_time_unit?: "days" | "weeks" | "months" | "years"
renewal_duration_amount?: number
renewal_duration_unit?: "days" | "weeks" | "months" | "years"
}

ExternalFeeMetadata​

type ExternalFeeMetadata = {
amount_total: number
amount_total_decimal: string
amount_static?: number
amount_static_decimal?: unknown
amount_variable_ht?: number
amount_variable_decimal_ht?: string
unit_amount_variable_ht?: number
unit_amount_variable_decimal_ht?: string
amount_variable_nt?: number
amount_variable_decimal_nt?: string
unit_amount_variable_nt?: number
unit_amount_variable_decimal_nt?: string
currency: string
billing_period: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
breakdown: {
static?: Record<string, {
amount: { ... }
amount_decimal: { ... }
unit_amount?: { ... }
unit_amount_decimal?: { ... }
}>
variable?: Record<string, {
amount: { ... }
amount_decimal: { ... }
unit_amount?: { ... }
unit_amount_decimal?: { ... }
}>
variable_ht?: Record<string, {
amount: { ... }
amount_decimal: { ... }
unit_amount?: { ... }
unit_amount_decimal?: { ... }
}>
variable_nt?: Record<string, {
amount: { ... }
amount_decimal: { ... }
unit_amount?: { ... }
unit_amount_decimal?: { ... }
}>
}
inputs?: {
type?: "power" | "gas"
consumptionHT?: number
consumptionNT?: number
consumptionType?: "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter"
zipCode?: string
city?: string
providerId?: string
billingPeriod?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
referenceDate?: string // date
}
_meta?: {
signature: string
timestamp: number
}
}

ExternalLocationMetadata​

type ExternalLocationMetadata = {
name: string
code: string
type: "gas" | "power"
additionalData: {
gridOperators: Array<{
name: { ... }
codeNumber: { ... }
validFrom?: { ... }
validUntil?: { ... }
}>
defaultSuppliers: Array<{
name: { ... }
codeNumber: { ... }
validFrom?: { ... }
validUntil?: { ... }
}>
marketAreaDetails: {
gasType?: { ... }
marketArea?: { ... }
virtualTradingPoint?: { ... }
} | {
controlZone?: { ... }
balancingZone?: { ... }
}
}
_meta?: {
signature: string
timestamp: number
}
}

ExternalPriceMetadata​

type ExternalPriceMetadata = {
market: "day_ahead"
bidding_zone: "AT" | "DE-LU"
price: {
unit_amount: number
unit_amount_decimal: string
unit_amount_currency: string
timestamp: string
}
_meta?: {
signature: string
timestamp: number
}
}

ExternalFeeMappings​

type ExternalFeeMappings = Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
amount_total?: number
amount_total_decimal?: string
}>

ExternalFeeMapping​

type ExternalFeeMapping = {
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
amount_total?: number
amount_total_decimal?: string
}

PublicCatalogSearch​

A public catalog search payload

type PublicCatalogSearch = {
q: string
sort?: string
from?: number
size?: number
hydrate?: boolean
availability?: {
location: {
street?: { ... }
street_number?: { ... }
postal_code?: { ... }
city?: { ... }
country?: { ... }
}
available_date?: string // date
}
}

CatalogSearch​

A catalog search payload

type CatalogSearch = {
q: string
sort?: string
from?: number
size?: number
hydrate?: boolean
availability?: {
location: {
street?: { ... }
street_number?: { ... }
postal_code?: { ... }
city?: { ... }
country?: { ... }
}
available_date?: string // date
}
fields?: string[]
}

CatalogFieldsParam​

List of entity fields to include or exclude from the results.

type CatalogFieldsParam = string[]

CatalogSearchResult​

The query result payload

type CatalogSearchResult = {
hits?: number
results?: Array<{
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: { ... }
feature?: { ... }
}>
product_images?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
product_downloads?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
_id?: string
_title?: string
_org_id?: string
_created_at?: string
_updated_at?: string
} | {
billing_duration_amount?: number
billing_duration_unit?: "days" | "weeks" | "months" | "years"
notice_time_amount?: number
notice_time_unit?: "days" | "weeks" | "months" | "years"
termination_time_amount?: number
termination_time_unit?: "days" | "weeks" | "months" | "years"
renewal_duration_amount?: number
renewal_duration_unit?: "days" | "weeks" | "months" | "years"
} | {
_id: string // uuid
_title: string
_org: string
_schema: "coupon"
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
name: string
description?: string
type: "fixed" | "percentage"
category: "discount" | "cashback"
percentage_value?: string
fixed_value?: number
fixed_value_decimal?: string
fixed_value_currency?: string
cashback_period?: "0" | "12"
active?: boolean
is_conditional?: boolean
requires_promo_code?: boolean
}>
}

ResolveCatalogRequest​

The entries of one journey block, and the situation to resolve them for. Every member of every pair is resolved for its entity type's context at the same as_of.

type ResolveCatalogRequest = {
entries: Array<{
product_id: string
price_id?: string
}>
context: {
product?: Record<string, string | number | boolean | {
postal_code: { ... }
city: { ... }
} | {
lt: { ... }
} | {
lte: { ... }
} | {
gt: { ... }
} | {
gte: { ... }
} | {
in: { ... }
} | {
between: { ... }
} | {
exists: { ... }
}>
price?: Record<string, string | number | boolean | {
postal_code: { ... }
city: { ... }
} | {
lt: { ... }
} | {
lte: { ... }
} | {
gt: { ... }
} | {
gte: { ... }
} | {
in: { ... }
} | {
between: { ... }
} | {
exists: { ... }
}>
coupon?: Record<string, string | number | boolean | {
postal_code: { ... }
city: { ... }
} | {
lt: { ... }
} | {
lte: { ... }
} | {
gt: { ... }
} | {
gte: { ... }
} | {
in: { ... }
} | {
between: { ... }
} | {
exists: { ... }
}>
}
as_of?: string
}

CatalogContext​

One context per entity type, each the authenticated resolve's context and checked against that type's schema alone. A product resolves against product, and a price and each of a composite's components against price. A type left out resolves against an empty context, which serves the default va

type CatalogContext = {
product?: Record<string, string | number | boolean | {
postal_code: string
city: string
} | {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
}>
price?: Record<string, string | number | boolean | {
postal_code: string
city: string
} | {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
}>
coupon?: Record<string, string | number | boolean | {
postal_code: string
city: string
} | {
lt: number | string
} | {
lte: number | string
} | {
gt: number | string
} | {
gte: number | string
} | {
in: string | number[]
} | {
between: string
} | {
exists: boolean
}>
}

CatalogEntry​

A product and, optionally, one of its prices. With price_id the entry is the author's pair, served as named; without it the entry is served from the resolved product's price_options, one pair per price.

type CatalogEntry = {
product_id: string
price_id?: string
}

ResolveCatalogResult​

type ResolveCatalogResult = {
pairs: Array<{
product: {
cross_sellable_products?: { ... }
price_options?: { ... }
_id: { ... }
_variant_id: { ... }
_version_valid_from: { ... }
_conditions: { ... }
_inert_overrides: { ... }
} | {
description?: { ... }
code?: { ... }
type?: { ... }
name?: { ... }
categories?: { ... }
feature?: { ... }
product_images?: { ... }
product_downloads?: { ... }
is_conditional?: { ... }
_availability_files?: { ... }
_id?: { ... }
_title?: { ... }
_org_id?: { ... }
_created_at?: { ... }
_updated_at?: { ... }
}
price: {
active?: { ... }
is_composite_price?: { ... }
is_conditional?: { ... }
pricing_model: { ... }
tiers?: { ... }
description?: { ... }
long_description?: { ... }
sales_tax?: { ... }
tax?: { ... }
is_tax_inclusive?: { ... }
type?: { ... }
billing_period?: { ... }
unit_amount?: { ... }
unit_amount_decimal?: { ... }
unit_amount_currency?: { ... }
price_display_in_journeys?: { ... }
variable_price?: { ... }
unit?: { ... }
get_ag?: { ... }
dynamic_tariff?: { ... }
_created_at?: { ... }
_id: { ... }
_title?: { ... }
_updated_at?: { ... }
_org_id?: { ... }
_tags?: { ... }
_variant_id: { ... }
_version_valid_from: { ... }
_conditions: { ... }
_inert_overrides: { ... }
} | {
price_components?: { ... }
_id: { ... }
_variant_id: { ... }
_version_valid_from: { ... }
_conditions: { ... }
_inert_overrides: { ... }
} | {
billing_duration_amount?: { ... }
billing_duration_unit?: { ... }
notice_time_amount?: { ... }
notice_time_unit?: { ... }
termination_time_amount?: { ... }
termination_time_unit?: { ... }
renewal_duration_amount?: { ... }
renewal_duration_unit?: { ... }
} | {
price_components?: { ... }
}
coupons: Array<{
_id: { ... }
_title: { ... }
_org: { ... }
_schema: { ... }
_tags?: { ... }
_created_at: { ... }
_updated_at: { ... }
name: { ... }
description?: { ... }
type: { ... }
category: { ... }
percentage_value?: { ... }
fixed_value?: { ... }
fixed_value_decimal?: { ... }
fixed_value_currency?: { ... }
cashback_period?: { ... }
active?: { ... }
is_conditional?: { ... }
requires_promo_code?: { ... }
}>
catalog_reference: {
product: { ... }
// ...
}

CatalogPair​

A product and one of its prices, resolved for the request's context at its as_of, with the coupons that apply and the reference checkout prices from.

type CatalogPair = {
product: {
cross_sellable_products?: Array<{
description?: { ... }
code?: { ... }
type?: { ... }
name?: { ... }
categories?: { ... }
feature?: { ... }
product_images?: { ... }
product_downloads?: { ... }
is_conditional?: { ... }
_availability_files?: { ... }
_id?: { ... }
_title?: { ... }
_org_id?: { ... }
_created_at?: { ... }
_updated_at?: { ... }
}>
price_options?: Array<{
billing_duration_amount?: { ... }
billing_duration_unit?: { ... }
notice_time_amount?: { ... }
notice_time_unit?: { ... }
termination_time_amount?: { ... }
termination_time_unit?: { ... }
renewal_duration_amount?: { ... }
renewal_duration_unit?: { ... }
} | {
billing_duration_amount?: { ... }
billing_duration_unit?: { ... }
notice_time_amount?: { ... }
notice_time_unit?: { ... }
termination_time_amount?: { ... }
termination_time_unit?: { ... }
renewal_duration_amount?: { ... }
renewal_duration_unit?: { ... }
} | {
billing_duration_amount?: { ... }
billing_duration_unit?: { ... }
notice_time_amount?: { ... }
notice_time_unit?: { ... }
termination_time_amount?: { ... }
termination_time_unit?: { ... }
renewal_duration_amount?: { ... }
renewal_duration_unit?: { ... }
}>
_id: string
_variant_id: string
_version_valid_from: string // date
_conditions: {
default: { ... }
}
_inert_overrides: Array<{
attribute: { ... }
reason: { ... }
}>
} | {
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: { ... }
feature?: { ... }
}>
product_images?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
product_downloads?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
// ...
}

ResolvedPriceComponents​

The components of a composite price as the v2 catalog serves them: hydrated in place, and a component that is itself conditional resolved against the same context, carrying the discriminators a resolved payload carries. A conditional component with no variant in effect — nothing matches and there is

type ResolvedPriceComponents = {
price_components?: Array<{
active?: boolean
is_composite_price?: false
is_conditional?: boolean
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "dynamic_tariff" | "external_getag"
tiers?: Array<{
up_to?: { ... }
flat_fee_amount?: { ... }
flat_fee_amount_decimal?: { ... }
unit_amount?: { ... }
unit_amount_decimal?: { ... }
display_mode?: { ... }
}>
description?: string
long_description?: string
sales_tax?: "nontaxable" | "reduced" | "standard"
tax?: {
$relation?: { ... }
} | Array<{
_id: { ... }
_title: { ... }
_org: { ... }
_schema: { ... }
_tags?: { ... }
_created_at: { ... }
_updated_at: { ... }
type: { ... }
description?: { ... }
rate: { ... }
active?: { ... }
region?: { ... }
region_label?: { ... }
}>
is_tax_inclusive?: boolean
type?: "one_time" | "recurring"
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"
unit_amount?: number
unit_amount_decimal?: string
unit_amount_currency?: string
price_display_in_journeys?: "show_price" | "show_as_starting_price" | "show_as_on_request" | "estimated_price"
variable_price?: boolean
unit?: "kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp" | string
get_ag?: {
category: { ... }
markup_pricing_model?: { ... }
type?: { ... }
tariff_type?: { ... }
consumption_type?: { ... }
concession_type?: { ... }
meter_type?: { ... }
markup_tiers?: { ... }
markup_amount: { ... }
markup_amount_decimal: { ... }
markup_amount_net?: { ... }
markup_amount_net_decimal?: { ... }
markup_amount_gross?: { ... }
markup_amount_gross_decimal?: { ... }
markup_total_amount_net?: { ... }
markup_total_amount_net_decimal?: { ... }
markup_total_amount_gross?: { ... }
markup_total_amount_gross_decimal?: { ... }
additional_markups_enabled?: { ... }
additional_markups?: { ... }
unit_amount_gross: { ... }
unit_amount_gross_decimal?: { ... }
unit_amount_net: { ... }
unit_amount_net_decimal?: { ... }
}
dynamic_tariff?: {
mode: { ... }
interval?: { ... }
average_price: { ... }
average_price_decimal: { ... }
markup_amount?: { ... }
markup_amount_decimal?: { ... }
markup_amount_net?: { ... }
markup_amount_net_decimal?: { ... }
markup_amount_gross?: { ... }
markup_amount_gross_decimal?: { ... }
unit_amount_net?: { ... }
unit_amount_net_decimal?: { ... }
unit_amount_gross?: { ... }
unit_amount_gross_decimal?: { ... }
}
_created_at?: string
_id: string
_title?: string
_updated_at?: string
_org_id?: string
_tags?: string[]
_variant_id: string
_version_valid_from: string // date
_conditions: {
default: { ... }
}
_inert_overrides: Array<{
attribute: { ... }
reason: { ... }
}>
// ...
}

CatalogReference​

Names the variant each member of a catalog pair was resolved from, and the instant as_of they were resolved at. Checkout prices each conditional member from that variant, using the version in effect on as_of's date in the organization's timezone.

The catalog signs every reference, classic pair

type CatalogReference = {
product: {
id: string
variant?: string
}
price: {
id: string
variant?: string
}
price_components?: Array<{
id: string
variant?: string
}>
coupons?: Array<{
id: string
variant?: string
}>
as_of: string
_meta?: {
signature: string
timestamp: number
}
}

CatalogReferenceMember​

One member of a catalog reference: the entity, and the variant that produced it. variant is absent for a classic entity.

type CatalogReferenceMember = {
id: string
variant?: string
}

SearchProvidersParams​

A search providers payload

type SearchProvidersParams = {
type: "power" | "gas"
postal_code: string
city?: string
street?: string
street_number?: string
grid_filter?: "all" | "exclude_closed" | "only_closed"
}

SearchStreetsParams​

A search streets payload

type SearchStreetsParams = {
postal_code: string
city: string
}

AvailabilityCheckParams​

Availability check request payload

type AvailabilityCheckParams = {
products: string[]
filters: {
location: {
street?: { ... }
street_number?: { ... }
postal_code?: { ... }
city?: { ... }
country?: { ... }
}
available_date?: string // date
}
}

AvailabilityResult​

The product availability check result payload

type AvailabilityResult = {
available_products: string[]
check_results?: Array<{
product_id: string
matching_hits?: number
matching_error?: Record<string, unknown>
}>
}

ValidateAvailabilityFileError​

The availability rule error

type ValidateAvailabilityFileError = {
line?: number
msg: string
data?: string
}

IntegrationCredentialsResult​

The auth credentials for external integrations

type IntegrationCredentialsResult = {
username: string
password: string
auth_type?: "basic_auth"
base_url?: string
} | {
auth_type: "oauth"
oauth: {
client_id: string
client_secret: string
authorization_url: string
grant_type: "client_credentials"
scope?: string
access_token?: string
access_token_expires_in?: number
access_token_expires_at?: number
}
base_url?: string
}

SaveIntegrationCredentialsParams​

The auth credentials for external integrations

type SaveIntegrationCredentialsParams = {
username: string
password: string
auth_type?: "basic_auth"
base_url?: string
} | {
auth_type: "oauth"
oauth: {
client_id: string
client_secret: string
authorization_url: string
grant_type: "client_credentials"
scope?: string
access_token?: string
access_token_expires_in?: number
access_token_expires_at?: number
}
base_url?: string
}

ComputePriceParamsBase​

type ComputePriceParamsBase = {
postal_code: string
consumption_type?: "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter"
consumption?: number
consumption_HT?: number
consumption_NT?: number
association_id?: string
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
reference_date?: string // date
city?: string
}

ComputePriceParamsPower​

type ComputePriceParamsPower = {
postal_code: string
consumption_type?: "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter"
consumption?: number
consumption_HT?: number
consumption_NT?: number
association_id?: string
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
reference_date?: string // date
city?: string
type: "power"
meter_type?: "classic" | "smart" | "digital"
}

ComputePriceParamsGas​

type ComputePriceParamsGas = {
postal_code: string
consumption_type?: "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter"
consumption?: number
consumption_HT?: number
consumption_NT?: number
association_id?: string
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
reference_date?: string // date
city?: string
type: "gas"
concession_type?: "standard" | "special"
}

SignatureMeta​

Signature meta data payload

type SignatureMeta = {
signature: string
timestamp: number
}

ComputedBasePrice​

The computed price

type ComputedBasePrice = {
amount: number
amount_decimal: string
unit_amount?: number
unit_amount_decimal?: string
}

ComputePriceParams​

The compute price payload

type ComputePriceParams = {
postal_code: string
consumption_type?: "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter"
consumption?: number
consumption_HT?: number
consumption_NT?: number
association_id?: string
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
reference_date?: string // date
city?: string
type: "power"
meter_type?: "classic" | "smart" | "digital"
} | {
postal_code: string
consumption_type?: "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter"
consumption?: number
consumption_HT?: number
consumption_NT?: number
association_id?: string
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
reference_date?: string // date
city?: string
type: "gas"
concession_type?: "standard" | "special"
}

GasConcessionType​

The concession type for gas

type GasConcessionType = "standard" | "special"

PowerMeterType​

The meter type for power

type PowerMeterType = "classic" | "smart" | "digital"

DynamicTariffMode​

The mode of the dynamic tariff. day_ahead_market uses the Day-Ahead spot market price as base.

type DynamicTariffMode = "day_ahead_market" | "manual"

DynamicTariffInterval​

The interval of the tariff if a spot market price is used as base.

type DynamicTariffInterval = "hourly" | "monthly_average"

ComputedPriceBreakdown​

Price breakdown

type ComputedPriceBreakdown = {
static?: Record<string, {
amount: number
amount_decimal: string
unit_amount?: number
unit_amount_decimal?: string
}>
variable?: Record<string, {
amount: number
amount_decimal: string
unit_amount?: number
unit_amount_decimal?: string
}>
variable_ht?: Record<string, {
amount: number
amount_decimal: string
unit_amount?: number
unit_amount_decimal?: string
}>
variable_nt?: Record<string, {
amount: number
amount_decimal: string
unit_amount?: number
unit_amount_decimal?: string
}>
}

ComputedPriceComponents​

The computed price components

type ComputedPriceComponents = Record<string, {
amount: number
amount_decimal: string
unit_amount?: number
unit_amount_decimal?: string
}>

ComputePriceResult​

type ComputePriceResult = {
amount_total: number
amount_total_decimal: string
amount_static?: number
amount_static_decimal?: unknown
amount_variable_ht?: number
amount_variable_decimal_ht?: string
unit_amount_variable_ht?: number
unit_amount_variable_decimal_ht?: string
amount_variable_nt?: number
amount_variable_decimal_nt?: string
unit_amount_variable_nt?: number
unit_amount_variable_decimal_nt?: string
currency: string
billing_period: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
breakdown: {
static?: Record<string, {
amount: { ... }
amount_decimal: { ... }
unit_amount?: { ... }
unit_amount_decimal?: { ... }
}>
variable?: Record<string, {
amount: { ... }
amount_decimal: { ... }
unit_amount?: { ... }
unit_amount_decimal?: { ... }
}>
variable_ht?: Record<string, {
amount: { ... }
amount_decimal: { ... }
unit_amount?: { ... }
unit_amount_decimal?: { ... }
}>
variable_nt?: Record<string, {
amount: { ... }
amount_decimal: { ... }
unit_amount?: { ... }
unit_amount_decimal?: { ... }
}>
}
inputs?: {
type?: "power" | "gas"
consumptionHT?: number
consumptionNT?: number
consumptionType?: "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter"
zipCode?: string
city?: string
providerId?: string
billingPeriod?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
referenceDate?: string // date
}
_meta?: {
signature: string
timestamp: number
}
}

ComputePriceInputs​

Echo of the request parameters used to compute the price, in the caller-facing shape.

type ComputePriceInputs = {
type?: "power" | "gas"
consumptionHT?: number
consumptionNT?: number
consumptionType?: "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter"
zipCode?: string
city?: string
providerId?: string
billingPeriod?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
referenceDate?: string // date
}

SpotMarketBiddingZone​

The bidding zone for a spot market price.

type SpotMarketBiddingZone = "AT" | "DE-LU"

SpotMarketType​

The market for a spot market price.

type SpotMarketType = "day_ahead"

SpotMarketDataFrequency​

The aggregation frequency for a series of spot market price data.

type SpotMarketDataFrequency = "PT15M" | "PT1H" | "P1D" | "P1M"

HistoricMarketPricesResult​

type HistoricMarketPricesResult = {
market: "day_ahead"
bidding_zone: "AT" | "DE-LU"
prices: Array<{
unit_amount: number
unit_amount_decimal: string
unit_amount_currency: string
timestamp: string // date-time
}>
}

AverageMarketPriceResult​

type AverageMarketPriceResult = {
market: "day_ahead"
bidding_zone: "AT" | "DE-LU"
price: {
unit_amount: number
unit_amount_decimal: string
unit_amount_currency: string
timestamp: string
}
_meta?: {
signature: string
timestamp: number
}
}

AverageMarketPriceRecord​

An average market price over a given period in time.

type AverageMarketPriceRecord = {
unit_amount: number
unit_amount_decimal: string
unit_amount_currency: string
timestamp: string
}

HistoricMarketPriceRecord​

A market price at a given point in time.

type HistoricMarketPriceRecord = {
unit_amount: number
unit_amount_decimal: string
unit_amount_currency: string
timestamp: string // date-time
}

BaseMarketPriceRecord​

type BaseMarketPriceRecord = {
unit_amount: number
unit_amount_decimal: string
unit_amount_currency: string
}

OAuthCredentials​

type OAuthCredentials = {
client_id: string
client_secret: string
authorization_url: string
grant_type: "client_credentials"
scope?: string
access_token?: string
access_token_expires_in?: number
access_token_expires_at?: number
}

BasicAuthCredentials​

type BasicAuthCredentials = {
username: string
password: string
}

BasicAuthIntegration​

type BasicAuthIntegration = {
username: string
password: string
auth_type?: "basic_auth"
base_url?: string
}

OAuthIntegration​

type OAuthIntegration = {
auth_type: "oauth"
oauth: {
client_id: string
client_secret: string
authorization_url: string
grant_type: "client_credentials"
scope?: string
access_token?: string
access_token_expires_in?: number
access_token_expires_at?: number
}
base_url?: string
}

IntegrationAuthCredentials​

The auth credentials for external integrations

type IntegrationAuthCredentials = {
username: string
password: string
auth_type?: "basic_auth"
base_url?: string
} | {
auth_type: "oauth"
oauth: {
client_id: string
client_secret: string
authorization_url: string
grant_type: "client_credentials"
scope?: string
access_token?: string
access_token_expires_in?: number
access_token_expires_at?: number
}
base_url?: string
}

SearchStreetsResult​

The search providers payload

type SearchStreetsResult = Array<{
street: string
}>

SearchProvidersResult​

The search providers payload

type SearchProvidersResult = Array<{
name: string
code: string
type: "gas" | "power"
additionalData: {
gridOperators: Array<{
name: { ... }
codeNumber: { ... }
validFrom?: { ... }
validUntil?: { ... }
}>
defaultSuppliers: Array<{
name: { ... }
codeNumber: { ... }
validFrom?: { ... }
validUntil?: { ... }
}>
marketAreaDetails: {
gasType?: { ... }
marketArea?: { ... }
virtualTradingPoint?: { ... }
} | {
controlZone?: { ... }
balancingZone?: { ... }
}
}
_meta?: {
signature: string
timestamp: number
}
}>

Provider​

The provider entity

type Provider = {
name: string
code: string
type: "gas" | "power"
additionalData: {
gridOperators: Array<{
name: { ... }
codeNumber: { ... }
validFrom?: { ... }
validUntil?: { ... }
}>
defaultSuppliers: Array<{
name: { ... }
codeNumber: { ... }
validFrom?: { ... }
validUntil?: { ... }
}>
marketAreaDetails: {
gasType?: { ... }
marketArea?: { ... }
virtualTradingPoint?: { ... }
} | {
controlZone?: { ... }
balancingZone?: { ... }
}
}
_meta?: {
signature: string
timestamp: number
}
}

AdditionalProviderData​

Additional data included in the provider entity

type AdditionalProviderData = {
gridOperators: Array<{
name: string
codeNumber: string
validFrom?: string // date
validUntil?: string // date
}>
defaultSuppliers: Array<{
name: string
codeNumber: string
validFrom?: string // date
validUntil?: string // date
}>
marketAreaDetails: {
gasType?: "L-Gas" | "H-Gas"
marketArea?: string
virtualTradingPoint?: string
} | {
controlZone?: string
balancingZone?: string
}
}

MarketParticipant​

Market participant data

type MarketParticipant = {
name: string
codeNumber: string
validFrom?: string // date
validUntil?: string // date
}

GasMarketAreaDetails​

Market area details for gas

type GasMarketAreaDetails = {
gasType?: "L-Gas" | "H-Gas"
marketArea?: string
virtualTradingPoint?: string
}

PowerMarketAreaDetails​

Market area details for power

type PowerMarketAreaDetails = {
controlZone?: string
balancingZone?: string
}

Street​

The street entity

type Street = {
street: string
}

ValidateAvailabilityFileResult​

The availability map file result payload

type ValidateAvailabilityFileResult = {
status: "success" | "error"
rules_parsed_count: number
errors: Array<{
line?: number
msg: string
data?: string
}>
}

CartDto​

A valid cart payload from a client.

type CartDto = {
metadata?: Array<{
key?: string
value?: string
}>
customer?: {
first_name?: string
last_name?: string
company_name?: string
vat_id?: string
email?: string
phone?: string
}
billing_address?: {
_tags?: string[]
street?: string
street_number?: string
postal_code?: string
city?: string
country?: string
additional_info?: string
company_name?: string
first_name?: string
last_name?: string
salutation?: string
title?: string
}
delivery_address?: {
_tags?: string[]
street?: string
street_number?: string
postal_code?: string
city?: string
country?: string
additional_info?: string
company_name?: string
first_name?: string
last_name?: string
salutation?: string
title?: string
}
source_type?: string
source_id?: string
source?: {
http?: string
title?: string
}
additional_addresses?: Array<{
_tags?: string[]
street?: string
street_number?: string
postal_code?: string
city?: string
country?: string
additional_info?: string
company_name?: string
first_name?: string
last_name?: string
salutation?: string
title?: string
}>
payment_method?: {
type?: string
details?: Record<string, unknown>
}
line_items: Array<{
external_fees_mappings?: Array<{
price_id?: { ... }
frequency_unit?: { ... }
amount_total?: { ... }
amount_total_decimal?: { ... }
}>
external_fees_metadata?: {
amount_total: { ... }
amount_total_decimal: { ... }
amount_static?: { ... }
amount_static_decimal?: { ... }
amount_variable_ht?: { ... }
amount_variable_decimal_ht?: { ... }
unit_amount_variable_ht?: { ... }
unit_amount_variable_decimal_ht?: { ... }
amount_variable_nt?: { ... }
amount_variable_decimal_nt?: { ... }
unit_amount_variable_nt?: { ... }
unit_amount_variable_decimal_nt?: { ... }
currency: { ... }
billing_period: { ... }
breakdown: { ... }
inputs?: { ... }
_meta?: { ... }
}
external_location_metadata?: {
name: { ... }
code: { ... }
type: { ... }
additionalData: { ... }
_meta?: { ... }
}
external_price_metadata?: {
market: { ... }
// ...
}

CheckoutCart​

The cart checkout request payload

type CheckoutCart = {
cart?: string | {
metadata?: Array<{
key?: { ... }
value?: { ... }
}>
customer?: {
first_name?: { ... }
last_name?: { ... }
company_name?: { ... }
vat_id?: { ... }
email?: { ... }
phone?: { ... }
}
billing_address?: {
_tags?: { ... }
street?: { ... }
street_number?: { ... }
postal_code?: { ... }
city?: { ... }
country?: { ... }
additional_info?: { ... }
company_name?: { ... }
first_name?: { ... }
last_name?: { ... }
salutation?: { ... }
title?: { ... }
}
delivery_address?: {
_tags?: { ... }
street?: { ... }
street_number?: { ... }
postal_code?: { ... }
city?: { ... }
country?: { ... }
additional_info?: { ... }
company_name?: { ... }
first_name?: { ... }
last_name?: { ... }
salutation?: { ... }
title?: { ... }
}
source_type?: string
source_id?: string
source?: {
http?: { ... }
title?: { ... }
}
additional_addresses?: Array<{
_tags?: { ... }
street?: { ... }
street_number?: { ... }
postal_code?: { ... }
city?: { ... }
country?: { ... }
additional_info?: { ... }
company_name?: { ... }
first_name?: { ... }
last_name?: { ... }
salutation?: { ... }
title?: { ... }
}>
payment_method?: {
type?: { ... }
details?: { ... }
}
line_items: Array<{
external_fees_mappings?: { ... }
external_fees_metadata?: { ... }
external_location_metadata?: { ... }
external_price_metadata?: { ... }
_immutable_pricing_details?: { ... }
coupon_ids?: { ... }
taxes?: { ... }
recurrences?: { ... }
_coupons?: { ... }
type?: { ... }
billing_period?: { ... }
unit_amount?: { ... }
unit_amount_gross?: { ... }
unit_amount_currency?: { ... }
unit_amount_decimal?: { ... }
is_composite_price?: { ... }
pricing_model?: { ... }
_price?: { ... }
} | {
external_fees_mappings?: { ... }
external_fees_metadata?: { ... }
external_location_metadata?: { ... }
external_price_metadata?: { ... }
_immutable_pricing_details?: { ... }
coupon_ids?: { ... }
taxes?: { ... }
recurrences?: { ... }
_coupons?: { ... }
is_composite_price: { ... }
item_components?: { ... }
selected_price_component_ids?: { ... }
price_component_coupon_ids?: { ... }
_price?: { ... }
// ...
}

CheckoutCartResult​

The cart checkout result

type CheckoutCartResult = {
order?: {
order_number?: string
cart_id?: string
status?: "draft" | "quote" | "placed" | "cancelled" | "completed"
source_type?: string
source_id?: string
source?: {
http?: { ... }
title?: { ... }
}
metadata?: Array<{
key?: { ... }
value?: { ... }
}>
customer?: {
$relation?: { ... }
}
billing_first_name?: string
billing_last_name?: string
billing_company_name?: string
billing_vat?: string
billing_email?: string
billing_phone?: string
billing_address?: Array<{
_tags?: { ... }
street?: { ... }
street_number?: { ... }
postal_code?: { ... }
city?: { ... }
country?: { ... }
additional_info?: { ... }
company_name?: { ... }
first_name?: { ... }
last_name?: { ... }
salutation?: { ... }
title?: { ... }
}>
currency?: string
delivery_address?: Array<{
_tags?: { ... }
street?: { ... }
street_number?: { ... }
postal_code?: { ... }
city?: { ... }
country?: { ... }
additional_info?: { ... }
company_name?: { ... }
first_name?: { ... }
last_name?: { ... }
salutation?: { ... }
title?: { ... }
}>
payment_method?: Array<{
type?: { ... }
details?: { ... }
}>
line_items?: Array<{
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
} | {
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
}>
products?: {
$relation?: { ... }
}
prices?: {
$relation?: { ... }
}
coupons?: {
$relation?: { ... }
}
amount_subtotal?: number
amount_total?: number
total_details?: {
amount_shipping?: { ... }
amount_tax?: { ... }
breakdown?: { ... }
}
_org_id?: string
_id?: string
// ...
}

CheckoutMode​

The checkout mode for the cart checkout.

type CheckoutMode = "create_order" | "create_invoice" | "create_quote"

OrderStatus​

statusdescription
draft​​Starting state for all orders, at this point we can still edit the order
quoteThe order is in a quoting phase, bound to an expiration date
placedThe order has been paid and can now be fulfilled (shipped
type OrderStatus = "draft" | "quote" | "placed" | "cancelled" | "completed"

BasePriceItemCommon​

Represents the common keys in BasePriceItem and BasePriceItemDto

type BasePriceItemCommon = {
metadata?: Array<{
key?: string
value?: string
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
name?: string
value?: number
metadata?: Record<string, string>
}>
is_tax_inclusive?: boolean
_product?: {
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: { ... }
feature?: { ... }
}>
product_images?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
product_downloads?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
_id?: string
_title?: string
_org_id?: string
_created_at?: string
_updated_at?: string
}
catalog_reference?: {
product: {
id: { ... }
variant?: { ... }
}
price: {
id: { ... }
variant?: { ... }
}
price_components?: Array<{
id: { ... }
variant?: { ... }
}>
coupons?: Array<{
id: { ... }
variant?: { ... }
}>
as_of: string
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
}

PriceItemDtoUnion​

type PriceItemDtoUnion = {
external_fees_mappings?: Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
amount_total?: number
amount_total_decimal?: string
}>
external_fees_metadata?: {
amount_total: number
amount_total_decimal: string
amount_static?: number
amount_static_decimal?: unknown
amount_variable_ht?: number
amount_variable_decimal_ht?: string
unit_amount_variable_ht?: number
unit_amount_variable_decimal_ht?: string
amount_variable_nt?: number
amount_variable_decimal_nt?: string
unit_amount_variable_nt?: number
unit_amount_variable_decimal_nt?: string
currency: string
billing_period: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
breakdown: {
static?: { ... }
variable?: { ... }
variable_ht?: { ... }
variable_nt?: { ... }
}
inputs?: {
type?: { ... }
consumptionHT?: { ... }
consumptionNT?: { ... }
consumptionType?: { ... }
zipCode?: { ... }
city?: { ... }
providerId?: { ... }
billingPeriod?: { ... }
referenceDate?: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
external_location_metadata?: {
name: string
code: string
type: "gas" | "power"
additionalData: {
gridOperators: { ... }
defaultSuppliers: { ... }
marketAreaDetails: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
external_price_metadata?: {
market: "day_ahead"
bidding_zone: "AT" | "DE-LU"
price: {
unit_amount: { ... }
unit_amount_decimal: { ... }
unit_amount_currency: { ... }
timestamp: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
_immutable_pricing_details?: {
items?: Array<{
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
} | {
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
}>
amount_subtotal?: number
amount_total?: number
// ...
}

PriceItemsDto​

A valid set of product prices, quantities, (discounts) and taxes from a client.

type PriceItemsDto = Array<{
external_fees_mappings?: Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
amount_total?: number
amount_total_decimal?: string
}>
external_fees_metadata?: {
amount_total: number
amount_total_decimal: string
amount_static?: number
amount_static_decimal?: unknown
amount_variable_ht?: number
amount_variable_decimal_ht?: string
unit_amount_variable_ht?: number
unit_amount_variable_decimal_ht?: string
amount_variable_nt?: number
amount_variable_decimal_nt?: string
unit_amount_variable_nt?: number
unit_amount_variable_decimal_nt?: string
currency: string
billing_period: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
breakdown: {
static?: { ... }
variable?: { ... }
variable_ht?: { ... }
variable_nt?: { ... }
}
inputs?: {
type?: { ... }
consumptionHT?: { ... }
consumptionNT?: { ... }
consumptionType?: { ... }
zipCode?: { ... }
city?: { ... }
providerId?: { ... }
billingPeriod?: { ... }
referenceDate?: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
external_location_metadata?: {
name: string
code: string
type: "gas" | "power"
additionalData: {
gridOperators: { ... }
defaultSuppliers: { ... }
marketAreaDetails: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
external_price_metadata?: {
market: "day_ahead"
bidding_zone: "AT" | "DE-LU"
price: {
unit_amount: { ... }
unit_amount_decimal: { ... }
unit_amount_currency: { ... }
timestamp: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
_immutable_pricing_details?: {
items?: Array<{
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
} | {
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
}>
amount_subtotal?: number
amount_total?: number
// ...
}

BasePriceItemDto​

Represents a valid base price item from a client.

type BasePriceItemDto = {
metadata?: Array<{
key?: string
value?: string
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
name?: string
value?: number
metadata?: Record<string, string>
}>
is_tax_inclusive?: boolean
_product?: {
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: { ... }
feature?: { ... }
}>
product_images?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
product_downloads?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
_id?: string
_title?: string
_org_id?: string
_created_at?: string
_updated_at?: string
}
catalog_reference?: {
product: {
id: { ... }
variant?: { ... }
}
price: {
id: { ... }
variant?: { ... }
}
price_components?: Array<{
id: { ... }
variant?: { ... }
}>
coupons?: Array<{
id: { ... }
variant?: { ... }
}>
as_of: string
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
}

PriceItemDto​

Represents a price input to the pricing library.

type PriceItemDto = {
external_fees_mappings?: Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
amount_total?: number
amount_total_decimal?: string
}>
external_fees_metadata?: {
amount_total: number
amount_total_decimal: string
amount_static?: number
amount_static_decimal?: unknown
amount_variable_ht?: number
amount_variable_decimal_ht?: string
unit_amount_variable_ht?: number
unit_amount_variable_decimal_ht?: string
amount_variable_nt?: number
amount_variable_decimal_nt?: string
unit_amount_variable_nt?: number
unit_amount_variable_decimal_nt?: string
currency: string
billing_period: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
breakdown: {
static?: { ... }
variable?: { ... }
variable_ht?: { ... }
variable_nt?: { ... }
}
inputs?: {
type?: { ... }
consumptionHT?: { ... }
consumptionNT?: { ... }
consumptionType?: { ... }
zipCode?: { ... }
city?: { ... }
providerId?: { ... }
billingPeriod?: { ... }
referenceDate?: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
external_location_metadata?: {
name: string
code: string
type: "gas" | "power"
additionalData: {
gridOperators: { ... }
defaultSuppliers: { ... }
marketAreaDetails: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
external_price_metadata?: {
market: "day_ahead"
bidding_zone: "AT" | "DE-LU"
price: {
unit_amount: { ... }
unit_amount_decimal: { ... }
unit_amount_currency: { ... }
timestamp: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
_immutable_pricing_details?: {
items?: Array<{
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
} | {
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
}>
amount_subtotal?: number
amount_total?: number
// ...
}

CompositePriceItemDto​

Represents a composite price input to the pricing library.

type CompositePriceItemDto = {
external_fees_mappings?: Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
amount_total?: number
amount_total_decimal?: string
}>
external_fees_metadata?: {
amount_total: number
amount_total_decimal: string
amount_static?: number
amount_static_decimal?: unknown
amount_variable_ht?: number
amount_variable_decimal_ht?: string
unit_amount_variable_ht?: number
unit_amount_variable_decimal_ht?: string
amount_variable_nt?: number
amount_variable_decimal_nt?: string
unit_amount_variable_nt?: number
unit_amount_variable_decimal_nt?: string
currency: string
billing_period: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
breakdown: {
static?: { ... }
variable?: { ... }
variable_ht?: { ... }
variable_nt?: { ... }
}
inputs?: {
type?: { ... }
consumptionHT?: { ... }
consumptionNT?: { ... }
consumptionType?: { ... }
zipCode?: { ... }
city?: { ... }
providerId?: { ... }
billingPeriod?: { ... }
referenceDate?: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
external_location_metadata?: {
name: string
code: string
type: "gas" | "power"
additionalData: {
gridOperators: { ... }
defaultSuppliers: { ... }
marketAreaDetails: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
external_price_metadata?: {
market: "day_ahead"
bidding_zone: "AT" | "DE-LU"
price: {
unit_amount: { ... }
unit_amount_decimal: { ... }
unit_amount_currency: { ... }
timestamp: { ... }
}
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
_immutable_pricing_details?: {
items?: Array<{
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
} | {
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
}>
amount_subtotal?: number
amount_total?: number
// ...
}

TaxAmountDto​

A valid tax rate from a client.

type TaxAmountDto = {
rate?: string
tax?: {
_id: string // uuid
_title: string
_org: string
_schema: string
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
type: "VAT" | "GST" | "Custom"
description?: string
rate: number
active?: boolean
region?: string
region_label?: string
} | {
type: "VAT" | "GST" | "Custom"
rate: number
description?: string
}
}

OrderSource​

The order generation source

type OrderSource = {
http?: string
title?: string
}

OpportunitySource​

The opportunity generation source

type OpportunitySource = {
http?: string
title?: string
}

RecurrenceAmountDto​

An amount associated with a specific recurrence.

type RecurrenceAmountDto = {
amount_subtotal?: number
amount_subtotal_decimal?: string
amount_total?: number
amount_total_decimal?: string
cashback_amount?: number
cashback_amount_decimal?: string
cashback_period?: "0" | "12"
after_cashback_amount_total?: number
after_cashback_amount_total_decimal?: string
discount_amount?: number
discount_amount_decimal?: string
discount_percentage?: number
before_discount_amount_total?: number
before_discount_amount_total_decimal?: string
before_discount_amount_subtotal?: number
before_discount_amount_subtotal_decimal?: string
}

Currency​

Three-letter ISO currency code, in lowercase. Must be a supported currency. ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html

type Currency = string

OrderRelation​

An order relation reference

type OrderRelation = {
entity_id?: string
_tags?: string[]
}

OrderPayload​

Order Entity Payload

type OrderPayload = {
status?: "draft" | "quote" | "placed" | "cancelled" | "completed"
line_items?: Array<{
external_fees_mappings?: Array<{
price_id?: { ... }
frequency_unit?: { ... }
amount_total?: { ... }
amount_total_decimal?: { ... }
}>
external_fees_metadata?: {
amount_total: { ... }
amount_total_decimal: { ... }
amount_static?: { ... }
amount_static_decimal?: { ... }
amount_variable_ht?: { ... }
amount_variable_decimal_ht?: { ... }
unit_amount_variable_ht?: { ... }
unit_amount_variable_decimal_ht?: { ... }
amount_variable_nt?: { ... }
amount_variable_decimal_nt?: { ... }
unit_amount_variable_nt?: { ... }
unit_amount_variable_decimal_nt?: { ... }
currency: { ... }
billing_period: { ... }
breakdown: { ... }
inputs?: { ... }
_meta?: { ... }
}
external_location_metadata?: {
name: { ... }
code: { ... }
type: { ... }
additionalData: { ... }
_meta?: { ... }
}
external_price_metadata?: {
market: { ... }
bidding_zone: { ... }
price: { ... }
_meta?: { ... }
}
_immutable_pricing_details?: {
items?: { ... }
amount_subtotal?: { ... }
amount_total?: { ... }
unit_amount_gross?: { ... }
unit_amount_net?: { ... }
amount_tax?: { ... }
total_details?: { ... }
currency?: { ... }
redeemed_promos?: { ... }
}
coupon_ids?: string[]
taxes?: Array<{
rate?: { ... }
tax?: { ... }
}>
recurrences?: Array<{
amount_subtotal?: { ... }
amount_subtotal_decimal?: { ... }
amount_total?: { ... }
amount_total_decimal?: { ... }
cashback_amount?: { ... }
cashback_amount_decimal?: { ... }
cashback_period?: { ... }
after_cashback_amount_total?: { ... }
after_cashback_amount_total_decimal?: { ... }
discount_amount?: { ... }
discount_amount_decimal?: { ... }
discount_percentage?: { ... }
before_discount_amount_total?: { ... }
before_discount_amount_total_decimal?: { ... }
before_discount_amount_subtotal?: { ... }
before_discount_amount_subtotal_decimal?: { ... }
}>
_coupons?: Array<{
_id: { ... }
_title: { ... }
_org: { ... }
_schema: { ... }
_tags?: { ... }
_created_at: { ... }
_updated_at: { ... }
name: { ... }
description?: { ... }
type: { ... }
category: { ... }
percentage_value?: { ... }
fixed_value?: { ... }
fixed_value_decimal?: { ... }
fixed_value_currency?: { ... }
cashback_period?: { ... }
active?: { ... }
is_conditional?: { ... }
requires_promo_code?: { ... }
}>
type?: "one_time" | "recurring"
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"
unit_amount?: number
unit_amount_gross?: number
// ...
}

PriceItems​

Tracks a set of product prices, quantities, (discounts) and taxes.

type PriceItems = Array<{
metadata?: Array<{
key?: string
value?: string
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
name?: string
value?: number
metadata?: Record<string, string>
}>
is_tax_inclusive?: boolean
_product?: {
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: { ... }
feature?: { ... }
}>
product_images?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
product_downloads?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
_id?: string
_title?: string
_org_id?: string
_created_at?: string
_updated_at?: string
}
catalog_reference?: {
product: {
id: { ... }
variant?: { ... }
}
price: {
id: { ... }
variant?: { ... }
}
price_components?: Array<{
id: { ... }
variant?: { ... }
}>
coupons?: Array<{
id: { ... }
variant?: { ... }
}>
as_of: string
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
} | {
// ...
}

CompositePriceItem​

Represents a composite price input to the pricing library.

type CompositePriceItem = {
metadata?: Array<{
key?: string
value?: string
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
name?: string
value?: number
metadata?: Record<string, string>
}>
is_tax_inclusive?: boolean
_product?: {
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: { ... }
feature?: { ... }
}>
product_images?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
product_downloads?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
_id?: string
_title?: string
_org_id?: string
_created_at?: string
_updated_at?: string
}
catalog_reference?: {
product: {
id: { ... }
variant?: { ... }
}
price: {
id: { ... }
variant?: { ... }
}
price_components?: Array<{
id: { ... }
variant?: { ... }
}>
coupons?: Array<{
id: { ... }
variant?: { ... }
}>
as_of: string
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
}

BasePriceItem​

Represents a price item

type BasePriceItem = {
metadata?: Array<{
key?: string
value?: string
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
name?: string
value?: number
metadata?: Record<string, string>
}>
is_tax_inclusive?: boolean
_product?: {
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: { ... }
feature?: { ... }
}>
product_images?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
product_downloads?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
_id?: string
_title?: string
_org_id?: string
_created_at?: string
_updated_at?: string
}
catalog_reference?: {
product: {
id: { ... }
variant?: { ... }
}
price: {
id: { ... }
variant?: { ... }
}
price_components?: Array<{
id: { ... }
variant?: { ... }
}>
coupons?: Array<{
id: { ... }
variant?: { ... }
}>
as_of: string
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
}

CashbackAmounts​

type CashbackAmounts = {
cashback_amount?: number
cashback_amount_decimal?: string
cashback_period?: "0" | "12"
after_cashback_amount_total?: number
after_cashback_amount_total_decimal?: string
}

DiscountAmounts​

type DiscountAmounts = {
discount_amount?: number
discount_amount_decimal?: string
discount_percentage?: number
before_discount_amount_total?: number
before_discount_amount_total_decimal?: string
before_discount_amount_subtotal?: number
before_discount_amount_subtotal_decimal?: string
}

PriceAmounts​

type PriceAmounts = {
amount_subtotal?: number
amount_subtotal_decimal?: string
amount_total?: number
amount_total_decimal?: string
}

Amounts​

type Amounts = {
amount_subtotal?: number
amount_subtotal_decimal?: string
amount_total?: number
amount_total_decimal?: string
cashback_amount?: number
cashback_amount_decimal?: string
cashback_period?: "0" | "12"
after_cashback_amount_total?: number
after_cashback_amount_total_decimal?: string
discount_amount?: number
discount_amount_decimal?: string
discount_percentage?: number
before_discount_amount_total?: number
before_discount_amount_total_decimal?: string
before_discount_amount_subtotal?: number
before_discount_amount_subtotal_decimal?: string
}

PriceItem​

Represents a price item

type PriceItem = {
metadata?: Array<{
key?: string
value?: string
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
name?: string
value?: number
metadata?: Record<string, string>
}>
is_tax_inclusive?: boolean
_product?: {
description?: string
code?: string
type?: "product" | "service"
name?: string
categories?: string[]
feature?: Array<{
_tags?: { ... }
feature?: { ... }
}>
product_images?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
product_downloads?: {
$relation?: { ... }
} | Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
is_conditional?: boolean
_availability_files?: Array<{
_id: { ... }
filename: { ... }
mime_type: { ... }
versions: { ... }
_schema: { ... }
_org: { ... }
_created_at: { ... }
_updated_at: { ... }
_title?: { ... }
$relation?: { ... }
}>
_id?: string
_title?: string
_org_id?: string
_created_at?: string
_updated_at?: string
}
catalog_reference?: {
product: {
id: { ... }
variant?: { ... }
}
price: {
id: { ... }
variant?: { ... }
}
price_components?: Array<{
id: { ... }
variant?: { ... }
}>
coupons?: Array<{
id: { ... }
variant?: { ... }
}>
as_of: string
_meta?: {
signature: { ... }
timestamp: { ... }
}
}
}

TaxAmount​

A tax amount associated with a specific tax rate.

type TaxAmount = {
amount?: number
rate?: string
rateValue?: number
tax?: {
_id: string // uuid
_title: string
_org: string
_schema: string
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
type: "VAT" | "GST" | "Custom"
description?: string
rate: number
active?: boolean
region?: string
region_label?: string
} | {
type: "VAT" | "GST" | "Custom"
rate: number
description?: string
}
}

TaxAmountBreakdown​

A tax amount associated with a specific tax rate.

type TaxAmountBreakdown = {
amount?: number
rate?: string
rateValue?: number
tax?: {
rate?: number
type?: "VAT" | "GST" | "Custom"
_id?: string
}
}

RecurrenceAmount​

An amount associated with a specific recurrence.

type RecurrenceAmount = {
amount_subtotal?: number
amount_subtotal_decimal?: string
amount_total?: number
amount_total_decimal?: string
cashback_amount?: number
cashback_amount_decimal?: string
cashback_period?: "0" | "12"
after_cashback_amount_total?: number
after_cashback_amount_total_decimal?: string
discount_amount?: number
discount_amount_decimal?: string
discount_percentage?: number
before_discount_amount_total?: number
before_discount_amount_total_decimal?: string
before_discount_amount_subtotal?: number
before_discount_amount_subtotal_decimal?: string
}

CashbackAmount​

A detail associated with a specific cashback.

type CashbackAmount = {
cashback_name?: string
cashback_period: "0" | "12"
amount_total: number
}

RecurrenceAmountWithTax​

An amount associated with a specific recurrence.

type RecurrenceAmountWithTax = {
type?: string
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"
amount_total: number
amount_subtotal: number
amount_tax?: number
tax?: {
amount?: number
rate?: string
rateValue?: number
tax?: {
rate?: { ... }
type?: { ... }
_id?: { ... }
}
}
}

TotalDetails​

The total details with tax (and discount) aggregated totals.

type TotalDetails = {
amount_shipping?: number
amount_tax?: number
breakdown?: {
taxes?: Array<{
amount?: { ... }
rate?: { ... }
rateValue?: { ... }
tax?: { ... }
}>
recurrences?: Array<{
amount_subtotal?: { ... }
amount_subtotal_decimal?: { ... }
amount_total?: { ... }
amount_total_decimal?: { ... }
cashback_amount?: { ... }
cashback_amount_decimal?: { ... }
cashback_period?: { ... }
after_cashback_amount_total?: { ... }
after_cashback_amount_total_decimal?: { ... }
discount_amount?: { ... }
discount_amount_decimal?: { ... }
discount_percentage?: { ... }
before_discount_amount_total?: { ... }
before_discount_amount_total_decimal?: { ... }
before_discount_amount_subtotal?: { ... }
before_discount_amount_subtotal_decimal?: { ... }
}>
cashbacks?: Array<{
cashback_name?: { ... }
cashback_period: { ... }
amount_total: { ... }
}>
recurrencesByTax?: Array<{
type?: { ... }
billing_period?: { ... }
amount_total: { ... }
amount_subtotal: { ... }
amount_tax?: { ... }
tax?: { ... }
}>
}
}

PricingDetails​

The result from the calculation of a set of price items.

type PricingDetails = {
items?: Array<{
metadata?: Array<{
key?: { ... }
value?: { ... }
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: { ... }
frequency_unit?: { ... }
name?: { ... }
value?: { ... }
metadata?: { ... }
}>
is_tax_inclusive?: boolean
_product?: {
description?: { ... }
code?: { ... }
type?: { ... }
name?: { ... }
categories?: { ... }
feature?: { ... }
product_images?: { ... }
product_downloads?: { ... }
is_conditional?: { ... }
_availability_files?: { ... }
_id?: { ... }
_title?: { ... }
_org_id?: { ... }
_created_at?: { ... }
_updated_at?: { ... }
}
catalog_reference?: {
product: { ... }
price: { ... }
price_components?: { ... }
coupons?: { ... }
as_of: { ... }
_meta?: { ... }
}
} | {
metadata?: Array<{
key?: { ... }
value?: { ... }
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: { ... }
frequency_unit?: { ... }
name?: { ... }
value?: { ... }
metadata?: { ... }
}>
is_tax_inclusive?: boolean
_product?: {
description?: { ... }
code?: { ... }
type?: { ... }
name?: { ... }
categories?: { ... }
feature?: { ... }
product_images?: { ... }
product_downloads?: { ... }
is_conditional?: { ... }
_availability_files?: { ... }
_id?: { ... }
_title?: { ... }
_org_id?: { ... }
_created_at?: { ... }
_updated_at?: { ... }
}
catalog_reference?: {
product: { ... }
price: { ... }
price_components?: { ... }
coupons?: { ... }
as_of: { ... }
_meta?: { ... }
}
}>
amount_subtotal?: number
amount_total?: number
unit_amount_gross?: number
unit_amount_net?: number
amount_tax?: number
total_details?: {
amount_shipping?: number
amount_tax?: number
breakdown?: {
taxes?: { ... }
// ...
}

PromoCodeValidationResponse​

The result from the validation of a set of promo codes.

type PromoCodeValidationResponse = {
matched_coupons?: Array<{
_id: string // uuid
_title: string
_org: string
_schema: "coupon"
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
name: string
description?: string
type: "fixed" | "percentage"
category: "discount" | "cashback"
percentage_value?: string
fixed_value?: number
fixed_value_decimal?: string
fixed_value_currency?: string
cashback_period?: "0" | "12"
active?: boolean
is_conditional?: boolean
requires_promo_code?: boolean
}>
}

PricingDetailsResponse​

The result from the calculation of a set of price items.

type PricingDetailsResponse = {
items?: Array<{
metadata?: Array<{
key?: { ... }
value?: { ... }
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: { ... }
frequency_unit?: { ... }
name?: { ... }
value?: { ... }
metadata?: { ... }
}>
is_tax_inclusive?: boolean
_product?: {
description?: { ... }
code?: { ... }
type?: { ... }
name?: { ... }
categories?: { ... }
feature?: { ... }
product_images?: { ... }
product_downloads?: { ... }
is_conditional?: { ... }
_availability_files?: { ... }
_id?: { ... }
_title?: { ... }
_org_id?: { ... }
_created_at?: { ... }
_updated_at?: { ... }
}
catalog_reference?: {
product: { ... }
price: { ... }
price_components?: { ... }
coupons?: { ... }
as_of: { ... }
_meta?: { ... }
}
} | {
metadata?: Array<{
key?: { ... }
value?: { ... }
}>
quantity?: number
product_id?: string
price_id?: string
description?: string
product_description?: string
product_name?: string
price_mappings?: Array<{
price_id?: { ... }
frequency_unit?: { ... }
name?: { ... }
value?: { ... }
metadata?: { ... }
}>
is_tax_inclusive?: boolean
_product?: {
description?: { ... }
code?: { ... }
type?: { ... }
name?: { ... }
categories?: { ... }
feature?: { ... }
product_images?: { ... }
product_downloads?: { ... }
is_conditional?: { ... }
_availability_files?: { ... }
_id?: { ... }
_title?: { ... }
_org_id?: { ... }
_created_at?: { ... }
_updated_at?: { ... }
}
catalog_reference?: {
product: { ... }
price: { ... }
price_components?: { ... }
coupons?: { ... }
as_of: { ... }
_meta?: { ... }
}
}>
amount_subtotal?: number
amount_total?: number
unit_amount_gross?: number
unit_amount_net?: number
amount_tax?: number
total_details?: {
amount_shipping?: number
amount_tax?: number
breakdown?: {
taxes?: { ... }
// ...
}

BillingPeriod​

type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"

CashbackPeriod​

The cashback period, for now it's limited to either 0 months or 12 months

type CashbackPeriod = "0" | "12"

SalesTax​

type SalesTax = "nontaxable" | "reduced" | "standard"

AvailabilityLocation​

type AvailabilityLocation = {
street?: string
street_number?: string
postal_code?: string
city?: string
country?: string
}

AvailabilityFilters​

Availability filters dimensions

type AvailabilityFilters = {
location: {
street?: string
street_number?: string
postal_code?: string
city?: string
country?: string
}
available_date?: string // date
}

Address​

type Address = {
_tags?: string[]
street?: string
street_number?: string
postal_code?: string
city?: string
country?: string
additional_info?: string
company_name?: string
first_name?: string
last_name?: string
salutation?: string
title?: string
}

PaymentMethod​

A PaymentMethod represent your customer's payment instruments.

type PaymentMethod = {
type?: string
details?: Record<string, unknown>
}

Customer​

type Customer = {
first_name?: string
last_name?: string
company_name?: string
vat_id?: string
email?: string
phone?: string
}

File​

type File = {
_id: string
filename: string
mime_type: string
versions: Array<{
s3ref: {
bucket: { ... }
key: { ... }
}
}>
_schema: string
_org: string
_created_at: string // date-time
_updated_at: string // date-time
_title?: string
$relation?: {
entity_id?: string
_tags?: string[]
}
}

EntityId​

type EntityId = string // uuid

EntityItem​

type EntityItem = {
_id: string // uuid
_title: string
_org: string
_schema: string
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
}

EntityRelation​

type EntityRelation = {
entity_id?: string
_tags?: string[]
}

Tax​

the tax configuration

type Tax = {
_id: string // uuid
_title: string
_org: string
_schema: string
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
type: "VAT" | "GST" | "Custom"
description?: string
rate: number
active?: boolean
region?: string
region_label?: string
}

TaxItem​

A minimal, ad-hoc tax rate for line items with no backing tax entity in the catalog (e.g. a fully custom/composite price component built by a client with no product/price reference to resolve tax from). Mirrors how PriceItem relates to Price: unlike Tax, this has no entity identity — it isn't persis

type TaxItem = {
type: "VAT" | "GST" | "Custom"
rate: number
description?: string
}

TaxBreakdownInfo​

type TaxBreakdownInfo = {
rate?: number
type?: "VAT" | "GST" | "Custom"
_id?: string
}

BaseCouponCommon​

The shared properties for the coupon entity and coupon item entity

type BaseCouponCommon = {
_id: string // uuid
_title: string
_org: string
_schema: "coupon"
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
name: string
description?: string
type: "fixed" | "percentage"
category: "discount" | "cashback"
percentage_value?: string
fixed_value?: number
fixed_value_decimal?: string
fixed_value_currency?: string
cashback_period?: "0" | "12"
active?: boolean
is_conditional?: boolean
requires_promo_code?: boolean
}

CouponWithoutPromoCodes​

The base for the coupon entity without promo codes

type CouponWithoutPromoCodes = {
_id: string // uuid
_title: string
_org: string
_schema: "coupon"
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
name: string
description?: string
type: "fixed" | "percentage"
category: "discount" | "cashback"
percentage_value?: string
fixed_value?: number
fixed_value_decimal?: string
fixed_value_currency?: string
cashback_period?: "0" | "12"
active?: boolean
is_conditional?: boolean
requires_promo_code?: boolean
}

Coupon​

The coupon entity

type Coupon = {
_id: string // uuid
_title: string
_org: string
_schema: "coupon"
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
name: string
description?: string
type: "fixed" | "percentage"
category: "discount" | "cashback"
percentage_value?: string
fixed_value?: number
fixed_value_decimal?: string
fixed_value_currency?: string
cashback_period?: "0" | "12"
active?: boolean
is_conditional?: boolean
requires_promo_code?: boolean
}

CouponItem​

type CouponItem = {
_id: string // uuid
_title: string
_org: string
_schema: "coupon"
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
name: string
description?: string
type: "fixed" | "percentage"
category: "discount" | "cashback"
percentage_value?: string
fixed_value?: number
fixed_value_decimal?: string
fixed_value_currency?: string
cashback_period?: "0" | "12"
active?: boolean
is_conditional?: boolean
requires_promo_code?: boolean
}

PromoCode​

type PromoCode = {
id: string
code: string
has_usage_limit?: boolean
usage_limit?: number
}

RedeemedPromo​

type RedeemedPromo = {
code: string
coupons: Array<{
_id: string // uuid
_title: string
_org: string
_schema: "coupon"
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
name: string
description?: string
type: "fixed" | "percentage"
category: "discount" | "cashback"
percentage_value?: string
fixed_value?: number
fixed_value_decimal?: string
fixed_value_currency?: string
cashback_period?: "0" | "12"
active?: boolean
is_conditional?: boolean
requires_promo_code?: boolean
}>
}

PriceTier​

type PriceTier = {
up_to?: number
flat_fee_amount?: number
flat_fee_amount_decimal?: string
unit_amount?: number
unit_amount_decimal?: string
display_mode?: "hidden" | "on_request"
}

PriceTierDisplayMode​

type PriceTierDisplayMode = "hidden" | "on_request"

PricingModel​

Describes how to compute the price per period. Either per_unit, tiered_graduated or tiered_volume.

  • per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
  • tiered_graduated indicates that the unit pricing will be co
type PricingModel = "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "dynamic_tariff" | "external_getag"

MarkupPricingModel​

Describes how to compute the markup per period. Either per_unit, tiered_volume or tiered_flatfee.

  • per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
  • tiered_volume indicates that the unit pricing will be comput
type MarkupPricingModel = "per_unit" | "tiered_volume" | "tiered_flatfee"

TypeGetAg​

type TypeGetAg = "base_price" | "work_price"

TariffTypeGetAg​

type TariffTypeGetAg = "HT" | "NT"

ConsumptionTypeGetAg​

type ConsumptionTypeGetAg = "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter"

ProductCategory​

type ProductCategory = "power" | "gas"

PriceGetAg​

type PriceGetAg = {
category: "power" | "gas"
markup_pricing_model?: "per_unit" | "tiered_volume" | "tiered_flatfee"
type?: "base_price" | "work_price"
tariff_type?: "HT" | "NT"
consumption_type?: "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter"
concession_type?: "standard" | "special"
meter_type?: "classic" | "smart" | "digital"
markup_tiers?: Array<{
up_to?: number
flat_fee_amount?: number
flat_fee_amount_decimal?: string
unit_amount?: number
unit_amount_decimal?: string
display_mode?: "hidden" | "on_request"
}>
markup_amount: number
markup_amount_decimal: string
markup_amount_net?: number
markup_amount_net_decimal?: string
markup_amount_gross?: number
markup_amount_gross_decimal?: string
markup_total_amount_net?: number
markup_total_amount_net_decimal?: string
markup_total_amount_gross?: number
markup_total_amount_gross_decimal?: string
additional_markups_enabled?: boolean
additional_markups?: Record<string, {
amount_decimal: string
amount: number
amount_net?: number
amount_net_decimal?: string
amount_gross?: number
amount_gross_decimal?: string
}>
unit_amount_gross: number
unit_amount_gross_decimal?: string
unit_amount_net: number
unit_amount_net_decimal?: string
}

PriceDynamicTariff​

type PriceDynamicTariff = {
mode: "day_ahead_market" | "manual"
interval?: "hourly" | "monthly_average"
average_price: number
average_price_decimal: string
markup_amount?: number
markup_amount_decimal?: string
markup_amount_net?: number
markup_amount_net_decimal?: string
markup_amount_gross?: number
markup_amount_gross_decimal?: string
unit_amount_net?: number
unit_amount_net_decimal?: string
unit_amount_gross?: number
unit_amount_gross_decimal?: string
}

TierDetails​

type TierDetails = {
quantity: number
unit_amount: number
unit_amount_gross: number
unit_amount_net: number
amount_total: number
amount_subtotal: number
amount_tax: number
unit_amount_decimal: string
}

SearchExternalCatalogParams​

type SearchExternalCatalogParams = {
context: {
journey_id: string
entity_id?: string
journey_name: string
journey_tags?: string[]
journey_url_params?: Record<string, unknown>
current_step_name: string
current_block_name: string
steps_data: Array<{
step_name: { ... }
step_index: { ... }
blocks: { ... }
}>
}
}

ExternalCatalogRequest​

The request payload for the external catalog service.

type ExternalCatalogRequest = {
config?: {
appId: string
componentId: string
hookId?: string
}
}

ExternalCatalogConfigurationRequest​

The request payload for the external catalog configuration service.

type ExternalCatalogConfigurationRequest = {
config?: {
appId: string
componentId: string
hookId?: string
}
}

ExternalCatalogJourneyRequest​

The request payload for the external catalog service with a journey context.

type ExternalCatalogJourneyRequest = {
origin: "journey"
context: {
journey_id: string
entity_id?: string
journey_name: string
journey_tags?: string[]
journey_url_params?: Record<string, unknown>
current_step_name: string
current_block_name: string
steps_data: Array<{
step_name: { ... }
step_index: { ... }
blocks: { ... }
}>
}
}

ExternalCatalogPortalRequest​

The request payload for the external catalog service with a portal context.

type ExternalCatalogPortalRequest = {
origin: "portal"
context: {
contract: Record<string, unknown>
contact: Record<string, unknown>
availability_address?: {
postal_code?: { ... }
city?: { ... }
street?: { ... }
street_number?: { ... }
journey_target_block?: { ... }
}
variable_inputs?: Array<{
value?: { ... }
unit?: { ... }
frequency_unit?: { ... }
journey_target_block?: { ... }
}>
}
}

ExternalCatalogCustomRequest​

The request payload for the external catalog service with a custom context. E.g. for requests from the Portal.

type ExternalCatalogCustomRequest = {
origin: "custom"
context: Record<string, unknown>
}

CustomContext​

A custom context object. E.g. for Portal context.

type CustomContext = Record<string, unknown>

JourneyContext​

type JourneyContext = {
journey_id: string
entity_id?: string
journey_name: string
journey_tags?: string[]
journey_url_params?: Record<string, unknown>
current_step_name: string
current_block_name: string
steps_data: Array<{
step_name: string
step_index: number
blocks: Record<string, unknown>
}>
}

PortalContext​

type PortalContext = {
contract: Record<string, unknown>
contact: Record<string, unknown>
availability_address?: {
postal_code?: string
city?: string
street?: string
street_number?: string
journey_target_block?: string
}
variable_inputs?: Array<{
value?: number
unit?: string
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time"
journey_target_block?: string
}>
}

SearchExternalCatalogResult​

type SearchExternalCatalogResult = {
hits: number
results: Array<{
pricing_details: {
items?: { ... }
amount_subtotal?: { ... }
amount_total?: { ... }
unit_amount_gross?: { ... }
unit_amount_net?: { ... }
amount_tax?: { ... }
total_details?: { ... }
currency?: { ... }
redeemed_promos?: { ... }
}
_meta: {
signature: { ... }
timestamp: { ... }
}
}>
}

SearchExternalCatalogRecommendationsResult​

type SearchExternalCatalogRecommendationsResult = {
source: {
pricing_details: {
items?: { ... }
amount_subtotal?: { ... }
amount_total?: { ... }
unit_amount_gross?: { ... }
unit_amount_net?: { ... }
amount_tax?: { ... }
total_details?: { ... }
currency?: { ... }
redeemed_promos?: { ... }
}
_meta: {
signature: { ... }
timestamp: { ... }
}
}
offers: Array<{
pricing_details: {
items?: { ... }
amount_subtotal?: { ... }
amount_total?: { ... }
unit_amount_gross?: { ... }
unit_amount_net?: { ... }
amount_tax?: { ... }
total_details?: { ... }
currency?: { ... }
redeemed_promos?: { ... }
}
_meta: {
signature: { ... }
timestamp: { ... }
}
}>
}

ExternalCatalogItem​

An external product & price information (already computed) from an external catalog.

type ExternalCatalogItem = {
pricing_details: {
items?: Array<{
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
} | {
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
}>
amount_subtotal?: number
amount_total?: number
unit_amount_gross?: number
unit_amount_net?: number
amount_tax?: number
total_details?: {
amount_shipping?: { ... }
amount_tax?: { ... }
breakdown?: { ... }
}
currency?: string
redeemed_promos?: Array<{
code: { ... }
coupons: { ... }
}>
}
_meta: {
signature: string
timestamp: number
}
}

ProductRecommendationSearch​

Product recommendations request payload

type ProductRecommendationSearch = {
product_recommendation_ids?: string[]
catalog_item?: {
product_id?: string
price_id?: string
}
contract_id?: string
filters?: {
location: {
street?: { ... }
street_number?: { ... }
postal_code?: { ... }
city?: { ... }
country?: { ... }
}
available_date?: string // date
}
}

ProductRecommendationResponse​

Product recommendations request payload

type ProductRecommendationResponse = {
hits: number
results: Array<{
_id: string // uuid
_title: string
_org: string
_schema: string
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
}>
source?: {
item?: {
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
} | {
metadata?: { ... }
quantity?: { ... }
product_id?: { ... }
price_id?: { ... }
description?: { ... }
product_description?: { ... }
product_name?: { ... }
price_mappings?: { ... }
is_tax_inclusive?: { ... }
_product?: { ... }
catalog_reference?: { ... }
}
}
}

OfferHighlightConfig​

type OfferHighlightConfig = {
unique_selling_point?: string
unique_selling_point_icon?: string
total?: {
enabled?: boolean
format?: "absolute" | "relative"
only_if_better?: boolean
}
}

Offer​

type Offer = {
target_id?: string
items?: Array<{
price_id: string
product_id: string
highlight_config?: {
unique_selling_point?: { ... }
unique_selling_point_icon?: { ... }
total?: { ... }
}
}>
}

ProductRecommendation​

type ProductRecommendation = {
_id: string // uuid
_title: string
_org: string
_schema: string
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
}