Previous Topic Next Topic
POS Module 6a: Show Applicable Offers - Example Scenarios (Redemptions 1.0) POS Module 6b: Process/Create Redemption - Example Scenarios (Redemptions 1.0)

POS API Certification Tutorial - Module 6b: Process/Create Redemption - Concepts (Redemptions 1.0)

Goal

Redemptions 1.0 - Process redemptions with the appropriate reward type. 

Prerequisites

Use Cases and Context

Redemption is a discount that can be applied to an order. While ordering at the POS, the end-user can request for redemption of rewards (available in the user's account) on the current order. The reward offers are configured by businesses. Redemptions can be initiated in two ways:

1. From the results of a user look-up – If a loyalty user has offers to redeem, the POS operator at the request of the loyalty guest selects one offer at a time and verifies if the offer can be applied to the guest check. When an eligible offer is found that can be applied to a menu item on the check, the POS operator submits the offer to the Punchh server to generate a discount for the menu item (for the discount to apply, it must pass the qualification criteria configured by the business in the Punchh platform).

2. From within a mobile app or website – The loyalty user generates a redemption code by selecting the reward or offer to redeem from a mobile app. This will generate a QR code and/or redemption code which should be given to the POS operator to scan or manually enter it at the POS.

Applicable API Endpoints

Endpoint Name/Path Relevant Request Parameters Relevant Response Parameters
Possible Redemptions
POST {server-name}/api/pos/redemptions/possible
- discount_type
- reward_id or redeemable_id or discount_amount or redemption_code or card_completion or fuel_reward or subscription
- subtotal_amount
- receipt_amount
- receipt_datetime
- transaction_no
- external_uid
- punchh_key
- email

The required parameters under the Menu Items object:
- item_name
- item_qty
- item_amount
- menu_item_type
- menu_item_id
- menu_family
- menu_major_group
- serial_number
category
status
redemption_id
redemption_amount

These parameters under the Qualified Menu Items object show the menu items to which the offer can be applied:
- item_name
- item_qty
- item_amount
- menu_item_type
- menu_item_id
- menu_family
- menu_major_group
- serial_number
Create Redemption
POST {server-name}/api/pos/redemptions
- discount_type
- reward_id or redeemable_id or discount_amount or redemption_code or card_completion or fuel_reward or subscription
- subtotal_amount
- receipt_amount
- receipt_datetime
- transaction_no
- external_uid
- punchh_key
- email

The required parameters under the Menu Items object:
- item_name
- item_qty
- item_amount
- menu_item_type
- menu_item_id
- menu_family
- menu_major_group
- serial_number
category
status
redemption_id
redemption_amount

These parameters under the Qualified Menu Items object show the menu items to which the offer can be applied:
- item_name
- item_qty
- item_amount
- menu_item_type
- menu_item_id
- menu_family
- menu_major_group
- serial_number

Example Code

We do not recommend sending the D (discount), T (tax), and P (payment) values in the item_type request parameter for Redemptions 1.0 API calls. Instead, send them in check-in API calls, such as Create Loyalty Check-in and Receipt Details.

For example, if a business offers a $2 discount on a $10 burger, send the burger as $8 ($10 - $2) in the API request. Send the discount as a line item in the Check-in API call.

If you must send D, T, and P menu item types, you must configure an exclusion qualification criterion (QC) for the offer in the Punchh platform. Create an exclusion filter using item types D, T, and P to ensure they are properly excluded. See the Qualification Criteria article on the Support Portal.

Note: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions here to access the Punchh Support Portal.

Possible Redemptions - Reward

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "reward",
  "reward_id": "REWARD_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Free Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'reward',
  'reward_id': 'REWARD_ID_GOES_HERE',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Cheese Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'BBQ Wings',
      'item_qty': 1,
      'item_amount': 7.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Free Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 7.86,
  'receipt_amount': 7.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "reward",
  "reward_id": "REWARD_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Free Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Create Redemption - Reward

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "reward",
  "reward_id": "REWARD_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Free Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'reward',
  'reward_id': 'REWARD_ID_GOES_HERE',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Cheese Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'BBQ Wings',
      'item_qty': 1,
      'item_amount': 7.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Free Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 7.86,
  'receipt_amount': 7.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "reward",
  "reward_id": "REWARD_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Free Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Possible Redemptions - Redeemable

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "redeemable",
  "redeemable_id": "REDEEMABLE_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Free Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'redeemable',
  'redeemable_id': 'REDEEMABLE_ID_GOES_HERE',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Cheese Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'BBQ Wings',
      'item_qty': 1,
      'item_amount': 7.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Free Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 7.86,
  'receipt_amount': 7.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "redeemable",
  "redeemable_id": "REDEEMABLE_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Free Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Create Redemption - Redeemable

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "redeemable",
  "redeemable_id": "REDEEMABLE_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Free Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'redeemable',
  'redeemable_id': 'REDEEMABLE_ID_GOES_HERE',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Cheese Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'BBQ Wings',
      'item_qty': 1,
      'item_amount': 7.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Free Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 7.86,
  'receipt_amount': 7.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "redeemable",
  "redeemable_id": "REDEEMABLE_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Free Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Possible Redemptions - Banked Rewards (Discount Amount)

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "discount_amount",
  "redeemed_points": 2.86,
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'discount_amount',
  'redeemed_points': 2.86,
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Cheese Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'BBQ Wings',
      'item_qty': 1,
      'item_amount': 7.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Discount',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 7.86,
  'receipt_amount': 7.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "discount_amount",
  "redeemed_points": 2.86,
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
        "item_name": "Discount",
        "item_qty": 1,
        "item_amount": 2.86,
        "menu_item_type": "D",
        "menu_item_id": 3333,
        "menu_family": "003",
        "menu_major_group": "003",
        "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Create Redemption - Banked Rewards (Discount Amount)

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "discount_amount",
  "redeemed_points": 2.86,
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'discount_amount',
  'redeemed_points': 2.86,
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Cheese Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'BBQ Wings',
      'item_qty': 1,
      'item_amount': 7.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Discount',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 7.86,
  'receipt_amount': 7.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "discount_amount",
  "redeemed_points": 2.86,
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Possible Redemptions - Card Completion

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "card_completion",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'card_completion',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Cheese Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'BBQ Wings',
      'item_qty': 1,
      'item_amount': 7.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Discount',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 7.86,
  'receipt_amount': 7.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "card_completion",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
        "item_name": "Discount",
        "item_qty": 1,
        "item_amount": 2.86,
        "menu_item_type": "D",
        "menu_item_id": 3333,
        "menu_family": "003",
        "menu_major_group": "003",
        "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Create Redemption - Card Completion

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "card_completion",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'card_completion',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Cheese Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'BBQ Wings',
      'item_qty': 1,
      'item_amount': 7.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Discount',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 7.86,
  'receipt_amount': 7.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "card_completion",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
        "item_name": "Discount",
        "item_qty": 1,
        "item_amount": 2.86,
        "menu_item_type": "D",
        "menu_item_id": 3333,
        "menu_family": "003",
        "menu_major_group": "003",
        "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Possible Redemptions - Redemption Code

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "redemption_code",
  "redemption_code": "REDEMPTION_CODE_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'redemption_code',
  'redemption_code': 'REDEMPTION_CODE_GOES_HERE',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Cheese Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'BBQ Wings',
      'item_qty': 1,
      'item_amount': 7.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Discount',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 7.86,
  'receipt_amount': 7.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "redemption_code",
  "redemption_code": "REDEMPTION_CODE_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Create Redemption - Redemption Code

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "redemption_code",
  "redemption_code": "REDEMPTION_CODE_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'redemption_code',
  'redemption_code': 'REDEMPTION_CODE_GOES_HERE',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Cheese Pizza',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'BBQ Wings',
      'item_qty': 1,
      'item_amount': 7.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Discount',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 7.86,
  'receipt_amount': 7.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "redemption_code",
  "redemption_code": "REDEMPTION_CODE_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Cheese Pizza",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "BBQ Wings",
      "item_qty": 1,
      "item_amount": 7.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 7.86,
  "receipt_amount": 7.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Possible Redemptions - Fuel Reward

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "fuel_reward",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Premium Unleaded",
      "item_qty": 10,
      "item_amount": 40.63,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "Fuel Discount",
      "item_qty": 1,
      "item_amount": 4.63,
      "menu_item_type": "D",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    }
  ],
  "subtotal_amount": 36.0,
  "receipt_amount": 36.0,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'fuel_reward',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Premium Unleaded',
      'item_qty': 10,
      'item_amount': 40.63,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'Fuel Discount',
      'item_qty': 1,
      'item_amount': 4.63,
      'menu_item_type': 'D',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    }
  ],
  'subtotal_amount': 36.0,
  'receipt_amount': 36.0,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "fuel_reward",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Premium Unleaded",
      "item_qty": 10,
      "item_amount": 40.63,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "Fuel Discount",
      "item_qty": 1,
      "item_amount": 4.63,
      "menu_item_type": "D",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    }
  ],
  "subtotal_amount": 36.0,
  "receipt_amount": 36.0,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Create Redemption - Fuel Reward

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "fuel_reward",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Premium Unleaded",
      "item_qty": 10,
      "item_amount": 40.63,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "Fuel Discount",
      "item_qty": 1,
      "item_amount": 4.63,
      "menu_item_type": "D",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    }
  ],
  "subtotal_amount": 36.0,
  "receipt_amount": 36.0,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'fuel_reward',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Premium Unleaded',
      'item_qty': 10,
      'item_amount': 40.63,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'Fuel Discount',
      'item_qty': 1,
      'item_amount': 4.63,
      'menu_item_type': 'D',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    }
  ],
  'subtotal_amount': 36.0,
  'receipt_amount': 36.0,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "fuel_reward",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Premium Unleaded",
      "item_qty": 10,
      "item_amount": 40.63,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "Fuel Discount",
      "item_qty": 1,
      "item_amount": 4.63,
      "menu_item_type": "D",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    }
  ],
  "subtotal_amount": 36.0,
  "receipt_amount": 36.0,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Possible Redemptions - Subscription

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "subscription",
  "subscription_id": "SUBSCRIPTION_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Small Coffee",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "Chocolate Croissant",
      "item_qty": 1,
      "item_amount": 4.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Coffee Club Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 4.86,
  "receipt_amount": 4.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'subscription',
  'subscription_id': 'SUBSCRIPTION_ID_GOES_HERE',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Small Coffee',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'Chocolate Croissant',
      'item_qty': 1,
      'item_amount': 4.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Coffee Club Discount',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 4.86,
  'receipt_amount': 4.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/possible"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "subscription",
  "subscription_id": "SUBSCRIPTION_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Small Coffee",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "Chocolate Croissant",
      "item_qty": 1,
      "item_amount": 4.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Coffee Club Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 4.86,
  "receipt_amount": 4.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Create Redemption - Subscription

