curl -X POST "https://ecommerce.jelou.ai/api/v2/apps/{app_id}/batch/categories/upsert" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"resources": [
{
"name": "Pizzas",
"description": "All our artisan pizzas",
"image": "https://example.com/images/pizzas.jpg",
"order": 1,
"status": true,
"branch": "BRANCH-DOWNTOWN"
},
{
"name": "Beverages",
"description": "Hot and cold beverages",
"order": 2,
"branch": "BRANCH-DOWNTOWN"
},
{
"name": "Desserts",
"order": 3
}
]
}'
{
"message": "Batch upsert process initiated successfully",
"count": 3,
"jobs": 1
}
Create or update categories in bulk. If a category with the same name already exists, it is updated.
curl -X POST "https://ecommerce.jelou.ai/api/v2/apps/{app_id}/batch/categories/upsert" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"resources": [
{
"name": "Pizzas",
"description": "All our artisan pizzas",
"image": "https://example.com/images/pizzas.jpg",
"order": 1,
"status": true,
"branch": "BRANCH-DOWNTOWN"
},
{
"name": "Beverages",
"description": "Hot and cold beverages",
"order": 2,
"branch": "BRANCH-DOWNTOWN"
},
{
"name": "Desserts",
"order": 3
}
]
}'
{
"message": "Batch upsert process initiated successfully",
"count": 3,
"jobs": 1
}
Show Category fields
curl -X POST "https://ecommerce.jelou.ai/api/v2/apps/{app_id}/batch/categories/upsert" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"resources": [
{
"name": "Pizzas",
"description": "All our artisan pizzas",
"image": "https://example.com/images/pizzas.jpg",
"order": 1,
"status": true,
"branch": "BRANCH-DOWNTOWN"
},
{
"name": "Beverages",
"description": "Hot and cold beverages",
"order": 2,
"branch": "BRANCH-DOWNTOWN"
},
{
"name": "Desserts",
"order": 3
}
]
}'
{
"message": "Batch upsert process initiated successfully",
"count": 3,
"jobs": 1
}
Asynchronous processing
202 Accepted immediately. Categories are processed in the background.Upsert by name
name within the same store and branch. If one with that name already exists, it is updated instead of creating a new one.Non-existent branch
Images
Common error messages
| Field | Message |
|---|---|
resources | The resources field is required. |
resources | At least one category is required. |
resources | Cannot process more than 500 categories at once. |
resources.*.name | Each category must have a name. |
resources.*.image | Category image must be a valid URL. |
resources.*.order | Category order must be an integer. / Category order cannot be negative. |
resources.*.status | Category status must be a boolean. |
{app_id} with your store ID and <API_KEY> with the token provided by Jelou.Was this page helpful?