- Platform Overview
- Resources and Guides
-
POS Integration
-
Getting Started
-
Core Concepts
-
Integration SDK
-
Certification
-
- Order Ahead
-
Provider Enablement
-
Provider Enablement
-
Endpoints
-
Developer Endpoints
-
-
API Reference
-
Getting Started
-
v15
-
- Access Tokens
- Campaigns
- Credit Cards
- Users
- Credit
- Locations
- Payment Methods
- QR Codes
- Progress Adjustments
- Orders
- Rewards
- Gift Cards
-
-
v14
-
- Credit
- Access Tokens
- Campaigns
- Categories
- Credit Cards
- Interstitials
- Locations
- Loyalty
- Orders
- Payment Tokens
- Support Tickets
- Users
-
-
Customers .: Get
API Reference / v15
Get details on a customer
This endpoint allows you to get details on a customer using their payment token. This endpoint can be used after a transaction to get the user’s name, order count and loyalty ID. It should not be required or hold up the transaction if for some reason it is slow or fails.
To request the user’s payment method, you must have a token with the manage_merchant_orders
permission.
Request Endpoint
POST /v15/merchants/:merchant_id/customer
Authorization Required – User Token in Header
Authorization: token merchant="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"
cURL Example
curl https://sandbox.thelevelup.com/v15/merchants/34/customer \
-H Accept:application/json \
-H Content-Type:application/json \
-H 'Authorization:token merchant="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"'
-d '{
"customer": {
"payment_token_data": "LU0200018SECH4O89A4NBOT7030000LU"
}
}'
Response Parameters
Key | Type | Description |
---|---|---|
loyalty_id |
Integer | The merchant-specific ID for this customer. |
name |
String | The customer’s first name and last initial. |
orders_count |
Integer | The count of successful orders by this customer at this merchant. |
Example:
{
"customer": {
"loyalty_id": 123456,
"name": "Bob B.",
"orders_count": 15
}
}
Errors
HTTP/1.1 error 404 Not Found
- QR Code is invalid
HTTP/1.1 error 401 Unauthorized
- Merchant token is not valid for the chosen location