Create Loyalty Check-in by Receipt Image
Creates a loyalty check-in for a user based on the receipt image captured by the user. The user captures the receipt image for an order and taps the create check-in button on the mobile app of the business. When the receipt is approved, loyalty points are added to the user's account.
Headers
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringAccept
- Language Preferred language
- Type: stringUser
- Agent requiredUsed to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.
Body
- Type: stringclient
OAuth client ID provided by the business
- Type: stringgps
_accuracy Accuracy of the user's device GPS
- Type: stringlatitude
Latitude coordinate of the user's device GPS. The latitude of the location is required if location_id is not provided.
- Type: stringlocation
_id ID of the location where the user did the check-in. The location ID is required if both the latitude and longitude of the location are not provided.
- Type: stringlongitude
Longitude coordinate of the user's device GPS. The longitude of the location is required if location_id is not provided.
- Type: stringreceipt
_url URL of the receipt image captured by the user. Use the Image Upload to AWS API endpoint to upload the receipt image to AWS. The endpoint returns the URL of the uploaded image in its response.
Responses
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/checkins/receipt_image \
--request POST \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--data '{
"client": "CLIENT_GOES_HERE",
"location_id": "304155",
"receipt_url": "IMAGE_URL_GOES_HERE"
}'
{
"created_at": "2016-05-17T08:22:25-04:00",
"current_membership_level": "Club Lite - Level 2 (0-400)",
"location_id": 304252,
"pending_refresh": false,
"points_earned": 72,
"store_number": "",
"survey_url": "URL_GOES_HERE",
"checkin_id": 11140255,
"first_checkin": false,
"expiring_on": null
}