Get products by section
GEThttps://api.staging.powerapi.com/api/v2/catalog/sections/products
Returns products grouped by their section
Queries can use the slugs instead of the IDs.
When searching by category slug, you must provide the business_id
.
Request
Query Parameters
Limit results to a specific business
Filter sections by a specific category
Filter sections and products by a menu
Filter products on whether they are available
Responses
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- application/json
- Schema
- Example (auto)
Schema
- Array [
- ]
Unique ID of the section
Possible values: >= 12 characters
and <= 12 characters
, Value must match regular expression ^[0-9a-z]+$
u7m4f8ep5nfi
Name of the section
Possible values: non-empty
Pizza
Slug of the section
Possible values: non-empty
pizza
Used to order the item, order defaults to ascending.
0
1
products object[]required
[
{
"id": "u7m4f8ep5nfi",
"name": "Pizza",
"slug": "pizza",
"order": 1,
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z",
"products": [
{
"id": "bk8h0y2r68ke",
"category_id": "5m4v972ra9ue",
"section_id": "u7m4f8ep5nfi",
"name": "Pizza",
"slug": "pizza",
"description": "A delicious pizza",
"sku": "123456",
"ref_code": "123456",
"photo_url": "https://example.com/photo.jpg",
"price": "12.5",
"available": true,
"order": 1,
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
}
]
}
]
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Error name
Not Found
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Error name
Not Found
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Error name
Not Found
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Error name
Not Found
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Where in the request the error occurred
Possible values: [query
, body
, response
, param
]
errors object[]required
{
"statusCode": 404,
"message": "Cannot find item",
"location": "query",
"errors": [
{
"path": "business.id",
"constraints": {
"object_required_property": "Required property"
}
}
]
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Error name
Not Found
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
Authorization: http
name: bearertype: httpscheme: bearerbearerFormat: JWT
- curl
- python
- go
- nodejs
- ruby
- java
- powershell
- CURL
curl -L 'https://api.staging.powerapi.com/api/v2/catalog/sections/products' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'