> 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/program/programs.md).

# All Programs

List all available programs and their descriptions

Suggestic provides a list of available programs for the user to be assigned to. If a user is using the free version of the app, the **Balanced Diet** will be assigned automatically.

Use the [Personalization Console](https://docs.suggestic.com/console/access-the-main-menu/access-the-main-menu/programs/programs) to manage programs.

### User Role

* `programs`: Get the list of all available programs.

### Available Fields

| **Field Name**     | **Type** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`               | ID       | Id of the program                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `databaseId`       | String   | Database Id of the program                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `name`             | String   | Name of the program                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `author`           | String   | Author of the program                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `isActive`         | Boolean  | **Ture** if the program is active. Otherwise, it displays **False**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `isPremium`        | Boolean  | **True** if the program is premium. Otherwise, it displays **False**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `restrictions`     | List     | <p>Returns the list of restrictions applied to a program. Use it as follows:</p><ul><li><code>restrictions</code> If no arguments are added it will return the unique ID</li><li><code>restrictions(encoded:true)</code> will return an encoded b64ids. For example: <code>UmVzdHJpY3Rpb246YzlhMmVjZGMtMWFmOS00MzRjLWE1MTktMGQ3ODg4MGQ5N2Yw.</code> It can be used in the <a href="https://docs.suggestic.com/graphql/query/mutations/user-profile/profilerestrictionsupdate"><code>profileRestrictionsUpdate</code></a></li><li><code>restrictions(encoded:false)</code>will return a unique ID. For example:  <code>c9a2ecdc-1af9-434c-a519-0d78880d97f0</code></li></ul><p>See <a href="https://docs.suggestic.com/graphql/query/queries/program/programs#get-the-list-of-available-restrictions-encoded-in-b-64-ids">this </a>example.</p> |
| `descriptionShort` | String   | Program short description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `descriptionLong`  | String   | Program long description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

## Example

### Get the list of available programs

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

```graphql
{
  programs {
    edges {
      node {
        id
        databaseId
        name
        author
        isActive
        isPremium
      }
    }
  }
}

```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "programs": {
      "edges": [
        {
          "node": {
            "id": "UHJvZ3JhbTo0OTYxMTg1Ny1hZjk3LTRmZjktOWY1OS04ZTc2Mzk2MGUwODE=",
            "databaseId": "49611857-af97-4ff9-9f59-8e763960e081",
            "name": "Immunity Boost Program",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTowMWJiZDU0MS05MzliLTRiODUtOGQ5MC00OGZmMGIwMmQwZWU=",
            "databaseId": "01bbd541-939b-4b85-8d90-48ff0b02d0ee",
            "name": "Wheat Belly 10-Day Grain Detox",
            "author": "Dr. William Davis",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo4ZDE0NTFjNC0xNGRkLTRkNzItODYxOS0zM2ZhYjI0ODkyNWQ=",
            "databaseId": "8d1451c4-14dd-4d72-8619-33fab248925d",
            "name": "Low Carb Mediterranean Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo4NTE1MjE2Zi01YmRkLTQzYzUtOGUyNi04Yzg0N2I5MTBjMGY=",
            "databaseId": "8515216f-5bdd-43c5-8e26-8c847b910c0f",
            "name": "21-Day Inflammation Solution",
            "author": "Dr. Mark Menolascino",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTowNzRjN2I4Ni0wNTdjLTRkNDctOGY0Yi03ZjQzMzljOGQxZjQ=",
            "databaseId": "074c7b86-057c-4d47-8f4b-7f4339c8d1f4",
            "name": "Healing Foods 28-Day Reset",
            "author": "Dr. Michael Murray",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbToxMDFhOTI4MS1lZGQ3LTQwOTgtYjQ0ZS01NzkyMzRmZDI2ZDE=",
            "databaseId": "101a9281-edd7-4098-b44e-579234fd26d1",
            "name": "Keto Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTpiZWE5ZjM0MS0yYTI1LTQwZmMtOWNlNC01MTViMzNmMjQ1OTI=",
            "databaseId": "bea9f341-2a25-40fc-9ce4-515b33f24592",
            "name": "Dr. Jockers' Keto Challenge",
            "author": "Dr. David Jockers",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo0NjQ3NzQxNy1kYzRlLTQyNWMtYjNhOS1mMmJjOWIxMjkxMDI=",
            "databaseId": "46477417-dc4e-425c-b3a9-f2bc9b129102",
            "name": "Anti-Inflammatory Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTozYjdlNDIwYy0zMTBhLTRiZjctYjVmMS0xNDkwM2MwOTE4NTA=",
            "databaseId": "3b7e420c-310a-4bf7-b5f1-14903c091850",
            "name": "21-Day Vegan Reset",
            "author": "Dr. Joel Kahn",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTowYWQ0ZTc3YS04ZWRhLTRlOWItYWM4ZS0xYzg0YTJlOGJiNDI=",
            "databaseId": "0ad4e77a-8eda-4e9b-ac8e-1c84a2e8bb42",
            "name": "Balanced Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTphOWRlOGQyMy1kMzM3LTQwOWQtYjllZC1jZTQ0OTIwNzcwNWI=",
            "databaseId": "a9de8d23-d337-409d-b9ed-ce449207705b",
            "name": "No Grain, No Pain 30-Day Diet",
            "author": "Dr. Peter Osborne",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTpiMzBjZjAyYS03MjE1LTRjMjUtOTZiZS02YjA0N2MyNTMzOGU=",
            "databaseId": "b30cf02a-7215-4c25-96be-6b047c25338e",
            "name": "Low FODMAP Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo5OWNjODk5Ny1lYzUyLTQ1NDgtYTc1My0zZWI0MWZkN2QxNzk=",
            "databaseId": "99cc8997-ec52-4548-a753-3eb41fd7d179",
            "name": "28-Day Metabolic Reset",
            "author": "Dr. Brian Mowll",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbToyOGY2YmNiMi1lMmJmLTQ2YjEtYTViZS02N2ViYzg0NTFmZTA=",
            "databaseId": "28f6bcb2-e2bf-46b1-a5be-67ebc8451fe0",
            "name": "DASH Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTpiNjU3MGUwMC02MTgwLTQxNTgtYTZjZC02NDU0YTA3NTg1MTU=",
            "databaseId": "b6570e00-6180-4158-a6cd-6454a0758515",
            "name": "SIBO Soothe and Manage Program",
            "author": "Kristy Regan",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo1NzRjYmJjZC0zOTEzLTRjODItODM2ZC0yYWExNDQwYmY4MTA=",
            "databaseId": "574cbbcd-3913-4c82-836d-2aa1440bf810",
            "name": "Paleo Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbToyMGFkMjAyMS1kNjhkLTQ4MzQtYjhmNC1lNDk3NTI0Yjk5ZDY=",
            "databaseId": "20ad2021-d68d-4834-b8f4-e497524b99d6",
            "name": "Auto-Immune Paleo Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo0NjQ5Y2EzNi1jZTFmLTRmNGItYmU0Zi0yYWJmZDM3MWVjOTY=",
            "databaseId": "4649ca36-ce1f-4f4b-be4f-2abfd371ec96",
            "name": "21-Day Bone Broth Diet",
            "author": "Dr. Kellyann Petrucci",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbToyYjk3N2JhYy1kMTE5LTRiNmMtYjMxMC1lNTEyMjk4ODExNWU=",
            "databaseId": "2b977bac-d119-4b6c-b310-e5122988115e",
            "name": "Vegan Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTpiMGU3ZGRlNy0zZDMzLTRiMDctOGE2Yi0wZjcyN2JiMDUzMzU=",
            "databaseId": "b0e7dde7-3d33-4b07-8a6b-0f727bb05335",
            "name": "21-Day Healthy Gut Jumpstart",
            "author": "Dr. John Dempster",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo2NmVmYTkyMi02ZWJjLTRmNTUtYTk3ZS01NWEzYTUwZDIxMDY=",
            "databaseId": "66efa922-6ebc-4f55-a97e-55a3a50d2106",
            "name": "Mediterranean Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTpmNmE3NmEwMC1kMGVmLTQ4MzgtYTcwNy03ZjkwYmM3MDQ3Zjc=",
            "databaseId": "f6a76a00-d0ef-4838-a707-7f90bc7047f7",
            "name": "3 Weeks to Clearer Skin",
            "author": "Kylene Terhune",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTpmNDlmM2Y0YS0yNTM0LTRkNDItYjA4NS01NDNkMGQ5MDNmYjA=",
            "databaseId": "f49f3f4a-2534-4d42-b085-543d0d903fb0",
            "name": "Diabetes Prevention Program",
            "author": "Centers for Disease Control",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo4ZThiOGMxYy1iNTQ4LTQ2MDItODFlNS03NzZlOTY3MmI1Y2Q=",
            "databaseId": "8e8b8c1c-b548-4602-81e5-776e9672b5cd",
            "name": "80/20 Plan",
            "author": "Dr. Kellyann Petrucci",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo3MzlkMWI0MC1lMDdjLTQ1MzktOGRkMS03NGRlMzNjZGYxMjg=",
            "databaseId": "739d1b40-e07c-4539-8dd1-74de33cdf128",
            "name": "Vegetarian Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTplYTU5MTAyYS01YzRlLTQyNTYtOTIzZC1iYmI2YTFkYjQwNWI=",
            "databaseId": "ea59102a-5c4e-4256-923d-bbb6a1db405b",
            "name": "Dr. Hyman's Pegan Diet",
            "author": "Dr. Mark Hyman",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTpiZmE2NGYyNC02YmU4LTRmNTctYjFmMC02NmRjMGRlY2ZmY2E=",
            "databaseId": "bfa64f24-6be8-4f57-b1f0-66dc0decffca",
            "name": "Pescetarian Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTplY2VjNjg3Ni1iZmVjLTQyYjEtYTYwZS04NmY3Zjc1Nzc1YzM=",
            "databaseId": "ecec6876-bfec-42b1-a60e-86f7f75775c3",
            "name": "Cardiometabolic Food Plan",
            "author": "The Institute for Functional Medicine",
            "isActive": true,
            "isPremium": true
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTplZmI3MTExYS0xNTgxLTQ1YjEtODA1OC1jNGIyOGUxZTEwMTA=",
            "databaseId": "efb7111a-1581-45b1-8058-c4b28e1e1010",
            "name": "28-Day Living in Reverse",
            "author": "Dr. Ted Schierer",
            "isActive": true,
            "isPremium": true
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

#### UI/UX example

In the same way, we have code examples, this is an implementation example in which see results of the API execution in the Suggestic App.&#x20;

Login to the Suggestic Plus App, and tap on the <img src="https://920729701-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LwqSnBDpAb6mFZYLsuB%2F-MkEZ1Lq1o2KWfe1v3nX%2F-MkEb-mxOktS7Pzi9ahv%2Fimage.png?alt=media&amp;token=69029ad6-d1d3-4cf9-afee-b36ca1e6f743" alt="" data-size="line"> profile icon, then go to the **Program** option and tap the **View All programs** option, the following list is displayed.

![](https://920729701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwqSnBDpAb6mFZYLsuB%2Fuploads%2FXZJjjnyLafhIZ7MeMqM1%2FAllPrograms1.png?alt=media\&token=6844ee33-cd4f-43a8-9bc4-ea7cbc8fff13)

### Get the list of available restrictions encoded in b64ids

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

```graphql
{
  programs
  {
    edges{
      node{
        id
        databaseId
        name
        author
        isActive
        isPremium
        restrictions (encoded:true)
      }
    }
  }
}

```

{% endtab %}

{% tab title="Results" %}

```graphql
{
  "data": {
    "programs": {
      "edges": [
        {
          "node": {
            "id": "UHJvZ3JhbTowMWJiZDU0MS05MzliLTRiODUtOGQ5MC00OGZmMGIwMmQwZWU=",
            "databaseId": "01bbd541-939b-4b85-8d90-48ff0b02d0ee",
            "name": "Wheat Belly 10-Day Grain Detox",
            "author": "Dr. William Davis",
            "isActive": true,
            "isPremium": true,
            "restrictions": [
              "UmVzdHJpY3Rpb246NWQ3ODg4YjctOWY5OC00NjAzLWE5MDUtZTYxNGQzOGYwMTUw",
              "UmVzdHJpY3Rpb246Mzk0ZGIyZTYtMGNiMy00MmQzLTkxYTUtNjU1NDQ5MzhmYzdj",
              "UmVzdHJpY3Rpb246OTYyOWUwY2UtZjVkZi00YmNjLWJmYTUtZDFlZmJjZjQ3NDBi"
            ]
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo4ZDE0NTFjNC0xNGRkLTRkNzItODYxOS0zM2ZhYjI0ODkyNWQ=",
            "databaseId": "8d1451c4-14dd-4d72-8619-33fab248925d",
            "name": "Low Carb Mediterranean Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false,
            "restrictions": [
              "UmVzdHJpY3Rpb246YThjODczYzctNDgyZC00ZGE0LWE1MTgtYjc5NzljNmIyZmYw",
              "UmVzdHJpY3Rpb246MDk5MTkzMGItMmMyZC00YTU5LTg0MTItOTQ3Yzk4NjIyZjVj",
              "UmVzdHJpY3Rpb246NGNjZDlmY2YtMDEyNC00ODlhLTlkODYtM2M1M2ViMjYxMDg1",
              "UmVzdHJpY3Rpb246YzlhMmVjZGMtMWFmOS00MzRjLWE1MTktMGQ3ODg4MGQ5N2Yw"
            ]
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTo4NTE1MjE2Zi01YmRkLTQzYzUtOGUyNi04Yzg0N2I5MTBjMGY=",
            "databaseId": "8515216f-5bdd-43c5-8e26-8c847b910c0f",
            "name": "21-Day Inflammation Solution",
            "author": "Dr. Mark Menolascino",
            "isActive": true,
            "isPremium": true,
            "restrictions": [
              "UmVzdHJpY3Rpb246MDEzZmUzMDgtNGVkMC00M2ExLWJhZWYtODZmYmQwMDgwMGU1"
            ]
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTowNzRjN2I4Ni0wNTdjLTRkNDctOGY0Yi03ZjQzMzljOGQxZjQ=",
            "databaseId": "074c7b86-057c-4d47-8f4b-7f4339c8d1f4",
            "name": "Healing Foods 28-Day Reset",
            "author": "Dr. Michael Murray",
            "isActive": true,
            "isPremium": true,
            "restrictions": [
              "UmVzdHJpY3Rpb246ZTg0YzUwNDctMGU0OS00OTRhLTlhMzQtOWRiNWVhOThlNGFm",
              "UmVzdHJpY3Rpb246YThjODczYzctNDgyZC00ZGE0LWE1MTgtYjc5NzljNmIyZmYw",
              "UmVzdHJpY3Rpb246Y2YxODI0YjctMWU0OC00ZmZkLTg4ZDItZDUwMjQ4MTA0MmRj"
            ]
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbToxMDFhOTI4MS1lZGQ3LTQwOTgtYjQ0ZS01NzkyMzRmZDI2ZDE=",
            "databaseId": "101a9281-edd7-4098-b44e-579234fd26d1",
            "name": "Keto Diet",
            "author": "Suggestic",
            "isActive": true,
            "isPremium": false,
            "restrictions": [
              "UmVzdHJpY3Rpb246YTVhMzM0ZjItNTZjYi00MmU3LTg3NmYtM2JiZTgzNDM4ZjBh",
              "UmVzdHJpY3Rpb246MDk5MTkzMGItMmMyZC00YTU5LTg0MTItOTQ3Yzk4NjIyZjVj",
              "UmVzdHJpY3Rpb246ZTg0YzUwNDctMGU0OS00OTRhLTlhMzQtOWRiNWVhOThlNGFm",
              "UmVzdHJpY3Rpb246Y2YxODI0YjctMWU0OC00ZmZkLTg4ZDItZDUwMjQ4MTA0MmRj",
              "UmVzdHJpY3Rpb246MTQ1OWI0NjAtMWY0My00ZDZiLWFjZTAtNTY3M2M0ZWNlZmY1"
            ]
          }
        },
        {
          "node": {
            "id": "UHJvZ3JhbTplY2VjNjg3Ni1iZmVjLTQyYjEtYTYwZS04NmY3Zjc1Nzc1YzM=",
            "databaseId": "ecec6876-bfec-42b1-a60e-86f7f75775c3",
            "name": "Cardiometabolic Food Plan",
            "author": "The Institute for Functional Medicine",
            "isActive": true,
            "isPremium": true,
            "restrictions": [
              "UmVzdHJpY3Rpb246YzlhMmVjZGMtMWFmOS00MzRjLWE1MTktMGQ3ODg4MGQ5N2Yw",
              "UmVzdHJpY3Rpb246MDEzZmUzMDgtNGVkMC00M2ExLWJhZWYtODZmYmQwMDgwMGU1"
            ]
          }
        },
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}
