Estimate Points Earning
Returns a prediction of how many points can be earned before submitting the transaction. The estimate is derived from the base earning rate of the business and does not account for special promotions or campaigns.
Headers
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - 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: stringaccess
_token requiredAccess token of the user
- Type: stringclientrequired
OAuth client ID provided by the business
- Type: stringreceipt
_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. - Type: stringsubtotal amountrequired
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:Properties: 8
This object used in the API request contains one or more menu items added to an order. It is mandatory to provide an array of menu items. See How To Send Menu Items to Punchh
- Type: stringreceipt
_datetime Timestamp of the receipt, in YYYY-MM-DDTHH:mm:SSZ (ISO 8601) format
- Type: stringstore
_number Number of the store at which the check-in is made
Responses
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/estimate_points \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'Content-Type: application/json' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--data '{
"menu_items": [
{
"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"
}
],
"receipt_datetime": "2024-04-26T23:59:59-07:00",
"store_number": "20",
"access_token": "ACCESS_TOKEN_GOES_HERE",
"client": "CLIENT_GOES_HERE",
"receipt_amount": "7.86",
"subtotal amount": "7.86"
}'
{
"estimated_points": 100
}