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


---

# 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://docs.suggestic.com/graphql/query/queries/restrictions/restriction-by-id.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.
