Achievements
Create achievement
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 new account-level achievement.
post/v2/achievements
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.
Request body
Example request
{
"name": "Order50Discount",
"title": "50% off on 50th purchase.",
"description": "50% off for every 50th purchase in a year.",
"target": 50,
"period": "1Y",
"recurrencePolicy": "no_recurrence",
"activationPolicy": "fixed_schedule",
"fixedStartDate": "2024-01-15T15:04:05+07:00",
"endDate": "2024-01-15T15:04:05+07:00",
"subscribedApplications": [
132,
97
],
"sandbox": true,
"timezone": "Europe/Berlin"
}Response
Created
Example response
{
"id": 6,
"created": "2020-06-10T09:05:27.993483Z",
"name": "Order50Discount",
"title": "50% off on 50th purchase.",
"description": "50% off for every 50th purchase in a year.",
"target": 50,
"period": "1Y",
"recurrencePolicy": "no_recurrence",
"activationPolicy": "fixed_schedule",
"fixedStartDate": "2024-01-15T15:04:05+07:00",
"endDate": "2024-01-15T15:04:05+07:00",
"subscribedApplications": [
132,
97
],
"userId": 1234,
"createdBy": "John Doe",
"periodEndOverride": {
"month": 11,
"dayOfMonth": 23,
"hour": 23,
"minute": 59,
"second": 59
},
"status": "active",
"sandbox": true,
"timezone": "Europe/Berlin",
"campaignId": 3,
"referencedByCampaigns": [
{
"id": 1,
"applicationId": 2
}
]
}Changes
- info
endpoint added
- info