curl --location --request POST 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'User-Agent: Brink/POS/1.0' \
--data-raw '{
  "phone": "1111111111",
  "discount_type": "subscription",
  "subscription_id": "SUBSCRIPTION_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Small Coffee",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "Chocolate Croissant",
      "item_qty": 1,
      "item_amount": 4.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Coffee Club Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 4.86,
  "receipt_amount": 4.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
}'
let requestBody = {
  'phone': '1111111111',
  'discount_type': 'subscription',
  'subscription_id': 'SUBSCRIPTION_ID_GOES_HERE',
  'cc_last4': '0001',
  'employee_id': 1,
  'employee_name': 'EMPLOYEE_NAME_GOES_HERE',
  'menu_items': [
    {
      'item_name': 'Small Coffee',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'M',
      'menu_item_id': 1111,
      'menu_family': '001',
      'menu_major_group': '001',
      'serial_number': '1.0'
    },
    {
      'item_name': 'Chocolate Croissant',
      'item_qty': 1,
      'item_amount': 4.86,
      'menu_item_type': 'M',
      'menu_item_id': 2222,
      'menu_family': '002',
      'menu_major_group': '002',
      'serial_number': '2.0'
    },
    {
      'item_name': 'Coffee Club Discount',
      'item_qty': 1,
      'item_amount': 2.86,
      'menu_item_type': 'D',
      'menu_item_id': 3333,
      'menu_family': '003',
      'menu_major_group': '003',
      'serial_number': '3.0'
    }
  ],
  'subtotal_amount': 4.86,
  'receipt_amount': 4.86,
  'receipt_datetime': '2022-06-15T01:01:01-07:00',
  'transaction_no': '111111111',
  'external_uid': 'EXTERNAL_UID_GOES_HERE',
  'pos_version': 'v1',
  'punchh_key': 'PUNCHH_KEY_GOES_HERE',
  'pos_type': 'brink'
};

