Comparar una canasta entre tiendas
POST
https://pricto.dev/v1/prices/compareMatrix of current prices for up to 50 products (by product_id or gtin) at each retailer, plus the basket total per retailer counting only retailers that have every item.
| Créditos | MCP |
|---|---|
| 1 per price in the matrix (product × retailer with data) | compare_prices |
Parámetros#
| Parámetro | En | Tipo | Descripción |
|---|---|---|---|
lang | query | string | Response 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. |
currency | query | string | Add converted amounts in this ISO 4217 currency. local (default) returns source currency only. Default: local. |
Cuerpo#
| Campo | Tipo | Descripción |
|---|---|---|
items requerido | ItemRef[] | |
items[].product_id | string | |
items[].gtin | string | |
items[].offer_id | string | |
items[].quantity | integer | Compare only. |
retailers | string[] | |
location | string | |
max_credits | number | |
dry_run | boolean | |
min_confidence | number | |
match_kinds | string[] | |
price_type | string | Which price to total. card_price falls back to price when there is no card price. Valores / values: price, card_price. |
Respuesta#
200 Price matrix and basket totals.
| Campo | Tipo | Descripción |
|---|---|---|
data requerido | object | |
data.items requerido | object[] | |
data.items[].product requerido | ProductSummary | |
data.items[].product.id requerido | string | |
data.items[].product.name requerido | string | |
data.items[].product.brand requerido | BrandRef | |
data.items[].product.category requerido | CategoryRef | |
data.items[].product.size | object | |
data.items[].product.gtin | string[] | |
data.items[].product.image_url | string | null | |
data.items[].product.price_summary requerido | PriceSummary | |
data.items[].product.score | number | Relevance score, search only. |
data.items[].quantity requerido | integer | |
data.items[].prices requerido | object | Map of retailer ID to price (null when the retailer does not carry it). |
data.retailers requerido | RetailerRef[] | |
data.retailers[].id requerido | string | |
data.retailers[].name requerido | string | |
data.totals requerido | object[] | Basket total per retailer, cheapest first. |
data.totals[].retailer requerido | RetailerRef | |
data.totals[].retailer.id requerido | string | |
data.totals[].retailer.name requerido | string | |
data.totals[].total requerido | number | |
data.totals[].items_found requerido | integer | |
data.totals[].complete requerido | boolean | |
data.totals[].converted_total | number | null | |
data.currency | string | |
data.not_found | ItemRef[] | |
data.not_found[].product_id | string | |
data.not_found[].gtin | string | |
data.not_found[].offer_id | string | |
data.not_found[].quantity | integer | Compare only. |
meta requerido | Meta |
meta trae el costo, la fuente para citar, el idioma, la moneda y los avisos (ver Convenciones).
Errores#
Compare a basket of products across retailers
POST
https://pricto.dev/v1/prices/compareMatrix of current prices for up to 50 products (by product_id or gtin) at each retailer, plus the basket total per retailer counting only retailers that have every item.
| Credits | MCP |
|---|---|
| 1 per price in the matrix (product × retailer with data) | compare_prices |
Parameters#
| Parameter | In | Type | Description |
|---|---|---|---|
lang | query | string | Response 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. |
currency | query | string | Add converted amounts in this ISO 4217 currency. local (default) returns source currency only. Default: local. |
Body#
| Field | Type | Description |
|---|---|---|
items required | ItemRef[] | |
items[].product_id | string | |
items[].gtin | string | |
items[].offer_id | string | |
items[].quantity | integer | Compare only. |
retailers | string[] | |
location | string | |
max_credits | number | |
dry_run | boolean | |
min_confidence | number | |
match_kinds | string[] | |
price_type | string | Which price to total. card_price falls back to price when there is no card price. Valores / values: price, card_price. |
Response#
200 Price matrix and basket totals.
| Field | Type | Description |
|---|---|---|
data required | object | |
data.items required | object[] | |
data.items[].product required | ProductSummary | |
data.items[].product.id required | string | |
data.items[].product.name required | string | |
data.items[].product.brand required | BrandRef | |
data.items[].product.category required | CategoryRef | |
data.items[].product.size | object | |
data.items[].product.gtin | string[] | |
data.items[].product.image_url | string | null | |
data.items[].product.price_summary required | PriceSummary | |
data.items[].product.score | number | Relevance score, search only. |
data.items[].quantity required | integer | |
data.items[].prices required | object | Map of retailer ID to price (null when the retailer does not carry it). |
data.retailers required | RetailerRef[] | |
data.retailers[].id required | string | |
data.retailers[].name required | string | |
data.totals required | object[] | Basket total per retailer, cheapest first. |
data.totals[].retailer required | RetailerRef | |
data.totals[].retailer.id required | string | |
data.totals[].retailer.name required | string | |
data.totals[].total required | number | |
data.totals[].items_found required | integer | |
data.totals[].complete required | boolean | |
data.totals[].converted_total | number | null | |
data.currency | string | |
data.not_found | ItemRef[] | |
data.not_found[].product_id | string | |
data.not_found[].gtin | string | |
data.not_found[].offer_id | string | |
data.not_found[].quantity | integer | Compare only. |
meta required | Meta |
meta carries the cost, the source line to quote, the language, the currency and notices (see Conventions).