Location Potential Credit .: Get

API Reference / v15

Get a user’s potential credit at a given location.

This endpoint allows you to get the total amount of credit that a user is eligible to redeem at a particular location. To use this endpoint, you’ll need a user’s token with the manage_user_campaigns permission.

Request Endpoint

GET /v15/locations/:location_id/credit

Authorization Required – User Token in Header

Authorization: token user="1131-a1fcf99331b51e92b6377920c915367a540523181985a203555bdcc37f0c86"

cURL Example

curl https://sandbox.thelevelup.com/v15/locations/19/credit \
  -H Accept:application/json \
  -H Content-Type:application/json \
  -H 'Authorization:token user="1131-a1fcf99331b51e92b6377920c915367a540523181985a203555bdcc37f0c86"'

Example Response

  "credit": {
    "total_amount": 505

Response Parameters

Parameters Type Description
total_amount Integer The user’s credit available at that location (in cents).


HTTP/1.1 error 401 Unauthorized - Token does not have manage_user_campaigns permission or is invalid