const url = 'https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions';
let headers = {
  'Cache-Control': 'no-cache',
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
};

let options = {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(requestBody)
};

fetch(url, options)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
# You will need to install the Requests package before this code will work.
# To do so, see the installation instructions here: https://requests.readthedocs.io/en/latest/user/install/#install
import requests
import json

url = "https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions"

payload = json.dumps({
  "phone": "1111111111",
  "discount_type": "subscription",
  "subscription_id": "SUBSCRIPTION_ID_GOES_HERE",
  "cc_last4": "0001",
  "employee_id": 1,
  "employee_name": "EMPLOYEE_NAME_GOES_HERE",
  "menu_items": [
    {
      "item_name": "Small Coffee",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "M",
      "menu_item_id": 1111,
      "menu_family": "001",
      "menu_major_group": "001",
      "serial_number": "1.0"
    },
    {
      "item_name": "Chocolate Croissant",
      "item_qty": 1,
      "item_amount": 4.86,
      "menu_item_type": "M",
      "menu_item_id": 2222,
      "menu_family": "002",
      "menu_major_group": "002",
      "serial_number": "2.0"
    },
    {
      "item_name": "Coffee Club Discount",
      "item_qty": 1,
      "item_amount": 2.86,
      "menu_item_type": "D",
      "menu_item_id": 3333,
      "menu_family": "003",
      "menu_major_group": "003",
      "serial_number": "3.0"
    }
  ],
  "subtotal_amount": 4.86,
  "receipt_amount": 4.86,
  "receipt_datetime": "2022-06-15T01:01:01-07:00",
  "transaction_no": "111111111",
  "external_uid": "EXTERNAL_UID_GOES_HERE",
  "pos_version": "v1",
  "punchh_key": "PUNCHH_KEY_GOES_HERE",
  "pos_type": "brink"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE',
  'User-Agent': 'Brink/POS/1.0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Workflow

The Possible Redemptions and Create Redemption endpoints let you 1) apply an offer on the order and determine whether the offer can be applied to a menu item in the check, and 2) process a redemption to get a discount. Both the Possible Redemptions API and the Create Redemption API are the same in terms of the API request and response parameters. The difference between the two APIs is that the Possible Redemptions API only verifies if an offer in the guest account (sent in the API request) can be applied to the menu items (sent in the API request) on a current check and returns in the API response the qualified menu item(s) for the offer. If the Possible Redemptions API shows that the offer is valid, you can then call the Create Redemption API and submit the offer to process the actual redemption. If the Create Redemption call is successful, the offer is marked as used in the user’s account. The message in the status parameter in the API response shows that the offer is redeemed if the redemption is successful.

