# modifyReceiptAdviceTags mutation


`modifyReceiptAdviceTags` is a GraphQL mutation of the Chameleoon MAX API. Send it as `POST https://max-api.chameleoon.sk/api/v1/graphql` with your API key, see [Chameleoon MAX](/chameleoon-max).

Adds, removes and clears the receipt advice's tags in one call, all or nothing -- as
[`modifySalesOrderTags`](/chameleoon-max/mutation/modify-sales-order-tags) does for an order. Tags and groups are named by their codes, as
[`tags`](/chameleoon-max/query/tags) lists them; tags you name nowhere stay as they are. A tag must be usable on
`RECEIPT_ADVICE`. No sync or import of MAX changes these tags.

#### Permissions

Requires the `advice.read` and `advice.write` permissions.

#### Repeated calls

A call that finds the tags already as requested changes nothing and returns `changed: false`.

#### Errors

- `VALIDATION` with reason `TAG_NOT_FOUND` or `TAG_GROUP_NOT_FOUND`, as in
  [`modifySalesOrderTags`](/chameleoon-max/mutation/modify-sales-order-tags); `VALIDATION` when a tag is not used on this kind of record.
- `NOT_FOUND` when no receipt advice has the id or your API key cannot see it.

## Arguments

- `id`: [`UUID!`](/chameleoon-max/type/uuid) · required
- `input`: [`RecordTagsInput!`](/chameleoon-max/type/record-tags-input) · required

## Returns

[`RecordTagsResult!`](/chameleoon-max/type/record-tags-result)

## Example

**Mutation**

```graphql
mutation modifyReceiptAdviceTags($id: UUID!, $input: RecordTagsInput!) {
  modifyReceiptAdviceTags(id: $id, input: $input) {
    id
    changed
    tags {
      code
      name
      description
      archived
      agendas
      colour
    }
  }
}
```

**Variables**

```json
{
  "id": "00000000-0000-4000-8000-000000000001",
  "input": {}
}
```

**Response**

```json
{
  "data": {
    "modifyReceiptAdviceTags": {
      "id": "00000000-0000-4000-8000-000000000001",
      "changed": true,
      "tags": [
        {
          "code": "example",
          "name": "example",
          "description": "example",
          "archived": true,
          "agendas": [
            "SALES_ORDER"
          ],
          "colour": "SLATE"
        }
      ]
    }
  }
}
```

Values are illustrative: replace IDs and codes with your own before you send the call.
