Docs / Historial de precios de un productoPrice history of a productMarkdown

Historial de precios de un producto

GEThttps://pricto.dev/v1/products/{product_id}/history

Time series per retailer. With interval=day (default) each point is the last price observed that day. interval=raw returns every observation. The response includes a summary (min, max, change) per series so agents rarely need to process the points.

CréditosMCP
1 per 30 points per series (minimum 1 per series)get_price_history

Parámetros#

ParámetroEnTipoDescripción
product_id requeridopathstringCanonical product ID (prd_...). A GTIN is also accepted here and resolved.
fx_datequerystring (date)Convert every amount with the rate of this date instead of the rate of each observation's own date.
max_creditsquerynumberSpend at most this many credits on this call. Results are cut to fit and meta.usage.truncated is true.
dry_runquerybooleanReturn the quote in meta.usage with data set to null, without charging. Default: false.
retailerquerystringOne or more retailer IDs, comma separated (e.g. cl-jumbo,cl-unimarc).
fromquerystring (date)Start date, inclusive. Defaults to 90 days before to.
toquerystring (date)End date, inclusive. Defaults to today.
intervalquerystringValores / values: raw, day, week, month. Default: day.
min_confidencequerynumberOnly include offers whose match confidence is at least this value. Default 0.85: below it an offer is not grouped with the product automatically. Default: 0.85.
match_kindsquerystringMatch kinds to include, comma separated. Default identical. Add pack for offers that are N units of the product (compare by unit price, see match.pack_ratio) and equivalent for declared substitutes (another brand or lab), which are not the same item. Default: identical.
langquerystringResponse language as a BCP 47 tag (es, es-CL, en, en-US...). Supported today: es, en. An unsupported language falls back to English with a warning, never an error. Falls back to Accept-Language, then to the account default. The resolved value is in meta.lang.
currencyquerystringAdd converted amounts in this ISO 4217 currency. local (default) returns source currency only. Default: local.

Respuesta#

200 History series.

CampoTipoDescripción
data requeridoobject
data.product_idstring | null
data.interval requeridostring
data.from requeridostring (date)
data.to requeridostring (date)
data.currency requeridostringCurrency of points (always the local currency).
data.converted_currencystring | null
data.fx_policystring | nullValores / values: point_date, fixed.
data.series requeridoobject[]
data.series[].retailer requeridoRetailerRef
data.series[].retailer.id requeridostring
data.series[].retailer.name requeridostring
data.series[].offer_id requeridostring
data.series[].match requeridoobjectSame offers as /prices (default identical, confidence >= 0.85). With match_kinds=identical,pack a pack series has kind pack and pack_ratio: points are the pack price, divide by pack_ratio for the unit price. null only in the history of an offer not linked to a product.
data.series[].points requeridoHistoryPoint[]
data.series[].points[].t requeridostringDate (day, week, month start) or timestamp (raw).
data.series[].points[].price requeridonumber
data.series[].points[].list_price requeridonumber
data.series[].points[].sale_pricenumber | null
data.series[].points[].card_pricenumber | null
data.series[].points[].availability requeridostringValores / values: in_stock, out_of_stock, limited, unknown.
data.series[].points[].convertedobjectPresent when currency is set. Converted with the rate of the point date (or fx_date).
data.series[].summary requeridoSeriesSummary
data.series[].summary.first requeridonumber | null
data.series[].summary.last requeridonumber | null
data.series[].summary.min requeridonumber | null
data.series[].summary.max requeridonumber | null
data.series[].summary.change_pct requeridonumber | null(last - first) / first × 100 in local currency, rounded to 1 decimal.
data.series[].summary.convertedobjectSummary in the requested currency, each point at its own rate, so the change includes FX.
data.series[].summary.changes requeridointegerNumber of times price changed in the period.
data.series[].summary.days_on_promotioninteger
meta requeridoMeta

