> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/query/queries/restrictions/restriction-by-id.md).

# Restriction by ID

Get the information of a restriction by its given ID

Use the `restriction` query to obtain the information of a specific restriction based on its ID.

### Required Argument

| **Argument Name** | **Type** |                                                                                **Description**                                                                               |
| :---------------: | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|        `id`       |    ID    | Unique Id of the restriction. Check [the restriction list](https://docs.suggestic.com/graphql/query/queries/restrictions#restrictions-list) to get a specific restriction ID |

### Available Fields

<table data-header-hidden><thead><tr><th width="202.33333333333331" align="center">Field Name</th><th align="center">Type</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center"><strong>Field Name</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Description</strong></td></tr><tr><td align="center"><code>id</code></td><td align="center">ID</td><td align="center">Id of the restriction</td></tr><tr><td align="center"><code>name</code></td><td align="center">String</td><td align="center">Name of the restriction</td></tr><tr><td align="center"><code>subcategory</code></td><td align="center">String</td><td align="center">Category of the restriction</td></tr><tr><td align="center"><code>slugname</code></td><td align="center">String</td><td align="center">Slug of the restriction</td></tr><tr><td align="center"><code>isOnProgram</code></td><td align="center">Bool</td><td align="center">True if the restriction is part of the user's program</td></tr></tbody></table>

### Example

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

```graphql
{
  restriction(
    id: "UmVzdHJpY3Rpb246ZTZmNzY2MjctOTg3OC00MzRmLTk2YTctYjg0NGE1ODliZmNh"
  ) {
    id
    name
    subcategory
    slugname
    isOnProgram
  }
}

```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "restriction": {
      "id": "UmVzdHJpY3Rpb246ZTZmNzY2MjctOTg3OC00MzRmLTk2YTctYjg0NGE1ODliZmNh",
      "name": "Walnuts",
      "subcategory": "Nuts and Seeds",
      "slugname": "walnuts",
      "isOnProgram": false
    }
  }
}
```

{% endtab %}
{% endtabs %}
