Get the key for the live code
POST
/perks/{perkId}/code
For a person who may use the perk in store now. Returns the key their phone makes the 6-digit codes with (also offline, for 24 hours). One live key per phone, three at most: a fourth replaces the oldest. 10 new codes a minute per person, with "Get a code". Never cached.
Authorizations
BearerAuth
In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.
Type
HTTP (bearer)
Parameters
Path Parameters
perkId*
Type
Requiredstring
Format
"uuid"Responses
The key
application/json
JSON
{
"data": "string"
}