Read a location menu using an expiring merchant-issued preview capability
curl --request GET \
--url https://api.craveup.com/api/v1/storefront/locations/{locationId}/preview \
--header 'Authorization: <api-key>'import requests
url = "https://api.craveup.com/api/v1/storefront/locations/{locationId}/preview"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.craveup.com/api/v1/storefront/locations/{locationId}/preview', 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.craveup.com/api/v1/storefront/locations/{locationId}/preview",
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: <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://api.craveup.com/api/v1/storefront/locations/{locationId}/preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://api.craveup.com/api/v1/storefront/locations/{locationId}/preview")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craveup.com/api/v1/storefront/locations/{locationId}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"menus": [
{
"id": "<string>",
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "online",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"name": "<string>",
"isActive": true,
"time": "<string>",
"categories": [
{
"id": "<string>",
"name": "<string>",
"products": [
{
"id": "<string>",
"name": "<string>",
"price": "<string>",
"displayPrice": "<string>",
"currency": "usd",
"modifierIds": [
"<string>"
],
"description": "<string>",
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "online",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"quantityUnit": "serving",
"availability": "<string>",
"images": [
"<string>"
],
"sellability": {
"sellable": true,
"reasonCodes": [
"<string>"
]
}
}
],
"parentCategoryId": "<string>"
}
],
"imageUrl": "<string>"
}
],
"popularProducts": [
{
"id": "<string>",
"name": "<string>",
"price": "<string>",
"displayPrice": "<string>",
"currency": "usd",
"modifierIds": [
"<string>"
],
"description": "<string>",
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "online",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"quantityUnit": "serving",
"availability": "<string>",
"images": [
"<string>"
],
"sellability": {
"sellable": true,
"reasonCodes": [
"<string>"
]
}
}
],
"expiresAt": "2023-11-07T05:31:56Z",
"location": {
"id": "<string>",
"restaurantSlug": "<string>",
"restaurantDisplayName": "<string>",
"restaurantBio": "<string>",
"coverPhoto": "<string>",
"restaurantLogo": "<string>",
"addressData": {
"street": "<string>",
"streetOptional": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"lat": 0,
"lng": 0
},
"addressString": "<string>",
"loyaltyProgramAvailable": true
}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}Locations
Read a location menu using an expiring merchant-issued preview capability
GET
/
locations
/
{locationId}
/
preview
Read a location menu using an expiring merchant-issued preview capability
curl --request GET \
--url https://api.craveup.com/api/v1/storefront/locations/{locationId}/preview \
--header 'Authorization: <api-key>'import requests
url = "https://api.craveup.com/api/v1/storefront/locations/{locationId}/preview"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.craveup.com/api/v1/storefront/locations/{locationId}/preview', 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.craveup.com/api/v1/storefront/locations/{locationId}/preview",
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: <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://api.craveup.com/api/v1/storefront/locations/{locationId}/preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://api.craveup.com/api/v1/storefront/locations/{locationId}/preview")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craveup.com/api/v1/storefront/locations/{locationId}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"menus": [
{
"id": "<string>",
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "online",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"name": "<string>",
"isActive": true,
"time": "<string>",
"categories": [
{
"id": "<string>",
"name": "<string>",
"products": [
{
"id": "<string>",
"name": "<string>",
"price": "<string>",
"displayPrice": "<string>",
"currency": "usd",
"modifierIds": [
"<string>"
],
"description": "<string>",
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "online",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"quantityUnit": "serving",
"availability": "<string>",
"images": [
"<string>"
],
"sellability": {
"sellable": true,
"reasonCodes": [
"<string>"
]
}
}
],
"parentCategoryId": "<string>"
}
],
"imageUrl": "<string>"
}
],
"popularProducts": [
{
"id": "<string>",
"name": "<string>",
"price": "<string>",
"displayPrice": "<string>",
"currency": "usd",
"modifierIds": [
"<string>"
],
"description": "<string>",
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "online",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"quantityUnit": "serving",
"availability": "<string>",
"images": [
"<string>"
],
"sellability": {
"sellable": true,
"reasonCodes": [
"<string>"
]
}
}
],
"expiresAt": "2023-11-07T05:31:56Z",
"location": {
"id": "<string>",
"restaurantSlug": "<string>",
"restaurantDisplayName": "<string>",
"restaurantBio": "<string>",
"coverPhoto": "<string>",
"restaurantLogo": "<string>",
"addressData": {
"street": "<string>",
"streetOptional": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"lat": 0,
"lng": 0
},
"addressString": "<string>",
"loyaltyProgramAvailable": true
}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"requestId": "<string>",
"details": {}
}Authorizations
Preview : a 30-minute, location-scoped capability minted by an organization admin. Never place it in query parameters; it cannot authorize cart or checkout writes.
Path Parameters
Required string length:
1 - 128Response
Private, no-store read-only catalog. Invalid, revoked or expired grants return 404. No ordering authority is granted.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Show child attributes
Show child attributes
