Loyalty cards
Import loyalty cards
[!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.
Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program.
Send the file as multipart data.
It contains the following columns for each card:
- identifier (required): The identifier of the loyalty card, which must match the regular expression ^[A-Za-z0-9._%+@-]+$.
- state (required): The state of the loyalty card. It can be active or inactive.
- customerprofileids (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;).
- attributes (optional): A JSON object that contains the loyalty card's custom attributes and their values. These attributes must be created and connected to this loyalty program before they can be assigned to the cards through this endpoint.
[!note] Your CSV file must contain less than 500,000 rows. Requests time out after 30 seconds.
Example
identifier,state,customerprofileids,attributes
123-456-789AT,active,Alexa001;UserA,'{""my_attributes"": ""10_off""}"
post/v1/loyalty_programs/{loyaltyProgramId}/import_cards
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 multipart/form-data
Response
OK
Example response
{
"id": 6,
"created": "2020-06-10T09:05:27.993483Z",
"accountId": 3886,
"userId": 388,
"entity": "AttributeAllowedList",
"amount": 10
}Changes
No recorded changes to this operation across all 2 revisions of this API.