Estimate Loyalty 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

  • The signature for the API call

  • Advertises which content types the client is able to understand

  • Set this header to application/json.

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

  • For details, see User Agent.

Body

application/json
  • Client key of the business

  • Pre-tax order amount used to estimate loyalty points. The estimate is based on the subtotal_amount provided in the request.

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

Responses

  • application/json
Request Example for get/api/auth/loyalty_points_estimator
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/loyalty_points_estimator \
  --header 'x-pch-digest: SIGNATURE_GOES_HERE' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
  --data '{
  "client": "CLIENT_GOES_HERE",
  "authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
  "subtotal_amount": 10
}'
{
  "estimated_points": 46
}