# Product

> Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter.

## Create product

`POST /shops/{SHOP_ID}/products`

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Request body

Request body containing product information to create

- `product` (Product, required): 
  - `measure_group_id` (integer): Measure group ID
  - `name` (string, required): Product name
  - `type` (string): Product type. `product`: Product (default). `accessory`: Accessory, comes with orders, has no retail price (retail price is reset to 0) and is not counted in sold quantity reports. `service`: Service, inventory is not managed. `LOT`: Product with expiry date, inventory is managed by lot and a lot must be chosen when importing or exporting stock (requires the shop to enable lot management). Values: `product`, `accessory`, `service`, `LOT`.
  - `category_ids` (integer[]): Category IDs
  - `note` (string): Internal note
  - `note_product` (string): Product note
  - `product_attributes` (object[]): Product attributes
  - `tags` (integer[]): Product tags
  - `weight` (integer, required): Product weight
  - `custom_id` (string): Product custom ID
  - `is_published` (boolean): Store cake status
  - `variations` (Variation[]): Product variations
  - `bonus_products` (object[]): Bonus products
  - `materials` (integer[]): Material IDs
  - `keyword` (string): Keyword
  - `brand_id` (string (uuid)): Brand ID

```json
{
  "product": {
    "name": "Ao so mi nam",
    "type": "product",
    "category_ids": [
      1290021044,
      201250699
    ],
    "note_product": "Ghi chú sản phẩm",
    "product_attributes": [
      {
        "name": "Màu",
        "values": [
          "Đen",
          "Trắng",
          "Đỏ"
        ]
      },
      {
        "name": "Size",
        "values": [
          "S",
          "M",
          "L"
        ]
      }
    ],
    "tags": [
      193,
      51
    ],
    "variations": [
      {
        "fields": [
          {
            "name": "Màu",
            "value": "Trắng"
          },
          {
            "name": "Size",
            "value": "M"
          }
        ],
        "images": [
          "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
        ],
        "last_imported_price": 30000,
        "retail_price": 140000,
        "price_at_counter": 123000,
        "retail_price_by_currency": [
          {
            "currency": "VND",
            "retailPriceByCurrency": 140000
          },
          {
            "currency": "USD",
            "retailPriceByCurrency": 6
          }
        ],
        "weight": 0,
        "barcode": "BARCODE123",
        "custom_id": "VCUSTOMID",
        "is_hidden": false,
        "variations_warehouses": [
          {
            "remain_quantity": 10,
            "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da",
            "batch_position": "lô 1",
            "shelf_position": "1.2"
          }
        ],
        "wholesale_price2": [
          {
            "levelProduct": "1",
            "wholesalePrices": "100000"
          },
          {
            "levelProduct": "2",
            "wholesalePrices": "200000"
          }
        ]
      }
    ],
    "weight": 1,
    "custom_id": "PCUSTOMID",
    "is_published": true,
    "materials": [
      182,
      193
    ],
    "bonus_products": [
      {
        "quantity": 1,
        "variation_id": "61fb5d14-107d-4b78-908d-8dc04f59d2d6",
        "price_original": 11000,
        "images": [
          "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
        ],
        "variation_info": {
          "id": "1",
          "measure_group_id": "2220",
          "measure_info": {
            "exchange_value": 100000,
            "measure_id": 2252
          },
          "name": "Combo 10 cây giống Cải nhún",
          "product_id": "RAL10.2675",
          "weight": 1000
        }
      }
    ],
    "keyword": "vai|cao cấp",
    "brand_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da"
  }
}
```

### Responses

- `200` Success (object)

```json
{
  "success": true
}
```

## Update product information

`PUT /shops/{SHOP_ID}/products/{PRODUCT_ID}`

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |
| `PRODUCT_ID` | path | string | yes | Product ID |

### Request body

Request body containing product information to update

- `product` (Product, required): 
  - `measure_group_id` (integer): Measure group ID
  - `name` (string, required): Product name
  - `type` (string): Product type. `product`: Product (default). `accessory`: Accessory, comes with orders, has no retail price (retail price is reset to 0) and is not counted in sold quantity reports. `service`: Service, inventory is not managed. `LOT`: Product with expiry date, inventory is managed by lot and a lot must be chosen when importing or exporting stock (requires the shop to enable lot management). Values: `product`, `accessory`, `service`, `LOT`.
  - `category_ids` (integer[]): Category IDs
  - `note` (string): Internal note
  - `note_product` (string): Product note
  - `product_attributes` (object[]): Product attributes
  - `tags` (integer[]): Product tags
  - `weight` (integer, required): Product weight
  - `custom_id` (string): Product custom ID
  - `is_published` (boolean): Store cake status
  - `variations` (Variation[]): Product variations
  - `bonus_products` (object[]): Bonus products
  - `materials` (integer[]): Material IDs
  - `keyword` (string): Keyword
  - `brand_id` (string (uuid)): Brand ID

