Products
Get the catalog
Categories, items with option groups, and add-ons. Deals appear as items and switch off by themselves when one of their items is off.
GET
/
menu
Get the menu
curl --request GET \
--url https://staging2.xfaster.net/api/partner/v1/menu \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging2.xfaster.net/api/partner/v1/menu', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging2.xfaster.net/api/partner/v1/menu"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging2.xfaster.net/api/partner/v1/menu",
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;
}{
"categories": [
{
"id": 123,
"external_id": "<string>",
"name": "<string>",
"position": 123
}
],
"items": [
{
"id": 3062,
"external_id": "<string>",
"category_id": 123,
"name": "<string>",
"price": 6000,
"discount": {},
"sale_price": 5500,
"available": true,
"off_until": "2023-11-07T05:31:56Z",
"barcode": "<string>",
"unit": "<string>",
"by_weight": true,
"stock": 123,
"option_groups": [
{
"name": "<string>",
"type": "single",
"min": 123,
"max": 123,
"options": [
{
"name": "<string>",
"price": 123
}
]
}
],
"addon_ids": [
123
]
}
],
"addons": [
{
"id": 123,
"external_id": "<string>",
"name": "<string>",
"price": 123,
"available": true
}
]
}Authorizations
apiKeyapiKey & storeHeader
The store's API key (xfp_test_… on the sandbox, xfp_live_… on live). XFaster creates it and shows it once. An integrator key (one key for a POS company) also sends X-XFaster-Store.
⌘I
Get the menu
curl --request GET \
--url https://staging2.xfaster.net/api/partner/v1/menu \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging2.xfaster.net/api/partner/v1/menu', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging2.xfaster.net/api/partner/v1/menu"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging2.xfaster.net/api/partner/v1/menu",
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;
}{
"categories": [
{
"id": 123,
"external_id": "<string>",
"name": "<string>",
"position": 123
}
],
"items": [
{
"id": 3062,
"external_id": "<string>",
"category_id": 123,
"name": "<string>",
"price": 6000,
"discount": {},
"sale_price": 5500,
"available": true,
"off_until": "2023-11-07T05:31:56Z",
"barcode": "<string>",
"unit": "<string>",
"by_weight": true,
"stock": 123,
"option_groups": [
{
"name": "<string>",
"type": "single",
"min": 123,
"max": 123,
"options": [
{
"name": "<string>",
"price": 123
}
]
}
],
"addon_ids": [
123
]
}
],
"addons": [
{
"id": 123,
"external_id": "<string>",
"name": "<string>",
"price": 123,
"available": true
}
]
}