Skip to content
cresvaDevelopers

Related products for one product

GET/api/storefront/{brandId}/recommend
No keyCallable anonymously. Rate limited by IP.10 requests a minute

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.
product_idstring · queryThe product to recommend against.
typestring · querysimilar_to by default.
limitinteger, default 5 · queryMaximum cards.

Request

bash
BRAND_ID=cmqmr1f6j0003la04nu93f4k4
curl "https://cresva.ai/api/storefront/$BRAND_ID/recommend"

Response

Captured from production on 2026-09-16: 200 in 748ms, X-OSP-Version: 2026-03-01. This is what the endpoint returned, not an example of what it might.

JSON
{
  "source_product": "cmtpqwhit001ajv04e1vvv5j6",
  "recommendation_type": "similar_to",
  "products": [],
  "meta": {
    "total": 0,
    "page": 1,
    "authority_score": null,
    "response_time_ms": 8,
    "data_freshness": "2026-09-16T04:54:09.986Z"
  }
}

The query values are real: product_id 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

200Related product cards.
productsarray of object
idstringrequired
titlestringrequired
summarystring
priceobjectrequired
availabilitystring, one of in_stock, low_stock, out_of_stock, preorderrequired
ratingobject or nullNull when the product has no ratings. Never 0.
attributesobject
purchase_urlstring or null, uri
imagesarray of string
metaobject
totalinteger
pageinteger
authority_scorenumber or null
response_time_msinteger
data_freshnessstring, date-time
401The 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.