Compare two or more products
GET
/api/storefront/{brandId}/compareNo keyCallable anonymously. Rate limited by IP.10 requests a minute
A GET with a query parameter, not a POST with a body. Earlier protocol drafts described a POST and the developer site documented one; the route has only ever exported GET, so a POST returns 405.
Parameters
brandIdstring · pathrequiredThe storefront's brand id. There is no public endpoint that maps a domain to a brand id; ask the merchant for their storefront URL, the id is in it.idsstring · queryComma separated product ids.Request
bash
BRAND_ID=cmqmr1f6j0003la04nu93f4k4
curl "https://cresva.ai/api/storefront/$BRAND_ID/compare"Response
Captured from production on 2026-09-16: 200 in 1427ms, X-OSP-Version: 2026-03-01. This is what the endpoint returned, not an example of what it might.
JSON
{
"products": [
{
"id": "cmtpqwhit001ajv04e1vvv5j6",
"title": "The Videographer Snowboard",
"price": {
"amount": 885.95,
"currency": "USD",
"formatted": "$885.95"
},
"availability": "in_stock",
"rating": null,
"summary": "",
"attributes": {},
"comparison_context": null,
"purchase_url": "https://cresva-pilot-two.myshopify.com/products/the-videographer-snowboard",
"images": [
"https://cdn.shopify.com/s/files/1/0803/1135/3541/files/Main.jpg?v=1787511528"
]
},
{
"id": "cmtpqwhih0018jv04l2zc1pi9",
"title": "The Out of Stock Snowboard",
"price": {
"amount": 885.95,
"currency": "USD",
"formatted": "$885.95"
},
"availability": "in_stock",
"rating": null,
"summary": "",
"attributes": {},
"comparison_context": null,
"purchase_url": "https://cresva-pilot-two.myshopify.com/products/the-out-of-stock-snowboard",
"images": [
"https://cdn.shopify.com/s/files/1/0803/1135/3541/files/Main_f44a9605-cd62-464d-b095-d45cdaa0d0d7.jpg?v=1787511528"
]
}
],
"comparison": {
"products_compared": 2,
"highest_rated": null,
"most_reviewed": null
},
"meta": {
"total": 2,
"page": 1,
"authority_score": null,
"response_time_ms": 114,
"data_freshness": "2026-09-16T04:54:02.210Z"
}
}The query values are real: ids is an id from this brand's own catalogue. Calling it without them returns 400, which is correct and is not what this endpoint does.
Response codes
200The comparison.object401The key does not match any active key.erroranyTwo shapes exist across this API and that is deliberate rather than untidy. Each route kept the error shape it already used, so an existing client's error handling keeps working. See x-cresva-error-shapes.403The key is valid but belongs to a different brand than the one in the path. Keys are scoped to one brand and do not travel.erroranyTwo shapes exist across this API and that is deliberate rather than untidy. Each route kept the error shape it already used, so an existing client's error handling keeps working. See x-cresva-error-shapes.404No such brand.erroranyTwo shapes exist across this API and that is deliberate rather than untidy. Each route kept the error shape it already used, so an existing client's error handling keeps working. See x-cresva-error-shapes.429Over the rate limit.erroranyTwo shapes exist across this API and that is deliberate rather than untidy. Each route kept the error shape it already used, so an existing client's error handling keeps working. See x-cresva-error-shapes.503The rate limiter could not be reached, so the request was refused rather than served unmetered. Deliberately not a 429: the caller has done nothing wrong and the fault is ours.erroranyTwo shapes exist across this API and that is deliberate rather than untidy. Each route kept the error shape it already used, so an existing client's error handling keeps working. See x-cresva-error-shapes.Generated from the storefront OpenAPI document at growthagents 269d7898b, sha256 047fe4d301258100. Nothing on this page was typed by hand.