Navigation menus
List website navigation menus
Lists the storefront website’s navigation menus, which the theme renders as navigation bars, footers, and other site menus. For the Fluid mobile app’s navigation, use the mobile navigations API. For portal navigation, use the portal navigations API.
GET
/
api
/
menus
List website navigation menus
curl --request GET \
--url https://api.fluid.app/api/menus \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/menus"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/menus', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/menus",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/menus"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fluid.app/api/menus")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/menus")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"menus": [
{
"id": 123,
"company_id": 123,
"title": "<string>",
"active": true,
"slug": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"country_ids": [
123
],
"menu_items": [
{
"id": 123,
"title": "<string>",
"linkable_id": 123,
"linkable_type": "<string>",
"url": "<string>",
"order": 123,
"parent_id": 123,
"linkable": {
"id": 123,
"type": "<string>",
"title": "<string>",
"image_url": "<string>"
},
"sub_menu_items": [
{
"id": 123,
"title": "<string>",
"url": "<string>",
"linkable_id": 123,
"linkable_type": "<string>",
"order": 123,
"parent_id": 123,
"sub_menu_items": [
{
"id": 123,
"title": "<string>",
"linkable_id": 123,
"linkable_type": "<string>",
"order": 123,
"parent_id": 123
}
],
"linkable": {
"id": 123,
"type": "<string>",
"title": "<string>",
"image_url": "<string>"
}
}
]
}
]
}
],
"meta": {
"request_id": "<string>",
"timestamp": "<string>",
"total_count": 123,
"total_pages": 123,
"current_page": 123,
"per_page": 123
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer token authentication
Query Parameters
Page number for pagination
Number of records per page
Search query to filter menus by title
Filter by menu status (active or inactive)
Available options:
active, inactive Filter by country IDs
Sorting criteria for menus, e.g., 'created_at_asc', 'created_at_desc', 'title_asc', 'title_desc'
Language code for localization
⌘I
List website navigation menus
curl --request GET \
--url https://api.fluid.app/api/menus \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/menus"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/menus', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/menus",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/menus"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fluid.app/api/menus")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/menus")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"menus": [
{
"id": 123,
"company_id": 123,
"title": "<string>",
"active": true,
"slug": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"country_ids": [
123
],
"menu_items": [
{
"id": 123,
"title": "<string>",
"linkable_id": 123,
"linkable_type": "<string>",
"url": "<string>",
"order": 123,
"parent_id": 123,
"linkable": {
"id": 123,
"type": "<string>",
"title": "<string>",
"image_url": "<string>"
},
"sub_menu_items": [
{
"id": 123,
"title": "<string>",
"url": "<string>",
"linkable_id": 123,
"linkable_type": "<string>",
"order": 123,
"parent_id": 123,
"sub_menu_items": [
{
"id": 123,
"title": "<string>",
"linkable_id": 123,
"linkable_type": "<string>",
"order": 123,
"parent_id": 123
}
],
"linkable": {
"id": 123,
"type": "<string>",
"title": "<string>",
"image_url": "<string>"
}
}
]
}
]
}
],
"meta": {
"request_id": "<string>",
"timestamp": "<string>",
"total_count": 123,
"total_pages": 123,
"current_page": 123,
"per_page": 123
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}