Mark Offers As Read
Marks specific offers that have been read by a user:
-
Within the app via the News & Offers screen. The value
read_through_appis passed with theevent_typerequest parameter. -
Via push notification on the phone screen. The value
app_open_via_pushis passed with theevent_typeparameter.
For more information about push notifications and payload based on different types of notifications, including platform configurations required to enable push notifications, see Push Notifications. Also, see Notifications and Badges Count for information about various use cases and best practices.
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringAccept
- Language Preferred language
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - 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: stringevent
_type Kind of event that shows how offers were read by the user. Valid values are read_through_app or app_open_via_push
- Type: stringrewards
Comma-separated IDs of rewards. Either the
user_notificationsparameter or therewardsparameter must be sent in the request. - Type: stringuser
_notifications Comma-separated IDs of user notifications. Either the
user_notificationsparameter or therewardsparameter must be sent in the request.
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/offers/mark_read \
--request PUT \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--data '{
"rewards": "309203, 309210",
"user_notifications": "7890469, 7890490",
"event_type": "read_through_app",
"client": "CLIENT_GOES_HERE"
}'
{}