```json
{
  "product": {
    "name": "Ao so mi nam",
    "type": "product",
    "category_ids": [
      1290021044,
      201250699
    ],
    "note_product": "Ghi chú sản phẩm",
    "product_attributes": [
      {
        "name": "Màu",
        "values": [
          "Đen",
          "Trắng",
          "Đỏ"
        ]
      },
      {
        "name": "Size",
        "values": [
          "S",
          "M",
          "L"
        ]
      }
    ],
    "variations": [
      {
        "id": "3c3aca82-030e-4708-a75b-b2eaf538a2f5",
        "fields": [
          {
            "name": "Màu",
            "value": "Trắng"
          },
          {
            "name": "Size",
            "value": "M"
          }
        ],
        "images": [],
        "last_imported_price": 30000,
        "retail_price": 140000,
        "price_at_counter": 123000,
        "retail_price_by_currency": [
          {
            "currency": "VND",
            "retailPriceByCurrency": 140000
          },
          {
            "currency": "USD",
            "retailPriceByCurrency": 6
          }
        ],
        "weight": 0,
        "barcode": "BARCODE123",
        "custom_id": "VCUSTOMID",
        "is_hidden": false,
        "variations_warehouses": [
          {
            "remain_quantity": 10,
            "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da",
            "batch_position": "lô 1",
            "shelf_position": "1.2"
          }
        ],
        "wholesale_price2": [
          {
            "levelProduct": "1",
            "wholesalePrices": "100000"
          },
          {
            "levelProduct": "2",
            "wholesalePrices": "200000"
          }
        ]
      },
      {
        "fields": [
          {
            "name": "Màu",
            "value": "Đỏ"
          },
          {
            "name": "Size",
            "value": "L"
          }
        ],
        "images": [
          "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
        ],
        "last_imported_price": 30000,
        "retail_price": 140000,
        "price_at_counter": 123000,
        "retail_price_by_currency": [
          {
            "currency": "VND",
            "retailPriceByCurrency": 140000
          },
          {
            "currency": "USD",
            "retailPriceByCurrency": 6
          }
        ],
        "weight": 0,
        "barcode": "BARCODE123",
        "custom_id": "VCUSTOMID2",
        "is_hidden": false,
        "variations_warehouses": [
          {
            "remain_quantity": 10,
            "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da",
            "batch_position": "lô 1",
            "shelf_position": "1.2"
          }
        ],
        "wholesale_price2": [
          {
            "levelProduct": "1",
            "wholesalePrices": "100000"
          },
          {
            "levelProduct": "2",
            "wholesalePrices": "200000"
          }
        ]
      }
    ],
    "weight": 1,
    "custom_id": "PCUSTOMID",
    "is_published": true,
    "tags": [
      193,
      51
    ],
    "materials": [
      182,
      193
    ],
    "bonus_products": [
      {
        "quantity": 1,
        "variation_id": "61fb5d14-107d-4b78-908d-8dc04f59d2d6",
        "price_original": 11000,
        "images": [
          "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
        ],
        "variation_info": {
          "id": "1",
          "measure_group_id": "2220",
          "measure_info": {
            "exchange_value": 100000,
            "measure_id": 2252
          },
          "name": "Combo 10 cây giống Cải nhún",
          "product_id": "RAL10.2675",
          "weight": 1000
        }
      }
    ],
    "keyword": "vai|cao cấp"
  }
}
```

### Responses

- `200` Success (object)

```json
{
  "success": true
}
```

## Update inventory

`POST /shops/{SHOP_ID}/variations/{VARIATION_ID}/update_quantity`

Update inventory quantity for a variation

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |
| `VARIATION_ID` | path | string | yes | Variation ID |

### Request body

Request body containing inventory update information for a variation

- `variations_warehouses` (object[], required): Warehouse info
  - `remain_quantity` (integer, required): Remain quantity
  - `warehouse_id` (string, required): Warehouse ID

