Export the signed-in customer's organization data
curl --request GET \
--url https://api.craveup.com/api/v1/storefront/customer/data-export \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.craveup.com/api/v1/storefront/customer/data-export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.craveup.com/api/v1/storefront/customer/data-export', 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/customer/data-export",
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.craveup.com/api/v1/storefront/customer/data-export"
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.craveup.com/api/v1/storefront/customer/data-export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craveup.com/api/v1/storefront/customer/data-export")
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{
"exportedAt": "2023-11-07T05:31:56Z",
"customer": {
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"identityState": "guest",
"lastName": "<string>",
"organizationId": "<string>",
"phone": "<string>",
"verifiedContacts": [
"email"
]
},
"addresses": [
{
"fullAddress": "<string>",
"id": "<string>",
"line1": "<string>",
"line2": "<string>",
"line3": "<string>"
}
],
"loyaltyPrograms": [
"<string>"
],
"cateringEvents": [
{
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"status": "enquiry",
"source": "nomly_phone",
"isTest": true,
"eventDate": "<string>",
"serviceTime": "<string>",
"headcount": {
"guests": 4503599627370496,
"approximate": true
},
"serviceStyle": "pickup",
"createdAt": "2023-11-07T05:31:56Z",
"contact": {
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"organization": "<string>"
},
"details": {
"deliveryAddress": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "United States",
"streetOptional": ""
},
"deliveryAddressStatus": "not_applicable",
"serviceAddress": "<string>",
"accessNotes": "<string>",
"onSiteContact": {
"name": "<string>",
"phone": "<string>"
},
"menuRequest": "<string>",
"dietary": [
{
"constraint": "<string>",
"count": 0,
"kind": "preference"
}
],
"serviceware": {
"needed": true,
"asStated": "<string>"
},
"budgetAsStated": "<string>",
"occasion": "<string>",
"questionsForTeam": [
"<string>"
],
"notes": "<string>"
},
"textConsent": {
"granted": true,
"phone": "<string>",
"grantedAt": "2023-11-07T05:31:56Z"
},
"amendments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originalQuoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 4503599627370495,
"currency": "<string>",
"totals": {
"subtotal": "<string>",
"discount": "<string>",
"taxRate": "<string>",
"taxTotal": "<string>",
"serviceFeeRate": "<string>",
"serviceFeeTotal": "<string>",
"total": "<string>",
"depositPercent": 50,
"depositAmount": "<string>",
"depositTotal": "<string>",
"balanceAmount": "<string>",
"balanceTotal": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"eventRevision": 4503599627370495,
"pricedLines": [
{
"kind": "menu",
"lineId": "<string>",
"productId": "<string>",
"unitPrice": "<string>",
"quantity": "<string>",
"unit": "person",
"lineTotal": "<string>",
"minimumSpendEligibility": "food_beverage"
}
],
"offer": {
"originalQuoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventSnapshot": {
"eventDate": "<string>",
"serviceTime": "<string>",
"headcount": {
"guests": 5000,
"approximate": true
},
"serviceStyle": "pickup",
"serviceAddress": "<string>",
"deliveryAddress": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "United States",
"streetOptional": ""
}
},
"lines": [
{
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "catering",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"kind": "menu",
"lineId": "<string>",
"productId": "<string>",
"name": "<string>",
"unitPrice": "<string>",
"quantity": "<string>",
"unit": "person",
"note": "<string>",
"lineTotal": "<string>",
"minimumSpendEligibility": "food_beverage",
"configuration": {
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "catering",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"lineId": "<string>",
"productId": "<string>",
"selections": [
{
"groupId": "<string>",
"selectedOptions": [
{
"optionId": "<string>",
"quantity": 50,
"children": "<array>"
}
]
}
],
"quantity": "<string>",
"allocation": {
"groupId": "<string>",
"guests": 5000
},
"requestedQuantity": "<string>",
"acceptedSelections": [
{
"groupId": "<string>",
"selectedOptions": [
{
"optionId": "<string>",
"quantity": 49,
"selectionPath": [
"<string>"
],
"provenance": "customer",
"children": "<array>"
}
]
}
],
"priceBasis": "per_person",
"unit": "person",
"planningYield": {
"guests": "<string>",
"quantity": "<string>",
"reviewNote": "<string>"
},
"unitPrice": {
"minCents": 49999999,
"maxCents": 49999999
},
"lineTotal": {
"minCents": 49999999,
"maxCents": 49999999
},
"charges": [
{
"chargeId": "<string>",
"scope": "sold_unit",
"bucketId": "<string>",
"selectionPath": [
"<string>"
],
"quantity": "<string>",
"unitPrice": {
"minCents": 49999999,
"maxCents": 49999999
},
"lineTotal": {
"minCents": 49999999,
"maxCents": 49999999
},
"minimumSpendEligibility": "food_beverage",
"coveredByBucket": true
}
],
"effectiveRules": {
"values": {
"minimumGuests": 5000,
"maximumGuests": 5000,
"minimumUnits": "<string>",
"maximumUnits": "<string>",
"minimumSpend": {
"amountCents": 49999999,
"basis": "eligible_food_beverage_before_discounts"
},
"leadTimeHours": 4380
},
"sources": {}
},
"food": {
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "online",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"contributions": [
{
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"selectionPath": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"fraction": {
"numerator": 1,
"denominator": 1
},
"provenance": {
"kind": "entered"
},
"nutrients": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
}
}
],
"serving": {
"label": "<string>",
"grams": 1
},
"quantity": {
"unit": "serving",
"count": 5000
},
"trayYield": {
"servingsPerTray": 1
},
"perServing": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"perTray": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"lineTotal": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"completeness": "complete",
"missing": [
{
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nutrient": "caloriesKcal"
}
],
"warnings": [
{
"code": "DIETARY_CONFLICT",
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"preferenceId": "vegetarian",
"selectionPath": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
]
},
"explanation": "<string>",
"dietaryPreferences": {
"preferences": [
"vegetarian"
],
"avoidAllergenIds": [
"milk"
]
}
},
"review": {
"priceConfirmations": [
{
"chargeId": "<string>",
"selectionPath": [
"<string>"
],
"unitPriceCents": 49999999,
"reason": "<string>"
}
],
"ruleResolutions": [
{
"code": "BELOW_MINIMUM_HEADCOUNT",
"reason": "<string>"
}
]
}
}
],
"totals": {
"subtotal": "<string>",
"discount": "<string>",
"taxRate": "<string>",
"taxTotal": "<string>",
"serviceFeeRate": "<string>",
"serviceFeeTotal": "<string>",
"total": "<string>",
"depositPercent": 50,
"depositAmount": "<string>",
"depositTotal": "<string>",
"balanceAmount": "<string>",
"balanceTotal": "<string>"
},
"noteToCustomer": "<string>",
"terms": {
"changeCutoffHours": 0,
"balanceDue": {
"rule": "at_cutoff"
},
"quoteValidityDays": 0,
"cancellationTerms": "<string>"
},
"timeZone": "<string>",
"lockAt": "2023-11-07T05:31:56Z"
},
"decision": {
"outcome": "accepted",
"createdAt": "2023-11-07T05:31:56Z"
}
}
],
"refundGroups": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventRevision": 4503599627370495,
"currency": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"reason": "<string>",
"allocations": [
{
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountMinor": 4503599627370495
}
]
}
],
"cancellationDecisions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quoteId": "<string>",
"eventRevision": 4503599627370495,
"outcome": "approved",
"reason": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"serviceCancellations": [
{
"id": "<string>",
"quoteId": "<string>",
"eventRevision": 4503599627370495,
"reason": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"cancellationRequests": [
{
"id": "<string>",
"quoteId": "<string>",
"eventRevision": 4503599627370495,
"reason": "<string>",
"status": "open",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"quotes": [
{
"version": 4503599627370496,
"status": "draft",
"totals": {
"subtotal": "<string>",
"discount": "<string>",
"taxRate": "<string>",
"taxTotal": "<string>",
"serviceFeeRate": "<string>",
"serviceFeeTotal": "<string>",
"total": "<string>",
"depositPercent": 50,
"depositAmount": "<string>",
"depositTotal": "<string>",
"balanceAmount": "<string>",
"balanceTotal": "<string>"
},
"noteToCustomer": "<string>",
"lines": [
{
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "catering",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"kind": "menu",
"lineId": "<string>",
"productId": "<string>",
"name": "<string>",
"unitPrice": "<string>",
"quantity": "<string>",
"unit": "person",
"note": "<string>",
"lineTotal": "<string>",
"minimumSpendEligibility": "food_beverage",
"configuration": {
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "catering",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"lineId": "<string>",
"productId": "<string>",
"selections": [
{
"groupId": "<string>",
"selectedOptions": [
{
"optionId": "<string>",
"quantity": 50,
"children": "<array>"
}
]
}
],
"quantity": "<string>",
"allocation": {
"groupId": "<string>",
"guests": 5000
},
"requestedQuantity": "<string>",
"acceptedSelections": [
{
"groupId": "<string>",
"selectedOptions": [
{
"optionId": "<string>",
"quantity": 49,
"selectionPath": [
"<string>"
],
"provenance": "customer",
"children": "<array>"
}
]
}
],
"priceBasis": "per_person",
"unit": "person",
"planningYield": {
"guests": "<string>",
"quantity": "<string>",
"reviewNote": "<string>"
},
"unitPrice": {
"minCents": 49999999,
"maxCents": 49999999
},
"lineTotal": {
"minCents": 49999999,
"maxCents": 49999999
},
"charges": [
{
"chargeId": "<string>",
"scope": "sold_unit",
"bucketId": "<string>",
"selectionPath": [
"<string>"
],
"quantity": "<string>",
"unitPrice": {
"minCents": 49999999,
"maxCents": 49999999
},
"lineTotal": {
"minCents": 49999999,
"maxCents": 49999999
},
"minimumSpendEligibility": "food_beverage",
"coveredByBucket": true
}
],
"effectiveRules": {
"values": {
"minimumGuests": 5000,
"maximumGuests": 5000,
"minimumUnits": "<string>",
"maximumUnits": "<string>",
"minimumSpend": {
"amountCents": 49999999,
"basis": "eligible_food_beverage_before_discounts"
},
"leadTimeHours": 4380
},
"sources": {}
},
"food": {
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "online",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"contributions": [
{
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"selectionPath": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"fraction": {
"numerator": 1,
"denominator": 1
},
"provenance": {
"kind": "entered"
},
"nutrients": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
}
}
],
"serving": {
"label": "<string>",
"grams": 1
},
"quantity": {
"unit": "serving",
"count": 5000
},
"trayYield": {
"servingsPerTray": 1
},
"perServing": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"perTray": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"lineTotal": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"completeness": "complete",
"missing": [
{
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nutrient": "caloriesKcal"
}
],
"warnings": [
{
"code": "DIETARY_CONFLICT",
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"preferenceId": "vegetarian",
"selectionPath": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
]
},
"explanation": "<string>",
"dietaryPreferences": {
"preferences": [
"vegetarian"
],
"avoidAllergenIds": [
"milk"
]
}
},
"review": {
"priceConfirmations": [
{
"chargeId": "<string>",
"selectionPath": [
"<string>"
],
"unitPriceCents": 49999999,
"reason": "<string>"
}
],
"ruleResolutions": [
{
"code": "BELOW_MINIMUM_HEADCOUNT",
"reason": "<string>"
}
]
}
}
],
"eventSnapshot": {
"eventDate": "<string>",
"serviceTime": "<string>",
"headcount": {
"guests": 0,
"approximate": true
},
"serviceStyle": "pickup",
"serviceAddress": "<string>",
"eventStartsAt": "2023-11-07T05:31:56Z",
"timeZone": "<string>"
}
}
],
"payments": [
{
"kind": "deposit",
"status": "pending",
"amount": "<string>",
"total": "<string>",
"currency": "<string>",
"paidAt": "2023-11-07T05:31:56Z"
}
]
}
],
"orders": [
{
"id": "<string>",
"shortId": "<string>",
"restaurantDisplayName": "<string>",
"fulfillmentMethod": "<string>",
"fulfillmentIdentifier": "<string>",
"pickupType": "<string>",
"orderTime": "<string>",
"orderDate": "<string>",
"totalQuantity": 4503599627370495,
"currency": "<string>",
"orderTotal": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"financial": {
"state": "known",
"status": "NO_PAYMENT_REQUIRED",
"reconciliationStatus": "CURRENT",
"revision": 4503599627370495,
"collected": "<string>",
"due": "<string>"
},
"partiallyRefunded": true,
"items": [
{
"id": "<string>",
"name": "<string>",
"quantity": 4503599627370495,
"price": "<string>",
"total": "<string>",
"discount": "<string>",
"specialInstructions": "<string>",
"modifiers": [
{
"groupName": "<string>",
"name": "<string>",
"quantity": 4503599627370495,
"price": "<string>"
}
]
}
],
"pricing": {
"subtotal": "<string>",
"discount": "<string>",
"tax": "<string>",
"tip": "<string>",
"serviceFee": "<string>",
"fulfillmentFee": "<string>",
"enterpriseFee": "<string>",
"total": "<string>",
"refunded": "<string>",
"netPaid": "<string>"
},
"deliveryInfo": {
"deliveryAddress": "<string>"
},
"delivery": {
"provider": "DOORDASH_DRIVE",
"status": "<string>",
"trackingUrl": "<string>",
"supportReference": "<string>",
"courierName": "<string>",
"pickupEstimatedAt": "2023-11-07T05:31:56Z",
"pickupActualAt": "2023-11-07T05:31:56Z",
"dropoffEstimatedAt": "2023-11-07T05:31:56Z",
"dropoffActualAt": "2023-11-07T05:31:56Z",
"cancellationReason": "<string>",
"providerUpdatedAt": "2023-11-07T05:31:56Z"
},
"roomServiceInfo": {},
"tableServiceInfo": {},
"payment": {
"provider": "STRIPE",
"cardLast4": "<string>",
"walletType": "<string>",
"cardBrand": "<string>"
},
"updatedAt": "2023-11-07T05:31:56Z",
"locationId": "<string>",
"catering": null
}
]
}{
"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": {}
}Customers
Export the signed-in customer's organization data
GET
/
customer
/
data-export
Export the signed-in customer's organization data
curl --request GET \
--url https://api.craveup.com/api/v1/storefront/customer/data-export \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.craveup.com/api/v1/storefront/customer/data-export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.craveup.com/api/v1/storefront/customer/data-export', 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/customer/data-export",
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.craveup.com/api/v1/storefront/customer/data-export"
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.craveup.com/api/v1/storefront/customer/data-export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craveup.com/api/v1/storefront/customer/data-export")
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{
"exportedAt": "2023-11-07T05:31:56Z",
"customer": {
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"identityState": "guest",
"lastName": "<string>",
"organizationId": "<string>",
"phone": "<string>",
"verifiedContacts": [
"email"
]
},
"addresses": [
{
"fullAddress": "<string>",
"id": "<string>",
"line1": "<string>",
"line2": "<string>",
"line3": "<string>"
}
],
"loyaltyPrograms": [
"<string>"
],
"cateringEvents": [
{
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"status": "enquiry",
"source": "nomly_phone",
"isTest": true,
"eventDate": "<string>",
"serviceTime": "<string>",
"headcount": {
"guests": 4503599627370496,
"approximate": true
},
"serviceStyle": "pickup",
"createdAt": "2023-11-07T05:31:56Z",
"contact": {
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"organization": "<string>"
},
"details": {
"deliveryAddress": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "United States",
"streetOptional": ""
},
"deliveryAddressStatus": "not_applicable",
"serviceAddress": "<string>",
"accessNotes": "<string>",
"onSiteContact": {
"name": "<string>",
"phone": "<string>"
},
"menuRequest": "<string>",
"dietary": [
{
"constraint": "<string>",
"count": 0,
"kind": "preference"
}
],
"serviceware": {
"needed": true,
"asStated": "<string>"
},
"budgetAsStated": "<string>",
"occasion": "<string>",
"questionsForTeam": [
"<string>"
],
"notes": "<string>"
},
"textConsent": {
"granted": true,
"phone": "<string>",
"grantedAt": "2023-11-07T05:31:56Z"
},
"amendments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originalQuoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 4503599627370495,
"currency": "<string>",
"totals": {
"subtotal": "<string>",
"discount": "<string>",
"taxRate": "<string>",
"taxTotal": "<string>",
"serviceFeeRate": "<string>",
"serviceFeeTotal": "<string>",
"total": "<string>",
"depositPercent": 50,
"depositAmount": "<string>",
"depositTotal": "<string>",
"balanceAmount": "<string>",
"balanceTotal": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"eventRevision": 4503599627370495,
"pricedLines": [
{
"kind": "menu",
"lineId": "<string>",
"productId": "<string>",
"unitPrice": "<string>",
"quantity": "<string>",
"unit": "person",
"lineTotal": "<string>",
"minimumSpendEligibility": "food_beverage"
}
],
"offer": {
"originalQuoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventSnapshot": {
"eventDate": "<string>",
"serviceTime": "<string>",
"headcount": {
"guests": 5000,
"approximate": true
},
"serviceStyle": "pickup",
"serviceAddress": "<string>",
"deliveryAddress": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "United States",
"streetOptional": ""
}
},
"lines": [
{
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "catering",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"kind": "menu",
"lineId": "<string>",
"productId": "<string>",
"name": "<string>",
"unitPrice": "<string>",
"quantity": "<string>",
"unit": "person",
"note": "<string>",
"lineTotal": "<string>",
"minimumSpendEligibility": "food_beverage",
"configuration": {
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "catering",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"lineId": "<string>",
"productId": "<string>",
"selections": [
{
"groupId": "<string>",
"selectedOptions": [
{
"optionId": "<string>",
"quantity": 50,
"children": "<array>"
}
]
}
],
"quantity": "<string>",
"allocation": {
"groupId": "<string>",
"guests": 5000
},
"requestedQuantity": "<string>",
"acceptedSelections": [
{
"groupId": "<string>",
"selectedOptions": [
{
"optionId": "<string>",
"quantity": 49,
"selectionPath": [
"<string>"
],
"provenance": "customer",
"children": "<array>"
}
]
}
],
"priceBasis": "per_person",
"unit": "person",
"planningYield": {
"guests": "<string>",
"quantity": "<string>",
"reviewNote": "<string>"
},
"unitPrice": {
"minCents": 49999999,
"maxCents": 49999999
},
"lineTotal": {
"minCents": 49999999,
"maxCents": 49999999
},
"charges": [
{
"chargeId": "<string>",
"scope": "sold_unit",
"bucketId": "<string>",
"selectionPath": [
"<string>"
],
"quantity": "<string>",
"unitPrice": {
"minCents": 49999999,
"maxCents": 49999999
},
"lineTotal": {
"minCents": 49999999,
"maxCents": 49999999
},
"minimumSpendEligibility": "food_beverage",
"coveredByBucket": true
}
],
"effectiveRules": {
"values": {
"minimumGuests": 5000,
"maximumGuests": 5000,
"minimumUnits": "<string>",
"maximumUnits": "<string>",
"minimumSpend": {
"amountCents": 49999999,
"basis": "eligible_food_beverage_before_discounts"
},
"leadTimeHours": 4380
},
"sources": {}
},
"food": {
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "online",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"contributions": [
{
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"selectionPath": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"fraction": {
"numerator": 1,
"denominator": 1
},
"provenance": {
"kind": "entered"
},
"nutrients": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
}
}
],
"serving": {
"label": "<string>",
"grams": 1
},
"quantity": {
"unit": "serving",
"count": 5000
},
"trayYield": {
"servingsPerTray": 1
},
"perServing": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"perTray": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"lineTotal": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"completeness": "complete",
"missing": [
{
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nutrient": "caloriesKcal"
}
],
"warnings": [
{
"code": "DIETARY_CONFLICT",
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"preferenceId": "vegetarian",
"selectionPath": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
]
},
"explanation": "<string>",
"dietaryPreferences": {
"preferences": [
"vegetarian"
],
"avoidAllergenIds": [
"milk"
]
}
},
"review": {
"priceConfirmations": [
{
"chargeId": "<string>",
"selectionPath": [
"<string>"
],
"unitPriceCents": 49999999,
"reason": "<string>"
}
],
"ruleResolutions": [
{
"code": "BELOW_MINIMUM_HEADCOUNT",
"reason": "<string>"
}
]
}
}
],
"totals": {
"subtotal": "<string>",
"discount": "<string>",
"taxRate": "<string>",
"taxTotal": "<string>",
"serviceFeeRate": "<string>",
"serviceFeeTotal": "<string>",
"total": "<string>",
"depositPercent": 50,
"depositAmount": "<string>",
"depositTotal": "<string>",
"balanceAmount": "<string>",
"balanceTotal": "<string>"
},
"noteToCustomer": "<string>",
"terms": {
"changeCutoffHours": 0,
"balanceDue": {
"rule": "at_cutoff"
},
"quoteValidityDays": 0,
"cancellationTerms": "<string>"
},
"timeZone": "<string>",
"lockAt": "2023-11-07T05:31:56Z"
},
"decision": {
"outcome": "accepted",
"createdAt": "2023-11-07T05:31:56Z"
}
}
],
"refundGroups": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventRevision": 4503599627370495,
"currency": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"reason": "<string>",
"allocations": [
{
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountMinor": 4503599627370495
}
]
}
],
"cancellationDecisions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quoteId": "<string>",
"eventRevision": 4503599627370495,
"outcome": "approved",
"reason": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"serviceCancellations": [
{
"id": "<string>",
"quoteId": "<string>",
"eventRevision": 4503599627370495,
"reason": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"cancellationRequests": [
{
"id": "<string>",
"quoteId": "<string>",
"eventRevision": 4503599627370495,
"reason": "<string>",
"status": "open",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"quotes": [
{
"version": 4503599627370496,
"status": "draft",
"totals": {
"subtotal": "<string>",
"discount": "<string>",
"taxRate": "<string>",
"taxTotal": "<string>",
"serviceFeeRate": "<string>",
"serviceFeeTotal": "<string>",
"total": "<string>",
"depositPercent": 50,
"depositAmount": "<string>",
"depositTotal": "<string>",
"balanceAmount": "<string>",
"balanceTotal": "<string>"
},
"noteToCustomer": "<string>",
"lines": [
{
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "catering",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"kind": "menu",
"lineId": "<string>",
"productId": "<string>",
"name": "<string>",
"unitPrice": "<string>",
"quantity": "<string>",
"unit": "person",
"note": "<string>",
"lineTotal": "<string>",
"minimumSpendEligibility": "food_beverage",
"configuration": {
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "catering",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"lineId": "<string>",
"productId": "<string>",
"selections": [
{
"groupId": "<string>",
"selectedOptions": [
{
"optionId": "<string>",
"quantity": 50,
"children": "<array>"
}
]
}
],
"quantity": "<string>",
"allocation": {
"groupId": "<string>",
"guests": 5000
},
"requestedQuantity": "<string>",
"acceptedSelections": [
{
"groupId": "<string>",
"selectedOptions": [
{
"optionId": "<string>",
"quantity": 49,
"selectionPath": [
"<string>"
],
"provenance": "customer",
"children": "<array>"
}
]
}
],
"priceBasis": "per_person",
"unit": "person",
"planningYield": {
"guests": "<string>",
"quantity": "<string>",
"reviewNote": "<string>"
},
"unitPrice": {
"minCents": 49999999,
"maxCents": 49999999
},
"lineTotal": {
"minCents": 49999999,
"maxCents": 49999999
},
"charges": [
{
"chargeId": "<string>",
"scope": "sold_unit",
"bucketId": "<string>",
"selectionPath": [
"<string>"
],
"quantity": "<string>",
"unitPrice": {
"minCents": 49999999,
"maxCents": 49999999
},
"lineTotal": {
"minCents": 49999999,
"maxCents": 49999999
},
"minimumSpendEligibility": "food_beverage",
"coveredByBucket": true
}
],
"effectiveRules": {
"values": {
"minimumGuests": 5000,
"maximumGuests": 5000,
"minimumUnits": "<string>",
"maximumUnits": "<string>",
"minimumSpend": {
"amountCents": 49999999,
"basis": "eligible_food_beverage_before_discounts"
},
"leadTimeHours": 4380
},
"sources": {}
},
"food": {
"source": {
"menuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "online",
"kind": "released",
"menuReleaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"contributions": [
{
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"selectionPath": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"fraction": {
"numerator": 1,
"denominator": 1
},
"provenance": {
"kind": "entered"
},
"nutrients": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
}
}
],
"serving": {
"label": "<string>",
"grams": 1
},
"quantity": {
"unit": "serving",
"count": 5000
},
"trayYield": {
"servingsPerTray": 1
},
"perServing": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"perTray": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"lineTotal": {
"caloriesKcal": 1,
"proteinGrams": 1,
"carbohydrateGrams": 1,
"fatGrams": 1,
"fiberGrams": 1,
"sugarGrams": 1,
"saturatedFatGrams": 1,
"sodiumMilligrams": 1
},
"completeness": "complete",
"missing": [
{
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nutrient": "caloriesKcal"
}
],
"warnings": [
{
"code": "DIETARY_CONFLICT",
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"preferenceId": "vegetarian",
"selectionPath": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
]
},
"explanation": "<string>",
"dietaryPreferences": {
"preferences": [
"vegetarian"
],
"avoidAllergenIds": [
"milk"
]
}
},
"review": {
"priceConfirmations": [
{
"chargeId": "<string>",
"selectionPath": [
"<string>"
],
"unitPriceCents": 49999999,
"reason": "<string>"
}
],
"ruleResolutions": [
{
"code": "BELOW_MINIMUM_HEADCOUNT",
"reason": "<string>"
}
]
}
}
],
"eventSnapshot": {
"eventDate": "<string>",
"serviceTime": "<string>",
"headcount": {
"guests": 0,
"approximate": true
},
"serviceStyle": "pickup",
"serviceAddress": "<string>",
"eventStartsAt": "2023-11-07T05:31:56Z",
"timeZone": "<string>"
}
}
],
"payments": [
{
"kind": "deposit",
"status": "pending",
"amount": "<string>",
"total": "<string>",
"currency": "<string>",
"paidAt": "2023-11-07T05:31:56Z"
}
]
}
],
"orders": [
{
"id": "<string>",
"shortId": "<string>",
"restaurantDisplayName": "<string>",
"fulfillmentMethod": "<string>",
"fulfillmentIdentifier": "<string>",
"pickupType": "<string>",
"orderTime": "<string>",
"orderDate": "<string>",
"totalQuantity": 4503599627370495,
"currency": "<string>",
"orderTotal": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"financial": {
"state": "known",
"status": "NO_PAYMENT_REQUIRED",
"reconciliationStatus": "CURRENT",
"revision": 4503599627370495,
"collected": "<string>",
"due": "<string>"
},
"partiallyRefunded": true,
"items": [
{
"id": "<string>",
"name": "<string>",
"quantity": 4503599627370495,
"price": "<string>",
"total": "<string>",
"discount": "<string>",
"specialInstructions": "<string>",
"modifiers": [
{
"groupName": "<string>",
"name": "<string>",
"quantity": 4503599627370495,
"price": "<string>"
}
]
}
],
"pricing": {
"subtotal": "<string>",
"discount": "<string>",
"tax": "<string>",
"tip": "<string>",
"serviceFee": "<string>",
"fulfillmentFee": "<string>",
"enterpriseFee": "<string>",
"total": "<string>",
"refunded": "<string>",
"netPaid": "<string>"
},
"deliveryInfo": {
"deliveryAddress": "<string>"
},
"delivery": {
"provider": "DOORDASH_DRIVE",
"status": "<string>",
"trackingUrl": "<string>",
"supportReference": "<string>",
"courierName": "<string>",
"pickupEstimatedAt": "2023-11-07T05:31:56Z",
"pickupActualAt": "2023-11-07T05:31:56Z",
"dropoffEstimatedAt": "2023-11-07T05:31:56Z",
"dropoffActualAt": "2023-11-07T05:31:56Z",
"cancellationReason": "<string>",
"providerUpdatedAt": "2023-11-07T05:31:56Z"
},
"roomServiceInfo": {},
"tableServiceInfo": {},
"payment": {
"provider": "STRIPE",
"cardLast4": "<string>",
"walletType": "<string>",
"cardBrand": "<string>"
},
"updatedAt": "2023-11-07T05:31:56Z",
"locationId": "<string>",
"catering": null
}
]
}{
"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
Merchant-bound opaque customer access capability returned by fresh code verification or refresh.
Response
Customer profile, addresses, loyalty programs, and order history.
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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
