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

  • The signature for the API call

  • Advertises which content types the client is able to understand

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

  • Set this header to application/json.

  • 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
  • Access token of the user

  • OAuth client ID provided by the business

  • 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, both receipt_amount and subtotal_amount will be 10. If a $2 discount is applied, both will be 8.

  • Order amount before taxes (sum of all item amounts minus any discounts). Same as receipt_amount. For historical reasons, include this parameter along with receipt_amount in the API request.

  • 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

    Properties: 8
  • Timestamp of the receipt, in YYYY-MM-DDTHH:mm:SSZ (ISO 8601) format

  • Number of the store at which the check-in is made

Responses

  • application/json
Request Example for get/api2/mobile/estimate_points
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
}