meta trae el costo, la fuente para citar, el idioma, la moneda y los avisos (ver Convenciones).

Errores#

Price history of a product

GEThttps://pricto.dev/v1/products/{product_id}/history

Time series per retailer. With interval=day (default) each point is the last price observed that day. interval=raw returns every observation. The response includes a summary (min, max, change) per series so agents rarely need to process the points.

CreditsMCP
1 per 30 points per series (minimum 1 per series)get_price_history

Parameters#

ParameterInTypeDescription
product_id requiredpathstringCanonical product ID (prd_...). A GTIN is also accepted here and resolved.
fx_datequerystring (date)Convert every amount with the rate of this date instead of the rate of each observation's own date.
max_creditsquerynumberSpend at most this many credits on this call. Results are cut to fit and meta.usage.truncated is true.
dry_runquerybooleanReturn the quote in meta.usage with data set to null, without charging. Default: false.
retailerquerystringOne or more retailer IDs, comma separated (e.g. cl-jumbo,cl-unimarc).
fromquerystring (date)Start date, inclusive. Defaults to 90 days before to.
toquerystring (date)End date, inclusive. Defaults to today.
intervalquerystringValores / values: raw, day, week, month. Default: day.
min_confidencequerynumberOnly include offers whose match confidence is at least this value. Default 0.85: below it an offer is not grouped with the product automatically. Default: 0.85.
match_kindsquerystringMatch kinds to include, comma separated. Default identical. Add pack for offers that are N units of the product (compare by unit price, see match.pack_ratio) and equivalent for declared substitutes (another brand or lab), which are not the same item. Default: identical.
langquerystringResponse language as a BCP 47 tag (es, es-CL, en, en-US...). Supported today: es, en. An unsupported language falls back to English with a warning, never an error. Falls back to Accept-Language, then to the account default. The resolved value is in meta.lang.
currencyquerystringAdd converted amounts in this ISO 4217 currency. local (default) returns source currency only. Default: local.

Response#

200 History series.

FieldTypeDescription
data requiredobject
data.product_idstring | null
data.interval requiredstring
data.from requiredstring (date)
data.to requiredstring (date)
data.currency requiredstringCurrency of points (always the local currency).
data.converted_currencystring | null
data.fx_policystring | nullValores / values: point_date, fixed.
data.series requiredobject[]
data.series[].retailer requiredRetailerRef
data.series[].retailer.id requiredstring
data.series[].retailer.name requiredstring
data.series[].offer_id requiredstring
data.series[].match requiredobjectSame offers as /prices (default identical, confidence >= 0.85). With match_kinds=identical,pack a pack series has kind pack and pack_ratio: points are the pack price, divide by pack_ratio for the unit price. null only in the history of an offer not linked to a product.
data.series[].points requiredHistoryPoint[]
data.series[].points[].t requiredstringDate (day, week, month start) or timestamp (raw).
data.series[].points[].price requirednumber
data.series[].points[].list_price requirednumber
data.series[].points[].sale_pricenumber | null
data.series[].points[].card_pricenumber | null
data.series[].points[].availability requiredstringValores / values: in_stock, out_of_stock, limited, unknown.
data.series[].points[].convertedobjectPresent when currency is set. Converted with the rate of the point date (or fx_date).
data.series[].summary requiredSeriesSummary
data.series[].summary.first requirednumber | null
data.series[].summary.last requirednumber | null
data.series[].summary.min requirednumber | null
data.series[].summary.max requirednumber | null
data.series[].summary.change_pct requirednumber | null(last - first) / first × 100 in local currency, rounded to 1 decimal.
data.series[].summary.convertedobjectSummary in the requested currency, each point at its own rate, so the change includes FX.
data.series[].summary.changes requiredintegerNumber of times price changed in the period.
data.series[].summary.days_on_promotioninteger
meta requiredMeta

meta carries the cost, the source line to quote, the language, the currency and notices (see Conventions).

Errors#