> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce/menu.md).

# Menu

### `GET` Retrieve Pretty URL Details

This method is used to retrieve detailed information for a pretty URL.

**Path:** `https://{commerce_url}/menus/generate/`

**Query Parameters**

| Query String Params | Data Type        | Explanation                      |
| ------------------- | ---------------- | -------------------------------- |
| depth\_height       | integer          | Depth height for generating menu |
| parent              | string           | Parent UUID of the menu item     |
| start\_level        | int (default: 0) | Starting level                   |
| include\_parent     | bool             | Flag to include parent or not    |
| request\_path       | string           | Requested category path          |
| selected            | string           | UUID of the selected menu item   |

**Response**

Below is an example response that provides details for a menu:

```json
{
  "menu": [
    {
      "label": "MARKET",
      "url": "/market/",
      "level": 0,
      "pk": "0c9cdbee-f4ad-4f74-a663-9b74093e5517",
      "sort_order": 0,
      "path": "0001000P",
      "parent_pk": null,
      "parent": null,
      "generator_name": "menu_item",
      "extra_context": {}
    },
    {
      "label": "ELEKTRONİK",
      "url": "/elektronik/",
      "level": 0,
      "pk": "d85bae5d-3ebc-40e6-a871-c6642fb64d23",
      "sort_order": 1,
      "path": "0001000R",
      "parent_pk": null,
      "parent": null,
      "generator_name": "menu_item",
      "extra_context": {}
    }
  ]
}
```

***

### `GET` Retrieve Breadcrumb for Menu Item

This method is used to obtain a breadcrumb for a specific menu item.

**Path:** `https://{commerce_url}/menus/generate_breadcrumb/`

**Query Parameters**

| Query String Params | Data Type | Explanation                   |
| ------------------- | --------- | ----------------------------- |
| generator\_name     | string    | Used to breadcrumb generation |
| item                | string    | 'pk' of the menu item         |

**Response**

Below is an example response that provides a breadcrumb details for a menu item:

```json
{
  "menu": [
    {
      "label": "MARKET",
      "url": "/market/",
      "level": 0,
      "pk": "0c9cdbee-f4ad-4f74-a663-9b74093e5517",
      "sort_order": 0,
      "path": "0001000P",
      "parent_pk": null,
      "parent": null,
      "generator_name": "menu_item",
      "extra_context": {
        "attributes": {
          "images": [
            {
              "value": {
                "url": "/market/cips-cerez-1/",
                "image": "cms/2019/02/27/f1e12f85-6d7b-4ffe-9159-4d8601a4e05b.jpg",
                "title": "Cips & Çerez"
              },
              "kwargs": {
                "value": {
                  "image": {
                    "url": "https://{{commerce_url}}/cms/2019/02/27/f1e12f85-6d7b-4ffe-9159-4d8601a4e05b.jpg",
                    "value": "cms/2019/02/27/f1e12f85-6d7b-4ffe-9159-4d8601a4e05b.jpg",
                    "data_type": "image"
                  }
                },
                "data_type": "nested"
              }
            },
            {
              "value": {
                "url": "/market/icecekler/",
                "image": "cms/2019/02/27/93b2cb5e-05f9-4c43-832f-192a4b62f9c4.jpg",
                "title": "İçecekler"
              },
              "kwargs": {
                "value": {
                  "image": {
                    "url": "https://{{commerce_url}}/cms/2019/02/27/93b2cb5e-05f9-4c43-832f-192a4b62f9c4.jpg",
                    "value": "cms/2019/02/27/93b2cb5e-05f9-4c43-832f-192a4b62f9c4.jpg",
                    "data_type": "image"
                  }
                },
                "data_type": "nested"
              }
            },
            {
              "value": {
                "url": "/market/cikolata-biskuvi-kek-1/",
                "image": "cms/2019/02/27/a1df5065-767f-4189-b3ab-792670ba5bbf.jpg",
                "title": "Çikolata & Bisküvi & Kek"
              },
              "kwargs": {
                "value": {
                  "image": {
                    "url": "https://{{commerce_url}}/cms/2019/02/27/a1df5065-767f-4189-b3ab-792670ba5bbf.jpg",
                    "value": "cms/2019/02/27/a1df5065-767f-4189-b3ab-792670ba5bbf.jpg",
                    "data_type": "image"
                  }
                },
                "data_type": "nested"
              }
            }
          ],
          "css_class": {
            "value": ".",
            "kwargs": {}
          },
          "category_id": 2,
          "visible_on_mobile_app": {
            "value": "t",
            "kwargs": {}
          }
        },
        "numchild": 10
      }
    }
  ]
}
```


---

# 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://apidocs.akinon.com/commerce/menu.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.
