curl --request GET \
--url https://app.hoppier.com/api/v1/programs/{program} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hoppier.com/api/v1/programs/{program}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hoppier.com/api/v1/programs/{program}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "prg_Z8q3NnW2xK",
"object": "program",
"name": "Team lunch",
"amount": 2500,
"currency": "usd",
"status": "active",
"startDate": "1793491200000",
"endDate": "1795996800000",
"createdAt": "1792504992000",
"updatedAt": "1792504992000",
"addressId": "ad_7Ym2p0Lx3Q",
"colorHex": "#FF6161",
"colorHex2": "#FFFFFF",
"logoUrl": null
}Get a program
Returns one program in the key’s company.
A program in another company gets the same 404 as an id that doesn’t exist.
curl --request GET \
--url https://app.hoppier.com/api/v1/programs/{program} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hoppier.com/api/v1/programs/{program}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hoppier.com/api/v1/programs/{program}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "prg_Z8q3NnW2xK",
"object": "program",
"name": "Team lunch",
"amount": 2500,
"currency": "usd",
"status": "active",
"startDate": "1793491200000",
"endDate": "1795996800000",
"createdAt": "1792504992000",
"updatedAt": "1792504992000",
"addressId": "ad_7Ym2p0Lx3Q",
"colorHex": "#FF6161",
"colorHex2": "#FFFFFF",
"logoUrl": null
}Authorizations
Send your key in the Authorization header: Authorization: Bearer hk_live.…. The word Bearer is case-sensitive.
Keys are issued by Hoppier during the beta and shown once. Treat them like passwords and never put one in code that runs in a browser or an app.
Path Parameters
The program's id. Starts with prg_.
^prg_Response
The program.
A reward program in your account.
The program's id. Starts with prg_.
"prg_Z8q3NnW2xK"
"program""Team lunch"
The amount each person gets, in cents (2500 means $25.00). 0 on a program where each person has their own amount.
2500
Lowercase currency code. usd is the only value today.
"usd"
active: running. inactive: archived. pending: not active yet.
active, inactive, pending When the program starts: a Unix timestamp in milliseconds, as a string. A program with no start date returns the string "undefined", so treat anything that isn't 13 digits as "no start date".
"1793491200000"
Unix milliseconds, as a string.
"1792504992000"
Unix milliseconds, as a string.
"1792504992000"
When the program ends (Unix milliseconds, as a string). Left out when the program has no end date.
"1795996800000"
Id of the program's address. Starts with ad_.
"ad_7Ym2p0Lx3Q"
The program's main colour in the Hoppier app.
"#FF6161"
The program's second colour in the Hoppier app.
"#FFFFFF"
URL of the program's logo, if it has one.