Attach products to a category

POST https://api.tamio.com/v2/categories/products/attach/{uuid}

Attaches one or more products to a category. Products are identified by their UUIDs and must be unique within the request. Up to 100 products can be attached per request.

Path Parameters

uuid string*

UUID of the category to attach products to.

Body Parameters

products array of string*

Array of product UUIDs to attach. Must contain unique values.

Example
{
  "products": [
    "d4e5f6a1-b2c3-7890-abcd-ef1234567890"
  ]
}

Responses

200 Products attached successfully

Products attached successfully

status integer
category Category
400 Validation or business logic error. Returned when:
401 Unauthorized – invalid or missing Bearer token
/categories/products/attach/{uuid}
1const response = await fetch("https://api.tamio.com/v2/categories/products/attach/{uuid}", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 // ... request body
9 })
10});
11const data = await response.json();
Responses
{
  "status": 200,
  "category": {
    "id": "c3d4e5f6-a1b2-7890-cdef-1234567890ab",
    "parent_id": "string",
    "slug": "electronics",
    "icon": "string",
    "status": true,
    "object": "category",
    "integer_id": 42,
    "name": "Electronics",
    "created_at": 1709500800,
    "asset_id": "string",
    "children": [],
    "config": {},
    "number_of_subcategories": 3,
    "number_of_products": 50,
    "number_of_sites": 2,
    "path": "string",
    "label_path": "string",
    "image": {}
  }
}