The category object
{
"id": "0199ed2a-…",
"parentId": "0199ed29-…",
"title": "Camisas",
"slug": "camisas",
"description": null,
"status": "active",
"visibility": "visible",
"createdAt": "2026-10-12T15:04:05.000Z",
"updatedAt": "2026-10-12T15:04:05.000Z"
}| Field | |
|---|---|
parentId |
null for a root category. |
status |
draft, active or archived. |
visibility |
visible or hidden in the storefront. |
GET/categories
| Query | |
|---|---|
parentId |
Only the children of this category. |
q |
Title search. |
limit |
1–100, default 10. |
cursor |
From the previous page. |
const { data: roots } = await malla.categories.list()
const { data: children } = await malla.categories.list({ parentId: roots[0].id })GET/categories/:id
Returns one category.
POST/categories
title and slug are required. Optional: description, parentId, status, visibility, photoKey. Answers 201.
const shirts = await malla.categories.create({ title: 'Camisas', slug: 'camisas', parentId: clothingId })PATCH/categories/:id
Same fields. parentId: null moves it to the root; photoKey: null removes its photo. A category can't become its own descendant (409 circular_parent).
DELETE/categories/:id
Deletes the category.
POST/categories/:id/products/:productId
Puts the product in this category, replacing its previous one.
await malla.categories.assignProduct(categoryId, productId)DELETE/categories/:id/products/:productId
Takes the product out of the category.