Skip to content
Bloomcount API
Esc
navigateopen⌘Jpreview

Create a category

Adds a label products can be filed under. name is the join key a product write uses.

Errors

  • 422 category_name_required — no name, or a blank one.
  • 409 category_name_taken — that label already exists on the tenant.
POST/api/v1/categories
Authorization
AuthorizationBearer token (bloomcount_...) · headerrequired
Request body
requiredapplication/json
namestring
colorstring
#RRGGBB, case-insensitive.
Responses
201Created
categoryIdstringrequired
namestringrequired
The label a product's category is matched against.
colorstringrequired
isPresetbooleanrequired
Preset categories ship with the account and can't be deleted.
401Missing or invalid API key, or revoked / expired.
errorstringrequired
403Authenticated, but the key lacks the required scope or the tenant has no API access.
errorstringrequired
409The request is well formed, but it conflicts with the current state: a name already taken, a row the app protects (the hidden Default supplier, a preset colour or category), or a staff member who has an account.
errorstringrequired
422Request body or arguments failed validation.
errorstringrequired
429Per-minute rate limit (60/min) or per-month cap exceeded.
errorstringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST "https://app.bloomcount.com/api/v1/categories" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Foliage"
}'
Response
{
  "categoryId": "cat_n3q8w5y0m2k7r4t9v1x6z3b8",
  "name": "Foliage",
  "color": null,
  "isPreset": false
}