openapi: 3.1.0
info:
  contact:
    name: Omnia Retail
    url: https://www.omniaretail.com/
  title: Omnia 2.0 API
  summary: >-
    This is the API powering Omnia 2.0 and Pricemonitor, containing operations
    that can also be used directly by customers from their own systems.
  description: >
    The Omnia 2.0 API is RESTful and provides access to the backend of Omnia 2.0
    and Pricemonitor. It is used to manage products, offers, contracts, and
    more.


    This API supports both public endpoints for customer integration and
    internal endpoints for platform management.

    All endpoints are authenticated using either Basic Authentication or JWT
    Bearer tokens.
  version: 0.0.7297
  x-logo:
    url: >-
      https://www.omniaretail.com/hubfs/Omnia%20Logo%20SVG/Omnia_Retail_Full_Colour_Logo_On_White_RGB.svg
    altText: Omnia Retail
  license:
    name: Omnia Retail API license
    url: https://www.omniaretail.com/legal/
servers:
  - url: https://api.patagona.de
    description: Production API
security:
  - BasicAuth: []
  - BearerAuth: []
tags:
  - name: overview
    x-displayName: Overview
    x-traitTag: true
    description: "Overview, explanation and pointers to the API documentation.\n\n# Introduction\n\nThe Omnia 2.0 API (also known as the Pricemonitor API) gives access to the superpowers behind the Omnia Retail platform.\n\nThe [Omnia 2.0 app](https://app.omniaretail.com/) and the [Pricemonitor app](https://pricemonitor.patagona.de/) are the main consumers of this API, but we also have endpoints available to customers to integrate the API directly with their own systems.\n\n# Common use cases for Omnia 2.0\n\nThese are the common API operations for customers to integrate Omnia with their own systems:\n\n- Retrieve market data\n- Retrieve price recommendations\n- Manage your product assortment\n- Provide offers for custom sources\n\n# Retrieving Data from the API\n\nOmnia supports four patterns for pulling data. Choose the one that best fits your latency and operational needs.\n\n| #     | Pattern                                  | When to use                                      |\n| ----- |------------------------------------------|--------------------------------------------------|\n| **1** | **Continuous polling** ***(preferred)*** | Near‑real‑time feed with minimal peak load       |\n| **2** | **Full data export**                     | Point‑in‑time snapshots or back‑fills            |\n| **3** | **Webhooks\_(callbacks)**                 | Push notifications after a price‑calculation run |\n| **4** | **Task‑based export**                    | Poll a *task* until `succeeded`, then fetch data |\n\n> **Why polling is preferred**\\\n> Continuous polling evens out traffic, avoids large \"catch‑up\" imports and delivers data as soon as it becomes available.\n\n---\n\n## 1. Continuous polling window logic\n\nAll polling examples use **15‑minute, aligned windows** and a **page size of 1,000 items**. This combination has proven to be the sweet‑spot between freshness and throughput.\n\n- **Alignment rule**\_– round the current time **down** to the nearest quarter hour (`:00`, `:15`, `:30`, `:45`).\\\n  *Example*: If it is `12:23`, the aligned time *T* is `12:15`.\n- **Window**\_– `endDate = T − 15 min`, `startDate = endDate − 15 min`.\n- **Next run**\_– repeat every 15 minutes; no need to persist `startDate` because it is derived from the current time.\n\n| Runtime | startDate | endDate |\n| ------- | --------- | ------- |\n| 12:00   | 11:30     | 11:45   |\n| 12:15   | 11:45     | 12:00   |\n| 12:30   | 12:00     | 12:15   |\n| …       | …         | …       |\n\n\n## 2. Full data export\n\nUse this pattern when you need the *entire* dataset for a specific point in time.\\\nCall the corresponding endpoint and page through the result set exactly as shown in the pagination section below.\n\n## 3. Webhooks\_(Callbacks)\n\nOmnia can send an HTTP\_POST callback as soon as a **price calculation task** finishes.\\\nThis push‑style integration is optional and complements the polling patterns.\n\n### Workflow\n\n1. **Register** an HTTPS endpoint **per contract** like described in the [Callback section](#tag/settings/Callbacks).\n2. When a price calculation task reaches the `succeeded` state, Omnia POSTs a JSON payload to your URL.\n3. Your service must respond with **HTTP\_2xx**.\n\n### Authentication\n\n\nYou can define custom headers for receiving callbacks. For example, Omnia can include a **Bearer token** in the `Authorization` header.\\\nAdvanced schemes are **not supported**.\n\n### Advantages\n\n- You receive a notification immediately after a price calculation is completed, avoiding the need for polling.\n\n### Limitations\n\n- **Single slot** – registering a new callback **replaces** the previous one; track your current value.\n- You must host an Internet‑reachable HTTPS endpoint.\n- Callbacks fire **only after price calculations**; there are none for market data scrapes or updates.\n- Only token‑based authentication is supported.\n\n> For the full payload schema and retry policy see the [Callback section](#tag/settings/Callbacks).\n\n## 4. Task‑based export\n\nA **task** is an asynchronous job such as *market data scrape* or *price calculation*.\n\n1. Poll the task endpoint until `state = succeeded` *(see the [Task section](#tag/tasks) for the exact status list).*\n2. Trigger a [full data export (pattern\_2)](#2-full-data-export) to download the result.\n\nRelevant task types:\n\n- `backend.tasks.pricemonitor.offers.monitoring`\_– market‑data retrieval\n- `backend.tasks.pricemonitor.offers.preprocessing`\_– price calculation\n\n# Retrieve market data via API\n\nUse `GET /api/v3/vendor/contracts/{contractId}/offers` to fetch the newest offers in the market as described [here](#operation/getOffersVendorV3).\n\n### Quick integration steps — Market data\n\n1. **Align to 15‑min window**\\\n   *T*\_=\_now rounded down to the nearest `:00 / :15 / :30 / :45`\\\n   `endDate = T − 15 min`, `startDate = endDate − 15 min`\n2. **Request**\\\n   `GET /api/v3/vendor/contracts/{contractId}/offers?startDate={startDate}&endDate={endDate}&limit=1000&start=0`\n3. **Page**\\\n   Repeat with `start=1000,2000,…` until the response contains < 1000 items.\n4. **Schedule**\\\n   Repeat every 15 minutes.\n\n# Retrieve price recommendations via API\n\nUse `GET /api/2/v/contracts/{contractId}/result/pricerecommendations` to fetch calculated prices as described [here](#operation/getPriceRecommendation).\n\n### Quick integration steps — Price recommendations\n\n1. **Align to 15‑min window** *(same logic as above)*\n2. **Request**\\\n   `GET /api/2/v/contracts/{contractId}/result/pricerecommendations?startTime={startDate}&endTime={endDate}&limit=1000&start=0`\n3. **Page**\\\n   Repeat with `start=1000,2000,…` until the response contains < 1000 items.\n4. **Schedule**\\\n   Repeat every 15 minutes.\n\n> **Tip** – Market data and price recommendations share the same window logic, so both polls can be executed by the same cron job.\n\n## Query products via API\n\nUse [this operation](#operation/queryProductsVendorV3) to retrieve products via a query. It supports returning paged results. We recommend to retrieve with a page size of 10,000 products.\n\n## Manage your product assortment\n\nUse [this operation](#operation/postProductsImportVendorV3) to upload your product assortment in JSON format. We recommend that you provide your product data in multiple parts via sequential requests to this endpoint. After providing all data, you need to delete the old data via [this operation](#operation/deleteProducts) by specifying a timestamp just before your import.\n\nIf you cannot use the JSON format, as a fallback, we support uploading your product assortment to our system in CSV format via [this operation](#operation/putProductsImportVendorV3).\n\n## Provide offers for custom sources\n\nUse [this operation](#operation/postOffersInABulkVendorV2) to provide external offers for your products to our system.\n\n# Pagination\n\nAPI endpoints can potentially return a lot of items. Returning all data as one response to one request can overload the server, the database or the client. Returning all items may even be unnecessary when the client is only interested in the top N entries. So API operations that could return a lot of data support pagination. The pagination approach used in the latest version of API operations is described here.\n\n## Pagination basics\n\nOperations that support pagination:\n\n- Return a subset of all matching items based on parameters in the request. Such a subset is called a page.\n- Return the requested page as an array within a `data` object within the response.\n- Can return all matching items by subsequently requesting multiple pages.\n\nThere are no subsequent matching items if the number of items in a response is smaller than the requested `limit`.\n\n### `limit` parameter\n\nThis parameter defines how many items are returned at most in a singe response. This is also called the page size.\n\nThe API documentation states the range that is allowed to be specified by the client.\n\n### `start` parameter\n\nThis parameter defines from which item in the total result set this request wants data to be returned. It basically defines what page should be returned. The index of the first item is 0\\. If the value of `start` is beyond the number of matching items, an empty `data` array is returned in the response.\n\nPagination itself only works when the entries have a stable sorting. This is the responsibility of the API.\n\n## Example of paginated requests\n\nTo request items with a page size of 1000, these are the pagination parameter values to be used for subsequent requests\n\nrequest # | start | limit\n--------- | ----- | -----\n1st       | 0     | 1000\n2nd       | 1000  | 1000\n3rd       | 2000  | 1000\n...       | ...   | ...\n\nSo the values for each subsequent request can be calculated by `start = previous start + limit`. All the other parameters of the API request must keep the same value to get stable sorting for a stable total result set.\n\nA response looks like this:\n\n```json\n{\n   \"data\": [\n      <item 1>,\n      <item 2>,\n      ...\n   ]\n}\n```\n\nThe client must compare the number of items in the `data` array with the used `limit` parameter. If they are equal there is likely a next page. If the number of items returned is less than the page size, there is no next page.\n\n> Note: In rare cases there is no next page even though the response has no less than a page size of items. E.g. when there are 2000 total items and using a page size of 1000\\. Here the client will make a request with `start=1000` and `limit=1000`. The response for this 2nd page request will have 1000 items. Then the client can't know in advance if there are further pages and it has to make an additional request. This third page request will return an empty array.\n\n# Authentication\n\nThe API supports two authentication methods with distinct use cases: _basic authentication_ and _JWT bearer token authentication_. For more details see below.\n\nIn short: for API integration with other systems or to explore the API, use _basic authentication_.\n\n## Basic authentication\n\n```\nSecurity Scheme Type: HTTP\nHTTP Authorization Scheme basic\n```\n\nUsed for:\n\n- API integration with other systems, like customer systems or plugins in webshops.\n- Exploring the API interactively via the API tester in the documentation.\n\n### Username\n\nThe username is the email address of a user account in _Omnia 2.0_ or _Pricemonitor_.\n\n### Password\n\nThe API password is:\n\n- Generated for _Omnia 2.0_ users via the _API access_ feature. Available in the user drop down menu top right in the Omnia 2.0 application.\n- For _Pricemonitor_ users the same password they use to sign in to Pricemonitor.\n\n> Note: For Omnia 2.0 users the API password is a different password than what is used for interactive logon to the web application. Also Single-Sign On users can generate an API password via the API access feature in Omnia 2.0.\n\n## JWT bearer token authentication\n\n```\nSecurity Scheme Type: HTTP\nHTTP Authorization Scheme bearer\nBearer format: \"JWT\"\n```\n\nUsed for:\n\n- The Omnia 2.0 web application to communicate with the API.\n\n> Note: This method is not usable for API integrations by customers as the tokens can only be obtained through interactive logon to the Omnia 2.0 web application by a person. These tokens expire quickly (they are valid for a maximum of 24 hours).\n"
  - name: products
    x-displayName: Products Management
    description: >-
      Operations to manage your products.


      # Import products


      We have two options: Either you provide the products as
      [JSON](#operation/postProductsImportVendorV3) or as
      [CSV](#operation/putProductsImportVendorV3). The product import via
      [JSON](#operation/postProductsImportVendorV3) is recommended.


      Notes:

      - When importing products, you need to provide an unique product
      identifier. We only allow importing products when they can be uniquely
      identified. In the very past we solely relied on GTIN for that, but not
      all customers have a GTIN. So we introduced the generic concept of the
      unique product identifier.

      - When importing products, you can additionally provide _tags_. These tags
      are key/value pairs (custom fields) which can be used to categorize your
      products: E.g. you could add the brand of the product.<br />The tag names
      need to be unique and non-empty.

      - In some endpoints we use caching for up to 5 minutes. So your newly
      imported products might need up to 5 minutes to get visible.

      - Timing is important: It's recommended to import products during a period
      when no monitorings are scheduled. Otherwise, the monitoring does not
      cover the most recently added products. A subsequent monitoring run will
      cover the previously added products.


      ## Recommended tags


      To get the most value out of the Omnia 2.0 insights dashboards, we
      recommend to include the following tag-keys in your imports. These product
      attributes can be used to drill-down into market and pricing insights.


      | Key | Description of value |

      | ---- | ------------------- |

      | brand | Values should include the brand of the respective product |

      | sku | If available, you can also include the stock keeping unit
      identifier |

      | amountInStock |  If available, you can also include the current stock
      level of each product |

      | topCategory  | Your product categories, highest level |

      | midCategory  | Your product categories, mid level |

      | lowCategory  |  Your product categories, lowest level |

      | purchasePrice | The purchase price of your product |

      | imageUrl | A url containing an image of your product |

      | logisticalCost | The logistical cost of your product |

      | recommendSellingPrice | The manufacturer suggested retail price or
      recommended retail price of your product |

      | vat | The Value Added Tax (VAT) for your product |


      Notes:

      - These fields are not mandatory for a successful import. They are
      optional, but recommended, to get the most value out of the insights in
      the UI of Omnia 2.0. If you intend to use them in the recommended way

      - The keys for the tags are case sensitive, so specify exactly as above.


      ## Import products via JSON (recommended)


      The preferred way to import products via API is via
      [JSON](#operation/postProductsImportVendorV3).


      This operation adds products to our system using _upsert_ (insert or
      update). It needs to be used in conjunction with a timestamp-based
      [product deletion operation](#operation/deleteProducts).


      The delete makes sure that old products, which are not part of your
      assortment anymore, are dropped from the system.


      Typical usage pattern:

      1. Remember the current time in UTC

      2. [Add products in chunks](#operation/postProductsImportVendorV3).
      Recommended chunk size: 1,000 products

      3. [Delete old products](#operation/deleteProducts) that are not needed in
      the system anymore by the timestamp from step 1 minus some extra buffer,
      e.g. one minute.


      ## Import products via CSV (not recommended)


      In order to provide products to our system you can send a CSV file via
      [this operation](#operation/putProductsImportVendorV3). This endpoint
      deactivates all current products and activates the ones which are provided
      via CSV.


      This creates a "task" at our side. Tasks are processed asynchronously.
      Typically, a big product import with 500K products takes 5-10 minutes. The
      mentioned endpoint returns a task id and a url where you can check the
      task state. Possible task states are: pending, executing, failed and
      succeeded. The last two states are representing a completed task. The task
      itself contains more details about how many products could get imported,
      which ones failed plus a preview failure list.


      When the product import successfully completed then the previously
      imported products have been deleted and only the ones which you have
      provided via CSV file are active in our system.


      # Query products


      Use [this operation](#operation/queryProductsVendorV3) to retrieve
      products via a query you specify in the request. It supports returning
      paged results. We recommend to retrieve with a page size of up to 10,000
      products.


      # Get all products


      Use [the query operation](#operation/queryProductsVendorV3) and just omit
      the query filter in the request. Results are paginated. A page size of at
      most 10,000 is recommended.


      # Determine internal product ids from your product ids


      Our system uses internal product ids that are distinct from your products
      ids. These internal product ids are sometimes referred to as
      _pricemonitor_ product ids.


      Often API operations require internal product ids to be specified. So you
      may need to map your product id onto our internal product id.


      There are two options:

      - Either you store the internal product ids after [importing
      products](#operation/postProductsImportVendorV3) into our system. The
      import operation returns the internal product ids for each imported
      product.

      - Or you map product ids on the fly when you need to by
      [querying](#operation/queryProductsVendorV3) specifying your product ids
      in the query. It's recommended to specify 1,000 product ids at once.
  - name: pricerecommendations
    x-displayName: Price Recommendations
    description: >
      Operations to get price recommendations calculated by our system.


      # Price recommendations and multiple domains


      > Note:

      > 1. Internally the system calculates a price recommendation for every
      domain

      > 2. As aggregation the system then provides the cheapest price
      recommendation

      >

      > Within the price recommendations we are providing a field called
      `relevantDomain`. This field contains from which domain the price
      recommendation originates.


      # Retrieve price recommendations


      ## Getting all price recommendations


      You can get all price recommendations via [this
      operation](#operation/getPriceRecommendation).


      It's a paginated endpoint, so you have to request multiple pages. See
      [pagination](#section/Pagination). Recommended page size is 1000.


      It's important that you define a timerange (by providing `startTime` and
      `endTime` parameters) in order to guarantee a stable pagination. This
      endpoint returns the most recent price recommendations per product and
      domain: This means that price recommendations from older price calculation
      runs within the provided timerange are ignored.
  - name: offers
    x-displayName: Offers
    description: "Operations to get and manage offers.\n\n# Provide offers for custom sources\n\nUse [this operation](#operation/postOffersInABulkVendorV2) to provide external offers for your products to our system.\nIt serves as an alternative to our automatic [domain-wise](#tag/domains) market data monitoring.\n\nTo use this operation, you need Omnia's internal product IDs.\nSee [how to determine internal product IDs](#tag/products).\n\n## Example\n\nHere is an example of a JSON body to provide one offer for one product via API.\n\n<details>\n<summary>Click to expand</summary>\n\n``` json\n[{\n\t\"productId\": \"67784570\",\n\t\"creationDate\": \"2024-06-11T00:15:07.099Z\",\n\t\"domain\": \"google.de\",\n\t\"offers\": [{\n\t\t\"vendorName\": \"amazon.de\",\n\t\t\"vendorDomainId\": 1,\n\t\t\"url\": \"https://www.amazon.de/-/en/dp/013142467X/\",\n\t\t\"price\": 58.84,\n\t\t\"deliveryCosts\": 9.95,\n\t\t\"currency\": \"EUR\",\n\t\t\"id\": \"636354d0-c865-4c56-84b3-bd9172e826aa\",\n\t\t\"productName\": \"Test item\",\n\t\t\"attributes\": [{\n\t\t\t\"key\": \"size\",\n\t\t\t\"value\": \"L\"\n\t\t}],\n\t\t\"maxDeliveryHours\": 48,\n\t\t\"minDeliveryHours\": 12,\n\t\t\"retrievalDate\": \"2024-06-11T10:50:45.659Z\",\n\t\t\"availability\": true\n\t}]\n}]\n```\n\n</details>\n\n## How It Works\n\nThis endpoint allows you to submit market data (\"offers\") for your products in bulk.\nOffers are submitted as *snapshots*.\n\nA **snapshot** is defined as:\n\n- a product\n- a domain (where the offers come from)\n- a timestamp\n- and a complete list of corresponding offers at that moment\n\nSnapshots form a **linear history** per product and domain.\nThat means:\n\n- You can only submit **newer** snapshots than the ones already stored.\n- Each snapshot must contain **all** relevant offers for that product + domain at that timestamp.\n- This endpoint is **append-only** - no edits or deletions of past offers are allowed.\n\nInternally, only the most recent snapshot is considered per product + domain, e.g., for price calculation or analytics.\n\nSnapshots are processed immediately after being accepted.\n\n## When to Send Offers\n\n- A regular daily import is a solid default.\n- Ideally submit offers before a price calculation tasks runs to ensure that recommended prices are based on up-to-date\n  data.\n- Real-time ingestion is supported.\n\n## Best Practices\n\n- Send up to **1,000 snapshots per request**.\n- Check if all snapshots are processed successfully by [analyzing the response](#response-interpretation).\n- Avoid single-snapshot requests if possible - batch requests are typically more efficient and faster.\n- Deduplicate and validate on the client side if possible.\n- Only include complete snapshots (i.e. all relevant offers for the product and domain at that time).\n- Avoid sending duplicate snapshots (e.g. previously stored ones), as they will be rejected.\n\n## Response Interpretation\n\nAnalyzing the response helps you quickly spot and fix invalid snapshots.\nSince each snapshot is validated separately, some may be accepted while others are rejected.\nResponses follow the same order as your input, so you can match and debug them easily.\n\nThe response is an array with one result per snapshot, matching the order of your input.\n\nEach item is either:\n\n- `true`: Snapshot accepted and stored.\n- An `ApiErrorResponse` object with details about the failure.\n\nThis allows you to match (`zip`) each response to your original input array.\n\nCommon reasons for rejection:\n\n- Product not part of the contract\n- Snapshot is older than what’s already stored\n- Conflicting snapshots submitted in same request\n- Invalid domain format\n- Duplicate offer IDs\n- Negative price or delivery costs\n\n## What Is a Domain?\n\n<details>\n<summary>Click to expand</summary>\n\nA **domain** is the origin of the offers. It refers to a website name - not a full URL.\nFor example, in `https://example.com/page`, the domain is `example.com`.\n\nExpected format:\n\n- Only use lowercase letters (`a–z`), digits (`0–9`), periods (`.`), and hyphens (`-`)\n- Each label (part between periods) must:\n    - Be 1-63 characters long\n    - Start and end with an alphanumeric character\n    - Not contain consecutive periods\n    - Not start or end with a hyphen\n- Total domain length must not exceed 255 characters\n\n**Examples**:\nValid: `example.com`, `shop.example.co.uk`\nInvalid: `-example.com`, `example..com`, `example_.com`, `example-.com`\n\n</details>\n\n# Retrieve offers\n\nUse [this operation](#operation/getOffersVendorV3) to get all offers for a contract. It's a paginated endpoint, so you have to scroll through all offers.\n\nIt's important that you define a timerange (by providing `startDate` and `endDate` parameters) in order to guarantee a stable pagination.\n\nThis endpoint returns the most recent offers per product and domain: This means that offers from older monitoring runs within the provided timerange are ignored.\n\n## Continuously retrieving offers\n\nFor continuously getting market data we recommend the following usage pattern:\n\nGet the offers for the last 15 minutes with a time offset of 15 minutes.\n\n| Runtime Timestamp | startDate | endDate |\n| ----------------- | --------- | ------- |\n| 12:00 | 11:30 | 11:45 |\n| 12:15 | 11:45 | 12:00 |\n| 12:30 | 12:00 | 12:15 |\n| …                     |\n\n> Note: The time offset is important since offers are not immediately visible via the API. Sometimes there is a slight delay in offer storing.\n\n\n\n\n\n"
  - name: feeds
    x-displayName: Feeds Management
    description: Manage your data-feeds.
  - name: logs
    x-displayName: Logs Management
    description: >-
      Operations to store log messages in the system.


      You can integrate this API into your own system and publish integration
      logs to the system so that Omnia Retail can analyze them.
  - name: companies
    x-displayName: Company Management
    description: >-
      Operations for managing company entities, including creation, retrieval,
      and contract management.
  - name: orders
    x-displayName: Orders Management
    description: >-
      Operations for managing orders, including bulk order imports and order
      tracking.
  - name: settings
    x-displayName: Settings Management
    description: >
      Operations to manage the settings of contracts.

      Only a limited number of these operations are available to customers
      directly.


      # Callbacks


      You can register HTTP(S) callbacks in Omnia 2.0, which function as
      webhooks.

      Callbacks are triggered at the contract level when specific events occur
      within the system.


      Please note that multiple parties can register callbacks, so when
      modifying callbacks,

      you must ensure that you do not overwrite or delete callbacks registered
      by other parties.

      We strongly recommend including a unique name for each callback to help
      you identify them later.


      Callbacks are executed asynchronously as [tasks](#tag/tasks) within our
      system.

      To monitor the execution of these callbacks,

      you can track the corresponding tasks with the task type
      backend.tasks.pricemonitor.callback.


      For added security, you can register a token with your callback and/or
      whitelist our IP range

      to ensure secure communication.
  - name: tasks
    x-displayName: Tasks Management
    description: >-
      Operations to view and manage the tasks running in the platform. Customers
      can only view tasks.


      # What tasks are


      Tasks are asynchronously handled jobs in our system, like price
      calculation or monitoring jobs.


      You can use [this operation to find tasks for a
      contract](#operation/getTasksVendorV2).


      # Price calculation tasks


      A use case for the find tasks operation is to get the most recent
      completed price calculation task to see if it was successful or failed.
      And if it failed, what the failures were.


      ### Finding most recent price calculation tasks


      If you want to find the most recent completed price calculation task you
      need the following query parameters:


      ```

      limit=1

      includeFailures=true

      taskTypeFilter=backend.tasks.pricemonitor.offers.preprocessing

      taskState=succeeded,failed    // this only returns completed tasks.
      Currently running tasks are ignored

      ```


      Optional: You might want to adjust the queried timerange and specify
      `minCreationDate` and `maxCreationDate`. By default all tasks ever are
      queried.



      It can happen that there no price calculation has been run yet, then an
      empty list of tasks is returned.


      Apart from that these are the possible task states:


      | Task state | Description |

      | ---------- | ----------- |

      | succeeded | At least for one product a price calculation has been
      calculated |

      | failed | Either all price calculations for every product failed OR the
      whole price calculation process failed due to an unexpected error |


      If there are price calculation failures on a product level, you find the
      dedicated failures in the failures array of the task. Be aware: at most
      1000 failures are returned.


      If you want to have statistics for how many products a price has been
      calculated and how many price calculations failed on product level, then
      please take a look at the `result.operations.<successful/failed/total>`
      fields in the response.


      When a task completely fails then the response also provides a
      `failureCode` that is of interest.


      ### Example Responses


      #### Successful task


      <details>

      <summary>Click to expand</summary>


      ``` json

      {
        "state":"succeeded",
        "data":{
          "startTimestamp":"2023-05-08T14:40:00.213Z"
        },
        "result":{
          "operations":{
            "successful":28444,
            "failed":0,
            "total":28444
          }
        },
        "contractId":"gj8qu6",
        "failures":[

        ],
        "creationDate":"2023-05-08T15:41:46.545Z",
        "taskType":"backend.tasks.pricemonitor.offers.preprocessing",
        "finishDate":"2023-05-08T15:44:58.853Z",
        "userId":2156,
        "startDate":"2023-05-08T15:41:46.555Z",
        "taskId":"gj8qu6:1e318eee-3217-4ee7-a380-c6312935dcd1"
      }

      ```

      </details>


      #### Successful task with failures for some products


      <details>

      <summary>Click to expand</summary>


      ``` json

      {
        "state":"succeeded",
        "data":{
          "startTimestamp":"2023-05-07T10:05:00.230Z"
        },
        "result":{
          "operations":{
            "successful":2737,
            "failed":24,
            "total":2761
          }
        },
        "contractId":"f8kfq5",
        "failures":[
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282163",
              "exceptionMessage":"Can't modify min price to 21.6 since it violates the current boundary PriceBoundary(24.00,24.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57316814",
              "exceptionMessage":"Can't modify min price to 35.1 since it violates the current boundary PriceBoundary(35.15,39.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282223",
              "exceptionMessage":"Can't modify min price to 35.1 since it violates the current boundary PriceBoundary(35.15,39.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282324",
              "exceptionMessage":"Can't modify min price to 31.5 since it violates the current boundary PriceBoundary(32.18,35.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282861",
              "exceptionMessage":"Can't modify min price to 35.1 since it violates the current boundary PriceBoundary(35.15,39.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282118",
              "exceptionMessage":"Can't modify min price to 26.1 since it violates the current boundary PriceBoundary(27.73,29.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282152",
              "exceptionMessage":"Can't modify min price to 35.1 since it violates the current boundary PriceBoundary(35.15,39.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57316468",
              "exceptionMessage":"Can't modify min price to 521.1 since it violates the current boundary PriceBoundary(529.00,579.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282300",
              "exceptionMessage":"Can't modify min price to 4769.1 since it violates the current boundary PriceBoundary(4916.84,5299.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57317261",
              "exceptionMessage":"Can't modify min price to 125.10000000000001 since it violates the current boundary PriceBoundary(129.00,139.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282345",
              "exceptionMessage":"Can't modify min price to 1205.1000000000001 since it violates the current boundary PriceBoundary(1299.00,1339.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282464",
              "exceptionMessage":"Can't modify min price to 152.1 since it violates the current boundary PriceBoundary(162.84,169.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282168",
              "exceptionMessage":"Can't modify min price to 836.1 since it violates the current boundary PriceBoundary(899.00,929.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282165",
              "exceptionMessage":"Can't modify min price to 1205.1000000000001 since it violates the current boundary PriceBoundary(1299.00,1339.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282895",
              "exceptionMessage":"Can't modify min price to 1205.1000000000001 since it violates the current boundary PriceBoundary(1299.00,1339.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282307",
              "exceptionMessage":"Can't modify min price to 1205.1000000000001 since it violates the current boundary PriceBoundary(1299.00,1339.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282002",
              "exceptionMessage":"Can't modify min price to 332.1 since it violates the current boundary PriceBoundary(349.00,369.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282399",
              "exceptionMessage":"Can't modify min price to 1025.1000000000001 since it violates the current boundary PriceBoundary(1099.00,1139.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282374",
              "exceptionMessage":"Can't modify min price to 1025.1000000000001 since it violates the current boundary PriceBoundary(1099.00,1139.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282694",
              "exceptionMessage":"Can't modify min price to 836.1 since it violates the current boundary PriceBoundary(899.00,929.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282155",
              "exceptionMessage":"Can't modify min price to 836.1 since it violates the current boundary PriceBoundary(899.00,929.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282271",
              "exceptionMessage":"Can't modify min price to 836.1 since it violates the current boundary PriceBoundary(899.00,929.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282087",
              "exceptionMessage":"Can't modify min price to 1025.1000000000001 since it violates the current boundary PriceBoundary(1099.00,1139.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"57282489",
              "exceptionMessage":"Can't modify min price to 1025.1000000000001 since it violates the current boundary PriceBoundary(1099.00,1139.00)"
            }
          }
        ],
        "creationDate":"2023-05-09T10:05:00.230Z",
        "taskType":"backend.tasks.pricemonitor.offers.preprocessing",
        "finishDate":"2023-05-09T10:05:20.095Z",
        "userId":2156,
        "startDate":"2023-05-09T10:05:00.238Z",
        "taskId":"f8kfq5:44680e2e-2458-4a64-b8a4-edfd5fb2517f"
      }

      ```

      </details>


      #### Failed task with failures for all products


      <details>

      <summary>Click to expand</summary>



      ``` json

      {
        "state":"failed",
        "data":{
          "startTimestamp":"2023-05-09T04:00:02.974Z"
        },
        "result":{
          "operations":{
            "successful":0,
            "failed":93,
            "total":93
          }
        },
        "failureCode":"user.preprocessing.strategy.failure",
        "contractId":"tujamm",
        "failures":[
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"88673055",
              "exceptionMessage":"Can't modify max price to 0.0 since it violates the current boundary PriceBoundary(358.6128,1000000.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328105",
              "exceptionMessage":"Can't modify max price to 15.6975 since it violates the current boundary PriceBoundary(15.743,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328438",
              "exceptionMessage":"Can't modify max price to 62.947500000000005 since it violates the current boundary PriceBoundary(68.614,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328838",
              "exceptionMessage":"Can't modify max price to 9.397499999999999 since it violates the current boundary PriceBoundary(11.793600000000001,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356778",
              "exceptionMessage":"Can't modify max price to 555.45 since it violates the current boundary PriceBoundary(667.3758,1049.0)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763642",
              "exceptionMessage":"Can't modify max price to 335.9475 since it violates the current boundary PriceBoundary(402.94800000000004,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356961",
              "exceptionMessage":"Can't modify max price to 1154.9895000000001 since it violates the current boundary PriceBoundary(1340.1752000000001,2199.0)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68329414",
              "exceptionMessage":"Can't modify max price to 12.5475 since it violates the current boundary PriceBoundary(17.654,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763669",
              "exceptionMessage":"Can't modify max price to 10.4475 since it violates the current boundary PriceBoundary(15.2152,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328448",
              "exceptionMessage":"Can't modify max price to 98.64750000000001 since it violates the current boundary PriceBoundary(102.284,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68756226",
              "exceptionMessage":"Can't modify max price to 131.19750000000002 since it violates the current boundary PriceBoundary(152.3158,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328748",
              "exceptionMessage":"Can't modify max price to 4.1475 since it violates the current boundary PriceBoundary(4.2042,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"87832326",
              "exceptionMessage":"Can't modify max price to 12.5475 since it violates the current boundary PriceBoundary(16.1252,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68329058",
              "exceptionMessage":"Can't modify max price to 2.0475 since it violates the current boundary PriceBoundary(2.0566,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328749",
              "exceptionMessage":"Can't modify max price to 8.3475 since it violates the current boundary PriceBoundary(12.1394,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68329108",
              "exceptionMessage":"Can't modify max price to 46.14750000000001 since it violates the current boundary PriceBoundary(47.502,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356678",
              "exceptionMessage":"Can't modify max price to 418.95000000000005 since it violates the current boundary PriceBoundary(508.5262000000001,789.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"79044179",
              "exceptionMessage":"Can't modify max price to 16.7475 since it violates the current boundary PriceBoundary(19.747,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328597",
              "exceptionMessage":"Can't modify max price to 125.9475 since it violates the current boundary PriceBoundary(130.13,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763724",
              "exceptionMessage":"Can't modify max price to 12.600000000000001 since it violates the current boundary PriceBoundary(14.7056,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328344",
              "exceptionMessage":"Can't modify max price to 62.947500000000005 since it violates the current boundary PriceBoundary(63.7,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78762366",
              "exceptionMessage":"Can't modify max price to 1101.45 since it violates the current boundary PriceBoundary(1397.4142,1649.0)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"84641852",
              "exceptionMessage":"Can't modify max price to 31.4475 since it violates the current boundary PriceBoundary(39.13,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763514",
              "exceptionMessage":"Can't modify max price to 272.9475 since it violates the current boundary PriceBoundary(292.929,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78762367",
              "exceptionMessage":"Can't modify max price to 99.75 since it violates the current boundary PriceBoundary(103.77640000000001,139.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68327996",
              "exceptionMessage":"Can't modify max price to 68.1975 since it violates the current boundary PriceBoundary(71.8354,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68373053",
              "exceptionMessage":"Can't modify max price to 19.8975 since it violates the current boundary PriceBoundary(20.4932,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68865365",
              "exceptionMessage":"Can't modify max price to 488.25 since it violates the current boundary PriceBoundary(560.7420000000001,869.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328261",
              "exceptionMessage":"Can't modify max price to 57.697500000000005 since it violates the current boundary PriceBoundary(75.69380000000001,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68373051",
              "exceptionMessage":"Can't modify max price to 2.0475 since it violates the current boundary PriceBoundary(3.6946,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78762370",
              "exceptionMessage":"Can't modify max price to 2623.9500000000003 since it violates the current boundary PriceBoundary(3310.7984,3799.0)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78764192",
              "exceptionMessage":"Can't modify min price to 0.0 since it violates the current boundary PriceBoundary(0.01,1000000.00)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356770",
              "exceptionMessage":"Can't modify max price to 523.95 since it violates the current boundary PriceBoundary(606.2420000000001,949.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68566764",
              "exceptionMessage":"Can't modify max price to 3.0975 since it violates the current boundary PriceBoundary(3.5126,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"82558573",
              "exceptionMessage":"Can't modify max price to 13.5975 since it violates the current boundary PriceBoundary(22.677200000000003,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"71348897",
              "exceptionMessage":"Can't modify max price to 110.25 since it violates the current boundary PriceBoundary(130.40300000000002,159.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356779",
              "exceptionMessage":"Can't modify max price to 523.95 since it violates the current boundary PriceBoundary(597.324,929.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763130",
              "exceptionMessage":"Can't modify max price to 262.4475 since it violates the current boundary PriceBoundary(297.479,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328608",
              "exceptionMessage":"Can't modify max price to 15.6975 since it violates the current boundary PriceBoundary(18.436600000000002,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356767",
              "exceptionMessage":"Can't modify max price to 450.45000000000005 since it violates the current boundary PriceBoundary(484.66600000000005,759.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328114",
              "exceptionMessage":"Can't modify max price to 62.947500000000005 since it violates the current boundary PriceBoundary(65.52,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"88113739",
              "exceptionMessage":"Can't modify max price to 2.0475 since it violates the current boundary PriceBoundary(26.499200000000002,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"82891765",
              "exceptionMessage":"Can't modify max price to 104.9475 since it violates the current boundary PriceBoundary(164.10940000000002,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356775",
              "exceptionMessage":"Can't modify max price to 498.75 since it violates the current boundary PriceBoundary(570.9522,889.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67357075",
              "exceptionMessage":"Can't modify max price to 82.95 since it violates the current boundary PriceBoundary(100.71880000000002,119.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328424",
              "exceptionMessage":"Can't modify max price to 141.6975 since it violates the current boundary PriceBoundary(202.02,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356784",
              "exceptionMessage":"Can't modify max price to 119.7 since it violates the current boundary PriceBoundary(144.01659999999998,169.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763163",
              "exceptionMessage":"Can't modify max price to 57.697500000000005 since it violates the current boundary PriceBoundary(58.80420000000001,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763355",
              "exceptionMessage":"Can't modify max price to 15.6975 since it violates the current boundary PriceBoundary(16.616600000000002,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78762365",
              "exceptionMessage":"Can't modify max price to 681.45 since it violates the current boundary PriceBoundary(883.2278000000001,989.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"79044161",
              "exceptionMessage":"Can't modify max price to 9.397499999999999 since it violates the current boundary PriceBoundary(2682.6800000000003,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"79809361",
              "exceptionMessage":"Can't modify max price to 16.7475 since it violates the current boundary PriceBoundary(21.2394,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356786",
              "exceptionMessage":"Can't modify max price to 488.25 since it violates the current boundary PriceBoundary(560.7420000000001,879.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68329134",
              "exceptionMessage":"Can't modify max price to 16.7475 since it violates the current boundary PriceBoundary(32.123,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328205",
              "exceptionMessage":"Can't modify max price to 102.84750000000001 since it violates the current boundary PriceBoundary(119.70139999999999,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763330",
              "exceptionMessage":"Can't modify max price to 5.197500000000001 since it violates the current boundary PriceBoundary(8.5722,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763539",
              "exceptionMessage":"Can't modify max price to 125.9475 since it violates the current boundary PriceBoundary(133.2968,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763512",
              "exceptionMessage":"Can't modify max price to 24.0975 since it violates the current boundary PriceBoundary(31.668,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328857",
              "exceptionMessage":"Can't modify max price to 31.4475 since it violates the current boundary PriceBoundary(37.1826,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78762372",
              "exceptionMessage":"Can't modify max price to 114.45 since it violates the current boundary PriceBoundary(145.16320000000002,169.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328455",
              "exceptionMessage":"Can't modify max price to 136.4475 since it violates the current boundary PriceBoundary(192.37400000000002,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68647965",
              "exceptionMessage":"Can't modify max price to 26.1975 since it violates the current boundary PriceBoundary(27.937,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356782",
              "exceptionMessage":"Can't modify max price to 376.95 since it violates the current boundary PriceBoundary(397.54260000000005,619.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"79431469",
              "exceptionMessage":"Can't modify max price to 15.6975 since it violates the current boundary PriceBoundary(31.8136,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763460",
              "exceptionMessage":"Can't modify max price to 38.79750000000001 since it violates the current boundary PriceBoundary(134.64360000000002,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763601",
              "exceptionMessage":"Can't modify max price to 29.3475 since it violates the current boundary PriceBoundary(29.9936,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356833",
              "exceptionMessage":"Can't modify max price to 523.95 since it violates the current boundary PriceBoundary(617.9264,959.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68044131",
              "exceptionMessage":"Can't modify max price to 292.95 since it violates the current boundary PriceBoundary(364.6734,419.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"74301166",
              "exceptionMessage":"Can't modify max price to 166.95000000000002 since it violates the current boundary PriceBoundary(221.40300000000002,9999.0)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68329019",
              "exceptionMessage":"Can't modify max price to 6.2475000000000005 since it violates the current boundary PriceBoundary(12.776399999999999,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356722",
              "exceptionMessage":"Can't modify max price to 866.25 since it violates the current boundary PriceBoundary(1092.8736000000001,1249.0)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78764189",
              "exceptionMessage":"Can't modify max price to 52.447500000000005 since it violates the current boundary PriceBoundary(56.27440000000001,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78764000",
              "exceptionMessage":"Can't modify max price to 2.0475 since it violates the current boundary PriceBoundary(5.6602,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356768",
              "exceptionMessage":"Can't modify max price to 488.25 since it violates the current boundary PriceBoundary(560.924,879.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68329149",
              "exceptionMessage":"Can't modify max price to 20.9475 since it violates the current boundary PriceBoundary(23.0958,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"82278909",
              "exceptionMessage":"Can't modify max price to 69.2475 since it violates the current boundary PriceBoundary(114.66000000000001,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68647966",
              "exceptionMessage":"Can't modify max price to 26.1975 since it violates the current boundary PriceBoundary(27.937,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763897",
              "exceptionMessage":"Can't modify max price to 16.7475 since it violates the current boundary PriceBoundary(17.1444,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"75351547",
              "exceptionMessage":"Can't modify max price to 109.2 since it violates the current boundary PriceBoundary(128.856,239.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763641",
              "exceptionMessage":"Can't modify max price to 52.447500000000005 since it violates the current boundary PriceBoundary(60.06,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328459",
              "exceptionMessage":"Can't modify max price to 36.697500000000005 since it violates the current boundary PriceBoundary(45.427200000000006,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68328752",
              "exceptionMessage":"Can't modify max price to 20.9475 since it violates the current boundary PriceBoundary(22.8592,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763678",
              "exceptionMessage":"Can't modify max price to 204.6975 since it violates the current boundary PriceBoundary(278.46000000000004,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"74301169",
              "exceptionMessage":"Can't modify max price to 261.45 since it violates the current boundary PriceBoundary(327.63640000000004,389.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68329012",
              "exceptionMessage":"Can't modify max price to 20.9475 since it violates the current boundary PriceBoundary(23.605400000000003,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"78763855",
              "exceptionMessage":"Can't modify max price to 13.5975 since it violates the current boundary PriceBoundary(17.672200000000004,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"81749897",
              "exceptionMessage":"Can't modify max price to 292.95 since it violates the current boundary PriceBoundary(326.5262,529.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67357159",
              "exceptionMessage":"Can't modify max price to 156.45000000000002 since it violates the current boundary PriceBoundary(225.8074,229.99)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356769",
              "exceptionMessage":"Can't modify max price to 603.75 since it violates the current boundary PriceBoundary(692.3462000000001,1089.0)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68329423",
              "exceptionMessage":"Can't modify max price to 10.4475 since it violates the current boundary PriceBoundary(10.92,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"68327990",
              "exceptionMessage":"Can't modify max price to 146.9475 since it violates the current boundary PriceBoundary(148.3664,2701.87)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"67356697",
              "exceptionMessage":"Can't modify max price to 1395.45 since it violates the current boundary PriceBoundary(1826.7340000000002,1999.0)"
            }
          },
          {
            "messageId":"ProcessingFailure",
            "attributes":{
              "productId":"87832348",
              "exceptionMessage":"Can't modify max price to 10.4475 since it violates the current boundary PriceBoundary(15.834,2701.87)"
            }
          }
        ],
        "creationDate":"2023-05-09T04:00:53.558Z",
        "taskType":"backend.tasks.pricemonitor.offers.preprocessing",
        "finishDate":"2023-05-09T04:00:59.213Z",
        "userId":2156,
        "startDate":"2023-05-09T04:00:54.677Z",
        "taskId":"tujamm:49329f97-62ff-4c65-89af-062432e82095"
      }

      ```

      </details>


      #### Unexpected failed task


      <details>

      <summary>Click to expand</summary>


      ``` json

      {
        "state":"failed",
        "data":{
          "startTimestamp":"2023-05-09T08:00:01.217Z"
        },
        "failureCode":"pricemonitor.uncategorized.failure",
        "contractId":"97j8f7",
        "failures":[
          {
            "messageId":"backend.tasks.pricemonitor.offers.preprocessing.unknownFailure",
            "attributes":{
              "error":"backend.tasks.pricemonitor.offers.preprocessing.unknownFailure",
              "exception":"scala.MatchError",
              "exceptionMessage":"null"
            }
          }
        ],
        "creationDate":"2023-05-09T09:09:18.888Z",
        "taskType":"backend.tasks.pricemonitor.offers.preprocessing",
        "finishDate":"2023-05-09T09:09:19.010Z",
        "userId":2156,
        "startDate":"2023-05-09T09:09:18.898Z",
        "taskId":"97j8f7:9a026a7a-5195-4cc4-b6b5-ceeb8cb431fa"
      }

      ```

      </details>
  - name: strategy
    x-displayName: Strategies Management
    description: Operations to view and manage pricing strategies.
  - name: domains
    x-displayName: Domains
    description: >-
      Operations to view all supported domains.


      A domain is an external datasource or website that contains information
      about offers for products for sale. Information like product
      characteristics and sales characterics like price, stock level and
      delivery times and costs.
  - name: pluginregistration
    x-displayName: Plugin Registration
    description: Operations to view and manage registered plugins for system integration.
paths:
  /api/v3/vendor/contracts/{contractId}/settings/pricingstrategies/history:
    get:
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPricingStrategyHistoryApiResponse'
          description: List of metadata of all strategy versions
      summary: Get all strategy versions metadata for contract
      description: >
        Retrieves a list of metadata for all pricing strategy versions
        associated with a specific contract.


        This endpoint provides version history information including creation
        dates, modification timestamps,

        and strategy metadata for tracking changes over time.
      operationId: getPricingStrategyHistory
      tags:
        - strategy
  /api/v3/domains:
    get:
      operationId: getAllDomainsV3
      summary: Get all available domains
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllDomainsV3ApiResponse'
              example:
                data:
                  domains:
                    - domain: amazon.de
                      domainId: 1
                      offerSources:
                        - DEFAULT_MONITORING
                        - PUSH_API
                      name: Amazon Deutschland
          description: List of all supported domains with their configurations
      description: >
        Retrieves all domains supported by the system for market data
        collection.


        Each domain includes:

        - Available offer sources for market data collection

        - Configuration parameters


        **Note:** Only domains with the `DEFAULT_MONITORING` offer source are
        supported

        out-of-the-box by the monitoring pipeline.
      tags:
        - domains
  /api/2/companies:
    post:
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCompanyApiResponse'
          description: Information about the created company.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: The company name may not be empty.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: User already belongs to a company.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: The company could not be created.
      tags:
        - companies
      operationId: createCompany
      requestBody:
        content:
          application/json:
            schema:
              type: string
        description: The company's name
        required: true
      summary: Create company
      description: Allows users without a company to create a new company.
  /api/2/companies/{companyId}/contracts:
    parameters:
      - $ref: '#/components/parameters/companyIdParam'
    get:
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCompanyContractsApiResponse'
          description: No response was specified
      tags:
        - companies
      operationId: getCompanyContracts
      summary: Get all contracts for company
      description: Get all contracts for the given company.
    post:
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddCompanyContractApiResponse'
          description: No response was specified
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Unable to add contract for company ID
      tags:
        - companies
      operationId: addCompanyContract
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/com.patagona.pricemonitor.share.api.CreateContractRequest
        description: Contract to be added
        required: true
      summary: Add contract for company
      description: Add a contract for the given company.
  /api/2/v/contracts/{contractId}/feeds:
    get:
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Feed'
                type: array
                uniqueItems: true
          description: No response was specified
      tags:
        - feeds
      description: >-
        Feeds can contain offer-related information such as price
        recommendations. They can be configured to match individual demands.
      operationId: getFeeds
      summary: Get all feeds
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
  /api/2/v/contracts/{contractId}/feeds/{feedId}:
    get:
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
        - description: ID of the feed
          in: path
          name: feedId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feed'
          description: No response was specified
        '404':
          description: Not found
      tags:
        - feeds
      description: >-
        A feed can contain offer-related information such as price
        recommendations. Feeds can be configured to match individual demands.
      operationId: getFeed
      summary: Find feed by ID
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
      - in: path
        name: feedId
        required: true
        schema:
          type: string
  /api/2/v/contracts/{contractId}/feeds/{feedId}/export/delta:
    delete:
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
        - description: ID of the feed
          in: path
          name: feedId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feed'
          description: No response was specified
        '404':
          description: Not found
      tags:
        - feeds
      description: >-
        Dismiss already fetched feed-entries, so they will not be part of future
        responses.
      operationId: excludeFetchedFeedData
      summary: Dismiss already fetched feed-entries
  /api/2/v/contracts/{contractId}/feeds/{feedId}/export/delta/{fileName}:
    get:
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
        - description: ID of the feed
          in: path
          name: feedId
          required: true
          schema:
            type: string
        - description: fileName
          in: path
          name: fileName
          required: true
          schema:
            default: my-feed.csv
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feed'
            text/csv:
              schema:
                $ref: '#/components/schemas/Feed'
          description: No response was specified
        '404':
          description: Not found
      tags:
        - feeds
      description: >-
        In contrast of normal feeds, feed-deltas return only results, that are
        new since the last (DELETE-)request.
      operationId: getFeedExportDelta
      summary: Retrieve all feed-entries after last request
  /api/2/v/contracts/{contractId}/feeds/{feedId}/export/{fileName}:
    get:
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
        - description: ID of the feed
          in: path
          name: feedId
          required: true
          schema:
            type: string
        - description: fileName
          in: path
          name: fileName
          required: true
          schema:
            default: my-feed.csv
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feed'
            text/csv:
              schema:
                $ref: '#/components/schemas/Feed'
          description: Feed data export retrieved successfully
        '404':
          description: Feed not found or access denied
      description: |
        Downloads a file containing all the data from the specified feed.

        Feeds are price recommendation centric and can be enriched with offer
        or product information. The export format (JSON or CSV) is determined
        by the request's Accept header.
      operationId: getFeedExport
      summary: Export feed data
      tags:
        - feeds
  /api/2/v/contracts/{contractId}/orders:
    post:
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
      summary: Add orders in bulk
      description: >
        Imports multiple orders for a specific contract in a single operation.


        This endpoint supports bulk order processing to efficiently manage large

        volumes of order data. All orders in the request are processed
        atomically.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostOrdersBulkApiResponse'
              example:
                data:
                  - data:
                      orders:
                        - orderId: '12345'
                          shippingCosts: 4.99
                          origin: amazon.de
                          creationDate: '2024-06-10T12:34:56Z'
                          items:
                            - itemId: item-1
                              unitPrice: 19.99
                              quantity: 2
                              taxPercentage: 19
                          productMappings:
                            - source: itemId
                              target: customerProductId
                          totalPrice: 44.97
                          currency: EUR
                          referrer: google
                      version: v2
                    errors: []
          description: Orders processed successfully (may include partial failures)
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostOrdersBulkApiResponse'
          description: |
            Request validation failed. Common issues include:
            - Invalid order data format
            - Missing required fields
            - Invalid contract ID
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/com.patagona.pricemonitor.share.api.PostCustomerOrdersRequestV2
            example:
              version: '2'
              orders:
                - orderId: ORDER-2024-001
                  origin: webshop
                  referrer: google
                  productMappings:
                    - source: itemId
                      target: customerProductId
                  items:
                    - itemId: ITEM-001
                      unitPrice: 29.99
                      quantity: 2
                      taxPercentage: 19
                  creationDate: '2024-01-15T10:30:00Z'
                  totalPrice: 65.98
                  shippingCosts: 5.99
                  currency: EUR
        description: Orders to be imported, including order metadata and item details
        required: true
      operationId: postOrders
      tags:
        - orders
  /api/2/v/contracts/{contractId}/products:
    get:
      operationId: getProducts
      summary: Get all products for a contract
      description: >
        **⚠️ DEPRECATED:** This endpoint is deprecated and should no longer be
        used.


        Retrieves all products for a contract without pagination support. This
        endpoint

        has performance limitations and lacks proper pagination. Use the newer
        product

        query endpoints instead.


        **Note:** The `attributes` parameter is required but poorly documented
        in this legacy version.
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
        - in: query
          description: >
            **REQUIRED:** Comma-separated list of product attributes to include
            in the response.


            Available attributes: `gtin`, `identifier`, `name`,
            `referencePrice`,

            `minPriceBoundary`, `maxPriceBoundary`, `tags`, `strategy`
          name: attributes
          required: true
          schema:
            type: string
            enum:
              - gtin
              - identifier
              - name
              - referencePrice
              - minPriceBoundary
              - maxPriceBoundary
              - tags
              - strategy
          example: gtin,name,referencePrice,tags
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Product'
                type: array
                uniqueItems: true
          description: No response was specified
      tags:
        - products
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
  /api/2/v/contracts/{contractId}/result/pricerecommendations:
    get:
      operationId: getPriceRecommendation
      summary: Get price recommendations for time range
      description: >
        Retrieves all price recommendations for a contract within the specified
        time range.


        This endpoint returns algorithmic pricing recommendations based on
        market analysis,

        competitor pricing, and configured pricing strategies. Only the most
        recent

        recommendations are returned when multiple recommendations exist for the
        same product.


        **Key Features:**

        - Paginated results for efficient data retrieval

        - Optional product tag inclusion

        - Configurable time range filtering

        - Real-time market-based recommendations
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
        - description: |
            **Start of time range** for price recommendation retrieval.

            Format: ISO 8601 date-time in UTC (e.g., `2024-01-15T10:30:00Z`)
          in: query
          name: startTime
          required: true
          schema:
            format: date-time
            type: string
          example: '2024-01-15T00:00:00Z'
        - description: |
            **End of time range** for price recommendation retrieval.

            Format: ISO 8601 date-time in UTC (e.g., `2024-01-16T10:30:00Z`)
          in: query
          name: endTime
          required: true
          schema:
            format: date-time
            type: string
          example: '2024-01-16T23:59:59Z'
        - description: Starting index for pagination (0-based)
          in: query
          name: start
          required: true
          schema:
            format: int32
            type: integer
            minimum: 0
          example: 0
        - description: Maximum number of price recommendations to return per page
          in: query
          name: limit
          required: false
          schema:
            default: 100
            format: int32
            type: integer
            minimum: 1
            maximum: 1000
          example: 100
        - description: Whether to include product tags in the response
          in: query
          name: includeTags
          required: false
          schema:
            default: true
            type: boolean
          example: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPriceRecommendationApiResponse'
              example:
                data:
                  - productId: PROD-001
                    gtin: 1234567890123
                    customerProductId: CUST-PROD-001
                    currency: EUR
                    price: 27.99
                    deliveryCosts: 4.99
                    timestamp: '2024-01-15T14:30:00Z'
                    tags: []
                    originalTags: []
                    relevantDomain: amazon.de
                    oldPrice: 29.99
                    oldDeliveryCosts: 4.99
                    relativePriceChangePercentage: 93.33
                    oldPosition: 5
                    newPosition: 3
                    originalMinPriceBoundary: 20
                    originalMaxPriceBoundary: 50
                    decisiveStrategyTreeLeafNodeId: 123
                    decisiveStrategyBranchName: CompetitorPricing
                meta:
                  nextUrl: >-
                    https://api.patagona.de/api/2/v/contracts/CONTRACT-123/result/pricerecommendations?startTime=2024-01-15T00:00:00Z&endTime=2024-01-16T23:59:59Z&start=100&limit=100&includeTags=true
                  totalSize: 1250
                  start: 0
                  limit: 100
          description: >
            Paginated list of price recommendations for the specified time
            range.


            Each recommendation includes the product information, recommended
            price,

            delivery costs, position data, and strategy information that
            determined

            the recommendation. Only the newest recommendations are returned
            when

            multiple exist for the same product.
      tags:
        - pricerecommendations
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
  /api/2/v/contracts/{contractId}/settings/domains:
    put:
      operationId: putDomains
      summary: Set domains for contract
      responses:
        '200':
          description: The domains setting for this contract was saved.
        '404':
          description: Settings for this contract do not exist yet
      tags:
        - settings
      requestBody:
        content:
          application/json:
            schema:
              items:
                type: string
              type: array
        description: Settings
        required: true
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
  /api/2/v/contracts/{contractId}/tasks:
    get:
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
        - description: Ids of the tasks
          in: query
          name: taskIdsFilter
          required: false
          schema:
            type: string
        - description: Desired task type
          in: query
          name: taskTypeFilter
          required: false
          schema:
            type: string
        - description: Maximal number of results
          in: query
          name: limit
          required: false
          example: 10
          schema:
            default: 100
            format: int32
            type: integer
        - description: Flag whether to include failures in the response
          in: query
          name: includeFailures
          schema:
            type: boolean
            default: true
        - description: Comma separated task state filter
          in: query
          name: taskState
          schema:
            type: string
        - description: Oldest returned creation date in UTC
          in: query
          name: minCreationDate
          schema:
            type: string
            format: date-time
        - description: Newest returned creation date in UTC
          in: query
          name: maxCreationDate
          schema:
            type: string
            format: date-time
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TaskWithContractResourceApiResponse'
                type: array
                uniqueItems: true
          description: No response was specified
      tags:
        - tasks
      description: >-
        The search can be narrowed down by providing the IDs of the tasks,
        separated by comma
      operationId: getTasksVendorV2
      summary: Find tasks for contract [vendor]
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
  /api/2/v/contracts/{contractId}/tasks/{taskId}:
    get:
      operationId: getTaskVendorV2
      summary: Get task
      description: Finds a task with the specified id for the given contract.
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
        - description: Id of the task
          in: path
          name: taskId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskWithContractResourceApiResponse'
          description: No response was specified
        '404':
          description: Not found
      tags:
        - tasks
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
      - in: path
        name: taskId
        required: true
        schema:
          type: string
  /api/v3/vendor/contracts/{contractId}/offers:
    get:
      operationId: getOffersVendorV3
      summary: Get offers for timerange
      description: Returns the newest offers for a given time range.
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
        - description: Where to start fetching the products
          in: query
          name: start
          required: false
          example: 0
          schema:
            default: 0
            format: int32
            type: integer
        - description: Maximum number of results
          in: query
          name: limit
          required: false
          example: 1000
          schema:
            default: 1000
            format: int32
            type: integer
        - description: Whether to return tags of products or not.
          in: query
          name: includeTags
          required: false
          schema:
            default: true
            type: boolean
        - $ref: '#/components/parameters/startDate'
        - $ref: '#/components/parameters/endDate'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOffersApiResponse'
          description: A list of products with their corresponding offers.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: >-
            Returned in case of invalid time range or a limit greater than
            10000.
      tags:
        - offers
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
  /api/v3/vendor/contracts/{contractId}/offers/query:
    post:
      operationId: queryOffersVendorV3
      summary: Query offers [vendor]
      description: Supports complex queries for offers.
      tags:
        - offers
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryOffersApiResponse'
          description: >-
            Returns either an Error or a list of ApiOffers matching the given
            filter.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: >-
            Returned in case of unparsable request JSON or unsupported
            filter/sorting.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductOffersApiQuery'
        description: >-
          The request body specifies which offers will be searched for.<br>

          Warning: It's highly recommended to not use this endpoint since it is
          error-prone due to complex query structure!

          Supported are queries with three different types of filters:<br>

          1. Filtering for offers of a certain product<br> This can be done by a
          ComparisonFilter with
            * the `left` side being a `StringValueProvider` with the `attributeName` value "productId"
            * the `right` side being a `StringConstantValueProvider` with the `value` being the actual pricemonitor product ID to filter offers for
            * the `comparison` being a `StringEquality`

          2. Filtering for valid offers of a certain product<br> This can be
          done by an AndFilter with
            * a) A product filter (see first supported filter)
            * b) A NotFilter which contains a ComparisonFilter
              * the `left` side being a `NumberValueProvider` with the `attributeName` value "ignoredBy"
              * the `right` side being a `NumberConstantValueProvider` with the `value` being the numeric contract id to filter offers for
              * the `comparison` being a `NumberEquality`

          3. Filtering for offers of a certain vendor<br> This can be done by a
          ComparisonFilter with
            * the `left` side being a `StringValueProvider` with the `attributeName` value "reseller_name"
            * the `right` side being a `StringConstantValueProvider` with the `value` being the actual vendor name to filter offers for
            * the `comparison` being a `StringEquality`

          Note: This endpoint will only return the newest offers for each
          product for a given time range.
        required: true
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
  /api/v3.1/vendor/contracts/{contractId}/offers/stats/query:
    post:
      operationId: queryOffersStatsVendorV31
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryOfferStatisticsV31ApiResponse'
          description: >
            Returns a list of offer statistics per product.

            When a product has no market data then no offer statistics are
            returned for that product.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: |
            A `400` error is returned under the following conditions:
            - The request body JSON is unparsable.
            - An unsupported filter is provided.
            - The specified time range exceeds 48 hours.
            - The pagination limit exceeds 10,000.
      tags:
        - offers
      requestBody:
        $ref: '#/components/requestBodies/PostOfferStatisticsRequestV31Enriched'
      description: >-
        This endpoint can be used to query offer statistics (e.g. offer count,
        average price) grouped by product. Only the most recent market data is
        considered per product and domain.
      summary: Query offer statistics per product
  /api/v3/vendor/contracts/{contractId}/orders:
    delete:
      operationId: deleteOrders
      summary: Delete all orders
      description: Delete all orders for this contract.
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedItemsApiResponse'
          description: Successfully deleted all orders
      tags:
        - orders
    put:
      operationId: putOrdersV3
      summary: PUT orders in bulk
      description: >
        Saves orders in bulk. If an orderId was already used by this contract
        this order and all it's order-items will

        be overwritten.


        - the `version` of the request body must be "3"

        - requests must not contain duplicated `orderId`

        - the number of orders in one request must not exceed 10,000

        - each order must have at least one item

        - the `orders.items.itemId` fields should correspond to a
        `customerProductId` of a product definition inside
          the contract
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/com.patagona.pricemonitor.share.api.PutCustomerOrdersRequestV3
            example:
              orders:
                - shippingCosts: 5.9
                  orderId: 2023-11_customer-a_001
                  items:
                    - unitPrice: 6.02
                      itemId: itemId
                      quantity: 1
                      taxPercentage: 19
                  totalPrice: 11.92
                  origin: Amazon.de
                  creationDate: '2023-11-23T11:20:21.034+01:00'
                  currency: EUR
              version: '3'
      responses:
        '201':
          description: The response provides the ids of the successfully imported orders
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutItemsV3ApiResponse'
              example:
                data:
                  ids:
                    - OrderId-1
                    - OrderId-2
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Unable to add orders because of invalid request data
      tags:
        - orders
    get:
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
          description: This is a generated entry and needs to be described.
      tags:
        - orders
      operationId: getOrdersVendorV3
      description: Returns all orders for a given contract.
      summary: Get all orders
      parameters:
        - in: query
          name: start
          required: true
          schema:
            type: integer
            format: int32
        - in: query
          name: limit
          required: true
          schema:
            type: integer
            format: int32
        - $ref: '#/components/parameters/getOrdersStartDate'
        - $ref: '#/components/parameters/getOrdersEndDate'
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
  /api/v3/vendor/contracts/{contractId}/orders/stats/query:
    post:
      operationId: queryOrdersStatsVendorV3
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryOrderStatisticsV3ApiResponse'
          description: >
            Returns a list of order statistics per product.

            When a product has no sold items then no order statistics are
            returned for that product.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: |
            A `400` error is returned under the following conditions:
            - The request body JSON is unparsable.
            - An unsupported filter is provided.
            - The specified time range exceeds 30 days.
            - The pagination limit exceeds 10,000.
      tags:
        - orders
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/com.patagona.pricemonitor.share.api.PostOrderStatisticsRequestV3
            example:
              pagination:
                start: 0
                limit: 10
              range:
                start: '2023-11-01T08:00:00Z'
                end: '2023-11-15T08:00:00Z'
              filter:
                oneOf:
                  field: customerProductId
                  values:
                    - '1'
                    - '2'
                    - '3'
                    - '4'
                    - '5'
                    - '6'
                    - '7'
                    - '8'
                    - '9'
                    - '10'
        required: true
        description: >
          The request body may include an optional products query. If omitted,
          all products are queried. Currently, product queries can be performed
          on two attributes:
            - "customerProductId"
            - "productId" (Patagona's internal product id; must be a numerical integer)

          Pagination is supported with a maximum limit of 10,000. For optimized
          performance:
            - Use a limit of 10,000 products per page when querying all products of a contract.
            - Prefer using "customerProductId" for queries when a product query is utilized.

          Pagination operates based on the provided products query.

          For chunked requests over a set of ids, it's straightforward to
          specify up to 10,000 customerProductId's in the query with pagination
          set at start: 0, limit: 10,000.


          The allowed query pattern is structured as follows:


          { <br>

          &nbsp;&nbsp;"pagination": { <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"start": ${start}, <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"limit": ${limit} <br>

          &nbsp;&nbsp;}, <br>

          &nbsp;&nbsp;"range": { <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"start": ${start}, <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"end": ${end} <br>

          &nbsp;&nbsp;}, <br>

          &nbsp;&nbsp;"filter": { <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"oneOf": { <br>

          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"field": "customerProductId", <br>

          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"values": [${customerProductIds as
          a list of strings}] <br>

          &nbsp;&nbsp;&nbsp;&nbsp;} <br>

          &nbsp;&nbsp;} <br>

          } <br>

          <br>
      description: This endpoint can be used to query order statistics grouped by product.
      summary: Query order statistics per product
  /api/v3/vendor/contracts/{contractId}/orders/delete/query:
    post:
      operationId: deleteOrdersByQueryVendorV3
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedItemsApiResponse'
          description: |
            Returns the number of orders that have been deleted successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: |
            A `400` error is returned under the following conditions:
            - The request body JSON is unparsable.
            - The provided order queries exceeds 10,000.
      tags:
        - orders
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/com.patagona.pricemonitor.share.api.DeleteOrdersByQueryRequestV3
            example:
              orders:
                - orderId: '123'
                  creationDate: '2023-11-01T08:00:00Z'
        required: true
        description: >
          The request body should contain a list of order queries. Each query
          should contain an order id and creation date.


          The allowed query pattern is structured as follows:


          { <br>

          &nbsp;&nbsp;"orders": [ <br>

          &nbsp;&nbsp;&nbsp;{ <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"orderId": ${orderId}, <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"creationDate": ${creationDate} <br>

          &nbsp;&nbsp;} <br>

          &nbsp;&nbsp;&nbsp;] <br>

          } <br>

          <br>
      description: This endpoint can be used to delete customer orders by an order query
      summary: Delete orders by query
  /api/v3/vendor/contracts/{contractId}/products:
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
    post:
      operationId: postProductsImportVendorV3
      summary: Add products in bulk (JSON)
      parameters:
        - in: header
          name: content-type
          required: true
          example: application/json
          schema:
            enum:
              - application/json
            type: string
        - in: header
          name: patagona-tags-decimal-separator
          description: >-
            The decimal separator is used for parsing numbers in tags. English
            and German number formats are supported: dot and comma.
          required: true
          example: .
          schema:
            type: string
            enum:
              - .
              - ','
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkedPostProductsApiResponse'
          description: >-
            The response provides sorted import results in respective to the
            order of the provided products.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Unable to add products because of invalid request data
      tags:
        - products
      description: >-
        This operation is used to import products into the system from JSON
        formatted data:<br>

        Products that are already present will be updated and new products will
        be added. Identification of the products is done based on the
        identifying attributes, which need to be provided via the request
        body.<br><br>Note:<br> This endpoint should be used in conjunction with:
        DELETE  /api/v3/vendor/contracts/{contractId}/products.<br><br>

        Procedure:<br> 1. Add your products in bulks with multiple requests via
        this endpoint.<br> 2. Send a DELETE request to
        /api/v3/vendor/contracts/{contractId}/products
           and set the parameter updatedMax to a date which is older or equal to your first request from step 1.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostProductsRequest'
        description: The body contains the products which should be added
        required: true
    put:
      operationId: putProductsImportVendorV3
      summary: Add products in bulk (CSV)
      parameters:
        - in: header
          name: content-type
          required: true
          example: text/csv
          schema:
            enum:
              - text/csv
              - text/comma-separated-values
              - text/csv; charset=UTF-8
              - text/comma-separated-values; charset=UTF-8
            type: string
        - description: >-
            A single CSV column that identify a product uniquely.

            Avoid using tags as an identifier, as this feature will soon be
            deprecated

            By doing so, you may loose historical market data during product
            import.
          in: header
          name: patagona-product-identifying-attributes
          required: true
          example: id-column
          schema:
            type: string
        - description: Csv column that contains the product name
          in: header
          name: patagona-product-name
          required: true
          example: name-column
          schema:
            type: string
        - description: Csv column that contains the reference price
          in: header
          name: patagona-product-reference-price
          required: true
          example: reference-price-column
          schema:
            type: string
        - description: Csv column that contains the min price
          in: header
          name: patagona-product-min-price
          required: true
          example: min-price-column
          schema:
            type: string
        - description: Csv column that contains the max price
          in: header
          name: patagona-product-max-price
          required: true
          example: max-price-column
          schema:
            type: string
        - description: Csv column that contains the gtin
          in: header
          name: patagona-product-gtin
          example: max-price-column
          schema:
            type: string
        - description: >-
            Csv column that contains an id (There is no requirement for this
            field to be unique)
          in: header
          name: patagona-product-customer-id
          example: id-column
          schema:
            type: string
        - description: >-
            Decimal separator used for parsing numbers \

            The values for patagona-decimal-separator,
            patagona-csv-column-separator and patagona-csv-quotation-character
            must be different from one another. \

            Available values: ",", "."
          in: header
          name: patagona-decimal-separator
          example: .
          required: true
          schema:
            type: string
        - description: >-
            The csv column separator \

            It can be provided either as text or as Base64 encoded string (e.g.
            needed for tab as separator). \

            The values for patagona-decimal-separator,
            patagona-csv-column-separator and patagona-csv-quotation-character
            must be different from one another.
          in: header
          name: patagona-csv-column-separator
          example: ','
          required: true
          schema:
            type: string
        - description: >-
            The csv quotation character \

            The values for patagona-decimal-separator,
            patagona-csv-column-separator and patagona-csv-quotation-character
            must be different from one another.
          in: header
          name: patagona-csv-quotation-character
          example: '"'
          required: true
          schema:
            type: string
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutProductsApiResponse'
          description: >-
            The field data.url in the returned object allows to check the status
            of the import process. It will point to the endpoint GET
            /api/2/v/contracts/{contractId}/tasks/{taskId}. \

            The field data.id is the task id corresponding to the product
            import.
      tags:
        - products
      description: >-
        This operation is used to import products into the system from CSV
        formatted data.

        This process is represented by a task, which is processed
        asynchronously.

        In the response you will receive a url which is used to check the status
        of the import process. <br>


        When the process is done all products in csv file from the request body
        will be in the pricemonitor.

        Products that were already present before have been updated and new
        products have been added. <br>


        Warning: All products that were in the pricemonitor before but are not
        present in the new import will be deleted.


        Identification of the products is done based on the identifying
        attributes (see parameter: patagona-product-identifying-attributes)


        Note: It is recommended to use the JSON variant to add products as it
        works synchronously and more efficient.
      requestBody:
        content:
          text/csv:
            schema:
              type: string
        description: >-
          CSV file containing the products. Note: The CSV file should be encoded
          in UTF-8.
        required: true
    delete:
      parameters:
        - in: query
          name: updatedMax
          description: >-
            Last updated timestamp of products, formatted as ISO Date (i.e.
            2019-11-20T13:46:13Z) in UTC.<br> Products can be deleted which
            haven't been updated since the specified timestamp.<br> If the query
            parameter is missing all products are deleted.
          required: false
          schema:
            format: date-time
            type: string
        - in: query
          name: tagKey
          description: >-
            Tag key to consider for deleting products. This parameter works in
            combination with tagValue.
          required: false
          schema:
            type: string
        - in: query
          name: tagValue
          description: >-
            Tag value to consider for deleting products. This parameter works in
            combination with tagKey.
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteProductsApiResponse'
          description: Returns the number of deleted products.
        '400':
          description: >
            Tags specified for deleting products are specified partially (either
            tagKey or tagValue is provided).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      tags:
        - products
      operationId: deleteProducts
      summary: Delete products
      description: >
        Delete all products or delete products by a last updated timestamp
        and/or a tag.


        **Note:** Avoid any product import requests concurrently with DELETE
        requests to prevent potential issues.
  /api/v3/vendor/contracts/{contractId}/products/{productId}/extendedtags:
    get:
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
        - description: ID of the product
          in: path
          name: productId
          required: true
          example: 1
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetExtendedTagsApiResponse'
          description: Returns a list of ExtendedTags for the given product.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Given product does not exist.
      tags:
        - products
      operationId: getExtendedTags
      summary: Return the extended tags for the given product
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
      - in: path
        name: productId
        required: true
        schema:
          type: string
  /api/v3/vendor/contracts/{contractId}/plugin:
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
    get:
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PluginRegistrationApiResponse'
          description: Returns a plugin registration for given contract.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Given plugin registration does not exist.
      tags:
        - pluginregistration
      operationId: getPluginRegistration
      summary: Get plugin registration for contract
      description: Return the plugin registration for the given contract.
    put:
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PluginRegistrationEmptyApiResponse'
          description: Plugin registration for given contract stored successfully.
      tags:
        - pluginregistration
      operationId: putPluginRegistration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutPluginRegistrationRequest'
      summary: Create/update plugin registration for contract
      description: Create and/or update the plugin registration for given contract.
    delete:
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PluginRegistrationEmptyApiResponse'
          description: Plugin registration for given contract deleted successfully.
      tags:
        - pluginregistration
      operationId: deletePluginRegistration
      summary: Delete plugin registration for contract
      description: Delete the plugin registration for the given contract.
  /api/v3/log/messages:
    post:
      responses:
        '200':
          description: The logs have been stored successfully.
      tags:
        - logs
      operationId: postLogMessages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogMessages'
      summary: Store log messages
      description: >-
        Stores log messages in the platform. This endpoint aims to improve the
        API integration process.
  /api/2/v/contracts/{contractId}/offers:
    post:
      operationId: postOffersInABulkVendorV2
      summary: Add offers in bulk
      tags:
        - offers
      responses:
        '200':
          description: >
            The request was successfully processed.

            Each individual POST offers request was validated and handled
            separately.

            The 'data' field in the response contains one entry per request
            item, in the same order as submitted.


            Each entry is either:

            - `true`: The offer snapshot was accepted and stored.

            - `ApiErrorResponse`: The snapshot was rejected, including details
            about the reason.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BooleanBulkApiResponse'
        '400':
          description: >
            The server could not understand the request due to invalid syntax.
            For example, a required field might be missing in the request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      description: >
        This endpoint can be used to provide external offers to Omnia 2.0.

        It's a bulk endpoint which accepts an array of individual POST offers
        requests each based on a "snapshot" - a

        unique combination of product, domain, and timestamp for a list of
        offers.


        Validation rules before storage:


        1. The product must exist in the contract.

        2. Only snapshots newer than those already stored will be accepted.

        3. Each domain must use a consistent currency.

        4. Duplicate snapshots in the same request are stored once.

        5. Conflicting snapshots for the same product + domain + timestamp are
        all rejected.

        6. Offer IDs must be unique across all offers.

        7. The domain field must not be empty.

        8. Offer prices must be ≥ 0.01, delivery costs must be ≥ 0.
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: >-
                  #/components/schemas/com.patagona.pricemonitor.share.api.PostProductOfferRequest
        description: >
          A list of individual POST offers requests (snapshots) to be stored.


          Submit up to 1,000 snapshots per request for optimal performance.

          Snapshots are validated and processed in the order provided. The
          response follows the same order.
        required: true
      parameters:
        - $ref: '#/components/parameters/contractIdParam'
  /api/2/v/contracts/{contractId}/settings/callbacks:
    get:
      operationId: getCallbacksVendorV2
      summary: Get callbacks
      description: Retrieve all callbacks for the given contract.
      tags:
        - settings
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/com.patagona.pricemonitor.share.api.Callbacks
          description: >
            Returns a list of all configured callbacks for certain events.

            These callbacks are executed once the respective event has been
            successfully completed.
        '404':
          description: Contract settings for this contract don't exist yet.
    put:
      operationId: putCallbacksVendorV2
      summary: Update callbacks
      description: >
        Create or update callbacks for the given contract.

        This is used to upsert (insert or update) all callbacks at once.

        Keep in mind that callbacks can be used by multiple parties (Omnia
        internal, Omnia Plugins, Users).

        It's strongly recommended to provide your callbacks with a unique name
        to easily identify them later.

        To update a single callback, you must also provide all other callbacks
        to ensure no callbacks from other parties are lost.

        To delete all callbacks, you can provide an empty list.
      tags:
        - settings
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/com.patagona.pricemonitor.share.api.Callbacks
          description: Returns the callbacks that have been successfully stored.
        '404':
          description: Contract settings for this contract don't exist yet
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/com.patagona.pricemonitor.share.api.Callbacks
        description: The request body should contain a list of callbacks to be stored.
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
  /api/v3/vendor/contracts/{contractId}/products/monitoringstatus:
    get:
      operationId: getProductMonitoringStatusVendorV3
      summary: Get monitoring status of queried products
      tags:
        - products
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetProductMonitoringStatusVendorV3ApiResponse
          description: Monitoring status of the queried products
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
      - in: query
        name: productIds
        schema:
          type: array
          items:
            type: integer
          minItems: 1
          uniqueItems: true
          maxItems: 1000
        style: form
        explode: true
        required: true
        description: The product ids for which the monitoring state should be returned
  /api/v3/vendor/contracts/{contractId}/products/{productId}/pricerecommendationhistory:
    get:
      operationId: getProductPriceRecommendationHistory
      summary: Get price recommendations for one product
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPriceRecommendationHistoryApiResponse'
          description: A list of price recommendations
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: E.g. when the time range spans more than 48h.
      tags:
        - products
        - pricerecommendations
      description: >-
        This endpoint returns all price recommendations for one product within a
        given time range.
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
      - $ref: '#/components/parameters/productIdParam'
      - $ref: '#/components/parameters/startDate'
      - $ref: '#/components/parameters/endDate'
  /api/v3.1/vendor/contracts/{contractId}/products/query:
    post:
      operationId: queryProductsVendorV3
      summary: Query products of a contract
      description: >-
        This endpoint can be used for querying either all products or certain
        products by the 'customerProductId' or 'productId'.
      tags:
        - products
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryProductsVendorV3ApiResponse'
          description: Returns a list of found products.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/com.patagona.pricemonitor.share.api.ApiQuery
        description: >
          The body contains the products query. <br>

          Currently, it supports only product queries for two attributes:<br>

          <ul>
            <li> by "customerProductId"</li>
            <li> by "productId" (Patagona's internal product id). Allowed values for 'productId' are numerical integer values</li>
          </ul>

          The maximum allowed limit in the pagination is 10000. <br>

          For better performance, when paginating over all products of a
          contract, we recommend to use a limit of 10000 products per page.

          Pagination works with respective to the given products query. <br>

          This is most relevant when querying for a set of customerProductId's.
          <br>

          When the requests are chunked over a set of ids, it is easiest to
          provide up to 10000 customerProductId's in the query and keep the
          pagination at start: 0, limit: 10000. <br>

          It also contains a boolean optional parameter 'includeTags' which is
          used to include the tags of the products in the response. <br>

          The only allowed pattern is currently: <br>

          { <br>

          &nbsp;&nbsp;"pagination": { <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"start": ${start}, <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"limit": ${limit} <br>

          &nbsp;&nbsp;}, <br>

          &nbsp;&nbsp;"filter": { <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"oneOf": { <br>

          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"field": "customerProductId", <br>

          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"values": [${customerProductIds as
          a list of strings}] <br>

          &nbsp;&nbsp;&nbsp;&nbsp;} <br>

          &nbsp;&nbsp;}, <br>

          &nbsp;&nbsp;"includeTags": ${includeTags} <br>

          } <br>

          <br>

          example: <br>

          { <br>

          &nbsp;&nbsp;"pagination": { <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"start": 0, <br>

          &nbsp;&nbsp;&nbsp;&nbsp;"limit": 10 <br>

          &nbsp;&nbsp;}, <br>

          &nbsp;&nbsp;"filter": { <br>

          &nbsp;&nbsp;"oneOf": { <br>

          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"field": "customerProductId", <br>

          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"values": ["1", "2", "3", "4",
          "5", "6", "7", "8", "9", "10"] <br>

          &nbsp;&nbsp;&nbsp;&nbsp;} <br>

          &nbsp;&nbsp;}, <br>

          &nbsp;&nbsp;"includeTags": true <br>

          } <br>
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
  /api/v3/vendor/contracts/{contractId}/products/amazon/buybox/stats:
    parameters:
      - $ref: '#/components/parameters/contractIdParam'
    get:
      operationId: getAmazonBuyboxProductStatsV3
      summary: Get Amazon Buy Box statistics for time range
      description: |
        Provides latest Amazon Buy Box statistics, i.e., whether a
        - product is in Amazon Buy Box for Prime users
        - product is in Amazon Buy Box for Non-Prime users
        per product per Amazon domain for a given time range.
      tags:
        - products
      parameters:
        - $ref: '#/components/parameters/startDate'
        - $ref: '#/components/parameters/endDate'
        - description: >-
            Where to start fetching the Amazon Buy Box statistics. Must be
            positive. Default value is 0.
          in: query
          name: start
          required: false
          example: 0
          schema:
            format: int32
            type: integer
        - description: >-
            Maximum number of results. Must be positive and not bigger than
            50,000. Default value is 50,000.
          in: query
          name: limit
          required: false
          example: 50000
          schema:
            format: int32
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AmazonBuyboxProductStatsV3ApiResponse'
          description: List of Amazon Buybox statistics per product
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: |
            Returned if:
            - The request body is not a valid JSON string.
            - The start date is after the end date.
            - The time range [startDate,endDate] is larger than 48h.
            - The start parameter is negative
            - The limit parameter is negative and larger than 50,000
            - The contract has more than one amazon domain configured.
components:
  parameters:
    companyIdParam:
      description: Unique identifier of a company in the system
      in: path
      name: companyId
      required: true
      schema:
        format: int64
        type: integer
        minimum: 1
      example: 1
    productIdParam:
      description: Internal product identifier in the pricemonitor system
      in: path
      name: productId
      required: true
      schema:
        type: string
        minLength: 1
      example: '862342'
    contractIdParam:
      description: Unique identifier of the contract
      in: path
      name: contractId
      required: true
      schema:
        type: string
        minLength: 1
      example: qbcxvb
    startDate:
      description: >
        **Start of time range** for data retrieval.


        Format: ISO 8601 date-time in UTC (e.g., `2024-01-15T10:30:00Z`)


        **Default behavior:**

        - If omitted and `endDate` is provided: `startDate` = `endDate` - 48
        hours

        - If both omitted: range is `NOW - 48 hours` to `NOW`
      in: query
      name: startDate
      required: false
      schema:
        format: date-time
        type: string
      example: '2024-01-15T00:00:00Z'
    endDate:
      description: >
        **End of time range** for data retrieval.


        Format: ISO 8601 date-time in UTC (e.g., `2024-01-16T10:30:00Z`)


        **Default behavior:**

        - If omitted and `startDate` is provided: `endDate` = `startDate` + 48
        hours

        - If both omitted: range is `NOW - 48 hours` to `NOW`
      in: query
      name: endDate
      required: false
      schema:
        format: date-time
        type: string
      example: '2024-01-16T23:59:59Z'
    getOrdersStartDate:
      description: >
        Timestamp of start of time range for fetching orders.

        Formatted as ISO 8601 format with timezone with reference to UTC (e.g.
        for [Europe/Berlin] in winter time:

        2023-11-01T14:50:45.495+01:00. In summer time:
        2023-11-01T14:50:45.495+02:00).

        If this value is omitted then no lower time limit is considered.
      in: query
      name: startDate
      required: false
      schema:
        format: date-time
        type: string
    getOrdersEndDate:
      description: >
        Timestamp of end of time range for fetching orders.

        Formatted as ISO 8601 format with timezone with reference to UTC (e.g.
        for [Europe/Berlin] in winter time:

        2023-11-01T14:50:45.495+01:00. In summer time:
        2023-11-01T14:50:45.495+02:00).

        If this value is omitted then no upper time limit is considered.
      in: query
      name: endDate
      required: false
      schema:
        format: date-time
        type: string
  schemas:
    LogMessages:
      description: Container for multiple log messages with version information
      properties:
        version:
          type: string
          description: >-
            API version for log message format. Must always be "1" for current
            implementation.
          enum:
            - '1'
          example: '1'
        messages:
          type: array
          description: Array of log messages to be processed
          items:
            $ref: '#/components/schemas/LogMessage'
          minItems: 1
          maxItems: 1000
      required:
        - version
        - messages
    LogMessage:
      description: Individual log message with severity level and contextual information
      required:
        - message
        - severity
        - source
        - component
      properties:
        message:
          type: string
          description: The actual log message content to be published
          example: Product sync completed successfully
          minLength: 1
          maxLength: 5000
        severity:
          type: string
          description: >
            Log message severity level, ordered by priority (highest to lowest):


            - **fatal**: Critical errors causing system termination

            - **error**: Serious errors requiring immediate attention

            - **warn**: Deprecated APIs, poor API usage, or unexpected
            situations

            - **info**: General progress and state information for end users

            - **debug**: Detailed information for application developers and
            support

            - **trace**: Most detailed information for deep debugging
          enum:
            - fatal
            - error
            - warn
            - info
            - debug
            - trace
          example: info
        component:
          type: string
          description: >-
            Name of the integrated system or application component generating
            the log
          example: shopware
          minLength: 1
          maxLength: 100
        source:
          type: string
          description: >-
            Specific entity or source within the component for additional
            categorization
          example: shop.example.com
          minLength: 1
          maxLength: 255
        contractId:
          type: string
          description: The contract identifier associated with this log message
          example: qbcxvb
          minLength: 1
    GenericFilter:
      description: >-
        This is a placeholder for filter expressions. They are using advanced
        features and are not covered by openapi. If you need to use filter
        expressions please contract us.
      type: object
    ApiContract:
      properties:
        active:
          type: boolean
        companyName:
          type: string
        contractId:
          type: string
        contractName:
          type: string
        contractType:
          type: string
        expirationDate:
          format: date-time
          type: string
      type: object
    ApiError:
      description: Individual error information with code and human-readable message
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: >
            Machine-readable error code for programmatic error handling.

            Typically follows a structured format like 'request.invalid' or
            'resource.invalid'.
          minLength: 1
          example: request.invalid
        message:
          type: string
          description: Human-readable error message providing details about the issue
          minLength: 1
          example: The provided email address is not in a valid format
    ApiErrorResponse:
      description: Standard error response containing one or more error details
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          description: List of errors that occurred during request processing
          items:
            $ref: '#/components/schemas/ApiError'
          minItems: 1
          example:
            - code: request.invalid
              message: The provided request data is invalid
            - code: resource.invalid
              message: The requested resource could not be found
    PostProduct:
      description: Product data structure for creating or updating products in the system
      type: object
      required:
        - name
        - referencePrice
        - tags
        - minPriceBoundary
        - maxPriceBoundary
      properties:
        name:
          type: string
          description: Product name or title as displayed to customers
          minLength: 1
          maxLength: 999
          example: Samsung Galaxy S24 Ultra 256GB
        customerProductId:
          type: string
          description: >
            Customer-specific product identifier. This can be your internal SKU
            or product ID.

            Used for mapping products between your system and the pricemonitor.
          minLength: 1
          maxLength: 255
          example: SKU-GALAXY-S24-256
        gtin:
          type: integer
          format: int64
          description: >
            Global Trade Item Number (GTIN) - typically EAN-13, UPC-A, or
            GTIN-14.

            Must be a valid positive number representing the product's global
            identifier.
          minimum: 1
          maximum: 99999999999999
          example: 8806094937329
        referencePrice:
          type: number
          format: double
          description: >
            Reference price for the product.


            **For Omnia 2.0:** This represents the selling price - the actual
            price at which you sell the product.

            **For Pricemonitor:** One of the use cases is to treat this as MSRP
            (Manufacturer's Suggested Retail Price).


            Used as a baseline for pricing strategies and recommendations.

            Will be rounded to two decimal places using half-up rounding.
          minimum: 0.01
          maximum: 9999999999999.99
          example: 1199.99
        minPriceBoundary:
          type: number
          format: double
          description: |
            Minimum allowed price boundary for automated pricing.
            Must be less than or equal to maxPriceBoundary.
            Will be rounded to two decimal places using half-up rounding.
          minimum: 0.01
          example: 999.99
        maxPriceBoundary:
          type: number
          format: double
          description: |
            Maximum allowed price boundary for automated pricing.
            Must be greater than or equal to minPriceBoundary.
            Will be rounded to two decimal places using half-up rounding.
          minimum: 0.01
          maximum: 9999999999999.99
          example: 1399.99
        tags:
          type: array
          description: |
            Product tags for categorization and strategy application.
            Used by pricing strategies to group and target specific products.
          items:
            $ref: '#/components/schemas/TagInput'
          minItems: 0
          maxItems: 100
          example:
            - key: brand
              value: Samsung
            - key: category
              value: smartphones
            - key: storage
              value: 256GB
    CreateCompanyResponse:
      properties:
        id:
          format: int64
          type: integer
        name:
          type: string
      type: object
    DeletedItemsResponse:
      properties:
        deleted:
          description: Number of deleted orders
          type: integer
      type: object
    ExtendedTag:
      properties:
        booleanValue:
          type: boolean
        doubleValue:
          format: double
          type: number
        integerValue:
          format: int32
          type: integer
        label:
          type: string
        stringValue:
          type: string
      required:
        - label
        - stringValue
    PluginRegistration:
      properties:
        pluginId:
          type: string
        shopSystem:
          type: string
        metricsUrl:
          type: string
    PluginRegistrationApiResponse:
      properties:
        data:
          $ref: '#/components/schemas/PluginRegistration'
    PluginRegistrationEmptyApiResponse:
      properties:
        data:
          type: object
    PutPluginRegistrationRequest:
      allOf:
        - $ref: '#/components/schemas/PluginRegistration'
        - type: object
          properties:
            version:
              type: string
              enum:
                - '1'
    Feed:
      properties:
        contractId:
          type: string
        csvDecimalSeparator:
          type: string
        csvSeparator:
          type: string
        deltaUrl:
          type: string
        fields:
          items:
            properties:
              default:
                type: string
              label:
                type: string
              name:
                type: string
            type: object
          type: array
        format:
          type: string
        id:
          type: string
        lastAccessed:
          format: date-time
          type: string
        lastDeletion:
          format: date-time
          type: string
        name:
          type: string
        url:
          type: string
        version:
          format: int64
          type: integer
      type: object
    Pagination:
      properties:
        limit:
          default: 100
          type: integer
        start:
          type: integer
      required:
        - start
    OffersQuerySortOrderV30:
      properties:
        metric:
          type: string
          enum:
            - TotalPrice
            - Price
        order:
          type: string
          enum:
            - asc
      required:
        - metric
        - order
    Product:
      description: A product defined by its attributes
      properties:
        tags:
          items:
            $ref: '#/components/schemas/Tag'
          type: array
        gtin:
          format: int64
          type: integer
        maxPriceBoundary:
          format: double
          type: number
        minPriceBoundary:
          format: double
          type: number
        name:
          type: string
        productId:
          type: string
        referencePrice:
          format: double
          type: number
      type: object
    ProductOffersApiQuery:
      properties:
        filter:
          $ref: '#/components/schemas/GenericFilter'
        pagination:
          $ref: '#/components/schemas/Pagination'
        range:
          $ref: '#/components/schemas/TimeRange'
        sort:
          $ref: '#/components/schemas/OffersQuerySortOrderV30'
      required:
        - pagination
        - range
    BooleanBulkApiResponse:
      description: >
        Response for bulk operations, containing one result per item in the
        request body (order preserved). Each result object contains either:
          - `data: true` if the operation succeeded,
          - or `errors`: a list of `ApiError` objects if it failed.
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              data:
                type: boolean
                example: true
              errors:
                items:
                  $ref: '#/components/schemas/ApiError'
                type: array
          example:
            - data: true
            - errors:
                - code: string
                  message: string
      type: object
    DeleteProductsApiResponse:
      properties:
        data:
          properties:
            deleted:
              type: integer
              description: Number of deleted products
          type: object
    PostProductsRequest:
      description: Request body which contains products
      properties:
        products:
          description: Products which should be added to the pricemonitor
          items:
            $ref: '#/components/schemas/PostProduct'
          type: array
        version:
          description: Version of the request body. Only version 2 is supported.
          type: string
          enum:
            - '2'
        identifyingAttributes:
          items:
            $ref: '#/components/schemas/PostProductsIdentifyingAttribute'
          type: array
          description: >-
            Non-empty list of product attributes which identify your products

            uniquely. Please ensure that you specify only one attribute in the
            list.

            Avoid using tags as an identifier, as this feature will soon be
            deprecated.

            By doing so, may loose historical market data during product import.
      required:
        - products
        - version
        - identifyingAttributes
      type: object
    PostProductsIdentifyingAttribute:
      enum:
        - customerProductId
        - gtin
        - name
      type: string
      description: >-
        The identifying attribute needs to be filled for all products. The
        identifying attribute needs to uniquely identify a product. If the
        identifying attribute isn't unique, then only the last of the duplicates
        will be saved. For the others duplicates an error will be provided
    BulkedPostProductsApiResponse:
      properties:
        data:
          items:
            description: >-
              If the product could be added successfully, the corresponding
              pricemonitor product id is returned. Otherwise a dedicated api
              error is returned.
            $ref: '#/components/schemas/PostProductsApiResponse'
          type: array
      type: object
    PostProductsApiResponse:
      properties:
        data:
          properties:
            productId:
              type: string
              description: The pricemonitor product id of the added product
          type: object
        errors:
          items:
            $ref: '#/components/schemas/ApiError'
          type: array
      type: object
    TagInput:
      description: Key-value pair for product categorization and strategy targeting
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
          description: |
            Tag identifier/name. Must be unique within a single product.
            Used to categorize products for pricing strategies and reporting.
          minLength: 1
          maxLength: 100
          pattern: ^[a-zA-Z0-9_-]+$
          example: brand
        value:
          type: string
          description: |
            Tag value associated with the key.
            Contains the actual categorization data for the product.
          maxLength: 10000
          example: Samsung
    Tag:
      description: Read-only representation of a product tag
      type: object
      properties:
        key:
          type: string
          description: Tag identifier
          example: category
        value:
          type: string
          description: Tag value
          example: smartphones
    Task:
      properties:
        id:
          type: string
        url:
          type: string
    TaskWithContractResourceApiResponse:
      properties:
        contractId:
          type: string
        creationDate:
          format: date-time
          type: string
        data:
          items:
            type: string
          type: array
        failures:
          items:
            properties:
              attributes:
                additionalProperties:
                  type: object
              messageId:
                type: string
            type: object
          type: array
        finishDate:
          format: date-time
          type: string
        parentId:
          type: string
        startDate:
          format: date-time
          type: string
        state:
          type: string
        taskId:
          type: string
        taskType:
          type: string
      type: object
    TimeRange:
      properties:
        end:
          format: date-time
          type: string
          description: Timestamp of end of time range, formatted as ISO Date in UTC
          example: '2018-04-06T13:46:13Z'
        start:
          format: date-time
          type: string
          description: Timestamp of start of time range, formatted as ISO Date in UTC
          example: '2018-04-04T13:46:13Z'
      required:
        - start
        - end
    GenericTask:
      description: >-
        A basic task type that represents the stored task document. Additional
        fields can be contained depending on specific task type.
      properties:
        creationDate:
          type: string
          format: date-time
          description: ISO 8601 timestamp (UTC) when the task was created.
        startDate:
          type: string
          format: date-time
          description: ISO 8601 timestamp (UTC) when processing of this task started.
        finishDate:
          type: string
          format: date-time
          description: ISO 8601 timestamp (UTC) when processing of this task finished.
        state:
          type: string
          enum:
            - pending
            - executing
            - succeeded
            - failed
          description: The current processing state of this task
        failures:
          type: array
          items:
            type: object
          description: >-
            Schemaless. If any errors occured during processing, these will be
            contained here. Only store a preview (up to 1,000 entries) to
            prevent overloading the database.
        taskId:
          type: string
          description: The unique ID of this task
        parentId:
          type: string
          description: The parents unique taskId, if any parent exists
        taskType:
          type: string
          description: The identifier string for the type of task
        data:
          type: object
          description: >-
            Schemaless. Contains the payload of the task given during task
            creation.
        result:
          type: object
          description: >-
            Schemaless. Contains the processing result for this task. Type is
            dependent on task type. Avoid persisting excessively large results;
            prefer concise summaries.
        failureCode:
          type: string
          description: >-
            If any error occured the error code for this error will be contained
            here.
      required:
        - creationDate
        - state
        - taskId
        - taskType
    GenericTaskWithUrl:
      allOf:
        - $ref: '#/components/schemas/GenericTask'
        - type: object
          description: >-
            A basic task type containing the URL. Additional fields can be
            contained depending on specific task type.
          properties:
            url:
              type: string
              description: The URL of the task
          required:
            - url
    UpdateTaskRequestV2:
      description: >-
        Full task document used by the update endpoints. Include the identifiers
        matching the request path.
      allOf:
        - $ref: '#/components/schemas/GenericTask'
        - type: object
          properties:
            contractId:
              type: string
              description: >-
                The contract SID to update the task for; must match the
                `contractId` path parameter.
          required:
            - contractId
    com.patagona.pricemonitor.share.api.StrategyMetadataResponseV3:
      description: Metadata used for strategy versioning.
      properties:
        documentVersion:
          type: integer
          description: strategy version per contract
        documentVersionMessage:
          type: string
          description: message provided by user when saving new strategy
        version:
          type: string
          description: schema version of the strategy
        updateDate:
          type: string
          format: date-time
          description: >-
            timestamp of last strategy update. It needs to be an option to
            ensure old strategies can be read.
        updatedBy:
          type: string
          description: >-
            user email of the account that updated the strategy. It needs to be
            an option to ensure old strategies can be read.
      additionalProperties: false
      type: object
      required:
        - documentVersion
        - version
    com.patagona.pricemonitor.share.api.GetPricingStrategyHistoryResponse:
      description: Version history of all strategies
      properties:
        history:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.StrategyMetadataResponseV3
          description: contains metadata of all strategies
      additionalProperties: false
      type: object
      required:
        - history
    GetPricingStrategyHistoryApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.GetPricingStrategyHistoryResponse
    com.patagona.pricemonitor.share.api.GetAllDomainsV3:
      description: Response body containing domain data
      properties:
        domains:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              domain:
                type: string
                description: domain url
              domainId:
                type: number
                description: internal domain id
              offerSources:
                type: array
                items:
                  type: string
                uniqueItems: true
                description: >-
                  list of offerSources for the domain OfferSource:  Describes
                  the origin of the offers. Domain may have more than one offer
                  sources. Here are the possible offer sources:
                  DEFAULT_MONITORING Offers - which are gathered via the
                  monitoring-pipeline by a standard product search. This is
                  typically done via GTIN. CUSTOM_MONITORING Offers - which are
                  gathered via the monitoring-pipeline by a customized search.
                  For instance via tags. OMNIA_CUSTOM_SPIDERING Offers - which
                  originate from omnia custom spidering sources. The domain
                  needs to be prefixed with "omnia.custom.spidering.". PUSH_API
                  Offers - which originate from services where we have a direct
                  API connection and get informed about offer changes. Example:
                  Offers from Amazon-Repricer OTHER Offers - which originate
                  from other sources e.g. Scripts which publish offers
              name:
                type: string
                description: display name for the domain
            required:
              - domain
              - domainId
              - offerSources
              - name
          description: Sequence of domain data
      additionalProperties: false
      type: object
      required:
        - domains
    GetAllDomainsV3ApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.GetAllDomainsV3
    CreateCompanyApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          $ref: '#/components/schemas/CreateCompanyResponse'
    GetCompanyContractsApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: '#/components/schemas/ApiContract'
          type: array
    com.patagona.pricemonitor.share.api.CreateContractRequest:
      description: Represents a new contract.
      properties:
        contractType:
          type: string
          description: >-
            Type of the contract. Currently, only 2 types are supported: -
            Pricemonitor for manufacturers - Pricemonitor for resellers
        contractName:
          type: string
          description: Name of the new contract
        expirationDate:
          type: string
          format: date-time
          description: Expiration date
      additionalProperties: false
      type: object
      required:
        - contractType
        - contractName
    AddCompanyContractApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          $ref: '#/components/schemas/ApiContract'
    com.patagona.pricemonitor.share.api.CustomerOrderItemV2:
      description: An ordered item
      properties:
        itemId:
          type: string
          description: >-
            ID of the item in the customer's system. It is expected to be the
            customerProductId. It should be guaranteed that the itemId can be
            always assigned to only one product or variant.
        unitPrice:
          type: number
          description: Gross unit price of a single item, including applicable taxes.
        quantity:
          type: integer
          description: How often the item was purchased.
        taxPercentage:
          type: number
          description: >-
            Tax percentage applied on the unit price, e.g. 20 for 20% tax. This
            percentage is used to determine the tax component of the unitPrice,
            but the unitPrice itself already includes this tax.
      additionalProperties: false
      type: object
      required:
        - itemId
        - unitPrice
        - quantity
    com.patagona.pricemonitor.share.api.CustomerOrderProductMappingV2:
      description: >-
        We originally planned to support complex mappings, but for sake of
        maintainability we restrict the mappings to itemId-> (customerProductId
        or productId)
      properties:
        source:
          type: string
          description: Identifier field within item. Only valid value is 'itemId'
        target:
          type: string
          description: >-
            Must be 'customerProductId' or 'productId' since plugins are still
            publishing both values. The semantics are actually the same. In both
            cases they address the customerProductId.
      additionalProperties: false
      type: object
      required:
        - source
        - target
    com.patagona.pricemonitor.share.api.CustomerOrderV2:
      description: An order placed in a shop.
      properties:
        shippingCosts:
          type: number
          description: Shipping costs of the order
        orderId:
          type: string
          description: >-
            Unique id of an order. It must mean unique in the shop, not in the
            pricemonitor.
        items:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.CustomerOrderItemV2
          description: List of bought items
        totalPrice:
          type: number
          description: Total price of the order
        productMappings:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.CustomerOrderProductMappingV2
          description: >-
            A relation from the products in your system to the pricemonitor.
            Currently it must contain exactly one element.
        origin:
          type: string
          description: Origin of an order, e.g. the online shop were the order is placed
        creationDate:
          type: string
          format: date-time
          description: Date when the order is created in UTC
        currency:
          type: string
          description: 'Currency used in the order. ISO 4217 Currency Codes: e.g. EUR'
        referrer:
          type: string
          description: >-
            Referrer of an order. Third party (e.g. marketplace) which referred
            the customer to the online shop
      additionalProperties: false
      type: object
      required:
        - orderId
        - shippingCosts
        - origin
        - creationDate
        - items
        - productMappings
        - totalPrice
        - currency
    com.patagona.pricemonitor.share.api.PostCustomerOrdersRequestV2:
      description: Request body containing bulked orders
      properties:
        orders:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.CustomerOrderV2
          description: Orders in bulk
        version:
          type: string
          description: Version of orders
      additionalProperties: false
      type: object
      required:
        - orders
        - version
    PostOrdersBulkApiResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              data:
                properties:
                  orders:
                    items:
                      $ref: >-
                        #/components/schemas/com.patagona.pricemonitor.share.api.CustomerOrderV2
                    type: array
                  version:
                    type: string
                type: object
              errors:
                items:
                  $ref: '#/components/schemas/ApiError'
                type: array
    com.patagona.pricemonitor.share.api.ExtendedTag:
      description: >-
        Tags represent additional information of a product. Extended tags can
        contain evaluated values like numbers which are determined during
        product import. The `stringValue` is used for deriving the evaluated
        values. Example: You provide a tag with label "strategy" and
        `stringValue` "1" during product import. This will be evaluated to these
        extended values: - integerValue  1 - doubleValue   1.0 - booleanValue 
        true
      properties:
        doubleValue:
          type: number
          description: >-
            The double value depends on the decimal separator which has been
            provided during product import.
        integerValue:
          type: integer
          description: >-
            The integer value of the tag. It's only defined when the
            `stringValue` consists solely of digits.
        label:
          type: string
          description: The name of the tag. It can't be empty.
        stringValue:
          type: string
          description: The text value of the tag.
        booleanValue:
          type: boolean
          description: >-
            The boolean value of the tag. It's only set to true when the
            `stringValue` is "1" or "true".
      additionalProperties: false
      type: object
      required:
        - stringValue
        - label
    com.patagona.pricemonitor.share.api.ApiPriceRecommendation:
      description: Represents a price recommendation of the pricemonitor.
      properties:
        oldPrice:
          type: number
          description: >-
            The price of the cheapest offer of the own shop(s) on the relevant
            domain
        deliveryCosts:
          type: number
          description: The delivery costs which were considered for the recommended price
        timestamp:
          type: string
          format: date-time
          description: The timestamp when the price recommendation has been calculated
        oldDeliveryCosts:
          type: number
          description: The delivery costs corresponding to `oldPrice`
        tags:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ExtendedTag
          description: Additional information on this product
        price:
          type: number
          description: The recommended price of the relevant domain
        oldPosition:
          type: integer
          description: The old position on the relevant domain
        gtin:
          type: number
          description: GTIN of the product
        relativePriceChangePercentage:
          type: number
          description: >-
            Absolute percentage how the recommended price changed compared to
            the `oldPrice` e.g. 200 stands for 200% which means the recommended
            price has doubled
        newPosition:
          type: integer
          description: The new position on the relevant domain
        decisiveStrategyBranchName:
          type: string
          description: >-
            The strategy branch name that calculated the price. This is only
            filled if the Strategy branch that calculated the price was given a
            name in the strategy tree. It will have the name that was active at
            the time the price was calculated (see timestamp)
        customerProductId:
          type: string
          description: The customer's id of the product
        originalMaxPriceBoundary:
          type: number
          description: Max price boundary during the time when the price was calculated
        relevantDomain:
          type: string
          description: >-
            The decisive domain of the price recommendation. It's been
            determined by the cheapest price recommendation.
        originalMinPriceBoundary:
          type: number
          description: Min price boundary during the time when the price was calculated
        currency:
          type: string
          description: The currency of the price recommendation.
        productId:
          type: string
          description: The internal product id of the pricemonitor
        originalTags:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ExtendedTag
          description: >-
            List of tags which were set during the time when the price has been
            calculated. ATTENTION: These are historic tags which are maybe
            outdated or incomplete.
        decisiveStrategyTreeLeafNodeId:
          type: integer
          description: >-
            The leaf node of the strategy branch that calculated the price. This
            id references the node in the strategy branch that was active at the
            time the price was calculated (see timestamp)
      additionalProperties: false
      type: object
      required:
        - tags
        - productId
        - price
        - timestamp
        - originalMinPriceBoundary
        - originalTags
        - originalMaxPriceBoundary
        - decisiveStrategyTreeLeafNodeId
        - currency
    com.patagona.pricemonitor.share.api.PaginationResponse:
      description: >-
        This model describes the information passed to the user for a paginated
        request.
      properties:
        nextUrl:
          type: string
          description: >-
            the url that can be called to retrieve the next page, None if th
            last page has been requested
        totalSize:
          type: integer
          description: the total number of elements that is paginated over
        start:
          type: integer
          description: the start index of the currently requested page
        limit:
          type: integer
          description: the number of elements in a full page
      additionalProperties: false
      type: object
      required:
        - totalSize
        - start
        - limit
    GetPriceRecommendationApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ApiPriceRecommendation
          type: array
        meta:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.PaginationResponse
    com.patagona.pricemonitor.share.api.Tag:
      properties:
        key:
          type: string
        value:
          type: string
      additionalProperties: false
      type: object
      required:
        - key
        - value
    com.patagona.pricemonitor.share.api.ApiProduct:
      description: Represents a product in Omnia 2.0.
      properties:
        name:
          type: string
          description: The name of the product.
        tags:
          type: array
          items:
            $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.Tag'
          description: >-
            Additional imported information as key-value pairs about this
            product.
        minPriceBoundary:
          type: number
          description: >-
            The minimum price that Omnia 2.0 can recommend for the product.
            Omnia 2.0 won't recommend any price below this boundary.
        gtin:
          type: number
          description: GTIN / EAN of the product. This field is optional.
        customerProductId:
          type: string
          description: >-
            Your ID of the product. This field allows to link products in Omnia
            2.0 to products in your system.
        id:
          type: string
          description: The internal product ID in Omnia 2.0.
        maxPriceBoundary:
          type: number
          description: >-
            The maximum price that Omnia 2.0 can recommend for the product.
            Omnia 2.0 won't recommend any price above this boundary.
        referencePrice:
          type: number
          description: >-
            The current selling price of the product. This price will be used as
            benchmark or variable for certain components in Omnia 2.0.
      additionalProperties: false
      type: object
      required:
        - tags
        - id
        - name
        - referencePrice
    com.patagona.pricemonitor.share.api.OfferAttribute:
      description: Created by Andreas Frankenberger on 28.01.16.
      properties:
        name:
          type: string
        value:
          type: string
      additionalProperties: false
      type: object
      required:
        - name
        - value
    com.patagona.pricemonitor.share.api.ApiOffer:
      description: Represents an offer for a product on a certain domain.
      properties:
        positionByTotalPrice:
          type: integer
          description: The position of the offer on the domain when sorted by total price.
        deliveryCosts:
          type: number
          description: >-
            The additional charges for delivering the product to the customer's
            location (shipping costs).
        maxDeliveryTime:
          type: integer
          description: >-
            Optional maximum time, in hours, it takes for the product to be
            delivered to the customer.
        url:
          type: string
          description: >-
            The direct link to the product page on the domain where this offer
            can be found.
        vendorDomainId:
          type: string
          description: >-
            An identifier of the vendor on the domain. Identifiers are available
            for certain domains only.
        domain:
          type: string
          description: The website from which the offer originates.
        price:
          type: number
          description: The unit price of the offer.
        minDeliveryTime:
          type: integer
          description: >-
            Optional minimum time, in hours, it takes for the product to be
            delivered to the customer.
        gtin:
          type: number
          description: An optional field for the GTIN / EAN of the product.
        positionByUnitPrice:
          type: integer
          description: The position of the offer on the domain when sorted by unit price.
        availability:
          type: boolean
          description: >-
            An optional flag indicating whether the product is currently in
            stock and available for purchase.
        attributes:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.OfferAttribute
          description: A list of additional offer details.
        vendorName:
          type: string
          description: >-
            The display name of the shop which sells the product. In some cases
            (e.g. marketplaces) with some additional information about the
            seller: e.g. Amazon NL - Sold By Amazon NL
        retrievalDate:
          type: string
          format: date-time
          description: >-
            Optional timestamp based on ISO 8601 format, indicating when this
            offer was fetched from the domain.
        creationDate:
          type: string
          format: date-time
          description: >-
            An optional timestamp in ISO 8601 format indicating when this offer
            was stored in Omnia 2.0. This is not the timestamp when the offer
            was fetched from the domain; for that, use retrievalDate.
        productName:
          type: string
          description: The name of the product as listed on the domain.
        currency:
          type: string
          description: >-
            The currency in which the price and delivery costs are expressed.
            Provided values are ISO 4217 currency codes like "EUR".
        productId:
          type: string
          description: The internal product ID in Omnia 2.0.
        ignored:
          type: boolean
          description: >-
            A flag indicating whether the offer has been blacklisted or not by
            the Omnia 2.0 filters.
      additionalProperties: false
      type: object
      required:
        - productName
        - ignored
        - url
        - attributes
        - positionByUnitPrice
        - vendorName
        - productId
        - price
        - deliveryCosts
        - creationDate
        - currency
        - positionByTotalPrice
        - domain
    com.patagona.pricemonitor.share.api.ProductAndOffers:
      description: Represents a product and its corresponding offers.
      properties:
        product:
          $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.ApiProduct'
          description: The product information.
        offers:
          type: array
          items:
            $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.ApiOffer'
          description: The list of offers for the corresponding product.
      additionalProperties: false
      type: object
      required:
        - product
        - offers
    GetOffersApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ProductAndOffers
          type: array
    QueryOffersApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.ApiOffer'
          type: array
    com.patagona.pricemonitor.share.api.Pagination:
      description: >-
        This model describes a step in a paginated endpoint. It consists of the
        start index, set to 0 for the first page. The next page starts at
        (previous start) + limit. Reasonable values for the limit parameter
        depend on the specific endpoint.
      properties:
        start:
          type: integer
          description: ''
        limit:
          type: integer
          description: ''
      additionalProperties: false
      type: object
      required:
        - start
        - limit
    com.patagona.pricemonitor.share.api.ZonedTimeRange:
      description: >-
        Represents a time range. It's required that the end timestamp is after
        or equals the start timestamp.
      properties:
        start:
          type: string
          format: date-time
          description: >-
            The starting point of the time range, represented as a timestamp in
            ISO 8601 format (e.g., "2023-10-19T13:45:30Z") in UTC.
        end:
          type: string
          format: date-time
          description: >-
            The ending point of the time range, represented as a timestamp in
            ISO 8601 format (e.g., "2023-10-19T14:45:30Z") in UTC.
      additionalProperties: false
      type: object
      required:
        - start
        - end
    com.patagona.pricemonitor.share.api.ProductIdQuery:
      description: >-
        This product query evaluates to 'true' if the value of the 'field' is
        one on the specified 'values'.
      properties:
        field:
          type: string
          description: >-
            Specifies the attribute to filter by. It accepts two values: <br> -
            "customerProductId": Your unique identifier for the product. <br> -
            "productId": Patagona's internal product id (must be a numerical
            integer).
        values:
          type: array
          items:
            type: string
          description: >-
            An array of strings containing the ids of the products to be
            queried.
      additionalProperties: false
      type: object
      required:
        - field
        - values
    com.patagona.pricemonitor.share.api.OneOfProductsQuery:
      description: >-
        An optional parameter to further filter the data based on product
        criteria.
      properties:
        oneOf:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.ProductIdQuery
          description: The 'oneOf' represents a product query.
      additionalProperties: false
      type: object
      required:
        - oneOf
    com.patagona.pricemonitor.share.api.PostOfferStatisticsRequestV31:
      description: >-
        Represents a paginated query with an optional product filter and a
        specified time range. <br> If no filter is provided, the response will
        contain all available data, paginated according to the `pagination`
        parameter. <br> <br> Notes: <br> - At maximum it's allowed to query
        10,000 records (pagination limit). <br> - The maximum time span between
        the start and end should not exceed 48 hours (timerange limit).
      properties:
        pagination:
          $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.Pagination'
          description: >-
            Specifies the pagination details such as the start index and the
            number of records to fetch (limit). At maximum it's allowed to query
            10,000 records.
        range:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.ZonedTimeRange
          description: >-
            Defines the time range for which offer statistics are queried. Note:
            The maximum time span between the start and end should not exceed 48
            hours.
        filter:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.OneOfProductsQuery
          description: >-
            An optional parameter to further filter the data based on product
            criteria.
      additionalProperties: false
      type: object
      required:
        - pagination
        - range
    com.patagona.pricemonitor.share.api.PriceStatisticsV31:
      description: >-
        Represents basic price statistics: (min, avg, max). All prices are
        rounded half-up to two decimal places.
      properties:
        min:
          type: number
          description: The minimum offer price.
        avg:
          type: number
          description: The average offer price.
        max:
          type: number
          description: The maximum offer price.
        cheapestShops:
          type: array
          items:
            type: string
          description: The shop names that offer for minimum price.
      additionalProperties: false
      type: object
      required:
        - min
        - avg
        - max
        - cheapestShops
    com.patagona.pricemonitor.share.api.DomainOfferStatisticsV31:
      description: >-
        Represents statistics about offers from competitors for a specific
        domain. The competitor offers are determined under-the-hood by excluding
        offers of the registered own shops.
      properties:
        domain:
          type: string
          description: >-
            This field specifies the domain where the competitor offers are
            sourced from. It's a string representing the domain name, such as
            "google.de".
        competitorOfferCount:
          type: integer
          description: The number of competitor offers available in the specified domain.
      additionalProperties: false
      type: object
      required:
        - domain
        - competitorOfferCount
    com.patagona.pricemonitor.share.api.ProductOfferStatisticsV31:
      description: >-
        Contains details on both unit price and total price statistics of
        product offers.
      properties:
        unitPriceStats:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.PriceStatisticsV31
          description: Offer statistics considering the unit price.
        totalPriceStats:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.PriceStatisticsV31
          description: Offer statistics considering the unit price plus delivery costs.
        domainStats:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.DomainOfferStatisticsV31
          description: >-
            A list of offer statistics per domain. Domains without competitor
            offers are not included in the list.
      additionalProperties: false
      type: object
      required:
        - unitPriceStats
        - totalPriceStats
        - domainStats
    com.patagona.pricemonitor.share.api.PostOfferStatisticsResponseV31:
      description: Represents aggregated offer statistics for a single product.
      properties:
        productId:
          type: string
          description: Pricemonitor's internal unique product identifier.
        offerCount:
          type: integer
          description: The number of offers found on all domains for the product.
        stats:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.ProductOfferStatisticsV31
          description: The aggregated offer price statistics for the product.
      additionalProperties: false
      type: object
      required:
        - productId
        - offerCount
        - stats
    QueryOfferStatisticsV31ApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.PostOfferStatisticsResponseV31
          type: array
    com.patagona.pricemonitor.share.api.CustomerOrderV3:
      description: An order placed in a shop.
      properties:
        shippingCosts:
          type: number
          description: Shipping costs of the order. This amount is included in totalPrice.
        orderId:
          type: string
          description: Unique ID of an order. This ID must be unique within the contract.
        items:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.CustomerOrderItemV2
          description: List of purchased items.
        totalPrice:
          type: number
          description: >-
            Total price of the order, including all items, applicable taxes, and
            shipping costs.
        origin:
          type: string
          description: Origin of an order, e.g., the online shop where the order is placed.
        creationDate:
          type: string
          format: date-time
          description: Timestamp in ISO 8601 format indicating when the order is placed.
        currency:
          type: string
          description: >-
            Currency used in the order, represented by ISO 4217 Currency Codes
            (e.g., EUR).
        referrer:
          type: string
          description: >-
            Optional referrer of an order. Third party (e.g. marketplace) which
            referred the customer to the online shop.
      additionalProperties: false
      type: object
      required:
        - orderId
        - shippingCosts
        - origin
        - creationDate
        - items
        - totalPrice
        - currency
    com.patagona.pricemonitor.share.api.PutCustomerOrdersRequestV3:
      description: Request body containing bulked orders
      properties:
        orders:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.CustomerOrderV3
          description: List of orders
        version:
          type: string
          description: Version of orders. Currently only "3" is allowed
      additionalProperties: false
      type: object
      required:
        - orders
        - version
    com.patagona.pricemonitor.share.api.PutItemsResponseV3:
      description: Represents list of unique identifiers
      properties:
        ids:
          type: array
          items:
            type: string
          description: list of ids of the items that have been saved or updated
      additionalProperties: false
      type: object
      required:
        - ids
    PutItemsV3ApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.PutItemsResponseV3
    DeletedItemsApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          $ref: '#/components/schemas/DeletedItemsResponse'
    com.patagona.pricemonitor.share.api.PostOrderStatisticsRequestV3:
      description: >-
        Represents a paginated query with an optional product filter and a
        specified time range. <br> If no filter is provided, the response will
        contain all available data, paginated according to the `pagination`
        parameter. <br> <br> Notes: <br> - At maximum it's allowed to query
        10,000 records (pagination limit). <br> - The maximum time span between
        the start and end should not exceed 30 days (timerange limit).
      properties:
        pagination:
          $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.Pagination'
          description: >-
            Specifies the pagination details such as the start index and the
            number of records to fetch (limit). At maximum it's allowed to query
            10,000 records.
        range:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.ZonedTimeRange
          description: >-
            Defines the time range for which order statistics are queried. Note:
            The maximum time span between the start and end should not exceed 30
            days.
        filter:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.OneOfProductsQuery
          description: >-
            An optional parameter to further filter the data based on product
            criteria.
      additionalProperties: false
      type: object
      required:
        - pagination
        - range
    com.patagona.pricemonitor.share.api.PostOrderStatisticsResponseV3:
      description: Represents aggregated order statistics for a single product.
      properties:
        productId:
          type: string
          description: Pricemonitor's internal unique product identifier.
        itemId:
          type: string
          description: >-
            The unique identifier of the sold item, expected to align with the
            customerProductId.
        numberOfSoldItems:
          type: integer
          description: The total count of how often the product has been sold.
      additionalProperties: false
      type: object
      required:
        - productId
        - itemId
        - numberOfSoldItems
    QueryOrderStatisticsV3ApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.PostOrderStatisticsResponseV3
          type: array
    com.patagona.pricemonitor.share.api.DeleteOrdersByQueryRequestV3:
      description: >-
        Request to delete a list of customer orders by providing an order query
        Notes: <br> - At maximum it's allowed to provide 10,000 order queries
        per request. <br>
      properties:
        orders:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              orderId:
                type: string
                description: Unique identifier of the order
              creationDate:
                type: string
                format: date-time
                description: >-
                  Creation date of the corresponding order. It is a Timestamp in
                  UTC time zone
            required:
              - orderId
              - creationDate
          description: >-
            List of order queries, each query should include an order id and its
            corresponding creation date
      additionalProperties: false
      type: object
      required:
        - orders
    PutProductsApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          $ref: '#/components/schemas/Task'
    GetExtendedTagsApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: '#/components/schemas/ExtendedTag'
          type: array
    com.patagona.pricemonitor.share.api.ApiOfferAttributeV2:
      description: >-
        Represents an additional attribute for an offer which is not in the
        predefined fields.
      properties:
        key:
          type: string
          description: The attribute name. It's not allowed to be empty.
        value:
          type: string
          description: The corresponding attribute value.
      additionalProperties: false
      type: object
      required:
        - key
        - value
    com.patagona.pricemonitor.share.api.ApiOfferV2:
      description: Represents an offer for a product on a certain domain.
      properties:
        deliveryCosts:
          type: number
          description: >-
            The additional charges for delivering the product to the customer's
            location.
        url:
          type: string
          description: >-
            The direct link to the product page on the domain where this offer
            can be found.
        vendorDomainId:
          type: string
          description: Optional identifier representing the vendor on a certain domain.
        price:
          type: number
          description: The current listed unit price of the product.
        availability:
          type: boolean
          description: >-
            An optional flag indicating whether the product is currently in
            stock and available for purchase.
        attributes:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ApiOfferAttributeV2
          description: A list of additional offer details.
        vendorName:
          type: string
          description: The display name of the shop which sells the product.
        retrievalDate:
          type: string
          format: date-time
          description: >-
            Optional timestamp based on ISO 8601 when this offer information was
            last fetched from the domain.
        id:
          type: string
          description: >-
            A unique identifier for the offer. It's crucial that it's unique
            across all offers independent of the timestamp. If you don't have a
            unique identifier then please use a UUID.
        productName:
          type: string
          description: The name of the product as listed on the domain.
        currency:
          type: string
          description: >-
            The currency in which the price and delivery costs are expressed.
            Allowed values are ISO 4217 currency codes like "EUR".
        minDeliveryHours:
          type: integer
          description: >-
            Optional minimum time, in hours, it takes for the product to be
            delivered to the customer.
        maxDeliveryHours:
          type: integer
          description: >-
            Optional maximum time, in hours, it takes for the product to be
            delivered to the customer.
      additionalProperties: false
      type: object
      required:
        - productName
        - url
        - attributes
        - id
        - vendorName
        - price
        - deliveryCosts
        - currency
    com.patagona.pricemonitor.share.api.PostProductOfferRequest:
      description: >-
        Represents a single request to post offers for a snapshot. A snapshot is
        a unique combination of productId, creationDate, and domain. It must
        contain the complete set of offers for that product and domain at the
        given time.
      properties:
        productId:
          type: string
          description: Omnia's internal product id.
        creationDate:
          type: string
          format: date-time
          description: >-
            ISO 8601 timestamp when the offers have been gathered. Must be more
            recent than existing snapshots for the same product and domain,
            otherwise the request will be rejected.
        domain:
          type: string
          description: Domain from which the offers originate (e.g., "example.com").
        offers:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ApiOfferV2
          description: Non-empty list of offers.
      additionalProperties: false
      type: object
      required:
        - productId
        - creationDate
        - domain
        - offers
    com.patagona.pricemonitor.share.api.Callback:
      description: >-
        Defines an HTTP(S) callback that can be registered to respond to system
        events.
      properties:
        method:
          type: string
          description: >-
            The HTTP method to use when making the request. Supported methods
            are GET and POST. If not provided, the default method is GET.
        name:
          type: string
          description: An optional name for the callback, used for identification purposes.
        bodyTemplate:
          type: string
          description: >-
            An optional Mustache template to define the body of the request.<br>
            The following placeholders are available in the template:<br> -
            startTime: The time when the monitoring task started (in ISO 8601
            format).<br> - contractId: The unique identifier of the
            contract.<br> Example default template:
            {"startTime":"{{startTime}}"}.
        url:
          type: string
          description: The URL to which the callback request will be sent.
        headers:
          type: object
          additionalProperties:
            type: string
          description: A map of HTTP headers to be included in the request.
      additionalProperties: false
      type: object
      required:
        - url
        - headers
    com.patagona.pricemonitor.share.api.Callbacks:
      description: >-
        A collection of callbacks that are triggered by specific events. These
        callbacks are executed once the corresponding event is completed
        successfully.
      properties:
        pricemonitorCompleted:
          type: array
          items:
            $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.Callback'
          description: >-
            A list of callbacks that are triggered when the "Pricemonitor
            Completed" event occurs, which means:<br> 1. A monitoring task
            (fetching offers) has successfully finished, and/or<br> 2. The price
            recommendation calculation task has been completed.
      additionalProperties: false
      type: object
      required:
        - pricemonitorCompleted
    com.patagona.pricemonitor.share.api.ProductMonitoringStatusOnDomainOutcome:
      description: Describes the result of a monitoring attempt.
      properties:
        successful:
          type: boolean
          description: >-
            Defines if everything worked as expected. This is the case if: -
            Offers have been found for the product - The product exists on the
            domain but is currently not available - The product doesn't exist on
            the domain
        outcome:
          type: string
          description: >-
            Describes the outcome of the monitoring attempt. Can be one of:
            ProductNotFound, ProductNotAvailable, ProductFound, CaptchaFailure,
            LayoutFailure, RequestFailure, UnknownFailure, ProductSearchFailure,
            MissingTaskData, AlreadyCompletedTask, InvalidTaskSession,
            MissingContractId, UnsupportedDomainFailure
      additionalProperties: false
      type: object
      required:
        - successful
        - outcome
    com.patagona.pricemonitor.share.api.ProductMonitoringStatusOnDomain:
      description: Describes the monitoring status of a product on a certain domain.
      properties:
        domain:
          type: string
          description: The domain which gets monitored.
        startedAt:
          type: string
          format: date-time
          description: >-
            The last time pricemonitor tried to monitor the product on the given
            domain. If this doesn't exist it mean's that pricemonitor haven't
            tried to monitor this product on the domain yet. One reason could be
            that the product is very new or the domain has just recently been
            added to the contract.
        completedAt:
          type: string
          format: date-time
          description: >-
            The last time pricemonitor completed monitoring the product on the
            given domain.
        outcome:
          $ref: >-
            #/components/schemas/com.patagona.pricemonitor.share.api.ProductMonitoringStatusOnDomainOutcome
          description: Describes the result of a monitoring attempt.
      additionalProperties: false
      type: object
      required:
        - domain
    com.patagona.pricemonitor.share.api.ProductMonitoringStatus:
      description: >-
        Describes the monitoring status of a product for all domains of the
        contract.
      properties:
        productId:
          type: number
          description: The product that gets monitored
        statusOnDomain:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ProductMonitoringStatusOnDomain
          description: >-
            The monitoring status on each domain. It will contain an entry for
            each domain which is active for that contract.
      additionalProperties: false
      type: object
      required:
        - productId
        - statusOnDomain
    GetProductMonitoringStatusVendorV3ApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ProductMonitoringStatus
          type: array
    GetPriceRecommendationHistoryApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ApiPriceRecommendation
          type: array
    com.patagona.pricemonitor.share.api.Query:
      description: >-
        This class specifies a general query language, even though all fields
        are marked as optional, exactly one has

        to be specified.

        Please note that depending on the endpoint only a subset of the query
        language might be supported.

        Refer to the endpoint specific documentation to view the restrictions.
      properties:
        regex:
          type: object
          additionalProperties: false
          properties:
            field:
              type: string
            pattern:
              type: string
          required:
            - field
            - pattern
        in:
          type: object
          additionalProperties: false
          properties:
            field:
              type: string
            query:
              $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.Query'
          required:
            - field
            - query
        or:
          type: array
          items:
            $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.Query'
        const:
          type: boolean
        not:
          $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.Query'
        oneOf:
          type: object
          additionalProperties: false
          properties:
            field:
              type: string
              description: ''
            values:
              type: array
              items:
                type: string
              description: ''
          required:
            - field
            - values
        lt:
          type: object
          additionalProperties: false
          properties:
            field:
              type: string
            value:
              type: string
          required:
            - field
            - value
        gt:
          type: object
          additionalProperties: false
          properties:
            field:
              type: string
            value:
              type: string
          required:
            - field
            - value
        eq:
          type: object
          additionalProperties: false
          properties:
            field:
              type: string
            value:
              type: string
          required:
            - field
            - value
        and:
          type: array
          items:
            $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.Query'
      additionalProperties: false
      type: object
      required: []
    com.patagona.pricemonitor.share.api.ApiQuery:
      description: >-
        This model represents a paginated query. The filter parameter is
        optional, if it is not set, all values will be returned, paginated by
        the pagination parameter.
      properties:
        pagination:
          $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.Pagination'
          description: ''
        filter:
          $ref: '#/components/schemas/com.patagona.pricemonitor.share.api.Query'
          description: ''
        includeTags:
          type: boolean
          description: Whether to include tags in the response or not
      additionalProperties: false
      type: object
      required:
        - pagination
    com.patagona.pricemonitor.share.api.ApiProductV3:
      description: A product in the pricemonitor.
      properties:
        name:
          type: string
          description: Name of the product.
        tags:
          type: array
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ExtendedTag
          description: Additional information on this product.
        minPriceBoundary:
          type: number
          description: >-
            Maximum price which pricemonitor can recommend for the product. It
            won't recommend any price above this boundary.
        gtin:
          type: number
          description: GTIN of the product. Can be optionally.
        customerProductId:
          type: string
          description: >-
            The customer's id of the product. This field allows to link products
            in pricemonitor to products in the customer's system.
        id:
          type: string
          description: Id of the product in the pricemonitor.
        maxPriceBoundary:
          type: number
          description: >-
            Minimum price which pricemonitor can recommend for the product. It
            won't recommend any price below this boundary.
        referencePrice:
          type: number
          description: >-
            Some price that will be used as benchmark for certain components in
            pricemonitor.
      additionalProperties: false
      type: object
      required:
        - tags
        - id
        - name
        - referencePrice
    QueryProductsVendorV3ApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.ApiProductV3
          type: array
    com.patagona.pricemonitor.share.api.AmazonBuyboxProductStatsV3:
      description: Shows if product belongs to Amazon Buybox
      properties:
        productId:
          type: number
          description: Internal product identifier
        isInPrimeBuybox:
          type: boolean
          description: Indicates if product is Amazon Prime product and is in Amazon Buybox
        isInNonPrimeBuybox:
          type: boolean
          description: Indicates if product is in Amazon Buybox
      additionalProperties: false
      type: object
      required:
        - productId
        - isInPrimeBuybox
        - isInNonPrimeBuybox
    AmazonBuyboxProductStatsV3ApiResponse:
      required:
        - data
      type: object
      additionalProperties: false
      description: ''
      properties:
        data:
          items:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.AmazonBuyboxProductStatsV3
          type: array
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: >
        HTTP Basic Authentication using username and password.


        **Usage:** Include the `Authorization` header with value `Basic
        <base64(username:password)>`


        **Example:** `Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=`
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        JWT Bearer Token Authentication for session-based access.


        **Usage:** Include the `Authorization` header with value `Bearer
        <jwt-token>`


        **Example:** `Authorization: Bearer
        eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...`


        **Note:** JWT tokens are typically obtained through the authentication
        endpoints.
  requestBodies:
    PostOfferStatisticsRequestV31Enriched:
      content:
        application/json:
          schema:
            $ref: >-
              #/components/schemas/com.patagona.pricemonitor.share.api.PostOfferStatisticsRequestV31
          example:
            pagination:
              start: 0
              limit: 10
            range:
              start: '2023-10-17T08:00:00Z'
              end: '2023-10-19T08:00:00Z'
            filter:
              oneOf:
                field: customerProductId
                values:
                  - '1'
                  - '2'
                  - '3'
                  - '4'
                  - '5'
                  - '6'
                  - '7'
                  - '8'
                  - '9'
                  - '10'
      description: >-
        The request body may include an optional products query. If omitted, all
        products are queried. Currently, product queries can be performed on two
        attributes:
          - "customerProductId"
          - "productId" (Patagona's internal product id; must be a numerical integer)

        Pagination is supported with a maximum limit of 10,000. For optimized
        performance:
          - Use a limit of 10,000 products per page when querying all products of a contract.
          - Prefer using "productId" for queries when a product query is utilized.

        Pagination operates based on the provided products query. This is
        particularly useful when querying a set of customerProductId's. For
        chunked requests over a set of ids, it's straightforward to specify up
        to 10,000 customerProductId's in the query with pagination set at start:
        0, limit: 10,000.

        The allowed query pattern is structured as follows:

        ``` json {
          "pagination": {
            "start": ${start},
            "limit": ${limit}
          },
          "range": {
            "start": ${start},
            "end": ${end}
          },
          "filter": {
            "oneOf": {
              "field": "customerProductId",
              "values": [${customerProductIds as a list of strings}]
            }
          }
        } ```
