# Get menu tree details

`GET /api/v1/Tenants/{tenantId}/MenuTrees/{menuTreeId}`

Core API · MenuTrees · base URL `https://core-api.ancon.io` · auth: `Access-Token` header · docs: https://ancon.dev/api/core/menu-trees/get-menu-tree-details

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string (uuid) | yes |  |
| `menuTreeId` | string (uuid) | yes |  |

## Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `correlationId` | string | no | Correlation Id for the request |

## Responses

| Status | Description |
| --- | --- |
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | Not Found |

### 200 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | no |  |
| `name` | string or null | no |  |
| `isMandatory` | boolean | no |  |
| `menuTreeItems` | array<object \| object> or null | no |  |
| `outletShares` | array<object> or null | no |  |
| `outletShares[].id` | string (uuid) | no |  |
| `outletShares[].name` | string or null | no |  |
| `outletShares[].productShareType` | integer (int32) | no | Allowed values: `0`, `1`. |

#### Example

```json
{
  "id": "36632d35-66e0-4713-8f0a-ae5d07f75ae9",
  "name": "Example menu tree",
  "isMandatory": true,
  "menuTreeItems": [
    {
      "name": "Favorites",
      "id": "031bb689-c68e-4f09-8ed1-791a9e8422d9",
      "menuTreeItemType": 2,
      "menuTreeBranchId": null,
      "backgroundColor": null,
      "sortOrder": 0
    },
    {
      "name": "Food",
      "id": "3c8aaaf1-7531-48cd-b631-341a9b5b16b9",
      "menuTreeItemType": 0,
      "menuTreeBranchId": null,
      "backgroundColor": null,
      "sortOrder": 1
    },
    {
      "name": "Drinks",
      "id": "c1fc870e-d34a-4a3b-b676-16706f8358ac",
      "menuTreeItemType": 0,
      "menuTreeBranchId": null,
      "backgroundColor": null,
      "sortOrder": 2
    },
    {
      "productId": "c553a6ba-060a-4905-8bbc-59d353e4e636",
      "productName": "Coca cola",
      "productDescription": null,
      "id": "b9da79d6-1aa9-4abd-87ad-7c4359320b7e",
      "menuTreeItemType": 1,
      "menuTreeBranchId": "031bb689-c68e-4f09-8ed1-791a9e8422d9",
      "backgroundColor": "#ECB82A",
      "sortOrder": 0
    },
    {
      "productId": "6bc20a5e-25a2-4b71-994c-117be4394daa",
      "productName": "Hamburger",
      "productDescription": null,
      "id": "99a6b020-1ffc-4bff-8a3b-c718b52946ce",
      "menuTreeItemType": 1,
      "menuTreeBranchId": "3c8aaaf1-7531-48cd-b631-341a9b5b16b9",
      "backgroundColor": "#ECB82A",
      "sortOrder": 0
    },
    {
      "productId": "7cfe3f38-0b60-4fec-b69e-8af66a24dc5c",
      "productName": "Pizza",
      "productDescription": null,
      "id": "f5695baf-aff6-40f7-b0c4-f5ada5695f1d",
      "menuTreeItemType": 1,
      "menuTreeBranchId": "3c8aaaf1-7531-48cd-b631-341a9b5b16b9",
      "backgroundColor": "#ECB82A",
      "sortOrder": 1
    },
    {
      "productId": "9901bbc4-510c-4ae2-907a-c046340ffd2a",
      "productName": "Coca cola",
      "productDescription": null,
      "id": "f1d2b4a5-1fc7-48e6-b1ee-ba9aea01dd2b",
      "menuTreeItemType": 1,
      "menuTreeBranchId": "c1fc870e-d34a-4a3b-b676-16706f8358ac",
      "backgroundColor": "#ECB82A",
      "sortOrder": 0
    },
    {
      "productId": "ebd3800f-a92c-44fb-a8cc-c3e7a4ae0b3a",
      "productName": "Fanta",
      "productDescription": null,
      "id": "d40b9f08-2468-4f8f-8d5a-400cf8867b1b",
      "menuTreeItemType": 1,
      "menuTreeBranchId": "c1fc870e-d34a-4a3b-b676-16706f8358ac",
      "backgroundColor": "#ECB82A",
      "sortOrder": 1
    },
    {
      "productId": "a747214a-817a-410c-846e-1dd22be66cf8",
      "productName": "Sprite",
      "productDescription": null,
      "id": "94320285-d8a5-4ff8-bbc7-f0db6256ecfe",
      "menuTreeItemType": 1,
      "menuTreeBranchId": "c1fc870e-d34a-4a3b-b676-16706f8358ac",
      "backgroundColor": "#ECB82A",
      "sortOrder": 2
    }
  ],
  "outletShares": [
    {
      "id": "442da7eb-aefe-49ae-aa78-507b89929916",
      "name": "Outlet 1",
      "productShareType": 0
    }
  ]
}
```

### 400 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string or null | no |  |
| `errorCode` | string (uuid) | no |  |
| `additionalData` | any or null | no |  |

#### Delivery request is not valid

```json
{
  "message": "Delivery information is not valid!",
  "errorCode": "41fcedd1-dfef-4d0d-a5b3-2e28da7dfc9a",
  "additionalData": null
}
```

### 401 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string or null | no |  |

#### Example (from schema)

```json
{
  "message": "string"
}
```

### 404 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string or null | no |  |
| `errorCode` | string (uuid) | no |  |

#### Example (from schema)

```json
{
  "message": "string",
  "errorCode": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```

## Example request

```bash
curl -X GET "https://core-api.ancon.io/api/v1/Tenants/{tenantId}/MenuTrees/{menuTreeId}" \
  -H "Access-Token: $ANCON_TOKEN"
```
