Akinon Release Notes (06/09/2025) are now live! Click here to learn what's new.
LogoLogo
API Reference
  • Home
  • Quick Start
  • Tutorials
  • Technical Guides
  • Release Notes
  • Glossary
  • Welcome to Akinon Technical Guides
  • ACC
    • ACC CLI
    • Create Application via CLI
    • Deploy Environment Variables
    • App Store for Developers
  • Omnitron
    • Product Types
    • Product Categorization
    • Splitting a Merged Order Item
  • Commerce
    • Shipping Rules Calculator
    • Data Source Shipping Options
    • Attribute Based Shipping Options
    • Filtering Products
    • Conversation & Messages
    • Sitemap Configuration
    • Weight-Based Product Sales
    • Group Attribute Sets
    • Contract Management
    • Find in Store for Whippy Ware
    • Plugins
    • Remote Price
    • E-mail Templates
    • Loyalty Accounts
    • Search Structure
    • User Segmentation & Rules
    • Configuring User Segmentation
    • Promotions
    • Email Redirection in Multi-Frontend Structure
  • OMS
    • Getting Started with OMS
    • Basic Setup
    • Scenarios
    • Capacity Feature
    • Package Management
      • Packages
      • Transfer
      • States
    • Commands
      • Packages
        • Package Command Parameters
        • DeAllocate Package Reservations Command
        • Channel Based Complete Packaging without Shipment Command
        • Complete Packaging with Shipment Command
        • Complete Packaging without Shipment Command
        • Package Refuse with Denial Reason Command
        • Product Not Found & Wrong Product Command
        • Product Not Found & Wrong Product Command Advanced
        • Package Packed for Refund Command
        • Block The Package For Action Command
        • Unblock the Package For Action Command
        • Update The Package’s Invoice
        • Manual Planning Command
      • Transfer
        • Transfer Order Advanced Command
        • Product for Transfer Not Found & Wrong Product Command
        • Transfer Delivered Command
        • Transfer Dispatch Command
        • Transfer Ready for Dispatch Command
        • Transfer Out Of Stock
      • Shipment
        • Shipment Order Command
        • Package Advanced Shipment Command
        • Ship The Package Command
        • Ship The Package without Shipment Integration Command
        • Update The Package’s Shipment Status Command
        • Update Shipment Info of Package Command
    • Inventory Locations & Engine
      • Properties & Domain Relation
      • Customization
      • Inventory Engine
    • Fulfillment
      • Shipments
      • Invoice Integration
    • Webhooks
      • Webhook Examples
        • Order Webhook
        • Package Webhook
        • Shipment Webhook
        • Stock Location Webhook
        • Transfer Webhook
    • Integrating OMS with Seller Center
  • Instore
    • Getting Started
    • Cash Register Integration
    • OTP (One Time Password) Process
    • Services
      • Password Reset Services
  • Marketplace Dashboard
    • N11 Marketplace Setup Configurations
    • Trendyol Marketplace Setup Configurations
    • Walmart Marketplace Setup Configurations
    • Amazon Marketplace Setup Configurations
    • Hepsiburada Marketplace Setup Configurations
    • Fashfed Marketplace Setup Configurations
    • Mono Marketplace Setup Configurations
    • Passo Marketplace Setup Configurations
    • Package Splitting Flow
    • Marketplace Dashboard Flow Trigger
  • Project Zero
    • Django
      • Basic Setup
      • Project Structure
        • Templates & Components
        • Private Dependencies
        • Omnife Project Submodule
        • Webpack
        • ESLint Rules
        • Bundles
        • Multilanguage & Translation
        • Environmental File
        • Custom Error Pages
        • Icon Font
      • Page Types
        • Static Pages & Flatpages
        • Account Page
          • Template Rendering in Account Pages
          • Forms & Validation
        • Basket Page
          • Redux Basket State
          • Basket Page - View
        • Checkout
          • Redux Checkout State
          • View & Template Rendering
          • Masking & Validation
      • Theming & Styling
      • Widgets
      • SEO Management
      • Extending Project Zero
    • Next.js
      • Basic Setup
      • Deployment
      • Static Assets
      • Icons
      • SEO Management
      • Advanced Usage
      • Plugins
        • Akinon Next
          • Data Fetching
            • Client
              • Account
              • Address
              • Basket
              • Checkout
              • Misc
              • Product
              • User
              • Wishlist
            • Server
              • Category
              • Flat Page
              • Landing Page
              • List
              • Menu
              • Product
              • SEO
              • Special Page
              • Widget
          • Localization
          • Widgets
        • Akifast
        • B2B
        • Basket Gift Package
        • BKM Express
        • Checkout Gift Package
        • Click&Collect
        • Credit Payment
        • GarantiPay
        • Hepsipay
        • Masterpass
        • Multi Basket
        • One Click Checkout
        • OTP
        • Pay on Delivery
        • Saved Card
        • Tabby Payment Gateway
        • Tamara Payment Gateway
  • App Maker
    • Setup Your Environment
    • Plugin Quickstart
    • Create Project
    • Setup Existing Project
    • Deploy Project
    • Users and Roles
    • Add Public Key
    • App Maker CLI
    • Create App on Stores
      • Creating App on Apple App Store
      • Creating App on Google Play Store
    • Mobile App Framework
      • Configuration
      • Framework
      • Project Structure
        • Structure
        • Data Containers
        • Pages
      • Dependency Integration
        • Plugins
        • Akinon Plugin Adapter
  • Akifast
    • HPP
      • Getting Started
      • Authorization
      • Payment Session Creation
        • Key Points Before Creating a Payment Session
        • Creating Payment Session
        • Redirecting to the Payment Page
        • Errors Encountered During Payment Session Creation
      • Merchant Services
        • Shipping Query URL
        • Agreement Query URL
        • Other URLs
  • B2B
    • Getting Started
    • B2B Setup
  • Adds-on
    • Invoicer
      • Introduction
      • Invoice & Pay On Delivery Service
  • Channel App Template
    • Introduction
    • Installation and Usage
    • Development Steps
      • Folder Structure
      • Starting Step
      • Encoding the Sales Channel
        • Introduction
        • Setup
        • Products
        • Product Price
        • Product Stock
        • Product Image
        • Orders
        • Product Data
      • Adding a New Command to Akinon
      • Listening for External Requests
    • Architecture
      • Introduction
      • Integration
      • Services (Flows)
        • Introduction
        • Product Service
        • Price Service
        • Stock Service
        • Image Service
        • Order Service
  • Multi Regional Settings
    • Multi Regional Settings
  • 3rd Party Integration
    • NKolay POS Payment Integration
    • ShipX (Inpost) Shipment Extension
    • Checkout Flow Integration
    • Ngenius Payment Integration
    • ShypV Shipment Extension
    • Masterpass via Craftgate POS
    • Benefit via Tap
    • Tap Credit Card
    • PayU Payment Extension
    • Pay with Iyzico Payment Extension
    • Multisafepay Payment Extension
    • Masterpass Installment Integration
    • Masterpass Iframe Extension
    • Mollie Payment Extension
    • Masterpass REST POS
    • Masterpass Rest Payment Option
    • YooMoney Payment Extension
    • MyFatoorah Payment Installation
    • Checkout Payment Extension
    • CyberSource Credit Card Integration
    • QNBPay Integration
    • KNET Payment Integration
    • MNG Seller Pays Shipment Extension
    • Porter Express Shipment Extension
    • Akbank Installation
    • Fero AI Shipment Extension
    • Horoz Lojistik Satıcı Öder Shipment Extension
    • Kolay Gelsin Shipment Extension
    • Falcon Flex Shipment Extension
    • Tap Saved Card Installation
    • NAPS QPay via Tap Installation
    • Tamara Payment Extension
    • Paywall Payment Integration
    • Horoz Lojistik Shipment Extension
    • Monist Shipment Extension
    • Sipay Integration
    • Nestpay Integration
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page

