Customer registry
Single customer
Returns detailed information about a specific customer identified by email or unique identifier.
GET
/
customerstats
/
customer
Single customer
curl --request GET \
--url https://app.xmenu.it/api/customerstats/customer \
--header 'X-Api-Key: <api-key>'import requests
url = "https://app.xmenu.it/api/customerstats/customer"
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/customerstats/customer', 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/customerstats/customer",
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/customerstats/customer"
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/customerstats/customer")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.xmenu.it/api/customerstats/customer")
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,
"error": "<string>",
"message": "<string>",
"customer": {
"email": "<string>",
"uid": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"address": "<string>",
"number": "<string>",
"city": "<string>",
"province": "<string>",
"zip": "<string>",
"country": "<string>",
"invoice_data": {
"name": "<string>",
"address": "<string>",
"city": "<string>",
"province": "<string>",
"zip": "<string>",
"country": "<string>",
"vat_code": "<string>",
"tax_code": "<string>",
"sdi_codice": "<string>",
"sdi_pec": "<string>"
},
"orders_count": 123,
"pickup_orders_count": 123,
"delivery_orders_count": 123,
"offline_orders_count": 123,
"first_order": "<string>",
"last_order": "<string>",
"last_offline_order": "<string>",
"orders_total": 123,
"added": "<string>",
"accept_marketing": true,
"mobile_app": true,
"signedup": true,
"signup_uid": "<string>",
"birthday": "2023-12-25",
"loyalty_points": 123,
"devices_unregistered": "<string>",
"code": "<string>",
"subrestaurant_code": "<string>",
"subrestaurant_uid": "<string>",
"signup_deleted": "<string>"
}
}Authorizations
apiKeyclientId & clientSecretoauth2
Restaurant API Key. Can be obtained from Tools > API Access in the xMenu dashboard.
Query Parameters
Unique restaurant identifier
Customer email address (alternative to uid)
Customer unique identifier (alternative to email)
Response
Single customer response
Operation status:
false= Errortrue= Success
Error code if the operation failed. Possible values:
CUSTOMER_NOT_FOUND= Customer not found
See Error codes for general error codes that may also occur.
Textual error description if the operation failed
Customer object
Show child attributes
Show child attributes
⌘I
Single customer
curl --request GET \
--url https://app.xmenu.it/api/customerstats/customer \
--header 'X-Api-Key: <api-key>'import requests
url = "https://app.xmenu.it/api/customerstats/customer"
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/customerstats/customer', 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/customerstats/customer",
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/customerstats/customer"
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/customerstats/customer")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.xmenu.it/api/customerstats/customer")
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,
"error": "<string>",
"message": "<string>",
"customer": {
"email": "<string>",
"uid": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"address": "<string>",
"number": "<string>",
"city": "<string>",
"province": "<string>",
"zip": "<string>",
"country": "<string>",
"invoice_data": {
"name": "<string>",
"address": "<string>",
"city": "<string>",
"province": "<string>",
"zip": "<string>",
"country": "<string>",
"vat_code": "<string>",
"tax_code": "<string>",
"sdi_codice": "<string>",
"sdi_pec": "<string>"
},
"orders_count": 123,
"pickup_orders_count": 123,
"delivery_orders_count": 123,
"offline_orders_count": 123,
"first_order": "<string>",
"last_order": "<string>",
"last_offline_order": "<string>",
"orders_total": 123,
"added": "<string>",
"accept_marketing": true,
"mobile_app": true,
"signedup": true,
"signup_uid": "<string>",
"birthday": "2023-12-25",
"loyalty_points": 123,
"devices_unregistered": "<string>",
"code": "<string>",
"subrestaurant_code": "<string>",
"subrestaurant_uid": "<string>",
"signup_deleted": "<string>"
}
}