Product category
Returns a paginated list of product categories.
productCategories
Returns a paginated list of product categories.
Method
POST
Path
/graphql
Authentication
Bearer Token
Request Body Schema
Content-type: application/json
Variables
| Name | Type | Required | Description |
|---|---|---|---|
first | Int | Optional | Items per page. Default: 15 |
page | Int | Optional | Page number. Default: 1 |
Example Payload
{
"query": "query ($first: Int, $page: Int) { productCategories(first: $first, page: $page) { data { id name base_price description custom_fields created_at updated_at } paginatorInfo { currentPage lastPage total } } }",
"variables": {
"first": 10,
"page": 1
}
}
Response
Returns a paginated list of ProductCategory objects.
Example Response
{
"data": {
"productCategories": {
"data": [
{
"id": "01JNQX4KZB7WNVR3MPXT6A0DYE",
"name": "Sensors",
"base_price": 50.0,
"description": "Industrial sensor products",
"custom_fields": null,
"created_at": "2026-02-01 09:00:00",
"updated_at": "2026-02-01 09:00:00"
}
],
"paginatorInfo": {
"currentPage": 1,
"lastPage": 2,
"total": 18
}
}
}
}
Errors
Example Response
{
"errors": [
{
"message": "Unauthenticated."
}
]
}
Method
POSTPath
/graphqlAuthentication
Bearer TokenRequest Body Schema
Content-type: application/json
| Name | Type | Required | Description |
|---|---|---|---|
| firstName | string | Required | First name of user |
| lastName | string | Required | Last name of user |
| role | string | Required | Enum: manager, admin, regular |
Example Payload
{
"id": "u123",
"firstName": "John".
"lastName": "Doe",
"createadAt": "2026-02-26"
}Response
Returns the newly created user object
Example Response
{
"id": "u123",
"firstName": "John".
"lastName": "Doe",
"createadAt": "2026-02-26"
}Errors
- Unauthorized
- Invalid Request
Example Response
{
"status": "Error"
"message": "Unauthorized".
"httpStatus": 400
}