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 achievement in a specific campaign.
post/v1/applications/{applicationId}/campaigns/{campaignId}/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.
Path parameters
applicationIdinteger required
The ID of the Application. It is displayed in your Talon.One deployment URL.
campaignIdinteger required
The ID of the campaign. It is displayed in your Talon.One deployment URL.
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",
"periodEndOverride": {
"month": 11,
"dayOfMonth": 23,
"hour": 23,
"minute": 59,
"second": 59
},
"recurrencePolicy": "no_recurrence",
"activationPolicy": "fixed_schedule",
"fixedStartDate": "2024-01-15T15:04:05Z07:00",
"endDate": "2024-02-15T15:04:05Z07:00"
}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",
"periodEndOverride": {
"month": 11,
"dayOfMonth": 23,
"hour": 23,
"minute": 59,
"second": 59
},
"recurrencePolicy": "no_recurrence",
"activationPolicy": "fixed_schedule",
"fixedStartDate": "2024-01-15T15:04:05Z07:00",
"endDate": "2024-02-15T15:04:05Z07:00",
"campaignId": 1,
"userId": 1234,
"createdBy": "John Doe",
"status": "inprogress"
}Changes
- info
endpoint deprecated
- info
removed the non-success response with the status
- info