Update Loyalty Check-in
Updates a loyalty check-in in the pending state based on external_uid. Requires all parameters to be sent again (no deltas).
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringAuthorizationrequired
You may pass the access_token instead of the authentication_token in Online Ordering endpoints to authorize the request. It must be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringUser
- Agent requiredFor details, see User Agent.
- Type: stringclientrequired
Client key of the business
- Type: stringauthentication
_token The authentication token of the user. You can retrieve this from the response of a successful sign-in API call or through the SSO process.
- Type: stringcc
_last4 Last 4 digits of credit card number
- Type: stringemployee
_id Employee ID. In case of a system order, it can be a system-generated ID.
- Type: stringemployee
_name Employee who took the order. In case of a system order, it can the be name of the system.
- Type: stringexternal
_uid Unique ID generated by your system. We use this to prevent duplicates in case the same transaction gets triggered twice.
- Type: array object[] ·
- Type: numberFormat: doublereceipt
_amount Order 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:ssZTimestamp of the receipt as per ISO 8601, in YYYY-MM-DDTHH:MM:SSZ format
values- Y
Y Y Y - M M - D D Thh:mm:ss Z
- Type: numberFormat: doublesubtotal
_amount Order amount before taxes (sum of all item amounts minus any discounts). Same as
receipt_amount. For historical reasons, include this parameter along withreceipt_amountin the API request. - Type: stringtransaction
_no Receipt number or transaction number on the receipt
- application/json
- 400
Sending missing/incorrect params, bad encoding etc
- 401
Sending invalid credentials
- 412
Sending invalid Signature
- 422
Sending invalid Entity
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/checkins/online_order \
--request PUT \
--header 'x-pch-digest: SIGNATURE_GOES_HERE' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
--data '{
"receipt_amount": 14.72,
"cc_last4": 4387,
"employee_id": "7",
"employee_name": "FIRST_NAME_GOES_HERE LAST_NAME_GOES_HERE",
"menu_items": [
{
"item_name": "White rice",
"item_qty": 1,
"item_amount": 4.86,
"menu_item_type": "M",
"menu_item_id": "3419",
"menu_family": "800",
"menu_major_group": "152"
},
{
"item_name": "Brown rice",
"item_qty": 1,
"item_amount": 9.86,
"menu_item_type": "M",
"menu_item_id": "3418",
"menu_family": "800",
"menu_major_group": "152"
}
],
"subtotal_amount": 14.72,
"receipt_datetime": "2019-10-05T15:23:20+05:30",
"transaction_no": 5090,
"external_uid": "EXTERNAL_UID_GOES_HERE",
"client": "CLIENT_GOES_HERE",
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE"
}'
{
"first_name": "FIRST_NAME_GOES_HERE",
"last_name": "LAST_NAME_GOES_HERE",
"checkins": 3,
"points": 183,
"checkin": {
"bar_code": "BARCODE_GOES_HERE",
"created_at": "2019-10-07T12:09:06Z",
"external_uid": "EXTERNAL_UID_GOES_HERE",
"checkin_id": 235355451,
"pending_points": 0,
"pending_refresh": false,
"points_earned": 11
}
}