List All Deals
Returns all available deals for a user. The page and per_page request parameters determine the page(s) returned and the number of deals returned per page. If the per_page parameter is not sent, the API returns up to 10 deals in the response.
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringUser
- Agent requiredUsed to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.
- Type: stringclientrequired
OAuth client ID provided by the business
- Type: integerpage
Page number. If
pageis specified, only that page will be returned using the value ofper_pageas the number of deals returned on that page. - Type: integerper
_page Number of deals per page. If
per_pageis not specified, the API defaults to 10 deals in response.
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/deals \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--data '{
"client": "CLIENT_GOES_HERE",
"page": 1,
"per_page": 20
}'
[
{
"applicable_as_loyalty_redemption": false,
"redeemable_properties": "",
"discount_amount": 0,
"discount_channel": "all",
"expire_redemption_code_with_reward_end_date": false,
"id": 23,
"image": "IMAGE_URL_GOES_HERE",
"points": 0,
"redeemable_id": 23,
"redemption_expiry": 240,
"thumb_image": "IMAGE_URL_GOES_HERE",
"meta_data": "",
"redeemable_uuid": "ID_GOES_HERE",
"name": "BOGO Breadsticks",
"description": "",
"auto_select": true,
"start_time": "2021-04-28T13:59:47+05:30"
}
]