> For the complete documentation index, see [llms.txt](https://w3block.gitbook.io/w3block-eng/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://w3block.gitbook.io/w3block-eng/dev-docs/api/commerce-api-services/company-administration/tags-admin.md).

# Tags (Admin)

Tags can be used to associate products to some words or categories. A tag can be used to filter products into the e-commerce.

{% hint style="info" %}
*Tags can be created associated to other tags, so you can create a kind of sub-tagging or even a tree of tags and show it into your e-commerce.*
{% endhint %}

<details>

<summary>Tag Model (Example)</summary>

```json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "string",
  "products": [],
  "parentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "parent": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "string",
    "parentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "hide": true
  },
  "hide": true,
  "children": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string",
      "parentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "hide": true
    }
  ]
}
```

</details>

## Service Methods

### Creates a new tag inside a company

Rest API reference:

{% openapi src="<https://commerce.pixway.io/sdk-json>" path="/admin/companies/{companyId}/tags" method="post" %}
<https://commerce.pixway.io/sdk-json>
{% endopenapi %}

### Lists all company tags

Rest API reference:

{% openapi src="<https://commerce.pixway.io/sdk-json>" path="/admin/companies/{companyId}/tags" method="get" %}
<https://commerce.pixway.io/sdk-json>
{% endopenapi %}

### Gets some company tag by id

Rest API reference:

{% openapi src="<https://commerce.pixway.io/sdk-json>" path="/admin/companies/{companyId}/tags/{id}" method="get" %}
<https://commerce.pixway.io/sdk-json>
{% endopenapi %}

### Updates some company tag

Rest API reference:

{% openapi src="<https://commerce.pixway.io/sdk-json>" path="/admin/companies/{companyId}/tags/{id}" method="patch" %}
<https://commerce.pixway.io/sdk-json>
{% endopenapi %}
