Create Loyalty Check-in by QR Code
Creates a loyalty check-in for a user when the user scans a quick-response (QR) code using the mobile app of the business
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: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringAccept
- Language Preferred language
- Type: stringContent
- Type requiredSet this header to application/json.
- 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: stringclientrequired
OAuth client ID provided by the business
- Type: stringFormat: int32qr
_decoded requiredDecoded form of the QR code printed on the receipt
- Type: stringgps
_accuracy Accuracy of the user's device GPS
- Type: numberFormat: doublelatitude
Latitude coordinate of the user's device GPS. The latitude of the location is required if location_id is not provided.
- Type: integerFormat: int32location
_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: numberFormat: doublelongitude
Longitude coordinate of the user's device GPS. The longitude of the location is required if location_id is not provided.
- Type: stringmanual
True if the user entered the QR code by hand
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/checkins/qrcode \
--request POST \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'Content-Type: application/json' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--data '{
"qr_decoded": "QR_CODE_GOES_HERE",
"client": "CLIENT_GOES_HERE",
"location_id": 304155,
"latitude": 26.9167509,
"longitude": 75.8136926,
"gps_accuracy": "27",
"manual": ""
}'
{
"created_at": "2016-05-16T08:22:25-04:00",
"current_membership_level": "Club Lite - Level 1 (0-400)",
"location_id": 304252,
"pending_refresh": false,
"points_earned": 72,
"store_number": "",
"survey_url": "URL_GOES_HERE",
"checkin_id": 11140685,
"first_checkin": false,
"expiring_on": "2024-03-13"
}