UNPKG

@epilot/pricing-client

Version:
1,457 lines (1,456 loc) 259 kB
{ "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": "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" } } ] } ] } } } } } }, "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/AvailabilityCheckParams" }, "examples": { "Check availability with location dimension": { "value": { "products": [ "cd75456a-30e4-4912-95be-e743d5ea175b" ], "filters": { "location": { "postal_code": "57008", "city": "Cologne", "street": "Media Park", "street_number": "8a" } } } }, "Check availability with location & available date dimension": { "value": { "products": [ "cd75456a-30e4-4912-95be-e743d5ea175b" ], "filters": { "location": { "postal_code": "57008", "city": "Cologne", "street": "Media Park", "street_number": "8a" }, "available_date": "2022-05-01" } } } } } } }, "responses": { "200": { "description": "The availability check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AvailabilityResult" }, "examples": { "Response with available products": { "value": { "available_products": [ "cd75456a-30e4-4912-95be-e743d5ea175b" ], "check_results": [ { "product_id": "cd75456a-30e4-4912-95be-e743d5ea175b", "matching_hits": 1 } ] } }, "Response with no available products": { "value": { "available_products": [] } }, "Response with available and unavailable products": { "value": { "availableProducts": [ "my-product-id-123-2" ], "checkResults": [ { "productId": "my-product-id-123-1", "matchingError": { "msg": "Error - Unknown file extension for availability file." } }, { "matchingHits": 1, "productId": "my-product-id-123-2" } ] } } } } } }, "400": { "description": "Invalid payload", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/validate-availability/{id}": { "get": { "description": "Validates an availability file, it returns an array of errors if the file is invalid", "operationId": "$validateAvailabilityFile", "summary": "validateAvailabilityFile", "tags": [ "Availability API" ], "parameters": [ { "in": "path", "name": "id", "description": "Product ID that the Availability File is attached to", "schema": { "type": "string" }, "required": true, "example": "72c803b2-2e5d-4bd6-bffc-fad998bbbe36" }, { "in": "header", "name": "X-Epilot-Org-ID", "description": "The target Organization Id represented by the caller", "schema": { "type": "string" }, "required": true, "example": 739224 } ], "responses": { "200": { "description": "The availability get result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateAvailabilityFileResult" }, "examples": { "Response when file has no errors": { "value": { "number_of_rules_parsed": 10, "errors": [] } }, "Response when file has errors": { "value": { "number_of_rules_parsed": 8, "errors": [ "File must be UTF-8 encoded", "Line 3 - Postal code is missing or invalid" ] } } } } } }, "400": { "description": "Invalid payload", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/public/historicMarketPrices": { "get": { "description": "Get a series of historic energy prices for a given time period, market and bidding zone.", "operationId": "$historicMarketPrices", "summary": "historicMarketPrices", "tags": [ "Spot Market API" ], "security": [ { "EpilotPublicAuth": [] } ], "parameters": [ { "in": "query", "name": "market", "schema": { "$ref": "#/components/schemas/SpotMarketType" }, "required": true, "description": "Market to use. For now, only day ahead prices are supported." }, { "in": "query", "name": "bidding_zone", "schema": { "$ref": "#/components/schemas/SpotMarketBiddingZone" }, "required": true, "description": "Bidding zone to use. For now, only AT and DE-LU are supported." }, { "in": "query", "name": "frequency", "schema": { "$ref": "#/components/schemas/SpotMarketDataFrequency" }, "required": true, "description": "Frequency of the price data points in ISO 8601 format." }, { "in": "query", "name": "from", "schema": { "type": "string", "anyOf": [ { "format": "date" }, { "format": "date-time" } ] }, "required": true, "description": "Start of price data in ISO 8601 format.\nIf only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used.\n" }, { "in": "query", "name": "to", "schema": { "type": "string", "anyOf": [ { "format": "date" }, { "format": "date-time" } ] }, "required": true, "description": "End of price data in ISO 8601 format.\nIf only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used.\n" } ], "responses": { "200": { "description": "Price data returned successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HistoricMarketPricesResult" } } } }, "400": { "description": "Invalid payload", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/public/averageMarketPrice": { "get": { "description": "Get the average energy prices for a given time period, market and bidding zone.", "operationId": "$averageMarketPrice", "summary": "averageMarketPrice", "tags": [ "Spot Market API" ], "security": [ { "EpilotPublicAuth": [] } ], "parameters": [ { "in": "query", "name": "market", "schema": { "$ref": "#/components/schemas/SpotMarketType" }, "required": true, "description": "Market to use. For now, only day ahead prices are supported." }, { "in": "query", "name": "bidding_zone", "schema": { "$ref": "#/components/schemas/SpotMarketBiddingZone" }, "required": true, "description": "Bidding zone to use. For now, only AT and DE-LU are supported." }, { "in": "query", "name": "from", "schema": { "type": "string", "anyOf": [ { "format": "date" }, { "format": "date-time" } ] }, "required": true, "description": "Start of price data in ISO 8601 format.\nIf only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used.\n" }, { "in": "query", "name": "to", "schema": { "type": "string", "anyOf": [ { "format": "date" }, { "format": "date-time" } ] }, "required": true, "description": "End of price data in ISO 8601 format.\nIf only a date is provided (YYYY-MM-DD) the timzone of the bidding zone is used.\n" } ], "responses": { "200": { "description": "Price data returned successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AverageMarketPriceResult" } } } }, "400": { "description": "Invalid payload", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/public/integration/{integrationId}/external-catalog": { "post": { "description": "Returns the list of available products (including computed prices) based on a given context.", "operationId": "$searchExternalCatalog", "security": [ {}, { "EpilotPublicAuth": [] } ], "parameters": [ { "in": "path", "name": "integrationId", "description": "The integration identifier", "schema": { "$ref": "#/components/schemas/IntegrationId" }, "required": true, "example": "ikom" } ], "summary": "searchExternalCatalog", "tags": [ "External Integrations API" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchExternalCatalogParams" } } } }, "responses": { "200": { "description": "The available products response payload", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchExternalCatalogResult" }, "examples": { "External products": { "$ref": "#/components/examples/external-catalog-sample-1" } } } } }, "400": { "description": "Invalid payload", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "Forbidden, no credentials found for the given integration / organization", "content": { "application/json": {