Skip to content

Real time prices

Through this method we can calculate the prices of one or several products, for one or multiple dates of access.

If the product does not have the RequiresRealTimePrice field in catalog set to true then there is no need to make this call.

If the product has the RequiresRealTimePrice field of the catalog set to true then we must make this call every time we want to offer to the customer that product to know its current price. In the catalog a base price is offered which can be altered (increase or discount) depending on certain factors.

Why do we talk about price in real time?

The price of a product depends on the moment in which the consultation is made. There are factors such as the days remaining until the date of access or the season, which cause the price to vary.

Access method

POST /realTimePrices

Request structure

  • ProductIds: (list). Array of product identifiers.
    • (string): Product identifier.
  • AccessDates: (string). Array of access dates we want to query. ISO 8601 format (yyyy-MM-dd).
    • (date): Dates to query.
  • StartDate: (date). Start of the access date range we want to query. Complements AccessDates and requires EndDate to be specified. ISO 8601 format (yyyy-MM-dd).
  • EndDate: (date). End of the access date range we want to query. Complements AccessDates and requires StartDate to be specified. ISO 8601 format (yyyy-MM-dd).
  • CombinedProducts: (list). Array of combined products.
    • CombinedProductId: (string). Combined product identifier.
    • Products: (list). Array of products included in the combined product.
      • ProductId: (string). Combined product identifier.
      • AccessDate: (date). Access date. ISO 8601 format (yyyy-MM-dd).

Request examples

{
    "ProductIds": 
    [
        "dj48vjsyufvyu",
        "ajr7v0alt62hl"
    ],
    "AccessDates": 
    [
        "2020-01-02",
        "2022-05-15"
    ]
}
{
    "ProductIds": 
    [
        "dj48vjsyufvyu"
    ],
    "StartDate": "2020-01-02",
    "EndDate": "2020-01-04"
}
{
    "CombinedProducts": 
    [
        {
            "CombinedProductId": "iudhbfvifebvi",
            "Products": 
            [
                {
                    "ProductId": "jiufdv80querb",
                    "AccessDate": "2022-05-03"
                },
                {
                    "ProductId": "349u8g870r3vb",
                    "AccessDate": "2022-05-05"
                }
            ]
        }
    ]
}

Response structure

  • ProductsRealTimePrices: (list). Array of real-time prices.

    • ProductId: (string). Product identifier.
    • AccessDate: (date). Access date. ISO 8601 format (yyyy-MM-dd).
    • Price: (decimal). Price at which the product should be sold.
    • PriceMode: (byte). Price type.

      Possible values
      • 1: Retail price
      • 2: Net price
    • CombinedProductId: (string). Combined product identifier.

    • CombinedProductProducts: (string). Array of products included in the combined product.
      • ProductId: (string). Product identifier.
      • AccessDate: (date). Access date. ISO 8601 format (yyyy-MM-dd).
    • Success (boolean): value that indicates whether the call was processed correctly or not.
    • Timestamp (dateTime): time at which the request was processed. ISO 8601 format (yyyy-MM-ddThh:mm:ss.fffffff).
    • ErrorMessage (string): error message explaining why the request was not successful. If it was correct, it will return null.
    • ErrorCodes (string[]): list of codes that identify the errors that occurred in the call.
    • ErrorEntityBreakDown (list): list that contains objects with the name and ID in case of error.
      • Id (string): identifier
      • Name (string): related name of the identifier.
  • Success (boolean): value that indicates whether the call was processed correctly or not.

  • Timestamp (dateTime): time at which the request was processed. ISO 8601 format (yyyy-MM-ddThh:mm:ss.fffffff).
  • ErrorMessage (string): error message explaining why the request was not successful. If it was correct, it will return null.
  • ErrorCodes (string[]): list of codes that identify the errors that occurred in the call.
  • ErrorEntityBreakDown (list): list that contains objects with the name and ID in case of error.
    • Id (string): identifier
    • Name (string): related name of the identifier.

Response examples

{
    "ProductsRealTimePrices": 
    [
        {
            "ProductId": "dj48vjsyufvyu",
            "AccessDate": "2020-01-02",
            "Price": 29,
            "PriceMode": 1,
            "Success": true,
            "Timestamp": "2022-02-18T17:02:27.8165916"
        },
        {
            "ProductId": "dj48vjsyufvyu",
            "AccessDate": "2022-05-15",
            "Price": 35,
            "PriceMode": 1,
            "Success": true,
            "Timestamp": "2022-02-18T17:02:27.8165916"
        },
        {
            "ProductId": "ajr7v0alt62hl",
            "AccessDate": "2020-01-02",
            "Price": 18,
            "PriceMode": 1,
            "Success": true,
            "Timestamp": "2022-02-18T17:02:27.8165916"
        },
        {
            "ProductId": "ajr7v0alt62hl",
            "AccessDate": "2022-05-15",
            "Price": 22,
            "PriceMode": 1,
            "Success": true,
            "Timestamp": "2022-02-18T17:02:27.8165916"
        }
    ],
    "Success": true,
    "Timestamp": "2022-02-18T17:02:27.8165916"
}
{
    "ProductsRealTimePrices": 
    [
        {
            "ProductId": "dj48vjsyufvyu",
            "AccessDate": "2020-01-02",
            "Price": 29,
            "PriceMode": 1,
            "Success": true,
            "Timestamp": "2022-02-18T17:02:27.8165916"
        },
        {
            "ProductId": "dj48vjsyufvyu",
            "AccessDate": "2022-05-03",
            "Price": 35,
            "PriceMode": 1,
            "Success": true,
            "Timestamp": "2022-02-18T17:02:27.8165916"
        },
        {
            "ProductId": "dj48vjsyufvyu",
            "AccessDate": "2020-01-04",
            "Price": 20,
            "PriceMode": 1,
            "Success": true,
            "Timestamp": "2022-02-18T17:02:27.8165916"
        }
    ],
    "Success": true,
    "Timestamp": "2022-02-18T17:02:27.8165916"
}
{
    "ProductsRealTimePrices": 
    [
        {
            "CombinedProductId": "iudhbfvifebvi",
            "CombinedProductProducts": 
            [
                {
                    "ProductId": "jiufdv80querb",
                    "AccessDate": "2022-05-03"
                },
                {
                    "ProductId": "349u8g870r3vb",
                    "AccessDate": "2022-05-05"
                }
            ],

            "Price": 59.54,
            "PriceMode": 1,
            "Success": true,
            "Timestamp": "2022-02-18T17:02:27.8165916"
        }
    ],
    "Success": true,
    "Timestamp": "2022-02-18T17:02:27.8165916"
}