```json
{
  "variations_warehouses": [
    {
      "remain_quantity": 20,
      "warehouse_id": "a41b5d73-9236-4a5d-9954-4db6d93242d1"
    },
    {
      "remain_quantity": 20,
      "warehouse_id": "a41b5d73-9236-4a5d-9954-4db6d93242d4"
    },
    {
      "remain_quantity": 20,
      "warehouse_id": "a41b5d73-9236-4a5d-9954-4db6d93242d5"
    }
  ]
}
```

### Responses

- `200` Success (object)

```json
{
  "success": true
}
```

## Updated inventory of many variations

`POST /shops/{SHOP_ID}/variations/update_quantity`

Update inventory quantity for multiple variations

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Request body

Request body containing inventory update information for multiple variations

- `is_actual_remain_quantity` (boolean): true: Update inventory, false: Update sellable quantity
- `variations_warehouses` (object[], required): Variations warehouses information
  - `variation_id` (string, required): Variation ID
  - `remain_quantity` (integer, required): Remain quantity
  - `warehouse_id` (string, required): Warehouse ID

```json
{
  "is_actual_remain_quantity": true,
  "variations_warehouses": [
    {
      "variation_id": "20e7d183-c70c-445e-8ce2-4d7e3a378e34",
      "remain_quantity": 15,
      "warehouse_id": "229102e4-39c3-4523-bd57-4ed0a45a85ba"
    },
    {
      "variation_id": "5f0cfb8d-aee9-4ec0-9ff0-b5668d3143d2",
      "remain_quantity": 15,
      "warehouse_id": "24c4447e-c35f-4acc-affa-70e49eb354d1"
    }
  ]
}
```

### Responses

- `200` Success (object)

```json
{
  "success": true
}
```

## Update composite product

`POST /shops/{SHOP_ID}/variations/update_composite_product`

Update composite product information

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Request body

Request body containing composite product update information

- `variation_id` (string, required): Variation ID
- `composite_products` (object[], required): Composite products
  - `quantity` (integer, required): Composite quantity
  - `component_id` (string, required): Composite variation ID

```json
{
  "variation_id": "79aecce9-3b1e-4ad3-afe1-2ee658720687",
  "composite_products": [
    {
      "quantity": 1,
      "component_id": "67b19856-3226-457e-a746-df26e4ec1360"
    }
  ]
}
```

### Responses

- `200` Success (object)

```json
{
  "success": true
}
```

## Product list

`GET /shops/{SHOP_ID}/products/variations`

