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_app is passed with the event_type request parameter.

  • Via push notification on the phone screen. The value app_open_via_push is passed with the event_type parameter.

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.

Headers

  • The signature for the API call

  • Advertises which content types the client is able to understand

  • Preferred language

  • Set this header to application/json.

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

  • Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.

Body

application/json
  • OAuth client ID provided by the business

  • Kind of event that shows how offers were read by the user. Valid values are read_through_app or app_open_via_push

  • Comma-separated IDs of rewards. Either the user_notifications parameter or the rewards parameter must be sent in the request.

  • Comma-separated IDs of user notifications. Either the user_notifications parameter or the rewards parameter must be sent in the request.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api2/mobile/offers/mark_read
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"
}'
{}