Create Loyalty Check-in
Creates a loyalty check-in for an order against a receipt when the user’s access token or authentication token is not available at the time of creating the check-in in the Punchh system -- for example, in the case of future-dated orders. The user is identified using email address, phone number, or user ID, with user ID given top priority if multiple look-up parameters are passed in the API.
Phone number will work only if it is set up as a unique parameter in the Punchh platform. The option to validate the uniqueness of phone number across guests must be enabled. Contact your Punchh representative to update this Punchh platform configuration.
Headers
- Type: stringAuthorizationrequired
Bearer token for admin authorization, who is making a call on behalf of the customer. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".
- Type: stringContent
- Type requiredSet this header to application/json.
Body
At least one of user_id, phone, or email is required.
- Type: stringexternal
_uid requiredUnique ID generated by your system. We use this to prevent duplicates in case the same transaction gets triggered twice.
- Type: stringpayablerequired
Amount paid after applying discounts and adding any taxes or service charges. For example, if the order amount is $10, the values of the
receipt_amountandsubtotal_amountparameters will be $10. If a $2 discount is applied,subtotal_amountbecomes $8. However, if there are $3 service charges and $1 tax, the value of thepayableparameter becomes $12 (10 – 2 + 3 + 1 = 12). - Type: numberFormat: doublereceipt
_amount requiredOrder amount before taxes, calculated as the sum of all item amounts minus any discounts. This is the amount used to calculate loyalty points/visits. The value of this parameter should match
subtotal_amount. For example, if the order amount is $10, bothreceipt_amountandsubtotal_amountwill be 10. If a $2 discount is applied, both will be 8. - Format: date-timeenumreceipt
_datetime const:YYYY-MM-DDThh:mm:ssZrequiredTimestamp of the receipt per ISO 8601, in YYYY-MM-DDThh:mm:ssZ format
- Type: stringstore
_number requiredThe location where the check-in occurred, as configured in the Punchh platform via Store Locations > All Store Locations > Edit Location. This is generally provided by the business.
- Type: numberFormat: doublesubtotal
_amount requiredOrder amount before taxes (sum of all item amounts minus any discounts). Same as
receipt_amount. For historical reasons, this parameter is included along withreceipt_amountin the API request. - Type: integertransaction
_no requiredReceipt number or transaction number on the receipt. In case of a redemption associated with the order, the same transaction number must be sent for both check-ins and redemptions.
- Type: integercc
_last4 Last 4 digits of credit card number
- Type: stringchannel
Channel through which the check-in was requested. Possible values are:
online_order,pos,web,mobile,dashboard,chatbot,kiosk - Type: stringemail
- Type: numberemployee
_id ID of the employee who took the order. In case of a system order, it can be a system-generated ID.
- Type: stringemployee
_name Name of the employee who took the order. In case of a system order, it can be the name of the system.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/dashboard/checkins \
--request POST \
--header 'Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' \
--header 'Content-Type: application/json' \
--data '{
"user_id": "111111",
"transaction_no": 5678,
"cc_last4": 4387,
"employee_id": 7,
"employee_name": "EMPLOYEE_NAME_GOES_HERE",
"store_number": "58",
"menu_items": [
{
"item_name": "White rice",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": 3419,
"menu_family": "800",
"menu_major_group": "152",
"serial_number": "1.0"
},
{
"item_name": "Brown rice",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": 3418,
"menu_family": "800",
"menu_major_group": "152",
"serial_number": "2.0"
},
{
"item_name": "Free rice",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "D",
"menu_item_id": 3419,
"menu_family": "800",
"menu_major_group": "152",
"serial_number": "3.0"
}
],
"subtotal_amount": 7.86,
"receipt_amount": 7.86,
"payable": "9.00",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"revenue_id": "REVENUE_ID_GOES_HERE",
"revenue_code": "REVENUE_CODE_GOES_HERE",
"channel": "online_order",
"state": "committed",
"receipt_datetime": "2023-11-20T15:23:20+05:30"
}'
{
"first_name": "FIRST_NAME_GOES_HERE",
"last_name": "LAST_NAME_GOES_HERE",
"checkins": 2,
"points": 22,
"checkin": {
"created_at": "2015-11-26T10:57:06Z",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"checkin_id": 7415394,
"pending_points": 0,
"pending_refresh": false,
"points_earned": 11,
"bar_code": "BARCODE_GOES_HERE"
}
}