Create Redemption Using Banked Currency (Redemptions 1.0)

Creates a redemption using a currency amount. The amount is deducted from a user's available banked currency.

Headers
  • Authorization
    Type: string
    required

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

  • x-pch-digest
    Type: string
    required

    The signature for the API call

  • Content-Type
    Type: string
    required

    Set this header to application/json.

  • Accept-Language
    Type: string

    Preferred language

  • Accept
    Type: string
    required

    Advertises which content types the client is able to understand

  • punchh-app-device-id
    Type: string
    required

    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.

  • User-Agent
    Type: string
    required

    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
  • client
    Type: string
    required

    OAuth client ID provided by the business

  • banked_currency
    Type: number Format: double

    The amount of banked currency with which a redemption code has to be created

  • gps_accuracy
    Type: integer

    Accuracy of a user's device GPS

  • latitude
    Type: string

    Latitude coordinate of the redemption location

  • location_id
    Type: integer

    Location ID at which the redemption code is generated. If no location ID is provided, then it returns the ID of the default location.

  • longitude
    Type: string

    Longitude coordinate of the redemption location

Responses
  • application/json
  • 400
Request Example for post/api2/mobile/redemptions/banked_currency
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/redemptions/banked_currency \
  --request POST \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --header 'x-pch-digest: {{$$.env.signature}}' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'punchh-app-device-id: APP_DEVICE_ID_GOES_HERE' \
  --header 'User-Agent: AppIdentifier/VersionNumber/BuildNumber(OS_Type)' \
  --data '{
  "client": "CLIENT_GOES_HERE",
  "banked_currency": 10,
  "location_id": 304155,
  "latitude": "26.9167509",
  "longitude": "75.8136926",
  "gps_accuracy": 27
}'
{
  "redemption_status": "redeemable",
  "created_at": "2016-05-25T06:41:37-04:00",
  "redeemable_id": null,
  "location_id": 304361,
  "redemption_image_url": "IMAGE_URL_GOES_HERE",
  "redemption_message": "Message associated with the redemption.",
  "updated_at": "2016-05-25T06:41:37-04:00",
  "redeemable_description": "",
  "redemption_id": 1822896,
  "redemption_tracking_code": "7246338",
  "expiring_at": "2016-05-25T08:41:37-04:00",
  "redeemable_name": null,
  "campaign_name": "Mass Campaign Offer",
  "redeemed_value": "10"
}