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

  • 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

  • Order amount before taxes, calculated as the sum of item_amount for M line items in menu_items minus the item_amount for D line items; S, T, and P line items are excluded. See the description of the D, S, T, and P items in the menu_items.menu_item_type request parameter. The value of this parameter should match subtotal_amount.

    Note: Loyalty point estimates for this endpoint are calculated from the subtotal_amount provided in the request.

  • Order amount before taxes, calculated as the sum of item_amount for M line items in menu_items minus the item_amount for D line items; S, T, and P line items are excluded. See the description of the D, S, T, and P items in the menu_items.menu_item_type request parameter. Same as receipt_amount.

    Note: Loyalty point estimates for this endpoint are calculated from the subtotal_amount provided in the request.

  • Properties: 8

Responses

  • application/json
Request Example for get/api/auth/estimate_points
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/estimate_points \
  --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",
  "menu_items": [
    {
      "item_name": "White rice",
      "item_qty": 1,
      "item_amount": 2,
      "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": 8,
      "menu_item_type": "M",
      "menu_item_id": "3418",
      "menu_family": "800",
      "menu_major_group": "152",
      "serial_number": "2.0"
    }
  ],
  "subtotal_amount": 10,
  "receipt_amount": 10
}'
{
  "estimated_points": 200
}