Batch merchant search
Changed onSearch for merchants by name (fuzzy) or domain (exact match). Up to 50 queries per request. Each query carries its own query_id that is echoed back so callers can correlate responses. Each result contains an items array with matched merchants. Name queries return up to limit items per result (default 5, max 20). Misses return a single item with id: null — there are no 404s.
Request
- Base URLhttps://api.openstock.sh
- URLhttps://api.openstock.sh/v1/merchants/search
- AuthHTTP bearer
Request body
Example request
{
"queries": [
{
"query_id": "q1",
"type": "name",
"value": "Brooklinen",
"region": "US",
"limit": 5
}
]
}Response
Per-query results. Each result has an items array. A name query with limit > 1 may produce multiple items. Misses have id: null.
Example response
{
"results": [
{
"query_id": "q1",
"items": [
{
"id": "01g4s5d0h956te86ff90h6xts4",
"name": "Brooklinen",
"domains": [
"brooklinen.com"
],
"popularity_rank": 142,
"estimated_shipping": {
"unit": "days",
"median": 6,
"q1": 3,
"q3": 10,
"basis": "measured_delivery",
"sample_size": 1240
}
}
]
}
]
}Changes
- info
api operation id
searchMerchantswas added - info
removed the non-success response with the status
- info
added the required property
/////to the response with the status - info
added the required property
/////to the response with the status - info
added the required property
////to the response with the status
- info