# Get Menu

| **API URL**     | {{url}}/spice-service/static-data/menu |
| --------------- | -------------------------------------- |
| **Method**      | POST                                   |
| **Description** | Fetch static data menu details.        |

#### **Sample Input** <a href="#getmenu-v2-sampleinput" id="getmenu-v2-sampleinput"></a>

| **Field Name**         | **Type** | **Mandatory** | **Example**                                                                                                                             |
| ---------------------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| countryId              | Integer  | Yes           | Country id                                                                                                                              |
| roleName               | String   | Yes           | SUPER\_ADMIN                                                                                                                            |
| appTypes               | String   | Yes           | COMMUNITY or NON\_COMMUNITY                                                                                                             |
| Authorization (Header) | String   | Yes           | Bearer 1ba363a1edf54402b51f58060aa52b11d30f99a490295adec900fdabf2b472181c0bfb165be18f4f5c430c7218a244bd29b9300d3471acc08197ccfb996118f6 |
| client                 | String   | Yes           | web                                                                                                                                     |

```
{
  countryId: "1", 
  roleName: "SUPER_ADMIN", 
  appTypes: ["NON_COMMUNITY"]
}
```

#### **Sample Output** <a href="#getmenu-v2-sampleoutput" id="getmenu-v2-sampleoutput"></a>

| **Field Name** | **Type** | **Comments**                                                                           |
| -------------- | -------- | -------------------------------------------------------------------------------------- |
| message        | String   | Menu Details fetched successfully                                                      |
| id             | Integer  | Menu id                                                                                |
| roleName       | String   | Role Names                                                                             |
| menus          | String   | Menu and its details, e.g BY\_REGION, BY\_CHIEFDOM, BY\_DISTRICT, BY\_HEALTH\_FACILITY |
| status         | String   | Menu status                                                                            |

```
{
    "message": "Menu Details fetched successfully.",
    "entity": {
        "id": 17,
        "roleName": "SUPER_ADMIN",
        "menus": [
            {
                "BY_REGION": [
                    {
                        "name": "REGION",
                        "order": 1,
                        "route": "/region/:regionId/:tenantId",
                        "displayName": "Region"
                    },
                    {
                        "name": "REGION_CUSTOMIZATION",
                        "order": 2,
                        "route": "/region/:regionId/:tenantId/customize",
                        "displayName": "Region Customization"
                    },
                    {
                        "name": "DISTRICT_BY_REGION",
                        "order": 3,
                        "route": "/region/:regionId/:tenantId/district",
                        "displayName": "County"
                    },
                    {
                        "name": "CHIEFDOM_BY_REGION",
                        "order": 4,
                        "route": "/region/:regionId/:tenantId/chiefdom",
                        "displayName": "Sub County"
                    },
                    {
                        "name": "HEALTH_FACILITY_BY_REGION",
                        "order": 5,
                        "route": "/region/:regionId/:tenantId/health-facility",
                        "displayName": "Health Facility"
                    },
                    {
                        "name": "ADMINS_BY_REGION",
                        "order": 6,
                        "route": "/region/:regionId/:tenantId/admin",
                        "displayName": "Admins"
                    },
                    {
                        "name": "USERS_BY_REGION",
                        "order": 7,
                        "route": "/region/:regionId/:tenantId/user",
                        "displayName": "Users"
                    },
                    {
                        "name": "PROGRAM_BY_REGION",
                        "order": 8,
                        "route": "/region/:regionId/:tenantId/program",
                        "displayName": "Program"
                    },
                    {
                        "name": "LAB_TEST_DATABASE_BY_REGION",
                        "order": 9,
                        "route": "/region/:regionId/:tenantId/lab-test",
                        "displayName": "Lab/Imaging Database"
                    },
                    {
                        "name": "MEDICATION_DATABASE_BY_REGION",
                        "order": 10,
                        "route": "/region/:regionId/:tenantId/medication/list",
                        "displayName": "Medication Database"
                    },
                    {
                        "name": "WORKFLOW_BY_REGION",
                        "order": 11,
                        "route": "/region/:regionId/:tenantId/workflow",
                        "displayName": "Workflow"
                    }
                ],
                "BY_CHIEFDOM": [
                    {
                        "name": "CHIEFDOM_SUMMARY",
                        "order": 1,
                        "route": "/chiefdom/:chiefdomId/:tenantId",
                        "displayName": "Sub County"
                    },
                    {
                        "name": "HEALTH_FACILITY_BY_CHIEFDOM",
                        "order": 2,
                        "route": "/chiefdom/:chiefdomId/:tenantId/health-facility",
                        "displayName": "Health Facility"
                    },
                    {
                        "name": "ADMINS_BY_CHIEFDOM",
                        "order": 3,
                        "route": "/chiefdom/:chiefdomId/:tenantId/admin",
                        "displayName": "Admins"
                    },
                    {
                        "name": "USERS_BY_CHIEFDOM",
                        "order": 4,
                        "route": "/chiefdom/:chiefdomId/:tenantId/user",
                        "displayName": "Users"
                    }
                ],
                "BY_DISTRICT": [
                    {
                        "name": "DISTRICT_SUMMARY",
                        "order": 1,
                        "route": "/district/:districtId/:tenantId",
                        "displayName": "County"
                    },
                    {
                        "name": "CHIEFDOM_BY_DISTRICT",
                        "order": 2,
                        "route": "/district/:districtId/:tenantId/chiefdom",
                        "displayName": "Sub County"
                    },
                    {
                        "name": "HEALTH_FACILITY_BY_DISTRICT",
                        "order": 3,
                        "route": "/district/:districtId/:tenantId/health-facility",
                        "displayName": "Health Facility"
                    },
                    {
                        "name": "ADMINS_BY_DISTRICT",
                        "order": 4,
                        "route": "/district/:districtId/:tenantId/admin",
                        "displayName": "Admins"
                    },
                    {
                        "name": "USERS_BY_DISTRICT",
                        "order": 5,
                        "route": "/district/:districtId/:tenantId/user",
                        "displayName": "Users"
                    }
                ],
                "BY_HEALTH_FACILITY": [
                    {
                        "name": "HEALTH_FACILITY_SUMMARY",
                        "order": 1,
                        "route": "/health-facility/:healthFacilityId/:tenantId",
                        "displayName": "Health Facility"
                    },
                    {
                        "name": "ADMINS_BY_HEALTH_FACILITY",
                        "order": 2,
                        "route": "/health-facility/:healthFacilityId/:tenantId/admin",
                        "displayName": "Admins"
                    },
                    {
                        "name": "USERS_BY_HEALTH_FACILITY",
                        "order": 3,
                        "route": "/health-facility/:healthFacilityId/:tenantId/user",
                        "displayName": "Users"
                    }
                ]
            }
        ],
        "meta": null,
        "metaForms": null,
        "jsonDisplayValues": null,
        "formDataId": null,
        "tenantId": null,
        "formName": null
    },
    "status": true,
    "entityList": null,
    "responseCode": 200,
    "totalCount": null
}
```


---

# 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://spice.docs.medtroniclabs.org/engineering/api-documentation/admin-services/get-menu.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.
