Wocart
Wocart API

Product Groups

Server

List product groups

GET
https://api.wocart.store
/api/product-groups
X-API-Key (header)

Get all product categories/groups, ordered by position. Each item includes productsCount (active, non-deleted products).

List product groups › query Parameters

search
​string

Search by name

Search by name

parentId
​string

Filter to direct sub-categories of this parent group ID

Filter to direct sub-categories of this parent group ID

List product groups › Responses

200

List of product groups

success
​boolean · required
​ProductCategory[] · required
count
​integer · required

Number of items returned


Create product group

POST
https://api.wocart.store
/api/product-groups
X-API-Key (header)

Create a new product category/group. Provide parentId to create a sub-category; slug is auto-generated from name when omitted.

Create product group › Request Body

name
​string · minLength: 1 · required
slug
​string · pattern: ^[a-z0-9]+(?:-[a-z0-…

Auto-generated from name with a unique suffix when omitted

description
​string | null
parentId
​string | null

Parent group ID to nest under; null/omitted for top-level

imageKey
​string | null · minLength: 1 · maxLength: 512

The image's Media Key, from a completed upload (POST /api/media/uploads)

metaTitle
​string | null · maxLength: 60
metaDescription
​string | null · maxLength: 160
metaKeywords
​string | null
position
​integer · min: 0
Default: 0

Create product group › Responses

Group created

success
​boolean · required
​ProductCategory · required

Product category/collection group in the catalog hierarchy


Get product group

GET
https://api.wocart.store
/api/product-groups/{id}
X-API-Key (header)

Returns the group with its immediate children (sub-categories) and productsCount.

Get product group › path Parameters

id
​string · required

Product group ID

Product group ID

Get product group › Responses

200

Group details with children and product count

success
​boolean · required
​ProductCategory · required

Product category/collection group in the catalog hierarchy


Update product group

PATCH
https://api.wocart.store
/api/product-groups/{id}
X-API-Key (header)

Partial update — only include fields you want to change. Set parentId to null to move a group to the top level; set SEO fields to null to clear them.

Update product group › path Parameters

id
​string · required

Product group ID

Product group ID

Update product group › Request Body

name
​string · minLength: 1
slug
​string · pattern: ^[a-z0-9]+(?:-[a-z0-…

Auto-generated from name with a unique suffix when omitted

description
​string | null
parentId
​string | null

Parent group ID to nest under; null/omitted for top-level

imageKey
​string | null · minLength: 1 · maxLength: 512

The image's Media Key, from a completed upload (POST /api/media/uploads)

metaTitle
​string | null · maxLength: 60
metaDescription
​string | null · maxLength: 160
metaKeywords
​string | null
position
​integer · min: 0

Update product group › Responses

200

Group updated

success
​boolean · required
​ProductCategory · required

Product category/collection group in the catalog hierarchy


Delete product group

DELETE
https://api.wocart.store
/api/product-groups/{id}
X-API-Key (header)

Permanently deletes a product group. Blocked while the group still has active products — reassign or remove those products first.

Delete product group › path Parameters

id
​string · required

Product group ID

Product group ID

Delete product group › Responses

Group deleted

success
​boolean · required

Get a category's translations

GET
https://api.wocart.store
/api/product-groups/{id}/translations
X-API-Key (header)

The translatable fields in the store's primary language and every stored translation, each flagged outdated when its source text changed after it was written.

Get a category's translations › path Parameters

id
​string · required

Get a category's translations › Responses

200

Source and translations

success
​boolean · required
​object · required

Translate a category into one language

PATCH
https://api.wocart.store
/api/product-groups/{id}/translations
X-API-Key (header)

A JSON Merge Patch (RFC 7396) of one language: a string sets a field, null removes its translation, other fields are untouched. The language must be one the store has added, and not its primary — the resource's own fields hold that.

Translate a category into one language › path Parameters

id
​string · required

Translate a category into one language › Request Body

locale
​string · enum · required
Enum values:
ar
fr
en
​object · required

Translate a category into one language › Responses

200

Source and translations after the patch

success
​boolean · required
​object · required