Convert Points
Converts points to cash, fuel discounts, and charities based on the configuration or conversion rules set in the Punchh platform
Headers
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringUser
- Agent requiredFor details, see User Agent.
- Type: stringAuthorizationrequired
You may pass the access_token instead of the authentication_token in Online Ordering endpoints to authorize the request. It must be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringContent
- Type requiredSet this header to application/json.
Body
- Type: stringclientrequired
Client key of the business
- Type: integerFormat: int32conversion
_rule _id requiredConversion rule ID set for the Punchh platform configuration (returned for the converted_category_balances object as category_id)
- Type: integerFormat: int32converted
_value requiredValues of the cash, fuel discounts, or charities converted from points
- Type: integerFormat: int32source
_value requiredNumber of points the user wants to convert to cash, fuel discounts, or charities
- Type: stringauthentication
_token - Type: string
Campaign ID in case of points converted to charity
Responses
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/conversions \
--request POST \
--header 'x-pch-digest: SIGNATURE_GOES_HERE' \
--header 'Accept: application/json' \
--header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'Content-Type: application/json' \
--data '{
"client": "CLIENT_GOES_HERE",
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
"conversion_rule_id": 8,
"source_value": 100,
"converted_value": 10,
"social_cause_campaign_id": "12"
}'
[
"250 points converted into 2"
]