POST /api/v1/categories — Creates a category. 'parent_id' places it in the tree (null or absent = top level). 'order' is its position among its siblings.

API
POST/api/v1/categories

Crear una categoría

Requiere token Bearer

Crea una categoría. 'parent_id' la ubica dentro del árbol (null o ausente = primer nivel). 'order' es la posición entre sus hermanas.

Solicitud

json
{
  "name": "Remeras",
  "parent_id": "101",
  "order": 0,
  "hidden": false
}

Respuesta

json
// 201 — la categoría creada

Código

bash
curl -X POST 'https://tu-tienda.com/api/v1/categories' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "Remeras", "parent_id": "101", "order": 0, "hidden": false }'

Probá el endpoint

https://tu-tienda.com/api/v1/categories
Necesitás un token para probar los endpoints. Generalo desde Configuración → ERP → API Token.