# Get menu tree list

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

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-list

### Available filter properties
- created (datetime)
- deleted (datetime)
- name (string)
- ismandatory (boolean)
- type (enum)
- outletshareid (guid)

## Path parameters

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

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `OutletId` | string (uuid) | no |  |
| `Offset` | integer (int32) | no | Offset the result, defaults to 0 |
| `Limit` | integer (int32) | no | Limits how many items to get, defaults to 100 min 0, max 1000. |
| `Order` | string | no | Order the result. |
| `Search` | string | no |  |
| `Filter` | map<string, array<string>> | no | Filter the result. Filter[created]=gte:2022-01-02 12:00:00&Filter[created]=lte:2022-08-03 22:00:00 |

## 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 |
| --- | --- | --- | --- |
| `items` | array<object> or null | no |  |
| `items[].id` | string (uuid) | no |  |
| `items[].name` | string or null | no |  |
| `items[].type` | integer (int32) | no | Allowed values: `0`, `1`. |
| `items[].isMandatory` | boolean | no |  |
| `items[].outletId` | string (uuid) or null | no |  |
| `items[].outletShares` | array<object> or null | no |  |
| `items[].outletShares[].id` | string (uuid) | no |  |
| `items[].outletShares[].name` | string or null | no |  |
| `items[].outletShares[].productShareType` | integer (int32) | no | Allowed values: `0`, `1`. |
| `meta` | object or null | no |  |
| `meta.count` | integer (int32) | no |  |
| `meta.offset` | integer (int32) | no |  |

#### Example

```json
{
  "items": [
    {
      "id": "313b2f80-e9df-41a8-837a-aae73d7a04e9",
      "name": "Menu 1",
      "type": 0,
      "isMandatory": true,
      "outletId": null,
      "outletShares": [
        {
          "id": "52d129c5-dbe7-495d-8d5a-98a2c6defd68",
          "name": "Outlet 1",
          "productShareType": 0
        },
        {
          "id": "20b9d80d-fa3b-4201-bfb6-ea28a91664be",
          "name": "Outlet 2",
          "productShareType": 0
        }
      ]
    },
    {
      "id": "c238422d-74dd-4afc-9dc0-97c30c19613e",
      "name": "Menu 2",
      "type": 1,
      "isMandatory": false,
      "outletId": null,
      "outletShares": [
        {
          "id": "fefeaf9b-010d-48aa-9b1c-2ba73b4a9c5b",
          "name": "Outlet 1",
          "productShareType": 0
        },
        {
          "id": "cee5ebf6-8fe7-4499-9548-ce34c77eb81d",
          "name": "Outlet 2",
          "productShareType": 0
        }
      ]
    },
    {
      "id": "85b33d34-7b42-427a-8d8d-bd1088ad3c74",
      "name": "Menu 3",
      "type": 0,
      "isMandatory": true,
      "outletId": "3ebddc1c-cc94-4aed-a2fc-480291e4af2e",
      "outletShares": [
        {
          "id": "9c992f85-3f6c-4b46-8dab-6ab0526acb1e",
          "name": "Outlet 1",
          "productShareType": 0
        }
      ]
    }
  ],
  "meta": {
    "count": 3,
    "offset": 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" \
  -H "Access-Token: $ANCON_TOKEN"
```
