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

  • The signature for the API call

  • Used to authorize the request with access_token. It should be supplied as Bearer ACCESS_TOKEN_GOES_HERE.

  • Advertises which content types the client is able to understand

  • Preferred language

  • Set this header to application/json.

  • Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.

Body

application/json
  • OAuth client ID provided by the business

  • Decoded form of the QR code printed on the receipt

  • Accuracy of the user's device GPS

  • Latitude coordinate of the user's device GPS. The latitude of the location is required if location_id is not provided.

  • 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.

  • Longitude coordinate of the user's device GPS. The longitude of the location is required if location_id is not provided.

  • True if the user entered the QR code by hand

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api2/mobile/checkins/qrcode
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"
}