@epilot/pricing-client
Version:
Client for epilot Pricing APIs
1,293 lines • 286 kB
JSON
{
"openapi": "3.0.3",
"info": {
"title": "Pricing API",
"description": "The `pricing-api` hub sets the foundations for the following Pricing APIs:\n\n### Order API\nThis api enables the management of orders in epilot 360, providing features such as:\n - Automatic calculation of totals and price breakdowns for taxes on the Order entity\n - Product and pricing data validation\n\n### Shopping Cart API\nUsed to interact with a cart during a customer's checkout session, providing:\n - An unified data model to model a Shopping Cart\n - Product and pricing data validation\n - Checkout a cart into an order or quote\n\n### Catalog API\nProvides a way to query the entire catalog of products and prices.\n\n### Availability API\nProvides endpoints for querying products availability by a set of predefined dimensions.\n\n### Spot Market API\nProvides endpoints to fetch (historic) spot market price data.\n\n### External Integrations API\nProvides endpoints for external integrations.\n",
"version": "1.0.0",
"termsOfService": "https://epilot.cloud/agb",
"contact": {
"name": "Support",
"email": "info@epilot.cloud",
"url": "https://help.epilot.cloud"
}
},
"tags": [
{
"name": "Order API",
"description": "This api enables the management of orders in epilot 360, providing features such as:\n - Automatic calculation of totals and price breakdowns for taxes on the Order entity\n - Product and pricing data validation\n"
},
{
"name": "Cart API",
"description": "Used to interact with a cart during a customer's checkout session, providing:\n - An unified data model to model a Shopping Cart\n - Product and pricing data validation\n - Checkout a cart into an order or quote\n"
},
{
"name": "Catalog API",
"description": "Provides a way to query the entire catalog of products and prices.\n"
},
{
"name": "Promo Codes API",
"description": "This API enables the validation of promo codes within journeys, their uniqueness and availability\n"
},
{
"name": "Availability API",
"description": "Provides endpoints for querying products availability by a set of predefined dimensions.\n"
},
{
"name": "Spot Market API",
"description": "Provides endpoints to fetch (historic) spot market data.\n"
},
{
"name": "External Integrations API",
"description": "Provides endpoints for external integrations.\n"
},
{
"name": "Deprecated Endpoints",
"description": "Deprecated endpoints.\n"
},
{
"name": "order_schema",
"x-displayName": "Order",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Order\" exampleRef=\"#/components/examples/order-with-simple-prices\" />\n"
},
{
"name": "order_composite_prices",
"x-displayName": "Order (with Composite Prices)",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Order\" exampleRef=\"#/components/examples/order-with-composite-prices\" />\n"
},
{
"name": "opportunity_schema",
"x-displayName": "Opportunity",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Opportunity\" exampleRef=\"#/components/examples/opportunity\" />\n"
},
{
"name": "product_schema",
"x-displayName": "Product",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Product\" exampleRef=\"#/components/examples/product\" />\n"
},
{
"name": "simple_price_schema",
"x-displayName": "Price",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Price\" exampleRef=\"#/components/examples/price\" />\n"
},
{
"name": "dynamic_price_schema",
"x-displayName": "Composite Price",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CompositePrice\" exampleRef=\"#/components/examples/composite-price\" />\n"
},
{
"name": "coupon_schema",
"x-displayName": "Coupon",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Coupon\" />\n"
}
],
"x-tagGroups": [
{
"name": "Commerce Schemas",
"tags": [
"order_schema",
"opportunity_schema"
]
},
{
"name": "Pricing Schemas",
"tags": [
"product_schema",
"simple_price_schema",
"dynamic_price_schema",
"coupon_schema"
]
},
{
"name": "Examples",
"tags": [
"order_composite_prices"
]
},
{
"name": "APIs",
"tags": [
"Order API",
"Cart API",
"Catalog API",
"Availability API",
"Deprecated"
]
}
],
"security": [
{
"EpilotAuth": []
}
],
"servers": [
{
"url": "https://pricing-api.sls.epilot.io"
}
],
"paths": {
"/v1/pricing:compute": {
"post": {
"description": "Computes a set of pricing details that can be persisted on an entity with the pricing capability enabled, e.g: Orders or Contracts.",
"summary": "calculatePricingDetails",
"operationId": "$calculatePricingDetails",
"tags": [
"Order API"
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"line_items": {
"$ref": "#/components/schemas/PriceItemsDto"
},
"redeemed_promos": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RedeemedPromo"
}
}
}
},
"examples": {
"Compute price": {
"value": {
"line_items": [
{
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"price_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b",
"quantity": 2
},
{
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"price_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b",
"quantity": 2,
"coupon_ids": [
"0f8c4852-23fa-4a64-a2f3-88702335f094"
]
},
{
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"price_id": "2abe0c6f-63ef-417b-8c85-5546359382d9",
"quantity": 1,
"price_mappings": [
{
"price_id": "2abe0c6f-63ef-417b-8c85-5546359382d9",
"frequency_unit": "one_time",
"value": 2,
"name": "Estimated consumption",
"metadata": {
"journey_title": "P&G",
"step_name": "Number Inputs"
}
}
]
},
{
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"price_id": "b59acf37-3cc0-456c-a712-1db0fc478d2d",
"quantity": 1,
"price_component_coupon_ids": {
"583fb57a-7549-4624-82d6-342d5e6542f7": [
"0f8c4852-23fa-4a64-a2f3-88702335f094"
]
},
"price_mappings": [
{
"price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534",
"frequency_unit": "yearly",
"value": 10000,
"name": "Estimated consumption",
"metadata": {
"journey_title": "P&G",
"step_name": "Number Inputs"
}
}
],
"item_components": [
{
"pricing_model": "per_unit",
"quantity": 1,
"type": "recurring",
"billing_period": "monthly",
"price_id": "583fb57a-7549-4624-82d6-342d5e6542f7",
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"_price": {
"pricing_model": "per_unit",
"unit_amount": 1500,
"unit_amount_currency": "EUR",
"unit_amount_decimal": "15",
"sales_tax": "standard",
"active": true,
"price_display_in_journeys": "show_price",
"type": "recurring",
"_title": "Base Price",
"tax": [
{
"_schema": "tax",
"active": true,
"description": "GST",
"rate": 19,
"region": "DE",
"type": "Custom",
"_id": "d792070e-328d-4d2c-8aba-5ac7b23ff621",
"_org": "739224",
"_created_at": "2024-12-18T14:14:53.340Z",
"_updated_at": "2025-02-11T11:07:49.660Z",
"_title": "GST",
"behavior": "inclusive"
}
],
"tax_behavior": "inclusive",
"billing_period": "monthly",
"billing_duration_unit": "months",
"notice_time_unit": "months",
"termination_time_unit": "months",
"renewal_duration_unit": "months",
"description": "Base Price",
"is_tax_inclusive": false,
"internal_description": "Base Price",
"variable_price": true
},
"taxes": [
{
"tax": {
"_schema": "tax",
"active": true,
"description": "GST",
"rate": 19,
"region": "DE",
"type": "Custom",
"_id": "d792070e-328d-4d2c-8aba-5ac7b23ff621",
"_org": "739224",
"_created_at": "2024-12-18T14:14:53.340Z",
"_updated_at": "2025-02-11T11:07:49.660Z",
"_title": "GST",
"behavior": "inclusive"
},
"amount": 285
}
],
"unit_amount": 1000,
"unit_amount_decimal": "10",
"currency": "EUR",
"description": "Base Price",
"is_tax_inclusive": false
},
{
"pricing_model": "per_unit",
"quantity": 1,
"type": "recurring",
"billing_period": "monthly",
"price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534",
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"_price": {
"_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534",
"active": true,
"description": "Work Price",
"is_tax_inclusive": true,
"price_display_in_journeys": "show_price",
"pricing_model": "per_unit",
"type": "recurring",
"unit_amount": 10,
"unit_amount_currency": "EUR",
"unit_amount_decimal": "0.10",
"variable_price": true,
"billing_period": "monthly",
"internal_description": "Work Price",
"_title": "Work Price",
"unit": "kwh"
},
"taxes": [
{
"tax": {
"_schema": "tax",
"active": true,
"description": "19%",
"rate": 19,
"region": "DE",
"type": "VAT",
"_id": "bd488a36-cae5-4b18-9ca5-f5cbf6d9735b",
"_org": "739224",
"_created_at": "2025-01-15T12:04:52.431Z",
"_updated_at": "2025-01-15T12:04:52.431Z",
"_title": "19%"
},
"amount": 1331
}
],
"unit_amount": 8,
"unit_amount_decimal": "0.08",
"currency": "EUR",
"description": "Work Price",
"is_tax_inclusive": true
}
]
},
{
"description": "Product Name",
"quantity": 1,
"is_composite_price": true,
"item_components": [
{
"quantity": 1,
"description": "Price Description",
"unit_amount": 10000,
"unit_amount_decimal": "100",
"unit_amount_currency": "EUR",
"pricing_model": "per_unit",
"taxes": [
{
"rate": "nontaxable",
"rateValue": 0,
"amount": 0
}
],
"type": "one_time",
"is_tax_inclusive": true
}
],
"currency": "EUR"
},
{
"price_id": "b59acf37-3cc0-456c-a712-1db0fc478d2d",
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"quantity": 1,
"description": "Power Test",
"is_composite_price": true,
"item_components": [
{
"price_id": "583fb57a-7549-4624-82d6-342d5e6542f7",
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"quantity": 1,
"description": "Base Price",
"unit_amount": 1500,
"unit_amount_decimal": "15",
"unit_amount_currency": "EUR",
"pricing_model": "per_unit",
"type": "recurring",
"billing_period": "monthly",
"is_tax_inclusive": false,
"_coupons": [
{
"name": "My Custom Discount",
"type": "fixed",
"fixed_value": 500,
"fixed_value_currency": "EUR",
"fixed_value_decimal": "5",
"category": "discount",
"active": true,
"_schema": "coupon",
"requires_promo_code": false,
"_org": "739224",
"_created_at": "2025-02-24T10:01:24.537Z",
"_updated_at": "2025-02-24T10:01:24.537Z",
"percentage_value": "0",
"_title": "My Custom Discount"
}
]
},
{
"price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534",
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"quantity": 1,
"description": "Work Price",
"unit_amount": 10,
"unit_amount_decimal": "0.10123",
"unit_amount_currency": "EUR",
"pricing_model": "per_unit",
"taxes": [
{
"tax": {
"_schema": "tax",
"active": true,
"description": "19%",
"rate": 19,
"region": "DE",
"type": "VAT",
"_id": "bd488a36-cae5-4b18-9ca5-f5cbf6d9735b",
"_org": "739224",
"_created_at": "2025-01-15T12:04:52.431Z",
"_updated_at": "2025-01-15T12:04:52.431Z",
"_title": "19%"
},
"amount": 2
}
],
"type": "recurring",
"billing_period": "monthly",
"unit_amount_net": 8,
"unit_amount_gross": 10,
"amount_subtotal": 8,
"amount_total": 10,
"amount_tax": 2,
"is_tax_inclusive": true,
"unit_amount_net_decimal": "0.084033613445",
"unit_amount_gross_decimal": "0.1",
"amount_subtotal_decimal": "0.084033613445",
"amount_total_decimal": "0.1"
}
],
"price_mappings": [
{
"price_id": "583fb57a-7549-4624-82d6-342d5e6542f7",
"value": 1
},
{
"price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534",
"value": 2000
}
],
"currency": "EUR"
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Pricing details result",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PricingDetailsResponse"
},
"example": {
"amount_subtotal": 1000,
"amount_total": 1000,
"amount_tax": 0,
"total_details": {
"amount_tax": 0,
"breakdown": {
"taxes": [
{
"tax": {
"rate": 0
},
"amount": 0
}
],
"recurrences": [
{
"type": "one_time",
"unit_amount_gross": 1000,
"unit_amount_net": 1000,
"amount_subtotal": 1000,
"amount_total": 1000,
"amount_subtotal_decimal": "10",
"amount_total_decimal": "10",
"amount_tax": 0
}
],
"recurrencesByTax": [
{
"type": "one_time",
"amount_total": 1000,
"amount_subtotal": 1000,
"amount_tax": 0,
"tax": {
"tax": {
"rate": 0
},
"amount": 0
}
}
]
}
},
"line_items": [
{
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"price_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b",
"quantity": 1,
"currency": "EUR",
"_price": {
"description": "Standard price component",
"pricing_model": "per_unit",
"unit_amount_currency": "EUR",
"unit_amount": 1000,
"unit_amount_decimal": "10",
"is_tax_inclusive": true,
"price_display_in_journeys": "show_price",
"active": true,
"variable_price": false,
"type": "one_time",
"billing_period": null,
"billing_duration_amount": null,
"billing_duration_unit": null,
"notice_time_amount": null,
"notice_time_unit": null,
"termination_time_amount": null,
"termination_time_unit": null,
"renewal_duration_amount": null,
"renewal_duration_unit": null,
"price_components": null,
"_tags": [],
"_title": "Standard price component",
"_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b",
"internal_description": "Standard price component"
},
"_product": {
"type": "product",
"_title": "Product PH",
"name": "Product PH ",
"price_options": {
"$relation": [
{
"entity_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b",
"_tags": [],
"_schema": "price"
}
]
},
"_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
"active": true,
"internal_name": "Product PH",
"description": ""
},
"description": "Standard price component",
"unit_amount": 1000,
"unit_amount_net": 1000,
"unit_amount_net_decimal": "10",
"unit_amount_gross": 1000,
"unit_amount_gross_decimal": "10",
"unit_amount_decimal": "10",
"amount_subtotal": 1000,
"amount_total": 1000,
"amount_tax": 0,
"taxes": [
{
"rate": "nontaxable",
"rateValue": 0,
"amount": 0
}
],
"is_tax_inclusive": true,
"amount_subtotal_decimal": "10",
"amount_total_decimal": "10"
}
],
"currency": "EUR"
}
}
}
},
"400": {
"description": "Invalid payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/v1/order": {
"post": {
"description": "Create an order",
"operationId": "createOrder",
"summary": "createOrder",
"tags": [
"Order API"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"examples": {
"Order with Simple Prices": {
"value": {
"status": "quote",
"source_type": "manual",
"expires_at": "2022-06-30T16:17:00.000Z",
"line_items": [
{
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"quantity": 16
},
{
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"quantity": 4
},
{
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"quantity": 1
},
{
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"quantity": 1
}
],
"currency": "EUR",
"payment_method": [
{
"type": "IBAN",
"details": {}
}
],
"billing_contact": {
"$relation": [
{
"entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5",
"_tags": []
}
]
},
"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"
}
]
}
},
"Order with Simple Prices and Dynamic Pricing": {
"value": {
"status": "quote",
"source_type": "manual",
"expires_at": "2022-06-30T16:17:00.000Z",
"line_items": [
{
"price_id": "632b18b5-3f50-4231-b8d5-f8c33a392ed0",
"product_id": "3d1c9987-a7ae-4c1c-a7ef-e12caccab4e0",
"price_mappings": [
{
"price_id": "632b18b5-3f50-4231-b8d5-f8c33a392ed0",
"frequency_unit": "yearly",
"value": 12000,
"name": "Estimated consumption",
"metadata": {
"journey_title": "P&G",
"step_name": "Number Inputs"
}
}
],
"quantity": 16
}
],
"currency": "EUR",
"payment_method": [
{
"type": "IBAN",
"details": {}
}
],
"billing_contact": {
"$relation": [
{
"entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5",
"_tags": []
}
]
},
"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"
}
]
}
},
"Order with Composite Prices and Dynamic Pricing": {
"value": {
"status": "quote",
"source_type": "manual",
"expires_at": "2022-06-30T16:17:00.000Z",
"line_items": [
{
"price_id": "b3900bf3-020c-4c58-8af9-32f2682929e3",
"product_id": "924f6881-7ae3-4e2e-a1dd-2d81b8fa2e32",
"price_mappings": [
{
"price_id": "6dc88d6f-ba33-45ee-b5d0-62641344a0d9",
"frequency_unit": "yearly",
"value": 12000,
"name": "Estimated consumption",
"metadata": {
"journey_title": "P&G",
"step_name": "Number Inputs"
}
},
{
"price_id": "60eb12cd-703d-4d41-9265-577ff657bfc9",
"value": 10,
"name": "Distance to power meter",
"metadata": {
"journey_title": "P&G",
"step_name": "Number Inputs"
}
}
],
"quantity": 1
}
],
"currency": "EUR",
"payment_method": [
{
"type": "IBAN",
"details": {}
}
],
"billing_contact": {
"$relation": [
{
"entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5",
"_tags": []
}
]
},
"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"
}
]
}
}
},
"schema": {
"$ref": "#/components/schemas/OrderPayload"
}
}
}
},
"responses": {
"201": {
"description": "Order result",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Order"
}
}
}
},
"400": {
"description": "Invalid payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/v1/order/{id}": {
"put": {
"description": "Update an existing Order",
"operationId": "putOrder",
"summary": "putOrder",
"tags": [
"Order API"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "Order entity ID",
"schema": {
"type": "string"
},
"required": true,
"example": "9d4602d3-03be-4d85-86b2-f3c6555fc606"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrderPayload"
},
"examples": {
"Order with Simple Prices": {
"value": {
"status": "quote",
"source_type": "manual",
"expires_at": "2022-06-30T16:17:00.000Z",
"line_items": [
{
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"quantity": 16
},
{
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"quantity": 4
},
{
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"quantity": 1
},
{
"price_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
"product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84",
"quantity": 1
}
],
"currency": "EUR",
"payment_method": [
{
"type": "IBAN",
"details": {}
}
],
"billing_contact": {
"$relation": [
{
"entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5",
"_tags": []
}
]
},
"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"
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Order result",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Order"
}
}
}
},
"400": {
"description": "Invalid payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/v1/public/cart:checkout": {
"post": {
"description": "Checkouts a cart and executes the specified checkout `mode` process.\n\nA Checkout implicitly finalizes the provided cart (if not transient from a fast-checkout) and behaves in one of the following modes:\n- `create_order` (**default**): the payment happens at a later date or managed by 3rd-party CRM (SAP)\n- `create_invoice`: the payment happens on the online checkout (paypal, stripe, adyen)\n- `create_quote`: the checkout represents a price quote request\n\nFast checkout is also supported, by passing the Cart contents directly.\nWhen a fast checkout is performed the cart is considered transient and there is no cart persistance.\n\nIf the checkout `mode` is omitted, the `mode` will default to `create_order`.\n",
"operationId": "$checkoutCart",
"summary": "checkoutCart",
"security": [
{},
{
"EpilotPublicAuth": []
}
],
"tags": [
"Cart API"
],
"parameters": [
{
"in": "header",
"name": "X-Ivy-Org-ID",
"description": "The target Organization Id represented by the caller",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CheckoutCart"
},
"examples": {
"Checkout with a transient Cart": {
"$ref": "#/components/examples/checkout-with-transient-cart"
}
}
}
}
},
"responses": {
"200": {
"description": "The checkout result",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CheckoutCartResult"
},
"examples": {
"Checkout with created order": {
"$ref": "#/components/examples/checkout-result"
}
}
}
}
},
"400": {
"description": "Invalid payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/v1/public/catalog": {
"post": {
"description": "Provides a querying functionalities over products and prices of the Catalog for a given organization.",
"operationId": "$searchCatalog",
"summary": "searchCatalog",
"security": [
{},
{
"EpilotPublicAuth": []
}
],
"tags": [
"Catalog API"
],
"parameters": [
{
"in": "header",
"name": "X-Ivy-Org-ID",
"description": "The target Organization Id represented by the caller",
"example": 739224,
"schema": {
"type": "string"
}
},
{
"in": "header",
"name": "Authorization",
"description": "The token identifying the client making the request",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CatalogSearch"
}
}
}
},
"responses": {
"200": {
"description": "The search result",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CatalogSearchResult"
}
}
}
},
"400": {
"description": "Invalid payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/v1/catalog": {
"post": {
"description": "Provides a querying functionalities over products and prices of the Catalog for a given organization.",
"operationId": "$privateSearchCatalog",
"summary": "privateSearchCatalog",
"tags": [
"Catalog API"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CatalogSearch"
}
}
}
},
"responses": {
"200": {
"description": "The search result",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CatalogSearchResult"
}
}
}
},
"400": {
"description": "Invalid payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/v1/public/validate-promo-codes": {
"post": {
"description": "Validate a list of promo codes against a list of coupons",
"summary": "validatePromoCodes",
"operationId": "$validatePromoCodes",
"tags": [
"Promo Codes API"
],
"security": [
{
"EpilotPublicAuth": []
}
],
"parameters": [
{
"in": "header",
"name": "X-Ivy-Org-ID",
"description": "The target Organization Id represented by the caller",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"coupon_ids": {
"type": "array",
"description": "The list of coupon ids to unlock with promo codes",
"items": {
"type": "string"
}
},
"promo_codes": {
"type": "array",
"description": "The list of promo codes to validate against the coupons",
"items": {
"type": "string"
}
}
}
},
"examples": {
"Find coupons matching codes": {
"value": {
"coupon_ids": [
"81b8e841-5926-4a73-ac77-6607c1037b65",
"45964a30-1a42-4e59-9362-7d954baf4ea1"
],
"promo_codes": [
"ABC",
"DEF"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Pricing details result",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PromoCodeValidationResponse"
},
"example": {
"matched_coupons": [
{
"name": "Coupon with promo-codes",
"type": "fixed",
"percentage_value": null,
"fixed_value": 10,
"fixed_value_currency": "EUR",
"fixed_value_decimal": "10.00",
"category": "discount",
"cashback_period": null,
"active": true,
"_schema": "coupon",
"requires_promo_code": true,
"_id": "81b8e841-5926-4a73-ac77-6607c1037b65",
"_org": "739224",
"_owners": [
{
"org_id": "739224",
"user_id": "11000622"
}
],
"_created_at": "2025-01-29T15:46:41.014Z",
"_updated_at": "2025-01-29T15:46:41.014Z",
"_title": "Coupon with promo-codes"
}
]
}
}
}
},
"400": {
"description": "Invalid payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/v1/public/availability:check": {
"post": {
"description": "The availability check endpoint",
"operationId": "$availabilityCheck",
"summary": "availabilityCheck",
"security": [
{
"EpilotPublicAuth": []
}
],
"tags": [
"Availability API"
],
"parameters": [
{
"in": "header",
"name": "X-Ivy-Org-ID",
"description": "The target Organization Id represented by the caller",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AvailabilityCh