Location Potential Credit .: Get

API Reference / v14

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. If authorized with a user token, it will return credit specific to that user. Without a user token, it will return the amount (in cents) of credit a new user would receive.

Request Endpoint

GET /v14/locations/:location_id/credit

Authorization Optional – User Token in Header

Authorization: token 123456-75489120749...

cURL Example

curl -X GET -H Accept:application/json -H Content-Type:application/json -H Authorization:token 123456-75489120749... https://api.thelevelup.com/v14/locations/1234/credit

Example Response

{
  "credit": {
    "total_amount": 505
  }
}

Response Parameters

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

Errors

HTTP/1.1 error 401 Unauthorized - Token is invalid