The status parameter in the Possible Redemptions API and the Create Redemption API response shows a message that explains if the customer's redemption was successfully completed or not, and the category parameter returns whether the offer the guest is trying to redeem is redeemable, expired, invalid, processed, or unassigned. If the message in the Status parameter indicates that the offer passed in the API request cannot be redeemed, then check the category of the offer. If the category of the offer is expired, invalid, processed, or unassigned, the offer cannot be redeemed.

A unique ID associated with the redemption is generated for each redemption. The ID is stored in the redemption_id parameter in the API response. Save this in your system for future reference. You need the redemption_id to void a redemption. Note: In the case of coupons/promos, the redemption_id returned would be the same as the redemption_code.

The Possible Redemptions and Create Redemption API endpoints require you to identify the offer type you want to redeem when validating an offer. In Punchh, redeeming a reward is different from redeeming a redeemable. You have to send slightly different requests when calling Possible Redemptions versus Create Redemption depending on the offer type. Following are the rules to decide what “discount type” to use depending on redemption types in the Possible Redemptions API request and the Create Redemption API request.

Note

The user object provides information regarding every possible balance the user may have, so it may not be possible to determine which type of redemption should be available for the user. So a configuration is needed on the POS vendor side to determine which type of redemption should be available for the entire business based on the program type information returned in the Program Meta API.

