Upload one-time codes
POST
/sponsors/{key}/manage/online-codes
A CSV's text, one code per line in the first column (a code header is skipped), at most 50,000. A code already on the perk's list or in the file, in any case, is refused, with its line; codes are stored encrypted. An upload that takes the perk from no codes left to some tells the givers watching it ("Tell me when it's back"). The owner and admins.
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
key*
Type
Requiredstring
Request Body
application/json
JSON
{
"perkId": "string",
"csv": "string",
"filename": "string"
}
Responses
Uploaded
application/json
JSON
{
"data": {
"batchId": "string",
"added": 0,
"duplicates": 0,
"duplicateLines": [
0
],
"invalid": [
"string"
]
}
}