Menu consultation
Get product
Returns details of a single product by its unique identifier.
GET
/
menu
/
product
Get product
curl --request GET \
--url https://app.xmenu.it/api/menu/product \
--header 'X-Api-Key: <api-key>'import requests
url = "https://app.xmenu.it/api/menu/product"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://app.xmenu.it/api/menu/product', 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://app.xmenu.it/api/menu/product",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://app.xmenu.it/api/menu/product"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.xmenu.it/api/menu/product")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.xmenu.it/api/menu/product")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"product": {
"uid": "<string>",
"category_uid": "<string>",
"name": "<string>",
"ingredients": "<string>",
"price": 123,
"prices_table": {},
"image": "<string>",
"allergens": [
"<string>"
],
"symbols": [
"<string>"
],
"suggested": true,
"price_sale_alert": true,
"price_sale_badge": 123,
"checkout_selling": true,
"url": "<string>",
"hidden": true,
"position": 123,
"subrestaurant_uids": [
"<string>"
],
"ext_id": "<string>",
"options": [
{
"uid": "<string>",
"name": "<string>",
"short_name": "<string>",
"min_selectable": 123,
"max_selectable": 123,
"max_quantity": 123,
"note": "<string>",
"hidden": true,
"position": 123,
"primary": true,
"first_default": true,
"show_caption": true,
"print_caption": true,
"subrestaurant_uids": [
"<string>"
],
"ext_id": "<string>",
"option_values": [
{
"uid": "<string>",
"name": "<string>",
"short_name": "<string>",
"price_operand": 123,
"hidden": true,
"position": 123,
"checked_default": true,
"subrestaurant_uids": [
"<string>"
],
"restrict_to_primary_value_uids": [
"<string>"
],
"ext_id": "<string>"
}
]
}
]
},
"error": "<string>",
"message": "<string>"
}
Authorizations
apiKeyclientId & clientSecretoauth2
Restaurant API Key. Can be obtained from Tools > API Access in the xMenu dashboard.
Query Parameters
Unique product identifier
Response
Product response
Operation result: true if successful, false if failed
Menu product
Show child attributes
Show child attributes
Error code if the operation failed. Possible values:
PRODUCT_NOT_FOUND= Requested product not found
See Error codes for general error codes that may also occur.
Human-readable error description if the operation failed
Previous
Import menuImport or update your menu structure including categories, products, and options.
Next
⌘I
Get product
curl --request GET \
--url https://app.xmenu.it/api/menu/product \
--header 'X-Api-Key: <api-key>'import requests
url = "https://app.xmenu.it/api/menu/product"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://app.xmenu.it/api/menu/product', 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://app.xmenu.it/api/menu/product",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://app.xmenu.it/api/menu/product"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.xmenu.it/api/menu/product")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.xmenu.it/api/menu/product")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"product": {
"uid": "<string>",
"category_uid": "<string>",
"name": "<string>",
"ingredients": "<string>",
"price": 123,
"prices_table": {},
"image": "<string>",
"allergens": [
"<string>"
],
"symbols": [
"<string>"
],
"suggested": true,
"price_sale_alert": true,
"price_sale_badge": 123,
"checkout_selling": true,
"url": "<string>",
"hidden": true,
"position": 123,
"subrestaurant_uids": [
"<string>"
],
"ext_id": "<string>",
"options": [
{
"uid": "<string>",
"name": "<string>",
"short_name": "<string>",
"min_selectable": 123,
"max_selectable": 123,
"max_quantity": 123,
"note": "<string>",
"hidden": true,
"position": 123,
"primary": true,
"first_default": true,
"show_caption": true,
"print_caption": true,
"subrestaurant_uids": [
"<string>"
],
"ext_id": "<string>",
"option_values": [
{
"uid": "<string>",
"name": "<string>",
"short_name": "<string>",
"price_operand": 123,
"hidden": true,
"position": 123,
"checked_default": true,
"subrestaurant_uids": [
"<string>"
],
"restrict_to_primary_value_uids": [
"<string>"
],
"ext_id": "<string>"
}
]
}
]
},
"error": "<string>",
"message": "<string>"
}