Was this helpful?

  1. Project Zero
  2. Next.js
  3. Plugins
  4. Akinon Next
  5. Data Fetching
  6. Server

Menu

getMenu

This function is used to fetch the data for menus created in Omnitron.

The getMenu function is imported from '@akinon/next/data/server'.

import { getMenu } from '@akinon/next/data/server';

The menu data is fetched by defining this function as const response = await getMenu({ depth: 4 });.

  • depth: This parameter determines how many levels of menu data should be retrieved. It is optional and defaults to 3. It should be of type Number.

  • parent: This parameter is used to fetch the submenus of a specific menu by providing the pk value of the parent menu. If this parameter is not provided, menu data is retrieved from level 0 up to the specified depth. It should be of type String.

Data returned from the function:

{
    "menu": [
        {
            "label": "Women",
            "url": "/women",
            "level": 0,
            "pk": "3cbf2ed2-04ef-4f78-ba37-194491cbd645",
            "sort_order": 0,
            "path": "00010001",
            "parent_pk": null,
            "parent": null,
            "generator_name": "menu_item",
            "extra_context": {
                "attributes": {
                    "shop_by_activity_title": {
                        "value": "Shop By Activity",
                        "kwargs": {}
                    },
                    "category_countdown": {
                        "value": {
                            "slug": "countdown-banner-women",
                            "is_countdown_active": "True"
                        },
                        "kwargs": {
                            "data_type": "nested",
                            "value": {
                                "is_countdown_active": {
                                    "data_type": "dropdown",
                                    "value": "True"
                                }
                            }
                        }
                    },
                    "best_sellers": [
                        {
                            "value": {
                                "url": "#",
                                "image": "cms/2023/07/13/c97efc07-4275-4c1c-a656-b27cb8084faa.jpg"
                            },
                            "kwargs": {
                                "data_type": "nested",
                                "value": {
                                    "image": {
                                        "url": "https://akn-randb.a-cdn.akinoncloud.com/cms/2023/07/13/c97efc07-4275-4c1c-a656-b27cb8084faa.jpg",
                                        "data_type": "image",
                                        "value": "cms/2023/07/13/c97efc07-4275-4c1c-a656-b27cb8084faa.jpg"
                                    }
                                }
                            }
                        }
                    ],
                    "shop_by_activity": [
                        {
                            "value": {},
                            "kwargs": {
                                "data_type": "nested",
                                "value": {}
                            }
                        }
                    ],
                    "css_class": {
                        "value": "bg-[#EAE0A0]",
                        "kwargs": {}
                    },
                    "images": [
                        {
                            "value": {
                                "url": "#",
                                "image": "cms/2023/07/21/3fad3f63-ca24-4b92-b7d6-94da5d2ae0fe.jpg",
                                "title": null
                            },
                            "kwargs": {
                                "data_type": "nested",
                                "value": {
                                    "image": {
                                        "url": "https://akn-randb.a-cdn.akinoncloud.com/cms/2023/07/21/3fad3f63-ca24-4b92-b7d6-94da5d2ae0fe.jpg",
                                        "data_type": "image",
                                        "value": "cms/2023/07/21/3fad3f63-ca24-4b92-b7d6-94da5d2ae0fe.jpg"
                                    }
                                }
                            }
                        }
                    ],
                    "best_sellers_title": {
                        "value": "Best Sellers",
                        "kwargs": {}
                    },
                    "category_id": 2,
                    "festival_edit": [
                        {
                            "value": {
                                "url": "#",
                                "alt": "Summer Collection",
                                "image": "cms/2023/07/07/14bacc14-c036-484e-b30e-0d9b94007790.jpg"
                            },
                            "kwargs": {
                                "data_type": "nested",
                                "value": {
                                    "image": {
                                        "url": "https://akn-randb.a-cdn.akinoncloud.com/cms/2023/07/07/14bacc14-c036-484e-b30e-0d9b94007790.jpg",
                                        "data_type": "image",
                                        "value": "cms/2023/07/07/14bacc14-c036-484e-b30e-0d9b94007790.jpg"
                                    }
                                }
                            }
                        }
                    ],
                    "festival_edit_title": {
                        "value": "Festival Edit",
                        "kwargs": {}
                    }
                },
                "numchild": 7,
                "include_parent": false
            }
        },
        {
            "label": "Men",
            "url": "/men",
            "level": 0,
            "pk": "a98bafbc-32d5-4a59-8a85-5d849980a2b6",
            "sort_order": 1,
            "path": "00010002",
            "parent_pk": null,
            "parent": null,
            "generator_name": "menu_item",
            "extra_context": {
                "attributes": {
                    "category_countdown": {
                        "value": {
                            "slug": "countdown-banner-men",
                            "is_countdown_active": "True"
                        },
                        "kwargs": {
                            "data_type": "nested",
                            "value": {
                                "is_countdown_active": {
                                    "data_type": "dropdown",
                                    "value": "True"
                                }
                            }
                        }
                    },
                    "best_sellers": [
                        {
                            "value": {},
                            "kwargs": {
                                "data_type": "nested",
                                "value": {}
                            }
                        }
                    ],
                    "shop_by_activity": [
                        {
                            "value": {},
                            "kwargs": {
                                "data_type": "nested",
                                "value": {}
                            }
                        }
                    ],
                    "images": [
                        {
                            "value": {
                                "url": "#",
                                "image": "cms/2023/07/20/8649ff5e-a114-4cf4-bb8a-22547e7ab795.jpg"
                            },
                            "kwargs": {
                                "data_type": "nested",
                                "value": {
                                    "image": {
                                        "url": "https://akn-randb.a-cdn.akinoncloud.com/cms/2023/07/20/8649ff5e-a114-4cf4-bb8a-22547e7ab795.jpg",
                                        "data_type": "image",
                                        "value": "cms/2023/07/20/8649ff5e-a114-4cf4-bb8a-22547e7ab795.jpg"
                                    }
                                }
                            }
                        }
                    ],
                    "category_id": 3,
                    "festival_edit": [
                        {
                            "value": {},
                            "kwargs": {
                                "data_type": "nested",
                                "value": {}
                            }
                        }
                    ]
                },
                "numchild": 4,
                "include_parent": false
            }
        },
        {
            "label": "Kids",
            "url": "/kids",
            "level": 0,
            "pk": "b58ca68a-3d44-4585-a4ea-b37d18a60da3",
            "sort_order": 2,
            "path": "00010003",
            "parent_pk": null,
            "parent": null,
            "generator_name": "menu_item",
            "extra_context": {
                "attributes": {
                    "category_countdown": {
                        "value": {
                            "slug": "countdown-banner-kids",
                            "is_countdown_active": "True"
                        },
                        "kwargs": {
                            "data_type": "nested",
                            "value": {
                                "is_countdown_active": {
                                    "data_type": "dropdown",
                                    "value": "True"
                                }
                            }
                        }
                    },
                    "best_sellers": [
                        {
                            "value": {},
                            "kwargs": {
                                "data_type": "nested",
                                "value": {}
                            }
                        }
                    ],
                    "shop_by_activity": [
                        {
                            "value": {},
                            "kwargs": {
                                "data_type": "nested",
                                "value": {}
                            }
                        }
                    ],
                    "images": [
                        {
                            "value": {
                                "url": "#",
                                "image": "cms/2023/07/24/b4191bde-4b8e-4143-8ac4-e21310a173e9.jpg"
                            },
                            "kwargs": {
                                "data_type": "nested",
                                "value": {
                                    "image": {
                                        "url": "https://akn-randb.a-cdn.akinoncloud.com/cms/2023/07/24/b4191bde-4b8e-4143-8ac4-e21310a173e9.jpg",
                                        "data_type": "image",
                                        "value": "cms/2023/07/24/b4191bde-4b8e-4143-8ac4-e21310a173e9.jpg"
                                    }
                                }
                            }
                        }
                    ],
                    "category_id": 4,
                    "festival_edit": [
                        {
                            "value": {},
                            "kwargs": {
                                "data_type": "nested",
                                "value": {}
                            }
                        }
                    ]
                },
                "numchild": 10,
                "include_parent": false
            }
        },
        {
            "label": "Home",
            "url": "/home/",
            "level": 0,
            "pk": "4e2dd206-a909-46ee-8c53-b494d12aaba1",
            "sort_order": 3,
            "path": "00010004",
            "parent_pk": null,
            "parent": null,
            "generator_name": "menu_item",
            "extra_context": {
                "attributes": {
                    "images": [
                        {
                            "value": {
                                "url": "#",
                                "image": "cms/2023/07/24/59b08b1d-4105-4c28-a113-f1b94a445935.jpg"
                            },
                            "kwargs": {
                                "data_type": "nested",
                                "value": {
                                    "image": {
                                        "url": "https://akn-randb.a-cdn.akinoncloud.com/cms/2023/07/24/59b08b1d-4105-4c28-a113-f1b94a445935.jpg",
                                        "data_type": "image",
                                        "value": "cms/2023/07/24/59b08b1d-4105-4c28-a113-f1b94a445935.jpg"
                                    }
                                }
                            }
                        }
                    ],
                    "best_sellers": [
                        {
                            "value": {},
                            "kwargs": {
                                "data_type": "nested",
                                "value": {}
                            }
                        }
                    ],
                    "shop_by_activity": [
                        {
                            "value": {},
                            "kwargs": {
                                "data_type": "nested",
                                "value": {}
                            }
                        }
                    ],
                    "festival_edit": [
                        {
                            "value": {},
                            "kwargs": {
                                "data_type": "nested",
                                "value": {}
                            }
                        }
                    ],
                    "category_id": 5
                },
                "numchild": 4,
                "include_parent": false
            }
        }
    ]
}
PreviousListNextProduct

Last updated 1 month ago

Was this helpful?