REST APILoyalty API
Get Customer
Retrieves the authenticated customer's complete loyalty profile including tier status, points balance, spend totals, wallet information, and referral code. This is the primary endpoint for displaying a customer's loyalty dashboard.
Response Body
application/json
application/json
application/json
curl -X GET "https://yourstore.myshopify.com/a/lantern/customer/"{
"id": "7234567890123",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane.smith@example.com",
"phone": "+15551234567",
"acceptsMarketing": true,
"loyaltyTier": {
"name": "gold-member",
"displayName": "Gold Member",
"spendThreshold": 1000,
"color": "#FFD700",
"icon": {
"url": "https://storage.gadget.dev/gold-icon.png",
"mimeType": "image/png"
}
},
"nextTier": {
"name": "platinum-member",
"displayName": "Platinum Member",
"spendThreshold": 2500,
"color": "#E5E4E2",
"icon": {
"url": "https://storage.gadget.dev/gold-icon.png",
"mimeType": "image/png"
}
},
"loyaltyPoints": 1500,
"loyaltySpend": 1750.5,
"wallet": {
"initialItems": [
null
],
"initialStoreCreditAccounts": [
null
]
},
"referralCode": "JANESMITH123",
"referredByCode": "FRIEND456",
"failedReferralErrorCode": "string",
"isOptedIn": true,
"isEligible": true,
"isEligibleAdvocate": true,
"isTester": false,
"birthDate": "1990-05-15",
"ordersCount": 12,
"latestOrder": {
"id": "6842969882865",
"orderStatus": "fulfilled",
"orderStatusUrl": "https://example.myshopify.com/12345/orders/abc123/authenticate",
"customerUrl": "https://example.myshopify.com/account/orders/6842969882865",
"name": "#1035",
"shippingAddress": {},
"createdAt": 1706399810583,
"totalPrice": "85.95",
"totalNetAmount": "85.95",
"cancelled": false,
"cancelledAt": 0,
"items": [
{
"id": "12345678901234",
"productVariantId": "44123456789012",
"available": true,
"title": "Classic T-Shirt - Medium / Black",
"quantity": 1,
"imageSrc": "string",
"requiresShipping": true,
"url": "/products/classic-t-shirt?variant=44123456789012"
}
]
},
"wishlist": [
{
"id": "44123456789012",
"title": "Classic T-Shirt",
"handle": "classic-t-shirt",
"name": "Medium / Black",
"options": [
"string"
],
"price": "29.99",
"compareAtPrice": "string",
"image": "string"
}
],
"recentlyViewed": [
{
"product": {
"id": "8123456789012",
"title": "Classic T-Shirt",
"handle": "classic-t-shirt",
"onlineStoreUrl": "/products/classic-t-shirt",
"vendor": "Acme Co"
},
"variant": {
"id": "44123456789012",
"title": "Medium / Black",
"availableForSale": true,
"price": "$29.99",
"compareAtPrice": "string",
"imageUrl": "string"
}
}
]
}{
"error": "Invalid app proxy request"
}{
"error": "Customer not found",
"customerId": "7234567890123"
}