Social Cause Campaign Details
Fetches donation details for a user based on the selected social cause campaign
- Type: integerrequired
Unique ID assigned to a social cause campaign. This ID is generated by Punchh when the social cause campaign is created in the Punchh platform.
- Type: stringrequired
The signature for the API call
- Type: stringrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringrequired
The app device ID helps Punchh identify each device so that certain rewards can be awarded individually to each device instead of per user. For example, the sign-up reward is given to each device ID to prevent fraudulent sign-ups so that a user cannot do repeated sign-ups from a single device to get rewards. It should not change even if the user resets a device. See the sample code to generate the punchh-app-device-id header.
- Type: stringrequired
Advertises which content types the client is able to understand
- Type: string
Preferred language
- Type: stringrequired
Set this header to application/json.
- Type: stringrequired
Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.
- Type: stringrequired
OAuth client ID provided by the business
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/social_causes/1 \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'punchh-app-device-id: APP_DEVICE_ID_GOES_HERE' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'Content-Type: application/json' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--data '{
"client": "CLIENT_GOES_HERE"
}'
{
"social_cause_id": 1,
"donations": {
"reward": {
"user_donations": 0,
"charity_donations": 0,
"all_donations": 0
},
"currency": {
"user_donations": 2,
"charity_donations": 2,
"all_donations": 2
}
},
"name": "Test Campaign",
"description": "Test",
"image_url": "IMAGE_URL_GOES_HERE",
"miscellaneous": "",
"disclaimer": "Updated value of charity donations & all donations will be reflected after 24 hours.",
"city": "San Mateo",
"state": "CA",
"street": "ADDRESS_GOES_HERE",
"zip": "94402",
"phone_number": "",
"email": "",
"address": "ADDRESS_GOES_HERE"
}