Get list of products and variations, including per-warehouse stock, selling speed (for low-stock detection), and suppliers.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |
| `page_size` | query | integer |  | Page size |
| `page_number` | query | integer |  | Page number |
| `search` | query | string |  | Search keyword |
| `selling_status` | query | string |  | Selling speed Values: `none` Testing, `bad` Sell slow, `normal` Normal, `star` Sell fast. |
| `product_status` | query | string |  | Product status Values: `locked` Deactive, `not_locked` Active. |
| `category_id[]` | query | integer[] |  | Category IDs |
| `is_filter_categories_by_or` | query | boolean |  | Filter category by "or" condition |
| `filter_exclude_categories` | query | boolean |  | Filter exclude category |
| `warehouse_until` | query | string (date-time) |  | Get inventory information at time |
| `promotion_advance[]` | query | string[] |  | Promotion advance ID |
| `manipulationWarehouse[]` | query | string[] |  | Manipulation warehouse ID |
| `startDate` | query | integer |  | Product creation start time |
| `endDate` | query | integer |  | Product creation end time |
| `start_time_update` | query | integer |  | Product update start time |
| `end_time_update` | query | integer |  | Product update end time |
| `included_composite` | query | string |  | Filter composite products Values: `parent` Product is composed of other products, `children` Composite product for other products, `false` No filter. |
| `variation_ids[]` | query | string[] |  | Filter by variation ID |
| `product_attributes[]` | query | string[] |  | Filter by product attribute |
| `remainQuantity` | query | string |  | Filter variations by **remaining (sellable) quantity** (`remain_quantity`). JSON-encoded object: - `type`: `"greaterOrEqual"` \| `"smallerOrEqual"` \| `"between"` - `value`: threshold for `greaterOrEqual` / `smallerOrEqual` - `minValue`, `maxValue`: range for `between` - `warehouseId`: `"all"` \| a warehouse UUID \| array of UUIDs — restricts which warehouses participate - `isFilterTotal`: `false` (default) compares per-warehouse; `true` compares SUM across the selected warehouses When any quantity filter (`remainQuantity` / `actualQuantity` / `waittingQuantity` / `returningQuantity` / `pendingQuantity` / `totalQuantity`) is set, response variations include a `warehouse_ids` array listing the warehouses that matched. |
| `actualQuantity` | query | string |  | Filter variations by **actual on-hand quantity** (`actual_remain_quantity`). Same JSON shape as `remainQuantity`. |
| `waittingQuantity` | query | string |  | Filter variations by **waiting/pending-to-ship quantity** (`waitting_quantity`). Same JSON shape as `remainQuantity`. (Note: param name keeps the `waitt-` spelling for backward compatibility with existing clients.) |
| `returningQuantity` | query | string |  | Filter variations by **quantity in return process** (`returning_quantity`). Same JSON shape as `remainQuantity`. |
| `pendingQuantity` | query | string |  | Filter variations by **reserved/pending quantity** (`pending_quantity`). Same JSON shape as `remainQuantity`. |
| `totalQuantity` | query | string |  | Filter variations by **total quantity** (`total_quantity`). Same JSON shape as `remainQuantity`. |
| `limit_quantity_to_warn` | query | boolean |  | When `true`, return only products whose remaining stock has reached the per-product warning threshold — i.e. **"running out of stock"**. The threshold is configured per-product (`limit_quantity_to_warn` on Product or Variation, depending on the product's `warning_by_variation` setting). |
| `defectQuantity` | query | boolean |  | When `true`, return only variations that have **damaged/defective stock** (`defect_quantity > 0` in at least one warehouse). |
| `nearly_out` | query | boolean |  | When `true`, return only variations flagged as **nearly out of stock** in at least one warehouse (the precomputed `nearly_out` flag on the warehouse row). Similar to `limit_quantity_to_warn` but reads the stored per-warehouse flag instead of recomputing the threshold at query time. |

### Responses

- `200` Success (object)

```json
{
  "success": true,
  "data": [
    {
      "average_imported_price": 50000,
      "barcode": null,
      "display_id": "ADXL",
      "is_hidden": false,
      "is_locked": false,
      "is_sell_negative_variation": true,
      "fields": [
        {
          "id": "b032c515-3f71-4a1b-8e1d-77721ae72f37",
          "name": "màu",
          "value": "nâu"
        },
        {
          "id": "677c14b5-458f-4af6-8d73-08bcb2245547",
          "name": "size",
          "value": "s"
        }
      ],
      "id": "e190db2b-1163-4cc3-b956-7a9528fbf5ef",
      "images": [
        "https://cf.shopee.vn/file/03e670d02803fcfbb17b2b719762ee17",
        "https://cf.shopee.vn/file/9070bb1b0e6fcc84b46b6e5057544023"
      ],
      "inserted_at": "2024-01-10T14:34:44.000000",
      "last_imported_price": 55000,
      "price_at_counter": 123000,
      "product_id": "3b98a639-9d40-4faa-a692-6662f20e128d",
      "product": {
        "note": "Dễ vỡ",
        "note_product": "Ghi chú sản phẩm",
        "categories": [],
        "display_id": "ADXL",
        "image": "https://content.pancake.vn/user-content-dev2.pancake.vn/2024/11/7/1fdf82943574017240257bf9c88bc70a06a8813a.png",
        "inserted_at": "2024-01-10T14:34:44",
        "measure_group_id": 58,
        "name": "ASOS đen XL",
        "supplier_product_ids": [
          270
        ],
        "tags": [
          {
            "id": 51,
            "note": "the 3"
          },
          {
            "id": 193,
            "note": "thẻ 1"
          }
        ],
        "is_published": true,
        "manipulation_warehouses": [
          "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da"
        ],
        "product_attributes": [
          {
            "name": "Color",
            "values": [
              "black",
              "white"
            ]
          },
          {
            "name": "Size",
            "values": [
              "S",
              "M"
            ]
          }
        ],
        "bonus_products": [
          {
            "quantity": 1,
            "variation_id": "61fb5d14-107d-4b78-908d-8dc04f59d2d6",
            "price_original": 11000,
            "images": [
              "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
            ],
            "variation_info": {
              "id": "1",
              "measure_group_id": "2220",
              "measure_info": {
                "exchange_value": 100000,
                "measure_id": 2252
              },
              "name": "Combo 10 cây giống Cải nhún",
              "product_id": "RAL10.2675",
              "weight": 1000
            }
          }
        ]
      },
      "remain_quantity": 20,
      "retail_price": 140000,
      "retail_price_by_currency": [
        {
          "currency": "VND",
          "retailPriceByCurrency": "140000"
        },
        {
          "currency": "USD",
          "retailPriceByCurrency": "6"
        }
      ],
      "size": {
        "length": 10,
        "width": 10,
        "height": 10
      },
      "total_purchase_price": 4500000,
      "variations_warehouses": [
        {
          "actual_remain_quantity": 100,
          "pending_quantity": 0,
          "remain_quantity": 20,
          "returning_quantity": 0,
          "selling_avg": 0.23,
          "total_quantity": 102,
          "warehouse_id": "a41b5d73-9236-4a5d-9954-4db6d93242d1"
        }
      ],
      "wholesale_price": [],
      "price_table": [
        {
          "id": "a07c-3f7b-2db0-8002-6a88-7d4c-e7c3",
          "name": "Giá bán sỉ",
          "price": 200000
        },
        {
          "id": "2251-43fa-9de5-765f-89ab-7246-c67b",
          "name": "Giá bán lẻ",
          "price": 150000
        }
      ],
      "keyword": "ANPR",
      "updated_at": "2026-03-09T01:45:58.013616"
    }
  ],
  "page_number": 1,
  "page_size": 30,
  "total_entries": 751,
  "total_pages": 26
}
```

## Get product information

`GET /shops/{SHOP_ID}/products/{PRODUCT_SKU}`

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |
| `PRODUCT_SKU` | path | string | yes | Product SKU or ID |

### Responses

- `200` Success (Product)

```json
{
  "measure_group_id": 58,
  "name": "Ao so mi nam",
  "category_ids": [
    1290021044,
    201250699
  ],
  "note": "dễ vỡ",
  "note_product": "Ghi chú sản phẩm",
  "product_attributes": [
    {
      "name": "Color",
      "values": [
        "black",
        "white"
      ]
    },
    {
      "name": "Size",
      "values": [
        "s",
        "m"
      ]
    }
  ],
  "tags": [
    193,
    51
  ],
  "weight": 1,
  "custom_id": "PCUSTOMID",
  "is_published": true,
  "variations": [
    {
      "id": null,
      "fields": [
        {
          "name": "Màu",
          "value": "Trắng"
        },
        {
          "name": "Size",
          "value": "M"
        }
      ],
      "images": [
        "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
      ],
      "last_imported_price": 30000,
      "retail_price": 140000,
      "retail_price_by_currency": [
        {
          "currency": "VND",
          "retailPriceByCurrency": "140000"
        },
        {
          "currency": "USD",
          "retailPriceByCurrency": "6"
        }
      ],
      "price_at_counter": 123000,
      "weight": 0,
      "size": {
        "length": 10,
        "width": 10,
        "height": 10
      },
      "barcode": "BARCODE123",
      "custom_id": "VCUSTOMID",
      "is_hidden": false,
      "variations_warehouses": [
        {
          "remain_quantity": 10,
          "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da",
          "batch_position": "lô 1",
          "shelf_position": "1.2"
        }
      ],
      "is_removed": false,
      "keyword": "VCUSTOMID"
    }
  ],
  "variations_warehouses": [
    {
      "remain_quantity": 10,
      "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da",
      "batch_position": "lô 1",
      "shelf_position": "1.2"
    }
  ],
  "materials": [
    182,
    193
  ],
  "bonus_products": [
    {
      "quantity": 1,
      "variation_id": "61fb5d14-107d-4b78-908d-8dc04f59d2d6",
      "price_original": 11000,
      "images": [
        "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
      ],
      "variation_info": {
        "id": "1",
        "measure_group_id": "2220",
        "measure_info": {
          "exchange_value": 100000,
          "measure_id": 2252
        },
        "name": "Combo 10 cây giống Cải nhún",
        "product_id": "RAL10.2675",
        "weight": 1000
      }
    }
  ],
  "keyword": "vai|cao cấp"
}
```

## Hide product

`PUT /shops/{SHOP_ID}/products/update_hide`

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Request body

Request body containing product hide/show information

- `is_hide` (boolean, required): Hide product
- `product_ids` (string[], required): Product IDs

```json
{
  "is_hide": true,
  "product_ids": [
    "3cbf2227-0205-446e-8c0e-584995f3cb23",
    "36b1e64c-f1f7-4518-afeb-1f9d2edc0f3e"
  ]
}
```

### Responses

- `200` Success (object)

```json
{
  "success": true
}
```

## Product tags

`GET /shops/{SHOP_ID}/tags_products`

Get list of product tags (removed tags are excluded), sorted by index ascending

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Responses

- `200` Success (object)

```json
{
  "success": true,
  "data": [
    {
      "id": 358,
      "index": 0,
      "inserted_at": "2025-07-15T10:38:48",
      "updated_at": "2025-07-15T14:43:16",
      "note": "Hàng dễ vỡ",
      "shop_id": 224
    },
    {
      "id": 359,
      "index": 1,
      "inserted_at": "2025-07-15T11:05:21",
      "updated_at": "2025-07-15T14:43:16",
      "note": "Hàng mới về",
      "shop_id": 224
    }
  ]
}
```

## Create product tag

`POST /shops/{SHOP_ID}/tags_products`

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Request body

Request body containing product tag information to create

- `name` (string, required): Tag name

```json
{
  "name": "Sản phẩm dễ vỡ"
}
```

### Responses

- `200` Success (object)

```json
{
  "success": true,
  "data": {
    "id": 368,
    "index": null,
    "inserted_at": "2025-09-19T10:26:38",
    "note": "Sản phẩm dễ vỡ",
    "shop_id": 20,
    "updated_at": "2025-09-19T10:26:38"
  }
}
```

## Product categories

`GET /shops/{SHOP_ID}/categories`

Get list of product categories

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Responses

- `200` Success (object)

```json
{
  "success": true,
  "data": [
    {
      "id": 865301,
      "nodes": [],
      "text": "AirSense Áo Khoác Siêu Nhẹ"
    },
    {
      "id": 30163,
      "nodes": [
        {
          "id": 30167,
          "nodes": [],
          "text": "Áo Thun"
        },
        {
          "id": 30169,
          "nodes": [
            {
              "id": 865293,
              "nodes": [],
              "text": "Áo Thun In Họa Tiết"
            }
          ],
          "text": "Áo Cardigan"
        },
        {
          "id": 865292,
          "nodes": [],
          "text": "Áo Nỉ & Áo Hoodie"
        }
      ],
      "text": "ÁO"
    }
  ]
}
```

## Create product category

`POST /shops/{SHOP_ID}/categories`

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Request body

Request body containing product category information to create

- `name` (string, required): Category name
- `parent_id` (string): Parent category ID

```json
{
  "name": "Sản phẩm dễ vỡ",
  "parent_id": 30163
}
```

### Responses

- `200` Success (Category)

```json
{
  "success": true,
  "data": {
    "id": 3299,
    "name": "Sản phẩm dễ vỡ"
  }
}
```

## Product brand list

`GET /shops/{SHOP_ID}/brand`

Get list of product brands

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |
| `page` | query | integer |  | Page number |
| `page_size` | query | integer |  | Page size |
| `search` | query | string |  | Search by brand name or brand ID |

### Responses

- `200` Success (object)

```json
{
  "data": [
    {
      "id": "921f6676-4103-4b63-8503-78737fa74d11",
      "name": "Movado",
      "description": "Brand of Viet Nam",
      "inserted_at": "2025-09-05T08:43:54",
      "updated_at": "2025-09-05T08:43:54",
      "shop_id": 2044252,
      "display_id": 170
    }
  ]
}
```

## Product material

`GET /shops/{SHOP_ID}/materials_products`

Get list of product materials

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Responses

- `200` Success (object)

```json
{
  "success": true,
  "data": [
    {
      "description": "cao cấp",
      "id": 180,
      "name": "vai",
      "nodes": [
        {
          "description": "chất liệu bò",
          "id": 181,
          "name": "vải bò",
          "nodes": []
        }
      ]
    }
  ]
}
```

## List of measure groups

`GET /shops/{SHOP_ID}/product_measurements/get_measure`

Get list of measure groups

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Responses

- `200` Success (object)

```json
{
  "success": true,
  "data": [
    {
      "id": 58,
      "name": "Nước hoa 1",
      "nodes": [
        {
          "exchange_value": 30,
          "id": 61,
          "is_default": false,
          "name": "30 ml",
          "parent_id": 58
        }
      ],
      "shop_id": 20
    }
  ]
}
```