Punchh supports the following redemption types based on the configuration chosen by the business:

Redemption Types Request Parameters and Values for Redemption Types
Reward Offer available to the user. This may be awarded to the user due to some campaign or may be explicitly gifted by a business admin. No points will be deducted for the redemption of this offer. Applicable when an end-user performs a particular action mentioned in a campaign. For example, if the end-user places an order under Facebook login or on a special day/event like Thanksgiving, Christmas, etc., the user gets rewards in the account.

In the User Look-up and Fetch Balance API response if any offer in the Rewards object has either “type” as “reward” or does not have a “type” parameter, use its ID to pass in the reward_id parameter and use discount type = reward in the Possible Redemptions API request and the Create Redemption API request.

"discount_type": "reward"
"reward_id": "REWARD_ID_GOES_HERE "
Redeemable These are core offers configured in the Punchh platform. So for every reward, you will find the corresponding configured redeemable in the redeemable object. Also, if a business is configured for the "points unlock program", then redemption of these offers results in a deduction of points.

In the User Look-up and Fetch Balance API response, if any item in the rewards array has a type as redeemable, use its ID to pass in the redeemable_id parameter and use discount_type = redeemable in the Possible Redemptions API request and the Create Redemption API request.

"discount_type": "redeemable"
"redeemable_id": "REDEEMABLE_ID_GOES_HERE"
Banked rewards Banked rewards can be used for the redemption of banked currency. This will be available if the program structure configured is "points convert to currency". This is applicable after a certain number of points are gained by order purchases, gifts, campaigns, referrals, etc. For example, after a total of 100 points are gathered by purchases made by orders, the end-user gets $10 redeemable (rewards banked) into the account. This type of discount is allowed in points-based businesses.

In the User Look-up and Fetch Balance API response, if the value of banked_rewards returned in the balance object is greater than 0, then use a dollar amount in the redeemed_points parameter not exceeding the value of banked_rewards and use discount_type = discount_amount in the Possible Redemptions API request and the Create Redemption API request.

“discount_type": "discount_amount"
"redeemed_points": "DISCOUNT_AMOUNT_IN DOLLARS_GOES_HERE"
Card completion This type of discount is allowed in visit-based businesses. This is applicable after a certain number of visits by an end-user, as configured by a business. An end-user can hold multiple cards. For example, if the end-user has had 7 check-ins at the POS, then on the 8th check-in one card will be completed and the user will be offered rewards.

