Point Conversion
Enables the conversion of a user's points to cash, fuel discounts, or 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: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - 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.
Body
- Type: stringclientrequired
OAuth client ID provided by the business
- Type: integerconversion
_rule _id requiredConversion rule ID set per the Punchh platform configuration (returned for the
converted_category_balancesobject ascategory_id) - Type: stringconverted
_value requiredValues of the cash, fuel discounts, or charities resuting from the points conversion
- Type: integersource
_value requiredNumber of the points that the user wants to convert to cash, fuel discounts, or charities
Responses
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/conversions \
--request POST \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--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",
"conversion_rule_id": 1,
"converted_value": "2",
"source_value": 250
}'
[
"250 points converted into 2"
]