> For the complete documentation index, see [llms.txt](https://moota.gitbook.io/technical-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://moota.gitbook.io/technical-docs/mutation/tagging.md).

# Tagging

Tagging for labeled mutation or splited mutation by tagging. you can manage all tagging here...

## Create Tagging

The table given below describes the `/api/v2/tagging`.

## Create&#x20;

<mark style="color:green;">`POST`</mark> `https://app.moota.co/api/v2/tagging`

#### Request Body

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| name | string | Name of tagging value |

{% tabs %}
{% tab title="200 " %}

```
{
  "tagging": {
    "name": "cash",
    "tag_id": "vZExj7Bz59G"
  }
}
```

{% endtab %}

{% tab title="422 " %}

```
{
  "message": "The given data was invalid.",
  "errors": {
    "name": [
      "Kolom name harus diisi."
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## Update Tagging

The table given below describes the `/api/v2/tagging/{tag_id}`. Use this API to update an existing beneficiary identified by its `tag_id`.

## Update

<mark style="color:orange;">`PUT`</mark> `https://app.moota.co/api/v2/tagging/{tag_id}`

#### Path Parameters

| Name    | Type   | Description                     |
| ------- | ------ | ------------------------------- |
| tag\_id | string | Tag Id of identified by tagging |

#### Request Body

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| name | string | Name of tagging value |

{% tabs %}
{% tab title="200 " %}

```
{
  "message": "Tag berhasil diupdate"
}
```

{% endtab %}

{% tab title="422 " %}

```
{
  "message": "The given data was invalid.",
  "errors": {
    "name": [
      "Kolom name harus diisi."
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## Get Taggings

The table given below describes the `/api/v2/tagging`.

## Fetch

<mark style="color:blue;">`GET`</mark> `https://app.moota.co/api/v2/tagging`

#### Query Parameters

| Name | Type   | Description                |
| ---- | ------ | -------------------------- |
| tag  | string | Name of filter tag by name |

{% tabs %}
{% tab title="200 " %}

```
{
  "error": false,
  "tagging": [
    {
      "name": "assurance",
      "tag_id": "e42qjy2WGE5"
    },
    {
      "name": "assurance-car",
      "tag_id": "M1Z6zK0jJDY"
    },
  ]
}
```

{% endtab %}
{% endtabs %}

## Remove Tagging

The table given below describes the `/api/v2/tagging/{tag_id}`.

## Remove

<mark style="color:red;">`DELETE`</mark> `https://app.moota.co/api/v2/tagging/{tag_id}`

#### Path Parameters

| Name    | Type   | Description                              |
| ------- | ------ | ---------------------------------------- |
| tag\_id | string | Tag Id of identified tagging can destroy |

{% tabs %}
{% tab title="200 " %}

```
{
  "message": "OK"
}
```

{% endtab %}

{% tab title="404 " %}

```
{
  "message": "Data not found"
}
```

{% endtab %}
{% endtabs %}