In the User Look-up and Fetch Balance API response if the value of unredeemed_cards returned in the balance object is greater than 0, then use discount_type = card_completion in the Possible Redemptions API request and the Create Redemption API request.

“discount_type": "card_completion"
Redemption code This is an intermediate code for the redemption of a reward or a redeemable; it can be generated from an app or iFrame. This is applicable when the end-user presents a valid redemption code at the POS. For example, the mobile app prompts the end-user to generate a redemption code after the user has cleared a certain number of visits.

This redemption type also applies to the coupon code and promo. Punchh coupons are applied on the POS to apply a discount on the receipt. To use these coupon codes, a guest need not be a Punchh user.

Promo codes are similar to coupon codes, but are separately termed because they can be configured by the business admin in the Punchh platform as required with a minimum length of 4 characters with at least one letter. To use these promo codes, a guest need not be a Punchh loyalty user. See Punchh Coupon Codes and Punchh Promo Codes.

When a redemption code, a Punchh coupon code, or a promo is entered on the POS either by scanning it using the QR code scanner or by manually entering it, pass that code in the redemption_code parameter and use discount_type = redemption_code in the Possible Redemptions API request and the Create Redemption API request.

“discount_type": "redemption_code"

"redemption_code": "REDEMPTION_CODE_GOES_HERE" (Need to specify coupon code for coupon and promo code for promo)

The redemption code, coupon code, and promo can be generated from the user’s mobile app. The POS can scan or enter a code to redeem.
Fuel reward Applicable when the user has points converted into a fuel discount balance in the account. This will reduce the price per gallon on the check when applied. Also, points will be earned on the transaction regardless of available fuel discounts.

This redemption type allows users to use their fuel discount balance, and it can be redeemed when a user is identified on the check. Use discount_type = fuel_reward in API requests.

“discount_type": "fuel_reward"
Subscription Applicable when the user has purchased a subscription plan. No points are deducted for redeeming a subscription. This redemption type allows a user to redeem subscription-related benefits. In the User Look-up and Fetch Balance API request, if the subscriptions object has subscription_id, use this ID to pass in the subscription_id parameter and use discount_type = subscription in the Possible Redemptions API request and the Create Redemption API requests.

“discount_type": "subscription"
"subscription_id": "SUBSCRIPTION_ID_GOES_HERE"

Punchh recommends that you configure the POS to support these features from the POS terminal:

Feature Description
The POS can redeem coupon codes. The POS can scan or enter a coupon code to redeem.
The POS can redeem promo codes. The POS can scan or enter a promo code to redeem.
The POS can redeem redemption codes. The POS can scan a QR code presented on a mobile app or manually enter a redemption code.
Multiple redemptions The POS will allow multiple redemptions to apply to the check (redemption codes, coupon codes, promo codes).

Steps to Perform Redemption of Rewards and Offers on the POS

Redemptions will begin from the user look-up / user ID check-in scan or the POS operator manually entering a user ID or redemption code on the POS Punchh entry field. When a reward is selected to be applied to the order, the overall general redemption flow process consists of two parts: 1) Performing a Possible Redemptions API call to validate the eligibility of the selected reward based on the POS order’s contents, and 2) Performing a Create Redemption API call (redemption commit) to mark the reward as used in the user's account.

This is the general workflow for processing a redemption at the POS:

1. Call the Possible Redemptions API with the redemption type (rewards, redeemable, etc.) and the menu items as they currently are in the check with any prior discounts (internal or Punchh) applied. As discussed in the Module 6a: Show Applicable Offers tutorial, the POS needs to send the menu items to Punchh in the format prescribed in How To Send Menu Items to Punchh. The API developers are responsible for sending the menu item object exactly how Punchh specifies in that API topic. There is no flexibility in the way menu items are sent in the Applicable Offers API call.

