Rewards .: Summary by Location

API Reference / v15

List a User’s Rewards at a Particular Location

This endpoint returns a summary of rewards available to a user at this location. If no user token is provided, a summary of rewards available to a new user will be shown. If a user token is used, it must have the manage_user_campaigns permission.

Authorization Optional – User Token in Header or No Authorization

Authorization: token user=123456-75489120749...

Request

GET /v15/locations/:location_id/reward_summary

cURL Example with No Authentication

curl 'https://sandbox.thelevelup.com/v15/locations/1/reward_summary' \
  -H Accept:application/json \
  -H Content-Type:application/json

cURL Example with User Authentication

curl 'https://sandbox.thelevelup.com/v15/locations/1/reward_summary' \
  -H Accept:application/json \
  -H Content-Type:application/json \
  -H 'Authorization:token user="1123-15d2aeedc9f4e0e7094a9d283868f8fbe873cb85ceaa0c511727245aec8c9e"'

Response

HTTP/1.1 200 OK

{
    "reward_summary": {
        "credit_amount": 1000,
        "reward_count": 5,
        "usable_as_credit_reward_count": 3
    }
}

Response Parameters

Param Type Description
credit_amount Integer Total credit available.
reward_count Integer Total number of rewards (including credit rewards)
usable_as_credit_reward_count Integer Number of rewards contributing to the credit_amount