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:
{
"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:
{
"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
}
}
]
}