2. After the Possible Redemptions API call, alter the API request as needed. For example, if in the Possible Redemptions API call the POS operator submitted a banked currency request for $5 to use up the loyalty guest user currency as a redemption, but the Possible Redemptions API call indicates that only a $3 discount is allowed on the check, then the POS operator should only submit a $3 redemption on the actual Create Redemption API call. If you submit $5 in the Create Redemption call, the Punchh system will deduct $5 from the loyalty guest account while only crediting $3 from the check.
NOTE: The example in step 2 only applies to the banked currency redemption.

3. If the Possible Redemptions API call is successful and/or returns a discount amount greater than zero, then do a Create Redemption call to process the redemption.

4. Note the discount amount in the response of the Create Redemption call, and the qualifying items in the response; apply that discount amount to the check.
NOTE: It is important to apply the discount amount to the correct menu items.

5. Repeat the process for any other offers on the check; menu items must first be updated with any other discounts that may already have been applied. Discounts must be applied correctly at the check level as well as to individual menu items (must be properly serialized). See How To Send Menu Items to Punchh.

6. The redemption will be marked on the POS check along with the discount specifics as a menu item placeholder including the reward_id value. By using the reward_id value, it will allow rollback if necessary on the POS order.

Performing Multiple Redemptions of Rewards and Offers on the POS

The Possible Redemptions API and the Create Redemption API can be used to apply single or multiple Punchh redemptions based on whether the business allows single or multiple discounts on a check. Two methods can be used to apply rewards to POS orders.  

  • FLOW 1 (Create-as-you-go) provides reliability that when multiple redemptions are applied to a POS order, each redemption will be committed as they are applied.

  • FLOW 2 (Create-all-at-tender) provides fewer API calls.

Note: FLOW 1 is recommended for redemption. After a redemption, if there are any changes to the order, all redemptions (possible or created) need to be voided (FLOW 1) or re-validated (FLOW 2)

Redemption Flow 1

1. The POS performs a Possible Redemptions API call. For each Possible Redemptions API call, the current check state should be passed in the check details. This means that any previously applied Punchh or internal discounts will be reflected in the check details for each subsequent Possible Redemptions API call.

2. Apply the POS discount to the check.

3. Confirm that the POS discount was successfully applied to the POS check. The offer is marked as used in the user’s account if the Create Redemption call is successful.

4. Commit the discount on the POS by performing a create redemption API call.

5. The redemption will be marked on the POS check along with the discount specifics as a menu item placeholder including the reward_id value of the redeemed reward. The POS can use this value to allow rollback if necessary on the POS order.

Redemption Flow 2

1. The POS performs a Possible Redemptions API call. For each Possible Redemptions API call, the current check state should be passed in the check details. This means that any previously applied Punchh or internal discounts will be reflected in the check details for each subsequent Possible Redemptions API call.

2. Apply the POS discount to the check.

3. Confirm that the POS discount was successfully applied to the POS check. The offer is marked as used in the user’s account if the Create Redemption call is successful.

4. Commit the discount on the POS by performing a Create Redemption API call.

5. The redemption will be marked on the POS check along with the discount specifics as a menu item placeholder including the reward_id value of the redeemed reward. The POS can use this value to allow rollback if necessary on the POS order.

6. During the POS tender process, each Possible Redemptions approval on the check will be processed one by one with a Create Redemption API call.

Best Practices

  • Submit your redemption to the Possible Redemptions endpoint. 

  • Create the redemption with the appropriate discount type (e.g., reward, redeemable, etc.). 

  • Submit another redemption only now with the applied discount reflected in the menu items with type D. (See How To Send Menu Items to Punchh.) 

  • Create the second redemption and repeat this process as needed. 

  • In case of multiple redemptions, submit any previously applied Punchh discounts along with internal discounts in the check details for each subsequent Possible Redemptions API call.

Possible Redemptions API

Create Redemption API

Applicable Offers API

How To Send Menu Items to Punchh

User Look-up and Fetch Balance API