Get the customer loyalty account, tier, membership, and wallet
curl --request GET \
--url https://api.craveup.com/api/v1/storefront/customer/locations/{locationId}/loyalty/account \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.craveup.com/api/v1/storefront/customer/locations/{locationId}/loyalty/account"
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/locations/{locationId}/loyalty/account', 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/locations/{locationId}/loyalty/account",
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/locations/{locationId}/loyalty/account"
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/locations/{locationId}/loyalty/account")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craveup.com/api/v1/storefront/customer/locations/{locationId}/loyalty/account")
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{
"enabled": true,
"authority": "SQUARE",
"enrollmentRequired": true,
"program": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"currency": "<string>"
},
"member": {
"status": "active",
"joinedAt": "2023-11-07T05:31:56Z"
},
"balances": [
{
"unit": "<string>",
"posted": 123,
"reserved": 123,
"available": 123,
"asOf": "2023-11-07T05:31:56Z",
"label": "<string>",
"lifetime": 123
}
],
"metrics": [
{
"id": "<string>",
"unit": "<string>",
"amount": 0,
"asOf": "2023-11-07T05:31:56Z",
"name": "<string>"
}
],
"expiringBalances": [
{
"unit": "<string>",
"amount": 4503599627370495,
"expiresAt": "2023-11-07T05:31:56Z"
}
],
"tier": {
"current": {
"id": "<string>",
"name": "<string>",
"minimum": 4503599627370495,
"earnMultiplierBps": 4503599627370495,
"benefits": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>"
}
]
},
"qualification": {
"metricId": "<string>",
"currentAmount": 4503599627370495,
"progressBps": 5000,
"isTopTier": true,
"remainingToNext": 4503599627370495,
"period": {
"type": "annual",
"startsMonth": 6,
"startsDay": 16,
"timeZone": "<string>",
"effectiveFrom": "2023-12-25"
}
},
"next": {
"id": "<string>",
"name": "<string>",
"minimum": 4503599627370495,
"earnMultiplierBps": 4503599627370495,
"benefits": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>"
}
]
}
},
"membership": {
"planId": "<string>",
"name": "<string>",
"status": "active",
"validFrom": "2023-11-07T05:31:56Z",
"validUntil": "2023-11-07T05:31:56Z",
"benefitRewardIds": [
"<string>"
],
"earnMultiplierBps": 4503599627370495
},
"membershipPlans": [
{
"id": "<string>",
"name": "<string>",
"benefitRewardIds": [
"<string>"
],
"earnMultiplierBps": 4503599627370495
}
],
"rewardCatalog": [
{
"id": "<string>",
"name": "<string>",
"cost": {
"unit": "<string>",
"amount": 4503599627370495
},
"membershipPlanIds": [
"<string>"
],
"description": "<string>",
"availableFrom": "2023-11-07T05:31:56Z",
"availableUntil": "2023-11-07T05:31:56Z"
}
],
"issuedRewards": [
{
"id": "<string>",
"rewardId": "<string>",
"status": "issued",
"issuedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
]
}{
"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": {}
}Loyalty
Get the customer loyalty account, tier, membership, and wallet
GET
/
customer
/
locations
/
{locationId}
/
loyalty
/
account
Get the customer loyalty account, tier, membership, and wallet
curl --request GET \
--url https://api.craveup.com/api/v1/storefront/customer/locations/{locationId}/loyalty/account \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.craveup.com/api/v1/storefront/customer/locations/{locationId}/loyalty/account"
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/locations/{locationId}/loyalty/account', 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/locations/{locationId}/loyalty/account",
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/locations/{locationId}/loyalty/account"
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/locations/{locationId}/loyalty/account")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craveup.com/api/v1/storefront/customer/locations/{locationId}/loyalty/account")
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{
"enabled": true,
"authority": "SQUARE",
"enrollmentRequired": true,
"program": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"currency": "<string>"
},
"member": {
"status": "active",
"joinedAt": "2023-11-07T05:31:56Z"
},
"balances": [
{
"unit": "<string>",
"posted": 123,
"reserved": 123,
"available": 123,
"asOf": "2023-11-07T05:31:56Z",
"label": "<string>",
"lifetime": 123
}
],
"metrics": [
{
"id": "<string>",
"unit": "<string>",
"amount": 0,
"asOf": "2023-11-07T05:31:56Z",
"name": "<string>"
}
],
"expiringBalances": [
{
"unit": "<string>",
"amount": 4503599627370495,
"expiresAt": "2023-11-07T05:31:56Z"
}
],
"tier": {
"current": {
"id": "<string>",
"name": "<string>",
"minimum": 4503599627370495,
"earnMultiplierBps": 4503599627370495,
"benefits": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>"
}
]
},
"qualification": {
"metricId": "<string>",
"currentAmount": 4503599627370495,
"progressBps": 5000,
"isTopTier": true,
"remainingToNext": 4503599627370495,
"period": {
"type": "annual",
"startsMonth": 6,
"startsDay": 16,
"timeZone": "<string>",
"effectiveFrom": "2023-12-25"
}
},
"next": {
"id": "<string>",
"name": "<string>",
"minimum": 4503599627370495,
"earnMultiplierBps": 4503599627370495,
"benefits": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>"
}
]
}
},
"membership": {
"planId": "<string>",
"name": "<string>",
"status": "active",
"validFrom": "2023-11-07T05:31:56Z",
"validUntil": "2023-11-07T05:31:56Z",
"benefitRewardIds": [
"<string>"
],
"earnMultiplierBps": 4503599627370495
},
"membershipPlans": [
{
"id": "<string>",
"name": "<string>",
"benefitRewardIds": [
"<string>"
],
"earnMultiplierBps": 4503599627370495
}
],
"rewardCatalog": [
{
"id": "<string>",
"name": "<string>",
"cost": {
"unit": "<string>",
"amount": 4503599627370495
},
"membershipPlanIds": [
"<string>"
],
"description": "<string>",
"availableFrom": "2023-11-07T05:31:56Z",
"availableUntil": "2023-11-07T05:31:56Z"
}
],
"issuedRewards": [
{
"id": "<string>",
"rewardId": "<string>",
"status": "issued",
"issuedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
]
}{
"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.
Path Parameters
Required string length:
1 - 128Response
Customer loyalty account.
Available options:
SQUARE, LIP Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
