# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://w3block.gitbook.io/w3block-eng/dev-docs/api/commerce-api-services/company-administration/tags-admin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
