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

  • The signature for the API call

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

  • Set this header to application/json.

  • Advertises which content types the client is able to understand

  • Preferred language

  • 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

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

  • 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
Request Example for post/api2/mobile/checkins/receipt_image
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
}