> 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

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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.suggestic.com/graphql/query/queries/restrictions/restriction-by-id.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
