Balance Timelines

​

Gets the balance timelines of a user depending on currency or fuel discount or both

Note: Depending on the configuration, different objects are returned in the response (currency, fuel_discount, etc.). Hence, the fuel_discount parameter is not returned in the response for businesses using only currency-based redemptions.

Headers

  • The signature for the API call

  • Advertises which content types the client is able to understand

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

  • Set this header to application/json.

  • 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
  • Access token of the user

  • OAuth client ID provided by the business

Responses

  • application/json
Request Example for get/api2/mobile/balance_timelines
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/balance_timelines \
  --header 'x-pch-digest: {{$$.env.signature}}' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
  --data '{
  "client": "CLIENT_GOES_HERE",
  "access_token": "ACCESS_TOKEN_GOES_HERE"
}'
{
  "currency": [
    {
      "actual_earned_currency": 2,
      "unredeemed_currency": 0,
      "expiration_date": null,
      "status": "honored"
    },
    {
      "actual_earned_currency": 1,
      "unredeemed_currency": 0,
      "expiration_date": "2019-07-17T23:59:59-05:00",
      "status": null
    },
    {
      "actual_earned_currency": 10,
      "unredeemed_currency": 4,
      "expiration_date": "2019-07-17T23:59:59-05:00",
      "status": "unredeemed_expired"
    }
  ],
  "fuel_discount": [
    {
      "actual_earned_currency": 0.05,
      "unredeemed_currency": 0.05,
      "expiration_date": "2019-08-15T23:59:59-05:00",
      "status": "unredeemed"
    },
    {
      "actual_earned_currency": 0.5,
      "unredeemed_currency": 0.5,
      "expiration_date": "2019-08-15T23:59:59-05:00",
      "status": "unredeemed"
    }
  ]
}