Observaciones de una oferta
GET
https://pricto.dev/v1/offers/{offer_id}/historyObservations of a single offer
| Créditos | MCP |
|---|---|
| 1 per 30 points (minimum 1) | — |
Parámetros#
| Parámetro | En | Tipo | Descripción |
|---|---|---|---|
offer_id requerido | path | string | |
fx_date | query | string (date) | Convert every amount with the rate of this date instead of the rate of each observation's own date. |
max_credits | query | number | Spend at most this many credits on this call. Results are cut to fit and meta.usage.truncated is true. |
dry_run | query | boolean | Return the quote in meta.usage with data set to null, without charging. Default: false. |
from | query | string (date) | Start date, inclusive. Defaults to 90 days before to. |
to | query | string (date) | End date, inclusive. Defaults to today. |
interval | query | string | Valores / values: raw, day, week, month. Default: day. |
currency | query | string | Add converted amounts in this ISO 4217 currency. local (default) returns source currency only. Default: local. |
Respuesta#
200 History of one offer.
| Campo | Tipo | Descripción |
|---|---|---|
data requerido | object | |
data.product_id | string | null | |
data.interval requerido | string | |
data.from requerido | string (date) | |
data.to requerido | string (date) | |
data.currency requerido | string | Currency of points (always the local currency). |
data.converted_currency | string | null | |
data.fx_policy | string | null | Valores / values: point_date, fixed. |
data.series requerido | object[] | |
data.series[].retailer requerido | RetailerRef | |
data.series[].retailer.id requerido | string | |
data.series[].retailer.name requerido | string | |
data.series[].offer_id requerido | string | |
data.series[].match requerido | object | Same 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 requerido | HistoryPoint[] | |
data.series[].points[].t requerido | string | Date (day, week, month start) or timestamp (raw). |
data.series[].points[].price requerido | number | |
data.series[].points[].list_price requerido | number | |
data.series[].points[].sale_price | number | null | |
data.series[].points[].card_price | number | null | |
data.series[].points[].availability requerido | string | Valores / values: in_stock, out_of_stock, limited, unknown. |
data.series[].points[].converted | object | Present when currency is set. Converted with the rate of the point date (or fx_date). |
data.series[].summary requerido | SeriesSummary | |
data.series[].summary.first requerido | number | null | |
data.series[].summary.last requerido | number | null | |
data.series[].summary.min requerido | number | null | |
data.series[].summary.max requerido | number | null | |
data.series[].summary.change_pct requerido | number | null | (last - first) / first × 100 in local currency, rounded to 1 decimal. |
data.series[].summary.converted | object | Summary in the requested currency, each point at its own rate, so the change includes FX. |
data.series[].summary.changes requerido | integer | Number of times price changed in the period. |
data.series[].summary.days_on_promotion | integer | |
meta requerido | Meta |
meta trae el costo, la fuente para citar, el idioma, la moneda y los avisos (ver Convenciones).
Errores#
Observations of a single offer
GET
https://pricto.dev/v1/offers/{offer_id}/historyObservations of a single offer
| Credits | MCP |
|---|---|
| 1 per 30 points (minimum 1) | — |
Parameters#
| Parameter | In | Type | Description |
|---|---|---|---|
offer_id required | path | string | |
fx_date | query | string (date) | Convert every amount with the rate of this date instead of the rate of each observation's own date. |
max_credits | query | number | Spend at most this many credits on this call. Results are cut to fit and meta.usage.truncated is true. |
dry_run | query | boolean | Return the quote in meta.usage with data set to null, without charging. Default: false. |
from | query | string (date) | Start date, inclusive. Defaults to 90 days before to. |
to | query | string (date) | End date, inclusive. Defaults to today. |
interval | query | string | Valores / values: raw, day, week, month. Default: day. |
currency | query | string | Add converted amounts in this ISO 4217 currency. local (default) returns source currency only. Default: local. |
Response#
200 History of one offer.
| Field | Type | Description |
|---|---|---|
data required | object | |
data.product_id | string | null | |
data.interval required | string | |
data.from required | string (date) | |
data.to required | string (date) | |
data.currency required | string | Currency of points (always the local currency). |
data.converted_currency | string | null | |
data.fx_policy | string | null | Valores / values: point_date, fixed. |
data.series required | object[] | |
data.series[].retailer required | RetailerRef | |
data.series[].retailer.id required | string | |
data.series[].retailer.name required | string | |
data.series[].offer_id required | string | |
data.series[].match required | object | Same 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 required | HistoryPoint[] | |
data.series[].points[].t required | string | Date (day, week, month start) or timestamp (raw). |
data.series[].points[].price required | number | |
data.series[].points[].list_price required | number | |
data.series[].points[].sale_price | number | null | |
data.series[].points[].card_price | number | null | |
data.series[].points[].availability required | string | Valores / values: in_stock, out_of_stock, limited, unknown. |
data.series[].points[].converted | object | Present when currency is set. Converted with the rate of the point date (or fx_date). |
data.series[].summary required | SeriesSummary | |
data.series[].summary.first required | number | null | |
data.series[].summary.last required | number | null | |
data.series[].summary.min required | number | null | |
data.series[].summary.max required | number | null | |
data.series[].summary.change_pct required | number | null | (last - first) / first × 100 in local currency, rounded to 1 decimal. |
data.series[].summary.converted | object | Summary in the requested currency, each point at its own rate, so the change includes FX. |
data.series[].summary.changes required | integer | Number of times price changed in the period. |
data.series[].summary.days_on_promotion | integer | |
meta required | Meta |
meta carries the cost, the source line to quote, the language, the currency and notices (see Conventions).