Fetch Products
Retrieve a list of products from your store.
Endpoint
GET /api/products/searchQuery Parameters
| Name | Type | Description |
|---|---|---|
| page | int | Page number (optional) |
| limit | int | Items per page (optional) |
| search | string | Search by name, slug, etc. |
Response
json
{
"results": [
{
"_id": "string",
"storeId": "string",
"user": {
"_id": "string",
"firstname": "string",
"lastname": "string",
"whoIs": "admin"
},
"name": "string",
"slug": "string",
"reference": "string",
"description": "string",
"model": "string",
"html": "<p></p>",
"source": "owner",
"bookingProps": { /* see bookingProps schema */ },
"digitalConfig": { /* see digitalConfig schema */ },
"affiliateId": "string",
"productType": "PHYSICAL",
"type": "simple",
"tags": ["string"],
"parent": {
"_id": "string",
"name": "string"
},
"seo": {
"title": "string",
"description": "string",
"hide": false,
"googleCategory": "string",
"keywords": ["string"]
},
"status": "DRAFT",
"collections": [
{
"_id": "string",
"name": "string",
"slug": "string"
}
],
"price": {
"buyingPrice": 0,
"salePrice": 0,
"comparePrice": 0
},
"quantity": {
"instock": 10000,
"transporting": 0,
"unit": "",
"increment": 1,
"default": 1,
"min": 1,
"max": 100
},
"outStock": {
"hide": false,
"disabled": true
},
"sizes": {
"weight": { "value": 0, "unit": "kg" },
"volume": { "value": 0, "unit": "ml" },
"dimensions": { "width": 0, "height": 0, "depth": 0, "unit": "cm" }
},
"supplier": { "_id": "string", "name": "string" },
"brand": { "_id": "string", "name": "string", "slug": "string" },
"shipping": {
"active": false,
"price": 0,
"zones": ["string"]
},
"images": [
{
"_id": "string",
"src": "string",
"title": "string",
"width": 0,
"height": 0
}
],
"files": [ /* ... */ ],
"options": [
{
"_id": "string",
"name": "string",
"key": "string",
"style": "LIST",
"position": 0,
"values": [
{
"_id": "string",
"value1": "string",
"value2": "string",
"value3": "string"
}
]
}
],
"variants": [
{
"_id": "string",
"unavailable": false,
"name": "string",
"option1": { "option": "string", "value": "string" },
"option2": { "option": "string", "value": "string" },
"option3": { "option": "string", "value": "string" },
"price": { "buyingPrice": 0, "salePrice": 0, "comparePrice": 0 },
"quantity": { "instock": 10000, "transporting": 0, "pack": 0 },
"sizes": {
"weight": { "value": 0, "unite": "kg" },
"volume": { "value": 0, "unite": "ml" },
"dimensions": { "width": 0, "height": 0, "depth": 0, "unite": "cm" }
},
"imageId": "string",
"fileId": "string",
"translates": [ /* see translates schema */ ]
}
],
"translates": [
{
"language": "en",
"properties": [
{ "name": "title", "value": "Product Title" }
]
}
],
"currencies": [
{
"currency": "USD",
"properties": [
{ "name": "price", "value": 20 }
]
}
],
"review": {
"reviews": ["string"],
"rating": 0
},
"createdAt": "2024-01-01T00:00:00.000Z"
}
],
"paginate": {
"total": 1,
"per_page": 20,
"current_page": 1,
"last_page": 1
}
}