# Get price recommendations for one product

This endpoint returns all price recommendations for one product within a given time range.

Endpoint: GET /api/v3/vendor/contracts/{contractId}/products/{productId}/pricerecommendationhistory
Version: 0.2.737
Security: BasicAuth, BearerAuth

## Path parameters:

  - `contractId` (string, required)
    Unique identifier of the contract
    Example: "qbcxvb"

  - `productId` (string, required)
    Internal product identifier in the pricemonitor system
    Example: "862342"

## Query parameters:

  - `startDate` (string)
    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
    Example: "2024-01-15T00:00:00Z"

  - `endDate` (string)
    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
    Example: "2024-01-16T23:59:59Z"

## Response 200 fields (application/json):

  - `data` (array, required)

  - `data.oldPrice` (number)
    The customer's current cheapest offer price across their own shops. Only provided when an offer of the customer is found.

  - `data.deliveryCosts` (number)
    The customer's delivery costs that were used during price calculation.

  - `data.timestamp` (string, required)
    The timestamp when the price recommendation has been calculated

  - `data.oldDeliveryCosts` (number)
    The delivery costs corresponding to oldPrice

  - `data.tags` (array, required)
    The current product tags as imported during product import.

  - `data.tags.doubleValue` (number)
    The double value depends on the decimal separator which has been provided during product import.

  - `data.tags.integerValue` (integer)
    The integer value of the tag. It's only defined when the stringValue consists solely of digits.

  - `data.tags.label` (string, required)
    The name of the tag. It can't be empty.

  - `data.tags.stringValue` (string, required)
    The text value of the tag.

  - `data.tags.booleanValue` (boolean)
    The boolean value of the tag. It's only set to true when the stringValue is "1" or "true".

  - `data.price` (number, required)
    The recommended unit price (excluding delivery costs) calculated by the pricing strategy. Rounded to two decimal places.

  - `data.oldPosition` (integer)
    The customer's current market position based on their cheapest offer (1 = cheapest). Only provided when an offer of the customer is found.

  - `data.gtin` (number)
    GTIN of the product. Only provided when imported.

  - `data.relativePriceChangePercentage` (number)
    The absolute percentage difference between price and oldPrice. Calculated as: |oldPrice - price| / oldPrice * 100. Returns 0 when oldPrice is not available.

  - `data.newPosition` (integer)
    The projected market position if the recommended price is applied (1 = cheapest).

  - `data.decisiveStrategyBranchName` (string)
    The name of the strategy branch that calculated the price. Only provided when the branch was given a name. Reflects the name at the time of calculation (see timestamp).

  - `data.customerProductId` (string)
    The customer's id of the product. Only provided when imported.

  - `data.originalMaxPriceBoundary` (number, required)
    Max price boundary during the time when the price was calculated

  - `data.relevantDomain` (string)
    The domain used for the price calculation. For Omnia 2.0, this is always total.market.

  - `data.originalMinPriceBoundary` (number, required)
    Min price boundary during the time when the price was calculated

  - `data.currency` (string, required)
    The currency of the price recommendation.

  - `data.productId` (string, required)
    The internal product ID in Omnia 2.0.

  - `data.originalTags` (array, required)
    The product tags at the time the price was calculated. These are a historical snapshot and may differ from the current tags.

  - `data.decisiveStrategyTreeLeafNodeId` (integer, required)
    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)

## Response 400 fields (application/json):

  - `errors` (array, required)
    List of errors that occurred during request processing
    Example: [{"code":"request.invalid","message":"The provided request data is invalid"},{"code":"resource.invalid","message":"The requested resource could not be found"}]

  - `errors.code` (string, required)
    Machine-readable error code for programmatic error handling.
Typically follows a structured format like 'request.invalid' or 'resource.invalid'.
    Example: "request.invalid"

  - `errors.message` (string, required)
    Human-readable error message providing details about the issue
    Example: "The provided email address is not in a valid format"


