Loyalty cards
Create loyalty cards
Changed on[!note] Management API endpoints are not meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.
Create a batch of loyalty cards in a specified card-based loyalty program.
Customers can use loyalty cards to collect and spend loyalty points.
[!important] Note
- The specified card-based loyalty program must have a defined card code format that is used to generate the loyalty card codes.
- Trying to create more than 20,000 loyalty cards in a single request returns an error message with a 400 status code.
post/v1/loyalty_programs/{loyaltyProgramId}/cards/batch
Request
- Base URLhttps://yourbaseurl.talon.one
- Auth
- API key in header Authorization
- or API key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
loyaltyProgramIdinteger required
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the List loyalty programs endpoint.
Request body
Example request
{
"numberOfCards": 5000,
"batchId": "hwernpjz",
"status": "active",
"attributes": {
"PIN": 1234,
"Language": "DE"
},
"cardCodeSettings": {
"validCharacters": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"
],
"couponPattern": "SUMMER-####-####"
}
}Response
OK
Example response
{
"numberOfCardsGenerated": 5000,
"batchId": "hwernpjz"
}Changes
- warning
the
/request property's max was set to20000.00 - warning
the
/request property's min was set to1.00 - info
added the new optional request property
/
- warning