Akinon Release Notes (05/12/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
    • Promotions
  • 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
  • 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
      • Plugins
      • Widgets
      • Icons
      • Localization
      • SEO Management
      • Advanced Usage
      • Data Fetching
        • Client
          • Account
          • Address
          • Basket
          • Checkout
          • Misc
          • Product
          • User
          • Wishlist
        • Server
          • Category
          • Flat Page
          • List
          • Menu
          • Product
          • SEO
          • Special Page
          • Widget
  • 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
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page
  • useAutocompleteQuery
  • useGetWidgetQuery
  • useGetMenuQuery

Was this helpful?

  1. Project Zero
  2. Next.js
  3. Data Fetching
  4. Client

Misc

useAutocompleteQuery

This function is used to match the entered keyword in categories and products for search input.

The useAutocompleteQuery function is imported from '@akinon/next/data/client/misc'.

import { useAutocompleteQuery } from '@akinon/next/data/client/misc';

To use the function, create a variable and call the function with the following properties:

  • debouncedSearchText

  • refetchOnMountOrArgChange

  • skip

const { currentData, isFetching, isLoading } = useAutocompleteQuery(
    debouncedSearchText,
    {
      refetchOnMountOrArgChange: true,
      skip: debouncedSearchText.length < MINIMUM_SEARCH_LENGTH
    }
  );

For example, if searching for the keyword "WOM", the data returned from the function:

{
  "groups": [{
      "entries": [{
        "label": "WOMAN",
        "url": "/woman/",
        "suggestion_type": "category",
        "extra": {
          "category_id": 2,
          "parent_categories": []
        }
      }],
      "suggestion_type": "Category"
    },
    {
      "entries": [{
          "label": "Mini Turnlock Flap Zebra Print Clutch Bag Black",
          "url": "/mini-turnlock-flap-zebra-print-clutch-bag-black/",
          "suggestion_type": "product",
          "extra": {
            "image": "https://0fb534.cdn.akinoncloud.com/products/2022/02/02/303/ae5f3cc6-d918-4dff-bdc0-b8b397f3882f_size273x210.jpg",
            "retail_price": 89.99,
            "product_type": "0",
            "price": 49.99
          }
        },
        {
          "label": "Resin Hair Clip Claw Zebra Print",
          "url": "/resin-hair-clip-claw-zebra-print/",
          "suggestion_type": "product",
          "extra": {
            "image": "https://0fb534.cdn.akinoncloud.com/products/2022/02/02/305/7374553d-151d-4cf0-b06f-45164313c959_size273x210.jpg",
            "retail_price": 8.49,
            "product_type": "0",
            "price": 8.49
          }
        },
        {
          "label": "Frill Neck Mini Dress With Fluted Three Quarter Sleeves Black",
          "url": "/frill-neck-mini-dress-with-fluted-three-quarter-sleeves-black-1/",
          "suggestion_type": "product",
          "extra": {
            "image": "https://0fb534.cdn.akinoncloud.com/products/2022/04/11/274/7f470497-fb62-4c41-afe8-f3c1bc01ed37_size273x210.jpg",
            "retail_price": 1000,
            "product_type": "0",
            "price": 1000
          }
        },
        {
          "label": "Wide Fit Embrace Leather High-Heeled Square Toe Boots Burgundy",
          "url": "/wide-fit-embrace-leather-high-heeled-square-toe-boots-burgundy/",
          "suggestion_type": "product",
          "extra": {
            "image": "https://0fb534.cdn.akinoncloud.com/products/2022/02/02/297/fdc50378-d570-44c0-9a69-1c16e3c15321_size273x210.jpg",
            "retail_price": 109.99,
            "product_type": "0",
            "price": 99.99
          }
        }
      ],
      "suggestion_type": "Product"
    }
  ]
}

useGetWidgetQuery

The useGetWidgetQuery function is used to fetch widget data in 'use client' components.

It should be imported into the component:

import { useGetWidgetQuery } from '@akinon/next/data/client/misc';

To use this function, create a variable where you specify the slug name of the widget you want to access:

const { data } = useGetWidgetQuery('slug-name');

The returned data varies depending on the widget you have created.

The returned data can be sent to another component as <ComponentName data={data} /> or can be processed in the component where it is located.

useGetMenuQuery

The useGetMenuQuery function is used to fetch menu data in 'use client' components.

It should be imported into the component:

import { useGetMenuQuery } from '@akinon/next/data/client/misc';

To use this function, create a variable and provide the menu level as an argument when calling the function:

const { data: menuData, isSuccess, isFetching } = useGetMenuQuery(4);
PreviousCheckoutNextProduct

Was this helpful?