openapi: 3.0.0
info:
title: Management API
version: ''
description: |
The Management API allows you to programmatically do what the Campaign Manager does.
For example, use it for management purposes and backoffice systems.
For more background information about this API, see [Management API overview](https://docs.talon.one/docs/dev/management-api/overview)
Ensure you [authenticate](#section/Authentication) to make requests to the API.
**Warnings:**
- This API is not meant to be used in real-time integrations that directly serve your end users.
- This API supports a maximum of **3 requests per second** for each of these endpoints.
Are you looking for a different API?
If you need the API to:
- Integrate with Talon.One directly and send real-time data, see [the Integration API reference docs](https://docs.talon.one/integration-api).
- Integrate with Talon.One from a CEP or CDP platform, see [the Third-party API reference docs](https://docs.talon.one/third-party-api).
# Authentication
servers:
- url: https://yourbaseurl.talon.one
security:
- manager_auth: []
- management_key: []
tags:
- name: Accounts and users
description: |
Operations for updating account information such as billing email addresses, inviting users, etc.
- name: Achievements
description: |
Achievements allow you to reward a customer profile for performing a number of specific actions or reaching a transactional milestone within a defined period.
For example, you can use achievements to award your customers when they purchase five cups of coffee in one week or when they purchase items worth $3000 in three months.
- name: Additional costs
description: |
An extra fee applied to the cart. For example, shipping fees or processing fees.
See the [docs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs).
- name: Analytics
description: |
Analytics are used to retrieve statistical data about the performance of campaigns within an Application.
- name: Applications
description: |
Represents an Application in the Campaign Manager.
An Application is the target of every Integration API request to Talon.One.
One Application can hold various API keys used for Integration API requests.
You may have multiple Applications within one account,
for example staging and production, or different international markets.
See the [docs](https://docs.talon.one/docs/product/applications/overview).
- name: Attributes
description: |
Represents a piece of information related to one of the entities avaialbe in the Campaign Manager. Use
them to create highly customized rules.
See the [docs](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes).
- name: Audiences
description: |
Represents lists of customer profiles that allow you to target specific groups of customers in your campaigns.
Audiences can be synced from customer data platforms or created directly in Talon.One.
See the [docs](https://docs.talon.one/docs/product/audiences/overview).
- name: Campaign access groups
description: |
Represents the campaign access groups you can create in your Applications to organize your campaigns based on the type of campaign or the team in charge.
See the [docs](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups).
- name: Campaign templates
description: |
Represents templates used to generate campaigns from.
- name: Campaigns
description: |
Represents the primary resource used to control the behavior of the Talon.One Rule Engine.
They combine rulesets, coupons, and limits into a single unit.
See the [docs](https://docs.talon.one/docs/product/campaigns/overview).
- name: Catalogs
description: |
Represents a catalog of cart items with unique SKUs. Cart item catalogs allow you to synchronize your entire inventory with Talon.One.
See the [docs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs).
- name: Collections
description: |
Represents a collection of arbitrary values that you can use inside rules. For example, a list of SKUs.
See the [docs](https://docs.talon.one/docs/product/campaigns/managing-collections).
- name: Coupons
description: |
Coupons are unique codes belonging to a particular campaign. They don't define any behavior on their own.
Instead the campaign ruleset can include rules that validate coupons and carry out particular effects.
See the [docs](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview).
- name: Customer data
description: |
Represents the data of a customer, including sessions and events used for reporting and debugging in the Campaign Manager.
- name: Events
description: |
Represents a single occurrence of a specific customer action, for example, updating the cart or signing up for a newsletter.
There are 2 types of events:
- **Built-in events:** They are triggered by various endpoints, such as the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. [Learn more](https://docs.talon.one/docs/dev/concepts/entities/events).
- **Custom events:** They are triggered by the [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint.
- name: Giveaways
description: |
Represents a program that rewards customers with giveaways, such as free gift cards.
See the [docs](https://docs.talon.one/docs/product/giveaways/overview).
- name: Logs
description: |
Operations to query the Talon.One logs. They contain all incoming and outgoing requests.
- name: Loyalty
description: |
Represents loyalty programs or concepts related to them.
Loyalty programs can be _profile-based_ or _card-based_, depending on whether loyalty points are linked
to [customer profiles](https://docs.talon.one/docs/product/applications/displaying-customer-profiles) or [loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview).
See [the Product docs](https://docs.talon.one/docs/product/loyalty-programs/overview) for more information.
- name: Loyalty cards
description: |
Represents loyalty cards.
[Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) allow your customers to collect and spend loyalty points within a card-based loyalty program.
- name: Notifications
description: |
Represents the notifications that customers can create about various events. See [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications).
- name: Referrals
description: |
A referral is a code shared between a customer and a prospect.
A referral is defined by:
- an advocate: person who invited their friend via referral program.
- a friend: person who receives the invite from an advocate.
- a referral code: code to be redeemed by the advocate(s) once they referred their friend.
See the [docs](https://docs.talon.one/docs/product/campaigns/referrals/referral-overview).
- name: Roles
description: |
Represents a set of permissions assigned to a user.
See the [docs](https://docs.talon.one/docs/product/account/account-settings/managing-roles).
- name: Sessions
description: |
Represents a session used for authentication purposes.
Create one with the [Create session](#operation/createSession) endpoint.
- name: Stores
description: |
Represents physical or digital stores, branches, and franchises.
- name: Webhooks
description: |
A way to send information from Talon.One to the URI of your choice.
See the [docs](https://docs.talon.one/docs/dev/getting-started/webhooks).
paths:
/v1/applications:
get:
operationId: getApplications
summary: List Applications
description: |-
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.
List all applications in the current account.
tags:
- Applications
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Application'
/v1/applications/{applicationId}:
get:
operationId: getApplication
summary: Get Application
description: |-
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.
Get the application specified by the ID.
tags:
- Applications
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
/v1/applications/{applicationId}/campaigns:
get:
operationId: getCampaigns
summary: List campaigns
description: |
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.
List the campaigns of the specified application that match your filter criteria.
tags:
- Campaigns
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignState
in: query
description: |
Filter results by the state of the campaign.
- `enabled`: Campaigns that are scheduled, running (activated), or expired.
- `running`: Campaigns that are running (activated).
- `disabled`: Campaigns that are disabled.
- `expired`: Campaigns that are expired.
- `archived`: Campaigns that are archived.
required: false
schema:
type: string
enum:
- enabled
- disabled
- archived
- scheduled
- running
- expired
- name: name
in: query
description: Filter results performing case-insensitive matching against the name of the campaign.
required: false
schema:
type: string
- name: tags
in: query
description: |
Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the "name" query parameter, a logical OR will be performed to search both tags and name for the provided values
required: false
schema:
type: string
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: campaignGroupId
in: query
description: Filter results to campaigns owned by the specified campaign access group ID.
required: false
schema:
type: integer
- name: templateId
in: query
description: The ID of the Campaign Template this Campaign was created from.
schema:
type: integer
- name: storeId
in: query
description: Filter results to campaigns linked to the specified store ID.
required: false
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Campaign'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/campaigns/{campaignId}:
get:
operationId: getCampaign
summary: Get campaign
description: |-
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.
Retrieve the given campaign.
tags:
- Campaigns
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Campaign'
put:
operationId: updateCampaign
summary: Update campaign
description: |-
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.
Update the given campaign.
tags:
- Campaigns
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCampaign'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Campaign'
delete:
operationId: deleteCampaign
summary: Delete campaign
description: |-
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.
Delete the given campaign.
tags:
- Campaigns
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
responses:
'204':
description: No Content
/v1/applications/{applicationId}/campaigns/{campaignId}/copy:
post:
operationId: copyCampaignToApplications
summary: Copy the campaign into the specified Application
description: |-
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.
Copy the campaign into all specified Applications.
tags:
- Campaigns
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignCopy'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Campaign'
/v1/notifications/{notificationId}/activation:
put:
operationId: notificationActivation
summary: Activate or deactivate notification
description: |
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.
Activate or deactivate the given notification.
When `enabled` is false, updates will no longer be sent for the given notification.
tags:
- Notifications
parameters:
- name: notificationId
in: path
required: true
description: The ID of the notification. Get it with the appropriate _List notifications_ endpoint.
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationActivation'
description: body
required: true
responses:
'204':
description: No Content
/v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points:
post:
operationId: postAddedDeductedPointsNotification
summary: Create notification about added or deducted loyalty points
description: |
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 notification about added or deducted loyalty points in a given profile-based loyalty program.
A notification for added or deducted loyalty points is different from regular webhooks
in that it is loyalty program-scoped and has a predefined payload.
For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-notifications).
tags:
- Notifications
parameters:
- name: loyaltyProgramId
in: path
required: true
description: |
Identifier of the profile-based loyalty program. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
schema:
type: integer
requestBody:
$ref: '#/components/requestBodies/NewBaseNotification'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/BaseNotification'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/notifications/pending_points:
post:
operationId: postPendingPointsNotification
summary: Create notification about pending loyalty points
description: |
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 notification about pending loyalty points for a given profile-based loyalty program. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-notifications).
tags:
- Notifications
parameters:
- name: loyaltyProgramId
in: path
required: true
description: |
Identifier of the profile-based loyalty program. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
schema:
type: integer
requestBody:
$ref: '#/components/requestBodies/NewBaseNotification'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/BaseNotification'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/catalogs/notifications/strikethrough:
post:
operationId: postCatalogsStrikethroughNotification
summary: Create strikethrough notification
description: |
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 notification for the in the given Application.
For more information, see [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications).
See the [payload](https://docs.talon.one/outbound-notifications) you will receive.
tags:
- Notifications
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
requestBody:
$ref: '#/components/requestBodies/NewBaseNotification'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/BaseNotification'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/campaigns_search:
post:
operationId: getCampaignByAttributes
summary: List campaigns that match the given attributes
description: |
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.
Get a list of all the campaigns that match a set of attributes.
tags:
- Campaigns
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignState
in: query
description: |
Filter results by the state of the campaign.
- `enabled`: Campaigns that are scheduled, running (activated), or expired.
- `running`: Campaigns that are running (activated).
- `disabled`: Campaigns that are disabled.
- `expired`: Campaigns that are expired.
- `archived`: Campaigns that are archived.
required: false
schema:
type: string
enum:
- enabled
- disabled
- archived
- scheduled
- running
- expired
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignSearch'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Campaign'
/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets:
get:
operationId: getRulesets
summary: List campaign rulesets
description: |
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.
List all rulesets of this campaign. A ruleset is a revision of the rules of a campaign.
**Important:** The response also includes deleted rules.
You should only consider the latest revision of the returned rulesets.
tags:
- Campaigns
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Ruleset'
/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}:
get:
operationId: getRuleset
summary: Get ruleset
description: |-
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.
Retrieve the specified ruleset.
tags:
- Campaigns
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: rulesetId
in: path
description: The ID of the ruleset.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Ruleset'
/v1/applications/{applicationId}/campaigns/{campaignId}/coupons:
post:
operationId: createCoupons
summary: Create coupons
description: |-
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 coupons according to some pattern. Up to 20.000 coupons can be created without a unique prefix. When a unique prefix is provided, up to 200.000 coupons can be created.
tags:
- Coupons
parameters:
- name: silent
in: query
description: |
Possible values: `yes` or `no`.
- `yes`: Increases the perfomance of the API call by returning a 204 response.
- `no`: Returns a 200 response that contains the updated customer profiles.
required: false
schema:
type: string
default: 'yes'
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewCoupons'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Coupon'
'204':
description: No Content
put:
operationId: updateCouponBatch
summary: Update coupons
description: |
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.
Update all coupons, or a specific batch of coupons in the given campaign.
You can find the `batchId` in the **Coupons** view of your Application
in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWithoutTotalCount).
Important
- Only send sequential requests to this endpoint.
- Requests to this endpoint timeout after 30 minutes. If you hit a timeout, reach out to our support team.
To update a specific coupon, use [Update coupon](#operation/updateCoupon).
tags:
- Coupons
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCouponBatch'
description: body
required: true
responses:
'204':
description: No Content
delete:
operationId: deleteCoupons
summary: Delete coupons
description: |-
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.
Deletes all the coupons matching the specified criteria.
tags:
- Coupons
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: value
in: query
description: Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters.
required: false
schema:
type: string
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: startsAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: startsBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: expiresAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: expiresBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: valid
in: query
description: |
- `expired`: Matches coupons in which the expiration date is set and in the past.
- `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future.
- `validFuture`: Matches coupons in which start date is set and in the future.
required: false
schema:
type: string
enum:
- expired
- validNow
- validFuture
- name: batchId
in: query
description: Filter results by batches of coupons
required: false
schema:
type: string
- name: usable
in: query
description: |
- `true`: only coupons where `usageCounter < usageLimit` will be returned.
- `false`: only coupons where `usageCounter >= usageLimit` will be returned.
schema:
type: string
enum:
- 'true'
- 'false'
- name: referralId
in: query
description: Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.
required: false
schema:
type: integer
- name: recipientIntegrationId
in: query
description: |
Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field.
required: false
schema:
type: string
- name: exactMatch
in: query
description: Filter results to an exact case-insensitive matching against the coupon code
required: false
schema:
type: boolean
default: false
responses:
'204':
description: No Content
/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients:
post:
operationId: createCouponsForMultipleRecipients
summary: Create coupons for multiple recipients
description: |-
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 coupons according to some pattern for up to 1000 recipients.
tags:
- Coupons
parameters:
- name: silent
in: query
description: |
Possible values: `yes` or `no`.
- `yes`: Increases the perfomance of the API call by returning a 204 response.
- `no`: Returns a 200 response that contains the updated customer profiles.
required: false
schema:
type: string
default: 'yes'
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewCouponsForMultipleRecipients'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Coupon'
'204':
description: No Content
/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async:
post:
operationId: createCouponsAsync
summary: Create coupons asynchronously
description: |
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 up to 5,000,000 coupons asynchronously. You should typically use this enpdoint when you create at least 20,001 coupons. You receive an email when the creation is complete.
If you want to create less than 20,001 coupons, you can use the [Create coupons](https://docs.talon.one/management-api#tag/Coupons/operation/createCoupons) endpoint.
tags:
- Coupons
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewCouponCreationJob'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncCouponCreationResponse'
/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs:
post:
operationId: createCouponsDeletionJob
summary: Creates a coupon deletion job
description: |
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.
This endpoint handles creating a job to delete coupons asynchronously.
tags:
- Coupons
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewCouponDeletionJob'
description: body
required: true
responses:
'202':
description: The deletion request has been accepted and will be processed asynchronously
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncCouponDeletionJobResponse'
/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total:
get:
operationId: getCouponsWithoutTotalCount
summary: List coupons
description: |
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.
List all the coupons matching the specified criteria.
tags:
- Coupons
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: value
in: query
description: Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters.
required: false
schema:
type: string
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: valid
in: query
description: |
Either "expired", "validNow", or "validFuture". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.
required: false
schema:
type: string
enum:
- expired
- validNow
- validFuture
- name: usable
in: query
description: |
Either "true" or "false". If "true", only coupons where `usageCounter < usageLimit` will be returned, "false" will return only coupons where `usageCounter >= usageLimit`.
schema:
type: string
enum:
- 'true'
- 'false'
- name: redeemed
in: query
description: |
- `true`: only coupons where `usageCounter > 0` will be returned.
- `false`: only coupons where `usageCounter = 0` will be returned.
- This field cannot be used in conjunction with the `usable` query parameter.
schema:
type: string
enum:
- 'true'
- 'false'
- name: referralId
in: query
description: Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.
required: false
schema:
type: integer
- name: recipientIntegrationId
in: query
description: Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field
required: false
schema:
type: string
- name: batchId
in: query
description: Filter results by batches of coupons
required: false
schema:
type: string
- name: exactMatch
in: query
description: Filter results to an exact case-insensitive matching against the coupon code
required: false
schema:
type: boolean
default: false
- name: expiresBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: expiresAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: startsBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: startsAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: valuesOnly
in: query
description: Filter results to only return the coupon codes (`value` column) without the associated coupon data.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/Coupon'
/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}:
put:
operationId: updateCoupon
summary: Update coupon
description: |
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.
Update the specified coupon.
Important
With this PUT
endpoint alone, if you do not explicitly set a value for the startDate
, expiryDate
, and recipientIntegrationId
properties in your request, it is automatically set to null
.
tags:
- Coupons
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: couponId
in: path
description: |
The internal ID of the coupon code. You can find this value in the `id` property from the
[List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCoupon'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Coupon'
delete:
operationId: deleteCoupon
summary: Delete coupon
description: |-
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.
Delete the specified coupon.
tags:
- Coupons
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: couponId
in: path
description: |
The internal ID of the coupon code. You can find this value in the `id` property from the
[List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response.
required: true
schema:
type: string
responses:
'204':
description: No Content
/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/no_total:
post:
operationId: searchCouponsAdvancedWithoutTotalCount
summary: List coupons that match the given attributes in campaign (without total count)
description: |
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.
List the coupons whose attributes match the query criteria
in the given campaign.
The match is successful if all the attributes of the request are found in a coupon,
even if the coupon has more attributes that are not present on the request.
**Note:** The total count is not included in the response.
tags:
- Coupons
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: value
in: query
description: Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters.
required: false
schema:
type: string
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: valid
in: query
description: |
Either "expired", "validNow", or "validFuture". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.
required: false
schema:
type: string
enum:
- expired
- validNow
- validFuture
- name: usable
in: query
description: |
Either "true" or "false". If "true", only coupons where `usageCounter < usageLimit` will be returned, "false" will return only coupons where `usageCounter >= usageLimit`.
schema:
type: string
enum:
- 'true'
- 'false'
- name: referralId
in: query
description: Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.
required: false
schema:
type: integer
- name: recipientIntegrationId
in: query
description: Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field
required: false
schema:
type: string
- name: exactMatch
in: query
description: Filter results to an exact case-insensitive matching against the coupon code
required: false
schema:
type: boolean
default: false
- name: batchId
in: query
description: Filter results by batches of coupons
required: false
schema:
type: string
requestBody:
$ref: '#/components/requestBodies/AttributeQuery'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/Coupon'
/v1/applications/{applicationId}/coupons_search_advanced/no_total:
post:
operationId: searchCouponsAdvancedApplicationWideWithoutTotalCount
summary: List coupons that match the given attributes (without total count)
description: |
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.
List the coupons whose attributes match the query criteria in all the campaigns of the given Application.
The match is successful if all the attributes of the request are found in a coupon,
even if the coupon has more attributes that are not present on the request.
**Note:** The total count is not included in the response.
tags:
- Coupons
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: value
in: query
description: Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters.
required: false
schema:
type: string
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: valid
in: query
description: |
Either "expired", "validNow", or "validFuture". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.
required: false
schema:
type: string
enum:
- expired
- validNow
- validFuture
- name: usable
in: query
description: |
Either "true" or "false". If "true", only coupons where `usageCounter < usageLimit` will be returned, "false" will return only coupons where `usageCounter >= usageLimit`.
schema:
type: string
enum:
- 'true'
- 'false'
- name: referralId
in: query
description: Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.
required: false
schema:
type: integer
- name: recipientIntegrationId
in: query
description: Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field
required: false
schema:
type: string
- name: batchId
in: query
description: Filter results by batches of coupons
required: false
schema:
type: string
- name: exactMatch
in: query
description: Filter results to an exact case-insensitive matching against the coupon code
required: false
schema:
type: boolean
default: false
- name: campaignState
in: query
description: |
Filter results by the state of the campaign.
- `enabled`: Campaigns that are scheduled, running (activated), or expired.
- `running`: Campaigns that are running (activated).
- `disabled`: Campaigns that are disabled.
- `expired`: Campaigns that are expired.
- `archived`: Campaigns that are archived.
required: false
schema:
type: string
enum:
- enabled
- disabled
- archived
- scheduled
- running
- expired
requestBody:
$ref: '#/components/requestBodies/AttributeQuery'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/Coupon'
/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}:
delete:
operationId: deleteReferral
summary: Delete referral
description: |-
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.
Delete the specified referral.
tags:
- Referrals
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: referralId
in: path
description: The ID of the referral code.
required: true
schema:
type: string
responses:
'204':
description: No Content
put:
operationId: updateReferral
summary: Update referral
description: |-
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.
Update the specified referral.
tags:
- Referrals
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: referralId
in: path
description: The ID of the referral code.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateReferral'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Referral'
/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total:
get:
operationId: getReferralsWithoutTotalCount
summary: List referrals
description: |-
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.
List all referrals of the specified campaign.
tags:
- Referrals
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: code
in: query
description: Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters.
required: false
schema:
type: string
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: valid
in: query
description: |
Either "expired", "validNow", or "validFuture". The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future.
required: false
schema:
type: string
enum:
- expired
- validNow
- validFuture
- name: usable
in: query
description: |
Either "true" or "false". If "true", only referrals where `usageCounter < usageLimit` will be returned, "false" will return only referrals where `usageCounter >= usageLimit`.
schema:
type: string
enum:
- 'true'
- 'false'
- name: advocate
in: query
required: false
description: Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/Referral'
/v1/campaign_groups:
get:
operationId: getCampaignGroups
summary: List campaign access groups
description: |-
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.
List the campaign access groups in the current account.
tags:
- Campaign access groups
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/CampaignGroup'
/v1/campaign_groups/{campaignGroupId}:
get:
operationId: getCampaignGroup
summary: Get campaign access group
description: |-
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.
Get a campaign access group specified by its ID.
tags:
- Campaign access groups
parameters:
- name: campaignGroupId
in: path
description: The ID of the campaign access group.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignGroup'
/v1/campaign_templates:
get:
operationId: getCampaignTemplates
summary: List campaign templates
description: |-
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.
Retrieve a list of campaign templates.
tags:
- Campaign templates
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: state
in: query
description: Filter results by the state of the campaign template.
required: false
schema:
type: string
enum:
- draft
- enabled
- disabled
- name: name
in: query
description: Filter results performing case-insensitive matching against the name of the campaign template.
required: false
schema:
type: string
- name: tags
in: query
description: |
Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the "name" query parameter, a logical OR will be performed to search both tags and name for the provided values.
required: false
schema:
type: string
- in: query
description: Filter results by user ID.
required: false
name: userId
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/CampaignTemplate'
/v1/applications/{applicationId}/create_campaign_from_template:
post:
operationId: createCampaignFromTemplate
summary: Create campaign from campaign template
description: |
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.
Use the campaign template referenced in the request body to create
a new campaign in one of the connected Applications.
If the template was created from a campaign with rules referencing [campaign collections](https://docs.talon.one/docs/product/campaigns/managing-collections),
the corresponding collections for the new campaign are created automatically.
tags:
- Campaign templates
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTemplateCampaign'
description: body
required: true
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTemplateCampaignResponse'
/v1/loyalty_programs:
get:
operationId: getLoyaltyPrograms
summary: List loyalty programs
description: |-
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.
List the loyalty programs of the account.
tags:
- Loyalty
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/LoyaltyProgram'
/v1/loyalty_programs/{loyaltyProgramId}:
get:
operationId: getLoyaltyProgram
summary: Get loyalty program
description: |
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.
Get the specified [loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview).
To list all loyalty programs in your Application, use [List loyalty programs](#operation/getLoyaltyPrograms).
To list the loyalty programs that a customer profile is part of, use the
[List customer data](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/getCustomerInventory)
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
required: true
description: |
Identifier of the loyalty program. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LoyaltyProgram'
/v1/loyalty_programs/{loyaltyProgramId}/import_points:
post:
operationId: importLoyaltyPoints
summary: Import loyalty points
description: |
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 points you want to import into a given loyalty program.
Send the file as multipart data.
Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card.
The CSV file contains the following columns:
- `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported.
- `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported.
- `amount`: The amount of points to award to the customer profile.
- `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date.
**Note**: It must be an RFC3339 timestamp string or string `immediate`. Empty or missing values are considered `immediate`.
- `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date.
**Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`.
- `subledgerid` (optional): The ID of the subledger that should received the points.
- `reason` (optional): The reason why these points are awarded.
You can use the time zone of your choice. It is converted to UTC internally by Talon.One.
**Note:** For existing customer profiles and loyalty cards, the imported points are added to any previous active or pending points, depending on the
value provided for `startdate`. If `startdate` matches the current date, the imported points are _active_. If it is later, the points are _pending_ until
the date provided for `startdate` is reached.
**Note:** We recommend limiting your file size to 500MB.
**Example for profile-based programs:**
```text
customerprofileid,amount,startdate,expirydate,subledgerid,reason
URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement
```
**Example for card-based programs:**
```text
identifier,amount,startdate,expirydate,subledgerid,reason
summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement
```
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
required: true
description: |
Identifier of the loyalty program. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
/v1/loyalty_programs/{loyaltyProgramId}/import_customers_tiers:
post:
operationId: importLoyaltyCustomersTiers
summary: Import customers into loyalty tiers
description: |
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 existing customers to be assigned to existing tiers.
Send the file as multipart data.
**Important:** This endpoint only works with loyalty programs with advanced tiers (with expiration and downgrade policy) feature enabled.
The CSV file should contain the following columns:
- `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used.
- `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned.
- `tiername`: The name of an existing tier to assign to the customer.
- `expirydate`: The expiration date of the tier when the tier is reevaluated. It should be a future date.
About customer assignment to a tier:
- If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import.
- If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated.
**Note:** We recommend not using this endpoint to update the tier of a customer.
To update a customer's tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points.
You can use the time zone of your choice. It is converted to UTC internally by Talon.One.
**Note:** We recommend limiting your file size to 500MB.
**Example:**
```csv
subledgerid,customerprofileid,tiername,expirydate
SUB1,alexa,Gold,2024-03-21T07:32:14Z
,george,Silver,2025-04-16T21:12:37Z
SUB2,avocado,Bronze,2026-05-03T11:47:01Z
```
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
required: true
description: |
Identifier of the loyalty program. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}:
get:
operationId: getLoyaltyPoints
summary: Get customer's full loyalty ledger
description: |
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.
Get the loyalty ledger for this profile integration ID.
To get the `integrationId` of the profile from a `sessionId`, use the
[Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint.
**Important:** To get loyalty transaction logs for a given Integration ID in a loyalty program,
we recommend using the Integration API's [Get customer's loyalty logs](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions).
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
description: The identifier for the loyalty program.
required: true
schema:
type: string
- name: integrationId
in: path
description: The identifier of the profile.
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LoyaltyLedger'
/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_points:
put:
operationId: addLoyaltyPoints
summary: Add points to customer profile
description: |
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.
Add points in the specified loyalty program for the given customer.
To get the `integrationId` of the profile from a `sessionId`, use the
[Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint.
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
description: The identifier for the loyalty program.
required: true
schema:
type: string
- name: integrationId
in: path
description: The identifier of the profile.
required: true
schema:
type: string
requestBody:
$ref: '#/components/requestBodies/AddLoyaltyPoints'
responses:
'204':
description: No Content
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points:
put:
operationId: removeLoyaltyPoints
summary: Deduct points from customer profile
description: |
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.
Deduct points from the specified loyalty program and specified customer profile.
**Important:**
- Only active points can be deducted.
- Only pending points are rolled back when a session is cancelled or reopened.
To get the `integrationId` of the profile from a `sessionId`, use the
[Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint.
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
description: The identifier for the loyalty program.
required: true
schema:
type: string
- name: integrationId
in: path
description: The identifier of the profile.
required: true
schema:
type: string
requestBody:
$ref: '#/components/requestBodies/DeductLoyaltyPoints'
responses:
'204':
description: No Content
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log:
get:
operationId: exportLoyaltyLedger
summary: Export customer's transaction logs
description: |
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.
Download a CSV file containing a customer's transaction logs in the loyalty program.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
The generated file can contain the following columns:
- `customerprofileid`: The ID of the profile.
- `customersessionid`: The ID of the customer session.
- `rulesetid`: The ID of the rule set.
- `rulename`: The name of the rule.
- `programid`: The ID of the loyalty program.
- `type`: The transaction type, such as `addition` or `subtraction`.
- `name`: The reason for the transaction.
- `subledgerid`: The ID of the subledger, when applicable.
- `startdate`: The start date of the program.
- `expirydate`: The expiration date of the program.
- `id`: The ID of the transaction.
- `created`: The timestamp of the creation of the loyalty program.
- `amount`: The number of points in that transaction.
- `archived`: Whether the session related to the transaction is archived.
- `campaignid`: The ID of the campaign.
tags:
- Loyalty
parameters:
- name: rangeStart
in: query
required: true
description: |
Only return results from after this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: rangeEnd
in: query
required: true
description: |
Only return results from before this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: dateFormat
in: query
description: Determines the format of dates in the export document.
required: false
schema:
type: string
enum:
- excel
- ISO8601
- name: loyaltyProgramId
in: path
description: The identifier for the loyalty program.
required: true
schema:
type: string
- name: integrationId
in: path
description: The identifier of the profile.
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
customerprofileid,customersessionid,rulesetid,rulename,programid,type,name,subledgerid,startdate,expirydate,id,created,amount,archived,campaignid
8NHOS78H,06b0fafb-ccbf-42c7-b44b-d858e8b525022,1691,test,37,subtraction,10% of current total,,immediate,unlimited,60803,2022-11-29 16:16:10,100.00,false,5
EB780RDN,06b0fafb-ccbf-42c7-b44b-d858e8b525022,1691,test,37,addition,Reimbursed loyalty points,,immediate,unlimited,60804,2022-11-29 16:16:23,100.00,false,5
/v1/loyalty_programs/{loyaltyProgramId}/export_customers_tiers:
get:
operationId: exportCustomersTiers
summary: Export customers' tier data
description: |
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.
Download a CSV file containing the tier information for customers of the specified loyalty program.
The generated file contains the following columns:
- `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL.
- `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program.
- `customerprofileid`: The ID used to integrate customer profiles with the loyalty program.
- `tiername`: The name of the tier.
- `startdate`: The tier start date in RFC3339.
- `expirydate`: The tier expiry date in RFC3339.
You can filter the results by providing the following optional input parameters:
- `subledgerIds` (optional): Filter results by an array of subledger IDs. If no value is provided, all subledger data for the specified loyalty program will be exported.
- `tierNames` (optional): Filter results by an array of tier names. If no value is provided, all tier data for the specified loyalty program will be exported.
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
description: The identifier for the loyalty program.
required: true
schema:
type: string
- name: subledgerIds
in: query
required: false
description: An array of subledgers IDs to filter the export by.
style: form
explode: false
schema:
type: array
items:
type: string
- name: tierNames
in: query
required: false
description: An array of tier names to filter the export by.
style: form
explode: false
schema:
type: array
items:
type: string
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
programid,subledgerid,customerprofileid,tiername,startdate,expirydate
1,SUB1,Dinesh,Golden,2023-08-02T15:04:05Z07:00,2024-08-02T15:04:05Z07:00
1,SUB2,Gilfoyle,Silver,2023-03-21T03:45:12Z05:00,2026-03-21T03:45:12Z05:00
/v1/loyalty_programs/{loyaltyProgramId}/statistics:
get:
operationId: getLoyaltyStatistics
summary: Get loyalty program statistics
description: |
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.
Retrieve the statistics of the specified loyalty program such as the
total active points, pending points, spent points, and expired points.
**Important:** The returned data does not include the current day. All statistics
are updated daily at 11:59 PM in the loyalty program time zone.
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
required: true
description: |
Identifier of the loyalty program. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LoyaltyDashboardData'
/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances:
get:
operationId: exportLoyaltyBalances
summary: Export customer loyalty balances
description: |
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.
Download a CSV file containing the balance of each customer in the loyalty program.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
The generated file can contain the following columns:
- `loyaltyProgramID`: The ID of the loyalty program.
- `loyaltySubledger`: The name of the subdleger, when applicatble.
- `profileIntegrationID`: The integration ID of the customer profile.
- `currentBalance`: The current point balance.
- `pendingBalance`: The number of pending points.
- `expiredBalance`: The number of expired points.
- `spentBalance`: The number of spent points.
- `currentTier`: The tier that the customer is in at the time of the export.
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
description: The identifier for the loyalty program.
required: true
schema:
type: string
- name: endDate
in: query
required: false
description: |
Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value.
**Note:**
- It must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
loyaltyProgramID,loyaltySubledger,profileIntegrationID,currentBalance,pendingBalance,expiredBalance,spentBalance,currentTier
40,,8786NTHSAO8,10.00,0.00,0.00,0.00,First
40,,2735HATHOH8,20.00,0.00,0.00,0.00,First
'400':
description: Bad request
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance:
get:
operationId: exportLoyaltyBalance
summary: Export customer loyalty balance to CSV
deprecated: true
description: |
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.
⚠️ Deprecation notice: Support for requests to this endpoint will end soon.
To export customer loyalty balances to CSV, use the [Export customer loyalty balances to CSV](/management-api#tag/Loyalty/operation/exportLoyaltyBalances) endpoint.
Download a CSV file containing the balance of each customer in the loyalty program.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
description: The identifier for the loyalty program.
required: true
schema:
type: string
- name: endDate
in: query
required: false
description: |
Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value.
**Note:**
- It must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
'400':
description: Bad request
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/transactions:
get:
operationId: getLoyaltyProgramTransactions
summary: List loyalty program transactions
description: |
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.
Retrieve loyalty program transaction logs in a given loyalty program with filtering options applied. Manual and imported transactions are also included.
**Note:** If no filters are applied, the last 50 loyalty transactions for the given loyalty program are returned.
**Important:** To get loyalty transaction logs for a given Integration ID in a loyalty program,
we recommend using the Integration API's [Get customer's loyalty logs](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions).
tags:
- Loyalty
parameters:
- name: loyaltyProgramId
in: path
required: true
description: |
Identifier of the loyalty program. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
schema:
type: integer
- name: loyaltyTransactionType
in: query
required: false
description: |
Filter results by loyalty transaction type:
- `manual`: Loyalty transaction that was done manually.
- `session`: Loyalty transaction that resulted from a customer session.
- `import`: Loyalty transaction that was imported from a CSV file.
schema:
type: string
enum:
- manual
- session
- import
- name: subledgerId
in: query
required: false
description: The ID of the subledger by which we filter the data.
schema:
type: string
- name: startDate
in: query
required: false
description: |
Date and time from which results are returned. Results are filtered by transaction creation date.
**Note:**
- It must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: endDate
in: query
required: false
description: |
Date and time by which results are returned. Results are filtered by transaction creation date.
**Note:**
- It must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 50
default: 50
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/LoyaltyProgramTransaction'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/import_cards:
post:
operationId: importLoyaltyCards
summary: Import loyalty cards
description: |
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 alphanumeric identifier of the loyalty card.
- `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.
**Note:** We recommend limiting your file size to 500MB.
**Example:**
```csv
identifier,state,customerprofileids
123-456-789AT,active,Alexa001;UserA
```
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/cards/batch:
post:
operationId: createBatchLoyaltyCards
summary: Create loyalty cards
description: |
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](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types).
Customers can use loyalty cards to collect and spend loyalty points.
**Important:**
- 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.
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LoyaltyCardBatch'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LoyaltyCardBatchResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/export_card_balances:
get:
operationId: exportLoyaltyCardBalances
summary: Export all card transaction logs
description: |
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.
Download a CSV file containing the balances of all cards in the loyalty program.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
The CSV file contains the following columns:
- `loyaltyProgramID`: The ID of the loyalty program.
- `loyaltySubledger`: The name of the subdleger, when applicatble.
- `cardIdentifier`: The alphanumeric identifier of the loyalty card.
- `cardState`:The state of the loyalty card. It can be `active` or `inactive`.
- `currentBalance`: The current point balance.
- `pendingBalance`: The number of pending points.
- `expiredBalance`: The number of expired points.
- `spentBalance`: The number of spent points.
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: endDate
in: query
required: false
description: |
Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value.
**Note:**
- It must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
loyaltyProgramID,loyaltySubledger,cardIdentifier,cardState,currentBalance,pendingBalance,expiredBalance,spentBalance
40,,111,active,10,0,0,0,5
'400':
description: Bad request
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/cards:
get:
operationId: getLoyaltyCards
summary: List loyalty cards
description: |
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.
For the given card-based loyalty program, list the loyalty cards that match your filter criteria.
tags:
- Loyalty cards
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: identifier
description: The card code by which to filter loyalty cards in the response.
in: query
required: false
schema:
type: string
minLength: 4
- name: profileId
in: query
description: Filter results by customer profile ID.
required: false
schema:
type: integer
minimum: 1
- name: batchId
in: query
description: Filter results by loyalty card batch ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/LoyaltyCard'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/cards/export:
get:
operationId: exportLoyaltyCards
summary: Export loyalty cards
description: |
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.
Download a CSV file containing the loyalty cards from a specified loyalty program.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
The CSV file contains the following columns:
- `identifier`: The unique identifier of the loyalty card.
- `created`: The date and time the loyalty card was created.
- `status`: The status of the loyalty card.
- `userpercardlimit`: The maximum number of customer profiles that can be linked to the card.
- `customerprofileids`: Integration IDs of the customer profiles linked to the card.
- `blockreason`: The reason for transferring and blocking the loyalty card.
- `generated`: An indicator of whether the loyalty card was generated.
- `batchid`: The ID of the batch the loyalty card is in.
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: batchId
in: query
description: Filter results by loyalty card batch ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
identifier,created,status,userpercardlimit,customerprofileids,blockreason,generated,batchid
CARD-1234,2020-06-10T09:05:27.993483Z,active,3,['profile1'],card limit reached,false,gwedcbfp
'400':
description: Bad request
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}:
delete:
operationId: deleteLoyaltyCard
summary: Delete loyalty card
description: |-
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.
Delete the given loyalty card.
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: loyaltyCardId
in: path
description: |
Identifier of the loyalty card. You can get the identifier with
the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
required: true
schema:
type: string
maxLength: 108
responses:
'204':
description: No Content
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
put:
operationId: updateLoyaltyCard
summary: Update loyalty card status
description: |-
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.
Update the status of the given loyalty card. A card can be _active_ or _inactive_.
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: loyaltyCardId
in: path
description: |
Identifier of the loyalty card. You can get the identifier with
the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
required: true
schema:
type: string
maxLength: 108
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateLoyaltyCard'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LoyaltyCard'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
get:
operationId: getLoyaltyCard
summary: Get loyalty card
description: |-
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.
Get the given loyalty card.
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: loyaltyCardId
in: path
description: |
Identifier of the loyalty card. You can get the identifier with
the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
required: true
schema:
type: string
maxLength: 108
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LoyaltyCard'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/add_points:
put:
operationId: addLoyaltyCardPoints
summary: Add points to card
description: |
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.
Add points to the given loyalty card in the specified card-based loyalty program.
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: loyaltyCardId
in: path
description: |
Identifier of the loyalty card. You can get the identifier with
the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
required: true
schema:
type: string
maxLength: 108
requestBody:
$ref: '#/components/requestBodies/AddLoyaltyPoints'
responses:
'204':
description: No Content
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points:
put:
operationId: deductLoyaltyCardPoints
summary: Deduct points from card
description: |
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.
Deduct points from the given loyalty card in the specified card-based loyalty program.
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: loyaltyCardId
in: path
description: |
Identifier of the loyalty card. You can get the identifier with
the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
required: true
schema:
type: string
maxLength: 108
requestBody:
$ref: '#/components/requestBodies/DeductLoyaltyPoints'
responses:
'204':
description: No Content
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log:
get:
operationId: exportLoyaltyCardLedger
summary: Export card's ledger log
description: |
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.
Download a CSV file containing a loyalty card ledger log of the loyalty program.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: loyaltyCardId
in: path
description: |
Identifier of the loyalty card. You can get the identifier with
the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
required: true
schema:
type: string
maxLength: 108
- name: rangeStart
in: query
required: true
description: |
Only return results from after this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: rangeEnd
in: query
required: true
description: |
Only return results from before this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: dateFormat
in: query
description: Determines the format of dates in the export document.
required: false
schema:
type: string
enum:
- excel
- ISO8601
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
'401':
description: Unauthorized
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs:
get:
operationId: getLoyaltyCardTransactionLogs
summary: List card's transactions
description: |
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.
Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview)
within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied.
If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned.
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: loyaltyCardId
in: path
description: |
Identifier of the loyalty card. You can get the identifier with
the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
required: true
schema:
type: string
maxLength: 108
- name: startDate
in: query
required: false
description: |
Date and time from which results are returned. Results are filtered by transaction creation date.
**Note:**
- It must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: endDate
in: query
required: false
description: |
Date and time by which results are returned. Results are filtered by transaction creation date.
**Note:**
- It must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: subledgerId
in: query
required: false
description: The ID of the subledger by which we filter the data.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
- hasMore
properties:
hasMore:
type: boolean
description: true means there is more data in the source collection to request..
example: true
data:
type: array
description: List of loyalty card transaction logs.
items:
$ref: '#/components/schemas/CardLedgerTransactionLogEntry'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transfer:
put:
operationId: transferLoyaltyCard
summary: Transfer card data
description: |
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.
Transfer loyalty card data, such as linked customers, loyalty balances and transactions, from a given loyalty card to a new, automatically created loyalty card.
**Important:**
- The original card is automatically blocked once the new card is created, and it cannot be activated again.
- The default status of the new card is _active_.
tags:
- Loyalty cards
parameters:
- name: loyaltyProgramId
in: path
description: |
Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with
the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
required: true
schema:
type: integer
- name: loyaltyCardId
in: path
description: |
Identifier of the loyalty card. You can get the identifier with
the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
required: true
schema:
type: string
maxLength: 108
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TransferLoyaltyCard'
description: body
required: true
responses:
'204':
description: No Content
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/giveaways/pools/{poolId}/import:
post:
operationId: importPoolGiveaways
summary: Import giveaway codes into a giveaway pool
description: |
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 giveaway codes that should be created. Send the file as multipart data.
The CSV file contains the following columns:
- `code` (required): The code of your giveaway, for instance, a gift card redemption code.
- `startdate`: The start date in RFC3339 of the code redemption period.
- `enddate`: The last date in RFC3339 of the code redemption period.
- `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes)
called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `"{"provider": "myPartnerCompany"}"`.
The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not.
You can use the time zone setting of your choice. The values are converted to UTC internally by Talon.One.
**Note:**
- We recommend limiting your file size to 500MB.
- You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes.
**Example:**
```text
code,startdate,enddate,attributes
GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,"{""provider"": ""Amazon""}"
GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,"{""provider"": ""Amazon""}"
GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,"{""provider"": ""Aliexpress""}"
```
tags:
- Giveaways
parameters:
- name: poolId
description: The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section.
in: path
required: true
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
/v1/giveaways/pools/{poolId}/export:
get:
operationId: exportPoolGiveaways
summary: Export giveaway codes of a giveaway pool
description: |
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.
Download a CSV file containing the giveaway codes of a specific giveaway pool.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
The CSV file contains the following columns:
- `id`: The internal ID of the giveaway.
- `poolid`: The internal ID of the giveaway pool.
- `code`: The giveaway code.
- `startdate`: The validity start date in RFC3339 of the giveaway (can be empty).
- `enddate`: The validity end date in RFC3339 of the giveaway (can be empty).
- `attributes`: Any custom attributes associated with the giveaway code (can be empty).
- `used`: An indication of whether the giveaway is already awarded.
- `importid`: The ID of the import which created the giveaway.
- `created`: The creation time of the giveaway code.
- `profileintegrationid`: The third-party integration ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded.
- `profileid`: The internal ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded or an internal ID does not exist.
tags:
- Giveaways
parameters:
- name: poolId
description: The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section.
in: path
required: true
schema:
type: integer
- name: createdBefore
description: Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string.
in: query
schema:
type: string
format: date-time
- name: createdAfter
description: Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string.
in: query
schema:
type: string
format: date-time
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
id,poolid,code,startdate,enddate,attributes,used,importid,created,profileintegrationid,profileid
1,7,af18bc3839799451fb6d6b6467cf4c25e,2023-04-11T12:47:47Z,2024-04-11T12:47:47Z,"{""attribute"": ""value""}",true,2,2023-04-11T12:47:47Z,R195412,35
'400':
description: Bad request
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/collections:
get:
operationId: listAccountCollections
summary: List collections in account
description: |-
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.
List account-level collections in the account.
tags:
- Collections
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: withTotalResultSize
in: query
description: |
When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets.
- When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero.
- When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query.
schema:
type: boolean
- name: name
in: query
description: Filter by collection name.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/CollectionWithoutPayload'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
post:
operationId: createAccountCollection
summary: Create account-level collection
description: |-
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 an account-level collection.
tags:
- Collections
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewCollection'
description: body
required: true
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Collection'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'409':
description: Conflict. A collection with this name already exists.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/collections/{collectionId}:
get:
operationId: getAccountCollection
summary: Get account-level collection
description: |-
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.
Retrieve a given account-level collection.
tags:
- Collections
parameters:
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Collection'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
put:
operationId: updateAccountCollection
summary: Update account-level collection
description: |-
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.
Edit the description of a given account-level collection and enable or disable the collection in the specified Applications.
tags:
- Collections
parameters:
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint.
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCollection'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Collection'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'409':
description: Conflict. A collection with this name already exists.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
delete:
operationId: deleteAccountCollection
summary: Delete account-level collection
description: |-
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.
Delete a given account-level collection.
tags:
- Collections
parameters:
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint.
schema:
type: integer
responses:
'204':
description: No Content
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/collections/{collectionId}/items:
get:
operationId: getCollectionItems
summary: Get collection items
description: |
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.
Retrieve items from a given collection.
You can retrieve items from both account-level collections and campaign-level collections using this endpoint.
tags:
- Collections
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/CollectionItem'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/collections:
get:
operationId: listCollectionsInApplication
summary: List collections in Application
description: |-
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.
List campaign-level collections from all campaigns in a given Application.
tags:
- Collections
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: withTotalResultSize
in: query
description: |
When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets.
- When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero.
- When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query.
schema:
type: boolean
- name: name
in: query
description: Filter by collection name.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/CollectionWithoutPayload'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/campaigns/{campaignId}/collections:
get:
operationId: listCollections
summary: List collections in campaign
description: |-
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.
List collections in a given campaign.
tags:
- Collections
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: withTotalResultSize
in: query
description: |
When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets.
- When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero.
- When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query.
schema:
type: boolean
- name: name
in: query
description: Filter by collection name.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/CollectionWithoutPayload'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
post:
operationId: createCollection
summary: Create campaign-level collection
description: |-
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 campaign-level collection in a given campaign.
tags:
- Collections
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewCampaignCollection'
description: body
required: true
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Collection'
/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}:
get:
operationId: getCollection
summary: Get campaign-level collection
description: |-
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.
Retrieve a given campaign-level collection.
tags:
- Collections
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Collection'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
put:
operationId: updateCollection
summary: Update campaign-level collection's description
description: |-
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.
Edit the description of a given campaign-level collection.
tags:
- Collections
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint.
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCampaignCollection'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Collection'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
delete:
operationId: deleteCollection
summary: Delete campaign-level collection
description: |-
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.
Delete a given campaign-level collection.
tags:
- Collections
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint.
schema:
type: integer
responses:
'204':
description: No Content
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/collections/{collectionId}/import:
post:
operationId: importAccountCollection
summary: Import data into existing account-level collection
description: |
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 collection of string values that should be attached as payload for collection.
The file should be sent as multipart data.
The import **replaces** the initial content of the collection.
The CSV file **must** only contain the following column:
- `item`: the values in your collection.
A collection is limited to 500,000 items.
Example:
```
item
Addidas
Nike
Asics
```
**Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection.
tags:
- Collections
parameters:
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint.
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import:
post:
operationId: importCollection
summary: Import data into existing campaign-level collection
description: |
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 collection of string values that should be attached as payload for collection.
The file should be sent as multipart data.
The import **replaces** the initial content of the collection.
The CSV file **must** only contain the following column:
- `item`: the values in your collection.
A collection is limited to 500,000 items.
Example:
```
item
Addidas
Nike
Asics
```
**Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection.
tags:
- Collections
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint.
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/collections/{collectionId}/export:
get:
operationId: exportAccountCollectionItems
summary: Export account-level collection's items
description: |
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.
Download a CSV file containing items from a given account-level collection.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
tags:
- Collections
parameters:
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint.
schema:
type: integer
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
item
SKU1
SKU2
SKU3
'401':
description: Unauthorized - Invalid API key
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export:
get:
operationId: exportCollectionItems
summary: Export campaign-level collection's items
description: |
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.
Download a CSV file containing items from a given campaign-level collection.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
tags:
- Collections
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: collectionId
in: path
required: true
description: The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint.
schema:
type: integer
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
item
SKU1
SKU2
SKU3
'401':
description: Unauthorized
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/health_report:
get:
operationId: getApplicationApiHealth
summary: Get Application health
description: |
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.
Display the health of the Application and show the last time the Application
was used.
You can also display this information from the **Settings** of an Application, in the **Developer Settings** menu.
See the [docs](https://docs.talon.one/docs/dev/tutorials/monitoring-integration-status).
tags:
- Applications
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ApplicationApiHealth'
/v1/applications/{applicationId}/access_logs/no_total:
get:
operationId: getAccessLogsWithoutTotalCount
summary: Get access logs for Application
description: |
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.
Retrieve the list of API calls sent to the specified Application.
tags:
- Logs
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: path
in: query
description: Only return results where the request path matches the given regular expression.
schema:
type: string
- name: method
in: query
description: Only return results where the request method matches the given regular expression.
schema:
type: string
enum:
- get
- put
- post
- delete
- patch
- name: status
in: query
description: Filter results by HTTP status codes.
required: false
schema:
type: string
enum:
- success
- error
- name: rangeStart
in: query
required: true
description: |
Only return results from after this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: rangeEnd
in: query
required: true
description: |
Only return results from before this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/AccessLogEntry'
/v1/access_logs:
get:
operationId: getAllAccessLogs
summary: List access logs
description: |
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.
Fetches the access logs for the entire account. Sensitive requests (logins) are _always_ filtered from the logs.
tags:
- Logs
parameters:
- name: rangeStart
in: query
required: false
description: |
Only return results from after this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: rangeEnd
in: query
required: false
description: |
Only return results from before this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: path
in: query
description: Only return results where the request path matches the given regular expression.
schema:
type: string
- name: method
in: query
description: Only return results where the request method matches the given regular expression.
schema:
type: string
enum:
- get
- put
- post
- delete
- patch
- name: status
in: query
description: Filter results by HTTP status codes.
required: false
schema:
type: string
enum:
- success
- error
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/AccessLogEntry'
/v1/applications/{applicationId}/campaigns/{campaignId}/analytics:
get:
operationId: getCampaignAnalytics
summary: Get analytics of campaigns
description: |-
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.
Retrieve statistical data about the performance of the given campaign.
tags:
- Campaigns
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: rangeStart
in: query
required: true
description: |
Only return results from after this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: rangeEnd
in: query
required: true
description: |
Only return results from before this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: granularity
in: query
description: The time interval between the results in the returned time-series.
schema:
type: string
enum:
- 1 hour
- 1 day
- 1 week
- 1 month
- 1 year
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/CampaignAnalytics'
/v1/applications/{applicationId}/customers:
get:
operationId: getApplicationCustomers
summary: List application's customers
description: |-
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.
List all the customers of the specified application.
tags:
- Customer data
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: integrationId
in: query
description: Filter results performing an exact matching against the profile integration identifier.
required: false
schema:
type: string
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: withTotalResultSize
in: query
description: |
When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets.
- When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero.
- When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query.
schema:
type: boolean
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
totalResultSize:
type: integer
example: 1
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/ApplicationCustomer'
/v1/applications/{applicationId}/customer_search:
post:
operationId: getApplicationCustomersByAttributes
summary: List application customers matching the given attributes
description: |
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.
Get a list of the application customers matching the provided criteria.
The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request.
tags:
- Customer data
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: withTotalResultSize
in: query
description: |
When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets.
- When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero.
- When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query.
schema:
type: boolean
requestBody:
$ref: '#/components/requestBodies/CustomerProfileSearchQuery'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
totalResultSize:
type: integer
data:
type: array
items:
$ref: '#/components/schemas/ApplicationCustomer'
/v1/customer_search/no_total:
post:
operationId: getCustomersByAttributes
summary: List customer profiles matching the given attributes
description: |
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.
Get a list of the customer profiles matching the provided criteria.
The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request.
tags:
- Customer data
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sandbox
in: query
description: Indicates whether you are pointing to a sandbox or Live customer.
required: false
schema:
type: boolean
default: false
requestBody:
$ref: '#/components/requestBodies/CustomerProfileSearchQuery'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
totalResultSize:
type: integer
data:
type: array
items:
$ref: '#/components/schemas/CustomerProfile'
/v1/customers/{customerId}:
get:
operationId: getCustomerProfile
summary: Get customer profile
description: |
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.
Return the details of the specified customer profile.
Performance tips
You can retrieve the same information via the Integration API, which can save you extra API requests. consider these options:
- Request the customer profile to be part of the response content using
[Update Customer Session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2).
- Send an empty update with the [Update Customer Profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint with `runRuleEngine=false`.
tags:
- Customer data
parameters:
- name: customerId
in: path
description: |
The value of the `id` property of a customer profile. Get it with the
[List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerProfile'
/v1/customers/no_total:
get:
operationId: getCustomerProfiles
summary: List customer profiles
description: |-
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.
List all customer profiles.
tags:
- Customer data
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sandbox
in: query
description: Indicates whether you are pointing to a sandbox or Live customer.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/CustomerProfile'
/v1/applications/{applicationId}/customers/{customerId}:
get:
operationId: getApplicationCustomer
summary: Get application's customer
description: |
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.
Retrieve the customers of the specified application.
tags:
- Customer data
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: customerId
in: path
description: |
The value of the `id` property of a customer profile. Get it with the
[List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ApplicationCustomer'
/v1/applications/{applicationId}/customer_activity_reports/no_total:
get:
operationId: getCustomerActivityReportsWithoutTotalCount
summary: Get Activity Reports for Application Customers
description: |
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.
Fetch summary reports for all application customers based on a time range. Instead of having the total number of results
in the response, this endpoint only mentions whether there are more results.
tags:
- Customer data
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: rangeStart
in: query
required: true
description: |
Only return results from after this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: rangeEnd
in: query
required: true
description: |
Only return results from before this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: name
in: query
description: Only return reports matching the customer name
required: false
schema:
type: string
- name: integrationId
in: query
description: Filter results performing an exact matching against the profile integration identifier.
required: false
schema:
type: string
- name: campaignName
in: query
description: Only return reports matching the campaignName
required: false
schema:
type: string
- name: advocateName
in: query
description: Only return reports matching the current customer referrer name
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/CustomerActivityReport'
/v1/applications/{applicationId}/customer_activity_reports/{customerId}:
get:
operationId: getCustomerActivityReport
summary: Get customer's activity report
description: |-
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.
Fetch the summary report of a given customer in the given application, in a time range.
tags:
- Customer data
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: rangeStart
in: query
required: true
description: |
Only return results from after this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: rangeEnd
in: query
required: true
description: |
Only return results from before this timestamp.
**Note:**
- This must be an RFC3339 timestamp string.
- You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
schema:
type: string
format: date-time
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: customerId
in: path
description: |
The value of the `id` property of a customer profile. Get it with the
[List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerActivityReport'
/v1/applications/{applicationId}/customers/{customerId}/analytics:
get:
operationId: getCustomerAnalytics
summary: Get customer's analytics report
description: |-
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.
Fetch analytics for a given customer in the given application.
tags:
- Customer data
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: customerId
in: path
description: |
The value of the `id` property of a customer profile. Get it with the
[List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerAnalytics'
/v1/applications/{applicationId}/sessions:
get:
operationId: getApplicationSessions
summary: List Application sessions
description: |
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.
List all the sessions of the specified Application.
tags:
- Customer data
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: profile
in: query
required: false
description: Profile integration ID filter for sessions. Must be exact match.
schema:
type: string
- name: state
in: query
required: false
description: Filter by sessions with this state. Must be exact match.
schema:
type: string
enum:
- open
- closed
- partially_returned
- cancelled
- name: createdBefore
in: query
description: Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: coupon
in: query
required: false
description: Filter by sessions with this coupon. Must be exact match.
schema:
type: string
- name: referral
in: query
required: false
description: Filter by sessions with this referral. Must be exact match.
schema:
type: string
- name: integrationId
in: query
required: false
description: Filter by sessions with this integrationId. Must be exact match.
schema:
type: string
- name: storeIntegrationId
in: query
required: false
description: The integration ID of the store. You choose this ID when you create a store.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/ApplicationSession'
/v1/applications/{applicationId}/sessions/{sessionId}:
get:
operationId: getApplicationSession
summary: Get Application session
description: |
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.
Get the details of the given session.
You can list the sessions with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint.
tags:
- Customer data
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: sessionId
in: path
description: |
The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ApplicationSession'
/v1/applications/{applicationId}/events/no_total:
get:
operationId: getApplicationEventsWithoutTotalCount
summary: List Applications events
description: |
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.
Lists all events recorded for an application. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results.
tags:
- Customer data
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: type
in: query
required: false
description: Comma-separated list of types by which to filter events. Must be exact match(es).
schema:
type: string
- name: createdBefore
in: query
description: Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: session
in: query
required: false
description: Session integration ID filter for events. Must be exact match.
schema:
type: string
- name: profile
in: query
required: false
description: Profile integration ID filter for events. Must be exact match.
schema:
type: string
- name: customerName
in: query
required: false
description: Customer name filter for events. Will match substrings case-insensitively.
schema:
type: string
minLength: 2
- name: customerEmail
in: query
required: false
description: Customer e-mail address filter for events. Will match substrings case-insensitively.
schema:
type: string
minLength: 2
- name: couponCode
in: query
required: false
description: Coupon code
schema:
type: string
- name: referralCode
in: query
required: false
description: Referral code
schema:
type: string
- name: ruleQuery
in: query
description: Rule name filter for events
required: false
schema:
type: string
- name: campaignQuery
in: query
description: Campaign name filter for events
required: false
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/ApplicationEvent'
/v1/applications/{applicationId}/event_types:
get:
operationId: getApplicationEventTypes
summary: List Applications event types
description: |
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.
Get all of the distinct values of the Event `type` property for events recorded in the application.
See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2)
tags:
- Customer data
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
type: string
/v1/audiences:
get:
operationId: getAudiences
summary: List audiences
description: |
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.
Get all audiences created in the account. To create an audience, use [Create audience](https://docs.talon.one/integration-api#tag/Audiences/operation/createAudienceV2).
tags:
- Audiences
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: withTotalResultSize
in: query
description: |
When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets.
- When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero.
- When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query.
schema:
type: boolean
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Audience'
/v1/audiences/analytics:
get:
operationId: getAudiencesAnalytics
summary: List audience analytics
description: |
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.
Get a list of audience IDs and their member count.
tags:
- Audiences
parameters:
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: audienceIds
in: query
required: true
description: The IDs of one or more audiences, separated by commas, by which to filter results.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/AudienceAnalytics'
/v1/audiences/{audienceId}/memberships:
get:
operationId: getAudienceMemberships
summary: List audience members
description: |
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.
Get a paginated list of the customer profiles in a given audience.
A maximum of 1000 customer profiles per page is allowed.
tags:
- Audiences
parameters:
- name: audienceId
in: path
required: true
description: The ID of the audience.
schema:
type: integer
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: profileQuery
in: query
description: The filter to select a profile.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/CustomerProfile'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/audiences/{audienceId}/memberships/import:
post:
operationId: importAudiencesMemberships
summary: Import audience members
description: |
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 integration IDs of the members you want to add to an audience.
The file should be sent as multipart data and should contain only the following column (required):
- `profileintegrationid`: The integration ID of the customer profile.
The import **replaces** the previous list of audience members.
**Note:** We recommend limiting your file size to 500MB.
Example:
```text
profileintegrationid
charles
alexa
```
tags:
- Audiences
parameters:
- name: audienceId
in: path
required: true
description: The ID of the audience.
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized - Invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/audiences/{audienceId}/memberships/export:
get:
operationId: exportAudiencesMemberships
summary: Export audience members
description: |
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.
Download a CSV file containing the integration IDs of the members of an audience.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
The file contains the following column:
- `profileintegrationid`: The integration ID of the customer profile.
tags:
- Audiences
parameters:
- name: audienceId
in: path
required: true
description: The ID of the audience.
schema:
type: integer
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
profileintegrationid
URNGV8294NV
BZGGC2454PA
'400':
description: Bad request
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized - Invalid API key
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/profile/{integrationId}/friends:
get:
operationId: getApplicationCustomerFriends
summary: List friends referred by customer profile
description: |
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.
List the friends referred by the specified customer profile in this Application.
tags:
- Referrals
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: withTotalResultSize
in: query
description: |
When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets.
- When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero.
- When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query.
schema:
type: boolean
- name: integrationId
in: path
required: true
description: The Integration ID of the Advocate's Profile.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/ApplicationReferee'
/v1/attributes:
post:
operationId: createAttribute
summary: Create custom attribute
description: |
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 _custom attribute_ in this account.
[Custom attributes](https://docs.talon.one/docs/dev/concepts/attributes) allow you
to add data to Talon.One domain entities like campaigns, coupons,
customers and so on.
These attributes can then be given values when creating/updating these entities, and these values can be
used in your campaign rules.
For example, you could define a `zipCode` field for customer sessions,
and add a rule to your campaign that only allows certain ZIP codes.
These attributes are shared across all Applications in your account and are never required.
tags:
- Attributes
requestBody:
$ref: '#/components/requestBodies/NewAttribute'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Attribute'
get:
operationId: getAttributes
summary: List custom attributes
description: |
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.
Return all the custom attributes for the account.
tags:
- Attributes
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: entity
in: query
required: false
description: Returned attributes will be filtered by supplied entity.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Attribute'
/v1/attributes/{attributeId}:
get:
operationId: getAttribute
summary: Get custom attribute
description: |
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.
Retrieve the specified custom attribute.
tags:
- Attributes
parameters:
- name: attributeId
in: path
required: true
description: The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Attribute'
put:
operationId: updateAttribute
summary: Update custom attribute
description: |
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.
Update an existing custom attribute. Once created, the only property of a custom attribute that can be
changed is the description.
To change the `type` or `name` property of a custom attribute, create a new attribute and
update any relevant integrations and rules to use the new attribute.
tags:
- Attributes
parameters:
- name: attributeId
in: path
required: true
description: The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**.
schema:
type: integer
requestBody:
$ref: '#/components/requestBodies/NewAttribute'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Attribute'
/v1/attributes/{attributeId}/allowed_list/import:
post:
operationId: importAllowedList
summary: Import allowed values for attribute
description: |
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 a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute.
The file should be sent as multipart data.
The import **replaces** the previous list of allowed values for this attribute, if any.
The CSV file **must** only contain the following column:
- `item` (required): the values in your allowed list, for example a list of SKU's.
An allowed list is limited to 500,000 items.
Example:
```text
item
CS-VG-04032021-UP-50D-10
CS-DV-04042021-UP-49D-12
CS-DG-02082021-UP-50G-07
```
tags:
- Attributes
parameters:
- name: attributeId
in: path
required: true
description: The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**.
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized - Invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/catalogs/{catalogId}/items:
get:
operationId: listCatalogItems
summary: List items in a catalog
description: |
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.
Return a paginated list of cart items in the given catalog.
tags:
- Catalogs
parameters:
- name: catalogId
description: The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**.
in: path
required: true
schema:
type: integer
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: withTotalResultSize
in: query
description: |
When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets.
- When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero.
- When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query.
schema:
type: boolean
- name: sku
in: query
description: Filter results by one or more SKUs. Must be exact match.
style: form
explode: false
schema:
type: array
items:
type: string
- name: productNames
in: query
description: Filter results by one or more product names. Must be exact match.
style: form
explode: false
schema:
type: array
items:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/CatalogItem'
/v1/additional_costs:
post:
operationId: createAdditionalCost
summary: Create additional cost
description: |
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 an [additional cost](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs).
These additional costs are shared across all applications in your account, and are never required.
tags:
- Additional costs
requestBody:
$ref: '#/components/requestBodies/NewAdditionalCost'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/AccountAdditionalCost'
get:
operationId: getAdditionalCosts
summary: List additional costs
description: |
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.
Returns all the defined additional costs for the account.
tags:
- Additional costs
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/AccountAdditionalCost'
/v1/additional_costs/{additionalCostId}:
get:
operationId: getAdditionalCost
summary: Get additional cost
description: |
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.
Returns the additional cost.
tags:
- Additional costs
parameters:
- name: additionalCostId
description: |
The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**.
in: path
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AccountAdditionalCost'
put:
operationId: updateAdditionalCost
summary: Update additional cost
description: |
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.
Updates an existing additional cost. Once created, the only property of an additional cost that cannot be changed is the `name` property (or **API name** in the Campaign Manager). This restriction is in place to prevent accidentally breaking live integrations.
tags:
- Additional costs
parameters:
- name: additionalCostId
description: |
The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**.
in: path
required: true
schema:
type: integer
requestBody:
$ref: '#/components/requestBodies/NewAdditionalCost'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AccountAdditionalCost'
/v1/webhooks:
get:
operationId: getWebhooks
summary: List webhooks
description: |-
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.
List all webhooks.
tags:
- Webhooks
parameters:
- name: applicationIds
in: query
description: |
Checks if the given catalog or its attributes are referenced in the specified Application ID.
**Note**: If no Application ID is provided, we check for all connected Applications.
required: false
schema:
type: string
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: creationType
in: query
description: Filter results by creation type.
required: false
schema:
type: string
enum:
- templateWebhooks
- webhooks
- name: visibility
in: query
description: Filter results by visibility.
required: false
schema:
type: string
enum:
- visible
- hidden
- name: outgoingIntegrationsTypeId
in: query
description: Filter results by outgoing integration type ID.
required: false
schema:
type: integer
- name: title
in: query
description: Filter results performing case-insensitive matching against the webhook title.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/WebhookWithOutgoingIntegrationDetails'
/v1/webhooks/{webhookId}:
get:
operationId: getWebhook
summary: Get webhook
description: |-
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.
Returns a webhook by its id.
tags:
- Webhooks
parameters:
- name: webhookId
description: |
The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**.
in: path
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Webhook'
/v1/webhook_activation_logs:
get:
operationId: getWebhookActivationLogs
summary: List webhook activation log entries
description: |
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.
Webhook activation log entries are created as soon as an integration request
triggers a webhook effect. See the [docs](https://docs.talon.one/docs/dev/getting-started/webhooks).
tags:
- Logs
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: integrationRequestUuid
in: query
description: Filter results by integration request UUID.
schema:
type: string
- name: webhookId
in: query
description: Filter results by Webhook.
schema:
type: number
- name: applicationId
in: query
description: Filter results by Application ID.
required: false
schema:
type: number
- name: campaignId
in: query
description: Filter results by campaign.
schema:
type: number
- name: createdBefore
in: query
description: Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/WebhookActivationLogEntry'
/v1/webhook_logs:
get:
operationId: getWebhookLogs
summary: List webhook log entries
description: |-
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.
Retrieve all webhook log entries.
tags:
- Logs
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: status
in: query
description: Filter results by HTTP status codes.
required: false
schema:
type: string
enum:
- success
- error
- name: webhookId
in: query
description: Filter results by Webhook.
schema:
type: number
- name: applicationId
in: query
description: Filter results by Application ID.
required: false
schema:
type: number
- name: campaignId
in: query
description: Filter results by campaign.
schema:
type: number
- name: requestUuid
in: query
description: Filter results by request UUID.
required: false
schema:
type: string
- name: createdBefore
in: query
description: Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/WebhookLogEntry'
/v1/event_types:
get:
operationId: getEventTypes
summary: List event types
description: |
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.
Fetch all event type definitions for your account.
tags:
- Events
parameters:
- name: name
in: query
description: Filter results to event types with the given name. This parameter implies `includeOldVersions`.
schema:
type: string
- name: includeOldVersions
in: query
description: Include all versions of every event type.
schema:
type: boolean
default: false
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/EventType'
/v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons:
post:
operationId: importCoupons
summary: Import coupons
description: |
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 coupons that should be created. The file should be sent as multipart data.
The CSV file contains the following columns:
- `value` (required): The coupon code.
- `expirydate`: The end date in RFC3339 of the code redemption period.
- `startdate`: The start date in RFC3339 of the code redemption period.
- `recipientintegrationid`: The integration ID of the recipient of the coupon.
Only the customer with this integration ID can redeem this code. Available only for personal codes.
- `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided.
- `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value.
- `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes)
called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `"{"category": "10_off"}"`.
You can use the time zone of your choice. It is converted to UTC internally by Talon.One.
**Note:** We recommend limiting your file size to 500MB.
**Example:**
```text
"value","expirydate","startdate","recipientintegrationid","limitval","attributes","discountlimit"
COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,"{""Category"": ""10_off""}",2.4
```
Once imported, you can find the `batchId` in the Campaign Manager or by
using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount).
tags:
- Coupons
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: skipDuplicates
in: query
required: false
description: |
An indicator of whether to skip duplicate coupon values instead of causing an error.
Duplicate values are ignored when `skipDuplicates=true`.
schema:
type: boolean
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
/v1/applications/{applicationId}/export_coupons:
get:
operationId: exportCoupons
summary: Export coupons
description: |
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.
Download a CSV file containing the coupons that match the given properties.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
The CSV file can contain the following columns:
- `accountid`: The ID of your deployment.
- `applicationid`: The ID of the Application this coupon is related to.
- `attributes`: A json object describing _custom_ referral attribute names and their values.
- `batchid`: The ID of the batch this coupon is part of.
- `campaignid`: The ID of the campaign this coupon is related to.
- `counter`: The number of times this coupon has been redeemed.
- `created`: The creation date of the coupon code.
- `deleted`: Whether the coupon code is deleted.
- `deleted_changelogid`: The ID of the delete event in the logs.
- `discount_counter`: The amount of discount given by this coupon.
- `discount_limitval`: The maximum discount amount that can be given be this coupon.
- `expirydate`: The end date in RFC3339 of the code redemption period.
- `id`: The internal ID of the coupon code.
- `importid`: The ID of the import job that created this coupon.
- `is_reservation_mandatory`: Whether this coupon requires a reservation to be redeemed.
- `limits`: The limits set on this coupon.
- `limitval`: The maximum number of redemptions of this code.
- `recipientintegrationid`: The integration ID of the recipient of the coupon.
Only the customer with this integration ID can redeem this code. Available only for personal codes.
- `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect).
- `reservation`: Whether the coupon can be reserved for multiple customers.
- `reservation_counter`: How many times this coupon has been reserved.
- `reservation_limitval`: The maximum of number of reservations this coupon can have.
- `startdate`: The start date in RFC3339 of the code redemption period.
- `value`: The coupon code.
tags:
- Coupons
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: query
description: Filter results by campaign.
schema:
type: number
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: value
in: query
description: Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters.
required: false
schema:
type: string
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: valid
in: query
description: |
Either "expired", "validNow", or "validFuture". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.
required: false
schema:
type: string
enum:
- expired
- validNow
- validFuture
- name: usable
in: query
description: |
Either "true" or "false". If "true", only coupons where `usageCounter < usageLimit` will be returned, "false" will return only coupons where `usageCounter >= usageLimit`.
schema:
type: string
enum:
- 'true'
- 'false'
- name: referralId
in: query
description: Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.
required: false
schema:
type: integer
- name: recipientIntegrationId
in: query
description: Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field.
required: false
schema:
type: string
- name: batchId
in: query
description: Filter results by batches of coupons
required: false
schema:
type: string
- name: exactMatch
in: query
description: Filter results to an exact case-insensitive matching against the coupon code.
required: false
schema:
type: boolean
default: false
- name: dateFormat
in: query
description: Determines the format of dates in the export document.
required: false
schema:
type: string
enum:
- excel
- ISO8601
- name: campaignState
in: query
description: |
Filter results by the state of the campaign.
- `enabled`: Campaigns that are scheduled, running (activated), or expired.
- `running`: Campaigns that are running (activated).
- `disabled`: Campaigns that are disabled.
- `expired`: Campaigns that are expired.
- `archived`: Campaigns that are archived.
required: false
schema:
type: string
enum:
- enabled
- disabled
- archived
- scheduled
- running
- expired
- name: valuesOnly
in: query
description: Filter results to only return the coupon codes (`value` column) without the associated coupon data.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
id,created,campaignid,value,expirydate,startdate,attributes,applicationid,deleted,deleted_changelogid,accountid,referralid,recipientintegrationid,importid,batchid,reservation,limits,limitval,counter,discount_counter,discount_limitval
20191301,2022-04-26T11:02:38Z,3882,COUP1,2022-04-27T10:56:47Z,2022-04-26T10:56:47Z,"{""test"": ""premium""}",270,,0,1,,cust123,671,axghjfdy,,"[]",1,0,0,1.5
/v1/applications/{applicationId}/export_referrals:
get:
operationId: exportReferrals
summary: Export referrals
description: |
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.
Download a CSV file containing the referrals that match the given parameters.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
The CSV file contains the following columns:
- `code`: The referral code.
- `advocateprofileintegrationid`: The profile ID of the advocate.
- `startdate`: The start date in RFC3339 of the code redemption period.
- `expirydate`: The end date in RFC3339 of the code redemption period.
- `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank.
- `attributes`: A json object describing _custom_ referral attribute names and their values.
tags:
- Referrals
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: query
description: Filter results by campaign.
schema:
type: number
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: valid
in: query
description: |
- `expired`: Matches referrals in which the expiration date is set and in the past.
- `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future.
- `validFuture`: Matches referrals in which start date is set and in the future.
required: false
schema:
type: string
enum:
- expired
- validNow
- validFuture
- name: usable
in: query
description: |
- `true`, only referrals where `usageCounter < usageLimit` will be returned.
- `false`, only referrals where `usageCounter >= usageLimit` will be returned.
schema:
type: string
enum:
- 'true'
- 'false'
- name: batchId
in: query
description: Filter results by batches of referrals
schema:
type: string
- name: dateFormat
in: query
description: Determines the format of dates in the export document.
required: false
schema:
type: string
enum:
- excel
- ISO8601
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
id,created,campaignid,advocateprofileintegrationid,friendprofileintegrationid,startdate,expirydate,code,importid,attributes,batchid,counter,limitval
687,2021-09-10 09:21:06,3882,UGAV4628K,,,,3LFC-4BPC,,"{}",pimcxobg,0,9999
/v1/applications/{applicationId}/export_effects:
get:
operationId: exportEffects
summary: Export triggered effects
description: |
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.
Download a CSV file containing the triggered effects that match the given attributes.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
The generated file can contain the following columns:
- `applicationid`: The ID of the Application.
- `campaignid`: The ID of the campaign.
- `couponid`: The ID of the coupon, when applicable to the effect.
- `created`: The timestamp of the effect.
- `event_type`: The name of the event. See the [docs](https://docs.talon.one/docs/dev/concepts/entities/events).
- `eventid`: The internal ID of the effect.
- `name`: The effect name. See the [docs](https://docs.talon.one/docs/dev/integration-api/api-effects).
- `profileintegrationid`: The ID of the customer profile, when applicable.
- `props`: The [properties](https://docs.talon.one/docs/dev/integration-api/api-effects) of the effect.
- `ruleindex`: The index of the rule.
- `rulesetid`: The ID of the rule set.
- `sessionid`: The internal ID of the session that triggered the effect.
- `profileid`: The internal ID of the customer profile.
- `sessionintegrationid`: The integration ID of the session.
- `total_revenue`: The total revenue.
- `store_integration_id`: The integration ID of the store. You choose this ID when you create a store.
tags:
- Analytics
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: query
description: Filter results by campaign.
schema:
type: number
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: dateFormat
in: query
description: Determines the format of dates in the export document.
required: false
schema:
type: string
enum:
- excel
- ISO8601
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
created,name,applicationid,campaignid,rulesetid,ruleindex,sessionintegrationid,profileintegrationid,sessionid,profileid,eventid,event_type,total_revenue,props,couponid,store_id,store_integration_id
2021-06-02T21:14:16Z,rejectCoupon,270,0,0,0,newsession1,,9168,0,95797,talon_session_created,265.00,"{""value"": ""XMAS20"", ""rejectionReason"": ""CouponNotFound""}",,115,STORE-001
2021-09-01T13:04:04Z,setDiscountPerItem,270,3882,13599,0,test_flattening_2,integid_4,9707,4800,98806,talon_session_updated,405.00,"{""name"": ""10% off per item#1"", ""value"": 11.0, ""position"": 1}",,116,STORE-002
/v1/applications/{applicationId}/export_customer_sessions:
get:
operationId: exportCustomerSessions
summary: Export customer sessions
description: |
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.
Download a CSV file containing the customer sessions that match the request.
**Important:** Archived sessions cannot be exported. See the [retention policy](https://docs.talon.one/docs/product/server-infrastructure-and-data-retention#data-retention-policy).
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
- `id`: The internal ID of the session.
- `firstsession`: Whether this is a first session.
- `integrationid`: The integration ID of the session.
- `applicationid`: The ID of the Application.
- `profileid`: The internal ID of the customer profile.
- `profileintegrationid`: The integration ID of the customer profile.
- `created`: The timestamp when the session was created.
- `state`: The [state](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions#customer-session-states) of the session.
- `cartitems`: The cart items in the session.
- `discounts`: The discounts in the session.
- `total`: The total value of cart items and additional costs in the session, before any discounts are applied.
- `attributes`: The attributes set in the session.
- `closedat`: Timestamp when the session was closed.
- `cancelledat`: Timestamp when the session was cancelled.
- `referral`: The referral code in the session.
- `identifiers`: The identifiers in the session.
- `additional_costs`: The [additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs) in the session.
- `updated`: Timestamp of the last session update.
- `store_integration_id`: The integration ID of the store.
- `coupons`: Coupon codes in the session.
tags:
- Analytics
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string.
required: false
schema:
type: string
format: date-time
- name: profileIntegrationId
in: query
description: Only return sessions for the customer that matches this customer integration ID.
required: false
schema:
type: string
- name: dateFormat
in: query
description: Determines the format of dates in the export document.
required: false
schema:
type: string
enum:
- excel
- ISO8601
- name: customerSessionState
in: query
description: Filter results by state.
required: false
schema:
type: string
enum:
- open
- closed
- partially_returned
- cancelled
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
id,firstsession,integrationid,applicationid,profileid,profileintegrationid,created,state,cartitems,discounts,total,attributes,closedat,cancelledat,referral,identifiers,additional_costs,updated,store_integration_id,coupons
12328,true,62791173fbf323ee5cfd96f3,270,6111,dxclwds,2022-05-09T13:05:31Z,open,"[{""sku"": ""B00004TKVY"", ""name"": ""Gravel bike - \""Aisle of Man\"""", ""price"": 1800, ""weight"": 6, ""category"": ""gravelbikes"", ""position"": 0, ""quantity"": 1, ""attributes"": {""color"": [""black,white""], ""material"": ""titanium""}, ""returnedQuantity"": 0, ""remainingQuantity"": 1}]","{}",1850.00,"{""ShippingCost"": 50, ""PaymentMethod"": ""creditcard"", ""ShippingMethod"": ""Standard""}",0001-01-01T00:00:00Z,0001-01-01T00:00:00Z,,"null","{""ShippingCost"": {""price"": 50}}",2022-05-09T13:13:28Z,"STORE-001","[""SORRY5QMUJRWA""]"
/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals:
post:
operationId: importReferrals
summary: Import referrals
description: |
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 referrals that should be created.
The file should be sent as multipart data.
The CSV file contains the following columns:
- `code` (required): The referral code.
- `advocateprofileintegrationid` (required): The profile ID of the advocate.
- `startdate`: The start date in RFC3339 of the code redemption period.
- `expirydate`: The end date in RFC3339 of the code redemption period.
- `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank.
- `attributes`: A JSON object describing _custom_ referral attribute names and their values, enclosed with double quotation marks.
For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes)
called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `"{"category": "10_off"}"`.
You can use the time zone of your choice. It is converted to UTC internally by Talon.One.
**Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles)
is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2)
endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2)
endpoint to create the customer profiles.
**Note:** We recommend limiting your file size to 500MB.
**Example:**
```text
code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes
REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,"{""my_attribute"": ""10_off""}"
REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,"{""my_attribute"": ""20_off""}"
```
tags:
- Referrals
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
/v1/users:
get:
operationId: getUsers
summary: List users in account
description: |
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.
Retrieve all users in your account.
tags:
- Accounts and users
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/User'
/v1/users/{userId}:
get:
operationId: getUser
summary: Get user
description: |
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.
Retrieve the data (including an invitation code) for a user. Non-admin users can only get their own profile.
tags:
- Accounts and users
parameters:
- name: userId
in: path
description: The ID of the user.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/User'
put:
operationId: updateUser
summary: Update user
description: |-
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.
Update the details of a specific user.
tags:
- Accounts and users
parameters:
- name: userId
in: path
description: The ID of the user.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateUser'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/User'
delete:
operationId: deleteUser
summary: Delete user
description: |-
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.
Delete a specific user.
tags:
- Accounts and users
parameters:
- name: userId
in: path
description: The ID of the user.
required: true
schema:
type: integer
responses:
'204':
description: No Content
/v1/provisioning/okta:
get:
operationId: oktaEventHandlerChallenge
summary: Validate Okta API ownership
description: |
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.
Validate the ownership of the API through a challenge-response mechanism.
This challenger endpoint is used by Okta to confirm that communication between Talon.One and Okta is correctly configured and accessible
for provisioning and deprovisioning of Talon.One users, and that only Talon.One can receive and respond to events from Okta.
tags:
- Accounts and users
responses:
'200':
description: OK
/v1/provisioning/scim/Users:
get:
operationId: scimGetUsers
summary: List SCIM users
description: |-
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.
Retrieve a paginated list of users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID.
tags:
- Accounts and users
responses:
'200':
description: List of SCIM users
content:
application/json:
schema:
$ref: '#/components/schemas/ScimUsersListResponse'
post:
operationId: scimCreateUser
summary: Create SCIM user
description: |-
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 Talon.One user using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.
tags:
- Accounts and users
requestBody:
$ref: '#/components/requestBodies/ScimNewUser'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/ScimUser'
/v1/provisioning/scim/Users/{userId}:
get:
operationId: scimGetUser
summary: Get SCIM user
description: |-
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.
Retrieve data for a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.
tags:
- Accounts and users
parameters:
- name: userId
in: path
description: The ID of the user.
required: true
schema:
type: integer
responses:
'200':
description: User details
content:
application/json:
schema:
$ref: '#/components/schemas/ScimUser'
delete:
operationId: scimDeleteUser
summary: Delete SCIM user
description: |-
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.
Delete a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.
tags:
- Accounts and users
parameters:
- name: userId
in: path
description: The ID of the user.
required: true
schema:
type: integer
responses:
'204':
description: No Content
put:
operationId: scimReplaceUserAttributes
summary: Update SCIM user
description: |
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.
Update the details of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.
This endpoint replaces all attributes of the specific user with the attributes provided in the request payload.
tags:
- Accounts and users
parameters:
- name: userId
in: path
description: The ID of the user.
required: true
schema:
type: integer
requestBody:
$ref: '#/components/requestBodies/ScimNewUser'
responses:
'200':
description: User details
content:
application/json:
schema:
$ref: '#/components/schemas/ScimUser'
patch:
operationId: scimPatchUser
summary: Update SCIM user attributes
description: |
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.
Update certain attributes of a specific Talon.One user created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.
This endpoint allows for selective adding, removing, or replacing specific attributes while leaving other attributes unchanged.
tags:
- Accounts and users
parameters:
- name: userId
in: path
description: The ID of the user.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ScimPatchRequest'
description: body
required: true
responses:
'200':
description: User details
content:
application/json:
schema:
$ref: '#/components/schemas/ScimUser'
/v1/provisioning/scim/ResourceTypes:
get:
operationId: scimGetResourceTypes
summary: List supported SCIM resource types
description: |
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.
Retrieve a list of resource types supported by the SCIM provisioning protocol.
Resource types define the various kinds of resources that can be managed via the SCIM API, such as users, groups, or custom-defined resources.
tags:
- Accounts and users
responses:
'200':
description: List of resource types
content:
application/json:
schema:
$ref: '#/components/schemas/ScimResourceTypesListResponse'
/v1/provisioning/scim/ServiceProviderConfig:
get:
operationId: scimGetServiceProviderConfig
summary: Get SCIM service provider configuration
description: |
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.
Retrieve the configuration settings of the SCIM service provider. It provides details about the features and capabilities supported by the SCIM API, such as the different operation settings.
tags:
- Accounts and users
responses:
'200':
description: Service configuration
content:
application/json:
schema:
$ref: '#/components/schemas/ScimServiceProviderConfigResponse'
/v1/provisioning/scim/Schemas:
get:
operationId: scimGetSchemas
summary: List supported SCIM schemas
description: |
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.
Retrieve a list of schemas supported by the SCIM provisioning protocol.
Schemas define the structure and attributes of the different resources that can be managed via the SCIM API, such as users, groups, and any custom-defined resources.
tags:
- Accounts and users
responses:
'200':
description: List of schemas supported by the SCIM provisioning protocol
content:
application/json:
schema:
$ref: '#/components/schemas/ScimSchemasListResponse'
/v1/users/delete:
post:
operationId: deleteUserByEmail
summary: Delete user by email address
description: |
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.
[Delete a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#deleting-a-user) by their email address.
tags:
- Accounts and users
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteUserRequest'
description: body
required: true
responses:
'204':
description: No Content
/v1/users/activate:
post:
operationId: activateUserByEmail
summary: Enable user by email address
description: |
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.
Enable a [disabled user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address.
tags:
- Accounts and users
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ActivateUserRequest'
description: body
required: true
responses:
'204':
description: No Content
/v1/users/deactivate:
post:
operationId: deactivateUserByEmail
summary: Disable user by email address
description: |
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.
[Disable a specific user](https://docs.talon.one/docs/product/account/account-settings/managing-users#disabling-a-user) by their email address.
tags:
- Accounts and users
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeactivateUserRequest'
description: body
required: true
responses:
'204':
description: No Content
/v1/users/invite:
post:
operationId: inviteUserExternal
summary: Invite user from identity provider
description: |
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.
[Invite a user](https://docs.talon.one/docs/product/account/account-settings/managing-users#inviting-a-user) from an external identity provider to Talon.One by sending an invitation to their email address.
tags:
- Accounts and users
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewExternalInvitation'
description: body
required: true
responses:
'204':
description: Invitation email sent
/v1/changes:
get:
operationId: getChanges
summary: Get audit logs for an account
description: |
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.
Retrieve the audit logs displayed in **Accounts > Audit logs**.
tags:
- Logs
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: applicationId
in: query
description: Filter results by Application ID.
required: false
schema:
type: number
- name: entityPath
in: query
description: Filter results on a case insensitive matching of the url path of the entity
required: false
schema:
type: string
- in: query
description: Filter results by user ID.
required: false
name: userId
schema:
type: integer
- name: createdBefore
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: createdAfter
in: query
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
required: false
schema:
type: string
format: date-time
- name: withTotalResultSize
in: query
description: |
When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets.
- When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero.
- When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query.
schema:
type: boolean
- name: managementKeyId
in: query
description: Filter results that match the given management key ID.
required: false
schema:
type: integer
- name: includeOld
in: query
description: When this flag is set to false, the state without the change will not be returned. The default value is true.
schema:
type: boolean
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
totalResultSize:
type: integer
example: 1
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/Change'
/v2/invites:
post:
operationId: createInviteV2
summary: Invite user
description: |
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 user in the account and send an invitation to their email address.
**Note**: The invitation token is valid for 24 hours after the email has been sent. You can resend an invitation to a user with the [Resend invitation email](https://docs.talon.one/management-api#tag/Accounts-and-users/operation/createInviteEmail) endpoint.
tags:
- Accounts and users
requestBody:
$ref: '#/components/requestBodies/NewInvitation'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/User'
/v1/invite_emails:
post:
operationId: createInviteEmail
summary: Resend invitation email
description: |
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.
Resend an email invitation to an existing user.
**Note:** The invitation token is valid for 24 hours after the email has been sent.
tags:
- Accounts and users
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewInviteEmail'
description: body
required: true
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/NewInviteEmail'
/v1/password_recovery_emails:
post:
operationId: createPasswordRecoveryEmail
summary: Request a password reset
description: |
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.
Send an email with a password recovery link to the email address of an existing account.
**Note:** The password recovery link expires 30 minutes after this endpoint is triggered.
tags:
- Accounts and users
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewPasswordEmail'
description: body
required: true
responses:
'204':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/NewPasswordEmail'
/v1/reset_password:
post:
operationId: resetPassword
summary: Reset password
description: |
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.
Consumes the supplied password reset token and updates the password for
the associated account.
tags:
- Accounts and users
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewPassword'
description: body
required: true
responses:
'204':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/NewPassword'
/v1/accounts/{accountId}:
get:
operationId: getAccount
summary: Get account details
description: |
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.
Return the details of your companies Talon.One account.
tags:
- Accounts and users
parameters:
- name: accountId
in: path
description: |
The identifier of the account. Retrieve it via the
[List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId`
property.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
/v1/accounts/{accountId}/analytics:
get:
operationId: getAccountAnalytics
summary: Get account analytics
description: |
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.
Return the analytics of your Talon.One account.
tags:
- Accounts and users
parameters:
- name: accountId
in: path
description: |
The identifier of the account. Retrieve it via the
[List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId`
property.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AccountAnalytics'
/v1/sessions:
post:
operationId: createSession
summary: Create session
description: |
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 session to use the Management API endpoints.
Use the value of the `token` property provided in the response as bearer token in other API calls.
A token is valid for 3 months. In accordance with best pratices, use your generated token
for all your API requests. Do **not** regenerate a token for each request.
This endpoint has a rate limit of 3 to 6 requests per second per account, depending on your setup.
Granular API key
Instead of using a session, you can also use the
Management API key feature
in the Campaign Manager to decide which endpoints can be used with a given key.
tags:
- Sessions
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LoginParams'
description: body
required: true
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Session'
delete:
operationId: destroySession
summary: Destroy session
description: |-
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.
Destroys the session.
tags:
- Sessions
responses:
'204':
description: No Content
/v1/exports:
get:
operationId: getExports
summary: Get exports
description: |
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.
List all past exports
tags:
- Logs
parameters:
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: applicationId
in: query
description: Filter results by Application ID.
required: false
schema:
type: number
- name: campaignId
in: query
description: Filter by the campaign ID on which the limit counters are used.
required: false
schema:
type: integer
- name: entity
in: query
required: false
description: The name of the entity type that was exported.
schema:
type: string
enum:
- Coupon
- Referral
- Effect
- CustomerSession
- LoyaltyLedger
- LoyaltyLedgerLog
- Collection
- AudienceMembership
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Export'
/v2/roles:
get:
operationId: listAllRolesV2
summary: List roles
description: |-
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.
List all roles.
tags:
- Roles
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- totalResultSize
- data
properties:
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/RoleV2'
/v2/roles/{roleId}:
get:
operationId: getRoleV2
summary: Get role
description: |
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.
Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.
tags:
- Roles
parameters:
- name: roleId
in: path
description: |
The ID of role.
**Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RoleV2'
put:
operationId: updateRoleV2
summary: Update role
description: |-
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.
Update a specific role.
tags:
- Roles
parameters:
- name: roleId
in: path
description: |
The ID of role.
**Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateRoleV2'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RoleV2'
/v1/applications/{applicationId}/stores:
get:
operationId: listStores
summary: List stores
description: |-
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.
List all stores for a specific Application.
tags:
- Stores
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: sort
in: query
required: false
description: |
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`.
**Note:** This parameter works only with numeric fields.
schema:
type: string
- name: withTotalResultSize
in: query
description: |
When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets.
- When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero.
- When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query.
schema:
type: boolean
- name: campaignId
in: query
description: Filter results by campaign.
schema:
type: number
- name: name
description: The name of the store.
required: false
in: query
schema:
type: string
- name: integrationId
description: The integration ID of the store.
required: false
in: query
schema:
type: string
- name: query
description: Filter results by `name` or `integrationId`.
required: false
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
totalResultSize:
type: integer
example: 1
data:
type: array
items:
$ref: '#/components/schemas/Store'
post:
operationId: createStore
summary: Create store
description: |-
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 store in a specific Application.
tags:
- Stores
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
requestBody:
$ref: '#/components/requestBodies/NewStore'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Store'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Conflict. A store with this integration ID already exists for this application.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/stores/{storeId}:
get:
operationId: getStore
summary: Get store
description: |-
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.
Get store details for a specific store ID.
tags:
- Stores
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: storeId
required: true
in: path
description: |
The ID of the store.
You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Store'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
put:
operationId: updateStore
summary: Update store
description: |-
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.
Update store details for a specific store ID.
tags:
- Stores
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: storeId
required: true
in: path
description: |
The ID of the store.
You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.
schema:
type: string
requestBody:
$ref: '#/components/requestBodies/NewStore'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Store'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
delete:
operationId: deleteStore
summary: Delete store
description: |-
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.
Delete the specified store.
tags:
- Stores
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: storeId
required: true
in: path
description: |
The ID of the store.
You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint.
schema:
type: string
responses:
'204':
description: No Content
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/campaigns/{campaignId}/stores/export:
get:
operationId: exportCampaignStores
summary: Export stores
description: |
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.
Download a CSV file containing the stores linked to a specific campaign.
**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/).
The CSV file contains the following column:
- `store_integration_id`: The identifier of the store.
tags:
- Stores
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
store_integration_id
STORE-001
STORE-002
STORE-003
'400':
description: Bad request
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized - Invalid API key
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/campaigns/{campaignId}/stores:
delete:
operationId: disconnectCampaignStores
summary: Disconnect stores
description: |-
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.
Disconnect the stores linked to a specific campaign.
tags:
- Stores
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
responses:
'204':
description: No Content
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized - Invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/campaigns/{campaignId}/stores/import:
post:
operationId: importCampaignStores
summary: Import stores
description: |
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 stores you want to link to a specific campaign.
Send the file as multipart data.
The CSV file **must** only contain the following column:
- `store_integration_id`: The identifier of the store.
The import **replaces** the previous list of stores linked to the campaign.
tags:
- Stores
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
upFile:
description: The file containing the data that is being imported.
type: string
format: csv
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Import'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized - Invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/campaigns/{campaignId}/achievements:
post:
operationId: createAchievement
summary: Create achievement
description: |-
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.
tags:
- Achievements
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAchievement'
description: body
required: true
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Achievement'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'409':
description: Conflict. An achievement with this name or title already exists.
get:
operationId: listAchievements
summary: List achievements
description: |-
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.
List all the achievements for a specific campaign.
tags:
- Achievements
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 50
default: 50
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: title
in: query
description: |
Filter by the display name for the achievement in the campaign manager.
**Note**: If no `title` is provided, all the achievements from the campaign are returned.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
hasMore:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/Achievement'
/v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}:
get:
operationId: getAchievement
summary: Get achievement
description: |-
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.
Get the details of a specific achievement.
tags:
- Achievements
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: achievementId
in: path
description: The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Achievement'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
put:
operationId: updateAchievement
summary: Update achievement
description: |-
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.
Update the details of a specific achievement.
tags:
- Achievements
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: achievementId
in: path
description: The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAchievement'
description: body
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Achievement'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
delete:
operationId: deleteAchievement
summary: Delete achievement
description: |-
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.
Delete the specified achievement.
tags:
- Achievements
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: achievementId
in: path
description: The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.
required: true
schema:
type: integer
responses:
'204':
description: No Content
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/export:
get:
operationId: exportAchievements
summary: Export achievement customer data
description: |
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.
Download a CSV file containing a list of all the customers who have participated in and are currently participating in the given achievement.
The CSV file contains the following columns:
- `profileIntegrationID`: The integration ID of the customer profile participating in the achievement.
- `title`: The display name of the achievement in the Campaign Manager.
- `target`: The required number of actions or the transactional milestone to complete the achievement.
- `progress`: The current progress of the customer in the achievement.
- `status`: The status of the achievement. Can be one of: ['inprogress', 'completed', 'expired'].
- `startDate`: The date on which the customer profile started the achievement in RFC3339.
- `endDate`: The date on which the achievement ends and resets for the customer profile in RFC3339.
- `completionDate`: The date on which the customer profile completed the achievement in RFC3339.
tags:
- Achievements
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: campaignId
in: path
description: The ID of the campaign. It is displayed in your Talon.One deployment URL.
required: true
schema:
type: integer
- name: achievementId
in: path
description: The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/csv:
schema:
type: string
format: csv
examples:
response:
value: |
profileIntegrationID,title,target,progress,status,startDate,endDate,completionDate
user1231,CoffeeFree10Orders,10.00,5,inprogress,2023-12-10T11:42:25+01:00,2024-01-10T11:42:25+01:00,
user341,CoffeeFree10Orders,10.00,10,completed,2023-12-10T11:42:25+01:00,2024-01-10T11:42:25+01:00,2023-12-20T10:24:34+01:00
'400':
description: Bad request
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'404':
description: Not found
content:
application/csv:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
/v1/applications/{applicationId}/achievement_progress/{integrationId}:
get:
operationId: getCustomerProfileAchievementProgress
summary: List customer achievements
description: |
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.
For the given customer profile, list all the achievements that match your filter criteria.
tags:
- Achievements
parameters:
- name: applicationId
in: path
required: true
description: The ID of the Application. It is displayed in your Talon.One deployment URL.
schema:
type: integer
- name: integrationId
in: path
description: The identifier of the profile.
required: true
schema:
type: string
- name: pageSize
in: query
required: false
description: The number of items in the response.
schema:
type: integer
minimum: 1
maximum: 50
default: 50
- name: skip
in: query
required: false
description: The number of items to skip when paging through large result sets.
schema:
type: integer
- name: achievementId
in: query
description: The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint.
required: false
schema:
type: integer
- name: title
in: query
required: false
description: Filter results by the `title` of an achievement.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- hasMore
- data
properties:
hasMore:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/AchievementProgress'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseWithStatus'
components:
requestBodies:
NewStore:
content:
application/json:
schema:
$ref: '#/components/schemas/NewStore'
description: body
required: true
AttributeQuery:
content:
application/json:
schema:
$ref: '#/components/schemas/AttributeQuery'
description: body
required: true
NewAdditionalCost:
content:
application/json:
schema:
$ref: '#/components/schemas/NewAdditionalCost'
description: body
required: true
NewAttribute:
content:
application/json:
schema:
$ref: '#/components/schemas/NewAttribute'
description: body
required: true
CustomerProfileSearchQuery:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerProfileSearchQuery'
description: body
required: true
NewInvitation:
content:
application/json:
schema:
$ref: '#/components/schemas/NewInvitation'
description: body
required: true
ScimNewUser:
content:
application/json:
schema:
$ref: '#/components/schemas/ScimNewUser'
description: body
required: true
DeductLoyaltyPoints:
content:
application/json:
schema:
$ref: '#/components/schemas/DeductLoyaltyPoints'
description: body
required: true
NewBaseNotification:
content:
application/json:
schema:
$ref: '#/components/schemas/NewBaseNotification'
description: body
required: true
AddLoyaltyPoints:
content:
application/json:
schema:
$ref: '#/components/schemas/AddLoyaltyPoints'
description: body
required: true
securitySchemes:
manager_auth:
type: apiKey
name: Authorization
in: header
description: |
This authentication scheme relies on a bearer token that you can use to access all the endpoints of the Management API.
To create the token:
1. Get a bearer token by calling the [createSession](#operation/createSession) endpoint.
1. Use the `token` property of the response in the HTTP header of your next queries:
`Authorization: Bearer $TOKEN`.
A token is valid for 3 months. In accordance with best pratices, use your generated token
for all your API requests. Do **not** regenerate a token for each request.
**Note:** We recommend that you use a [Management API key](https://docs.talon.one/management-api#section/Authentication/management_key)
instead of a bearer token.
management_key:
type: apiKey
name: Authorization
in: header
description: |
The API key authentication gives you access to the endpoints selected by the admin who created the key.
Using an API key is the recommended authentication method.
The key must be generated by an admin and given to the developer that requires it:
1. Log into the Campaign Manager and click **Account** > **Management API keys**.
1. Click **Create Key** and give it a name.
1. Set an expiration date.
1. Choose the endpoints the key should give access to.
1. Click **Create Key**.
1. Share it with your developer.
The developer can now use the API key in the HTTP header, prefixing it with `ManagementKey-v1`:
```
Authorization: ManagementKey-v1 bd9479c59e16f9dbc644d33aa74d58270fe13bf3
```
schemas:
ErrorResponse:
type: object
required:
- message
properties:
message:
type: string
description: A message describing the error.
errors:
type: array
description: An array of individual problems encountered during the request.
items:
$ref: '#/components/schemas/APIError'
ErrorResponseWithStatus:
type: object
properties:
message:
type: string
errors:
type: array
description: An array of individual problems encountered during the request.
items:
$ref: '#/components/schemas/APIError'
StatusCode:
type: integer
description: The error code
APIError:
type: object
required:
- source
- title
properties:
title:
type: string
description: Short description of the problem.
details:
type: string
description: Longer description of this specific instance of the problem.
source:
$ref: '#/components/schemas/ErrorSource'
ErrorSource:
type: object
description: |
The source of the current error, exactly one of `pointer`, `parameter` or `line` will be defined.
properties:
pointer:
type: string
description: Pointer to the path in the payload that caused this error.
parameter:
type: string
description: Query parameter that caused this error.
line:
type: string
description: Line number in uploaded multipart file that caused this error. 'N/A' if unknown.
resource:
type: string
description: Pointer to the resource that caused this error.
IdentifiableEntity:
type: object
required:
- id
properties:
id:
type: integer
description: Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints.
example: 6
Entity:
type: object
required:
- id
- created
properties:
id:
type: integer
description: Internal ID of this entity.
example: 6
created:
type: string
format: date-time
description: The time this entity was created.
example: '2020-06-10T09:05:27.993483Z'
EntityWithTalangVisibleID:
type: object
required:
- id
- created
properties:
id:
type: integer
description: Unique ID for this entity.
example: 4
created:
type: string
format: date-time
description: The exact moment this entity was created.
example: '2020-06-10T09:05:27.993483Z'
MutableEntity:
type: object
required:
- modified
properties:
modified:
type: string
format: date-time
description: The time this entity was last modified.
example: '2021-09-12T10:12:42Z'
AccountEntity:
type: object
required:
- accountId
properties:
accountId:
type: integer
description: The ID of the account that owns this entity.
example: 3886
UserEntity:
type: object
required:
- userId
properties:
userId:
type: integer
description: The ID of the user associated with this entity.
example: 388
EmailEntity:
type: object
required:
- email
properties:
email:
type: string
format: email
example: john.doe@example.com
description: The email address associated with the user profile.
ApplicationEntity:
type: object
required:
- applicationId
properties:
applicationId:
type: integer
description: The ID of the application that owns this entity.
example: 322
LoyaltyProgramEntity:
type: object
required:
- programID
properties:
programID:
type: integer
description: The ID of the loyalty program that owns this entity.
example: 125
MultiApplicationEntity:
type: object
required:
- applicationIds
properties:
applicationIds:
type: array
minItems: 1
description: The IDs of the Applications that are related to this entity.
items:
type: integer
CampaignEntity:
type: object
required:
- campaignId
properties:
campaignId:
type: integer
title: Campaign ID
description: The ID of the campaign that owns this entity.
example: 211
ApplicationCustomerEntity:
type: object
properties:
profileId:
type: integer
description: The globally unique Talon.One ID of the customer that created this entity.
example: 138
ApplicationStoreEntity:
type: object
properties:
storeId:
type: integer
description: The ID of the store.
IntegrationEntity:
type: object
required:
- integrationId
- created
properties:
integrationId:
type: string
format: string
example: URNGV8294NV
maxLength: 1000
description: The integration ID set by your integration layer.
created:
type: string
format: date-time
description: The time this entity was created.
example: '2020-02-07T08:15:22Z'
IntegrationProfileEntity:
type: object
properties:
profileId:
type: string
description: |
ID of the customer profile set by your integration layer.
**Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`.
example: URNGV8294NV
IntegrationStoreEntity:
type: object
properties:
storeIntegrationId:
type: string
minLength: 1
maxLength: 1000
description: The integration ID of the store. You choose this ID when you create a store.
example: STORE-001
CouponValue:
type: object
properties:
value:
type: string
title: Coupon Code
description: The coupon code.
minLength: 4
example: XMAS-20-2021
CouponConstraints:
type: object
properties:
usageLimit:
type: integer
minimum: 0
maximum: 999999
example: 100
description: |
The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply.
discountLimit:
type: number
minimum: 0
maximum: 999999
example: 30
description: |
The total discount value that the code can give. Typically used to represent a gift card value.
reservationLimit:
type: integer
minimum: 0
maximum: 999999
example: 45
description: |
The number of reservations that can be made with this coupon code.
startDate:
type: string
format: date-time
example: '2020-01-24T14:15:22Z'
minimum: 0
description: Timestamp at which point the coupon becomes valid.
expiryDate:
type: string
format: date-time
example: '2023-08-24T14:15:22Z'
minimum: 0
description: Expiration date of the coupon. Coupon never expires if this is omitted.
CodeGeneratorSettings:
type: object
properties:
validCharacters:
type: array
description: |
List of characters used to generate the random parts of a code.
example:
- 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'
items:
type: string
couponPattern:
type: string
description: |
The pattern used to generate codes, such as coupon codes, referral codes, and loyalty cards. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set.
maxLength: 100
minLength: 3
example: SUMMER-####-####
additionalProperties: false
required:
- couponPattern
- validCharacters
Session:
type: object
properties:
userId:
type: integer
description: The ID of the user of this session.
example: 109
token:
type: string
description: The token to use as a bearer token to query Management API endpoints.
example: dy_Fa_lQ4iDAnqldJFvVEmnsN8xDTxej19l0LZDBJhQ
created:
type: string
format: date-time
description: Unix timestamp indicating when the session was first created.
example: '2021-07-20T22:00:00Z'
required:
- userId
- token
- created
LoginParams:
allOf:
- $ref: '#/components/schemas/EmailEntity'
- type: object
properties:
password:
type: string
description: The password for your account.
example: admin123456
required:
- password
AttributesMandatory:
type: object
description: Arbitrary settings associated with attributes.
properties:
campaigns:
type: array
items:
type: string
description: List of mandatory attributes for campaigns.
coupons:
type: array
items:
type: string
description: List of mandatory attributes for campaigns.
AttributesSettings:
type: object
description: Arbitrary settings associated with attributes.
properties:
mandatory:
$ref: '#/components/schemas/AttributesMandatory'
UpdateApplication:
type: object
properties:
name:
type: string
description: The name of this application.
minLength: 1
example: My Application
description:
type: string
description: A longer description of the application.
example: A test Application
timezone:
type: string
description: A string containing an IANA timezone descriptor.
minLength: 1
example: Europe/Berlin
currency:
type: string
description: The default currency for new customer sessions.
minLength: 1
example: EUR
caseSensitivity:
type: string
enum:
- sensitive
- insensitive-uppercase
- insensitive-lowercase
description: The case sensitivity behavior to check coupon codes in the campaigns of this Application.
example: sensitive
attributes:
type: object
description: Arbitrary properties associated with this campaign.
additionalProperties: true
limits:
type: array
description: Default limits for campaigns created in this application.
items:
$ref: '#/components/schemas/LimitConfig'
defaultDiscountScope:
type: string
example: sessionTotal
description: |
The default scope to apply `setDiscount` effects on if no scope was provided with the effect.
enum:
- sessionTotal
- cartItems
- additionalCosts
enableCascadingDiscounts:
type: boolean
description: Indicates if discounts should cascade for this Application.
example: true
enableFlattenedCartItems:
type: boolean
example: true
description: |
Indicates if cart items of quantity larger than one should be separated into different items of quantity one.
attributesSettings:
$ref: '#/components/schemas/AttributesSettings'
sandbox:
type: boolean
description: Indicates if this is a live or sandbox Application.
example: true
enablePartialDiscounts:
type: boolean
description: Indicates if this Application supports partial discounts.
example: false
defaultDiscountAdditionalCostPerItemScope:
type: string
description: |
The default scope to apply `setDiscountPerItem` effects on if no scope was provided with the effect.
example: price
enum:
- price
- itemTotal
- additionalCosts
defaultEvaluationGroupId:
type: integer
description: The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign.
example: 3
defaultCartItemFilterId:
type: integer
description: The ID of the default Cart-Item-Filter for this application.
example: 3
enableCampaignStateManagement:
type: boolean
description: |
Indicates whether the campaign staging and revisions feature is enabled for the Application.
**Important:** After this feature is enabled, it cannot be disabled.
example: false
required:
- name
- timezone
- currency
Application:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/UpdateApplication'
- type: object
required:
- loyaltyPrograms
properties:
loyaltyPrograms:
type: array
description: An array containing all the loyalty programs to which this application is subscribed.
items:
$ref: '#/components/schemas/LoyaltyProgram'
NewCampaignGroup:
type: object
properties:
name:
type: string
description: The name of the campaign access group.
minLength: 1
example: Europe access group
description:
type: string
description: A longer description of the campaign access group.
example: A group that gives access to all the campaigns for the Europe market.
subscribedApplicationsIds:
type: array
description: A list of IDs of the Applications that this campaign access group is enabled for.
items:
type: integer
example:
- 1
- 2
- 3
campaignIds:
type: array
description: A list of IDs of the campaigns that are part of the campaign access group.
items:
type: integer
example:
- 4
- 6
- 8
required:
- name
CampaignGroup:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/NewCampaignGroup'
- type: object
UpdateCampaignGroup:
allOf:
- $ref: '#/components/schemas/NewCampaignGroup'
- type: object
NewCampaign:
allOf:
- $ref: '#/components/schemas/BaseCampaign'
- type: object
properties:
evaluationGroupId:
type: integer
title: Evaluation Group ID
example: 2
description: The ID of the campaign evaluation group the campaign belongs to.
CampaignVersions:
type: object
properties:
activeRevisionId:
type: integer
description: |
ID of the revision that was last activated on this campaign.
example: 6
activeRevisionVersionId:
type: integer
description: |
ID of the revision version that is active on the campaign.
example: 6
version:
type: integer
description: |
Incrementing number representing how many revisions have been activated on this campaign, starts from 0 for a new campaign.
example: 6
currentRevisionId:
type: integer
description: |
ID of the revision currently being modified for the campaign.
example: 6
currentRevisionVersionId:
type: integer
description: |
ID of the latest version applied on the current revision.
example: 6
stageRevision:
type: boolean
description: |
Flag for determining whether we use current revision when sending requests with staging API key.
example: false
default: false
UpdateCampaign:
type: object
properties:
name:
type: string
title: Campaign Name
description: A user-facing name for this campaign.
minLength: 1
example: Summer promotions
description:
type: string
title: Campaign Description
description: A detailed description of the campaign.
example: Campaign for all summer 2021 promotions
startTime:
type: string
format: date-time
description: Timestamp when the campaign will become active.
example: '2021-07-20T22:00:00Z'
endTime:
type: string
format: date-time
description: Timestamp when the campaign will become inactive.
example: '2021-10-01T02:00:00Z'
attributes:
type: object
description: Arbitrary properties associated with this campaign.
additionalProperties: true
example:
myattribute: 20
state:
type: string
enum:
- enabled
- disabled
- archived
default: enabled
example: disabled
description: |
A disabled or archived campaign is not evaluated for rules or coupons.
activeRulesetId:
type: integer
description: |
[ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this
campaign applies on customer session evaluation.
example: 2
tags:
type: array
description: A list of tags for the campaign.
maxItems: 50
example:
- Summer
- Shoes
items:
type: string
minLength: 1
maxLength: 50
features:
type: array
description: A list of features for the campaign.
items:
type: string
enum:
- coupons
- referrals
- loyalty
- giveaways
- strikethrough
- achievements
example:
- coupons
- loyalty
couponSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
referralSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
limits:
type: array
description: The set of limits that will operate for this campaign.
items:
$ref: '#/components/schemas/LimitConfig'
campaignGroups:
type: array
description: |
The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups) this campaign belongs to.
example:
- 1
- 3
items:
type: integer
evaluationGroupId:
type: integer
example: 2
description: The ID of the campaign evaluation group the campaign belongs to.
type:
type: string
enum:
- cartItem
- advanced
default: advanced
example: advanced
description: |
The campaign type. Possible type values:
- `cartItem`: Type of campaign that can apply effects only to cart items.
- `advanced`: Type of campaign that can apply effects to customer sessions and cart items.
linkedStoreIds:
type: array
description: |
A list of store IDs that you want to link to the campaign.
**Note:**
- Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store.
- If you linked stores to the campaign by uploading a CSV file, you cannot use this property and it should be empty.
- Use of this property is limited to 50 stores. To link more than 50 stores, upload them via a CSV file.
items:
type: integer
example:
- 1
- 2
- 3
required:
- name
- tags
- limits
- features
BaseCampaign:
type: object
properties:
name:
type: string
title: Campaign Name
description: A user-facing name for this campaign.
minLength: 1
example: Summer promotions
description:
type: string
title: Campaign Description
description: A detailed description of the campaign.
example: Campaign for all summer 2021 promotions
startTime:
type: string
format: date-time
description: Timestamp when the campaign will become active.
example: '2021-07-20T22:00:00Z'
endTime:
type: string
format: date-time
description: Timestamp when the campaign will become inactive.
example: '2021-09-22T22:00:00Z'
attributes:
type: object
description: Arbitrary properties associated with this campaign.
additionalProperties: true
state:
type: string
enum:
- enabled
- disabled
- archived
default: enabled
example: enabled
description: |
A disabled or archived campaign is not evaluated for rules or coupons.
activeRulesetId:
type: integer
description: |
[ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this
campaign applies on customer session evaluation.
example: 6
tags:
type: array
description: A list of tags for the campaign.
example:
- summer
maxItems: 50
items:
type: string
minLength: 1
maxLength: 50
features:
type: array
description: The features enabled in this campaign.
example:
- coupons
- referrals
items:
type: string
enum:
- coupons
- referrals
- loyalty
- giveaways
- strikethrough
- achievements
couponSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
referralSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
limits:
type: array
description: |
The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign.
items:
$ref: '#/components/schemas/LimitConfig'
campaignGroups:
type: array
description: |
The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to.
example:
- 1
- 3
items:
type: integer
type:
type: string
title: Type
enum:
- cartItem
- advanced
default: advanced
example: advanced
description: |
The campaign type. Possible type values:
- `cartItem`: Type of campaign that can apply effects only to cart items.
- `advanced`: Type of campaign that can apply effects to customer sessions and cart items.
linkedStoreIds:
type: array
description: |
A list of store IDs that you want to link to the campaign.
**Note:** Campaigns with linked store IDs will only be evaluated when there is a
[customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)
that references a linked store.
items:
type: integer
example:
- 1
- 2
- 3
required:
- name
- state
- tags
- limits
- features
Campaign:
allOf:
- $ref: '#/components/schemas/EntityWithTalangVisibleID'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/UserEntity'
- $ref: '#/components/schemas/BaseCampaign'
- $ref: '#/components/schemas/AdditionalCampaignProperties'
- $ref: '#/components/schemas/CampaignVersions'
Revision:
allOf:
- $ref: '#/components/schemas/IdentifiableEntity'
- $ref: '#/components/schemas/RevisionActivation'
- type: object
required:
- created
- createdBy
- accountId
- applicationId
- campaignId
properties:
accountId:
type: integer
applicationId:
type: integer
campaignId:
type: integer
created:
type: string
format: date-time
createdBy:
type: integer
activatedAt:
type: string
format: date-time
activatedBy:
type: integer
currentVersion:
$ref: '#/components/schemas/RevisionVersion'
RevisionActivation:
type: object
properties:
activateAt:
type: string
format: date-time
RevisionVersion:
allOf:
- $ref: '#/components/schemas/IdentifiableEntity'
- type: object
required:
- accountId
- applicationId
- campaignId
- created
- createdBy
- revisionId
- version
properties:
accountId:
type: integer
applicationId:
type: integer
campaignId:
type: integer
created:
type: string
format: date-time
createdBy:
type: integer
revisionId:
type: integer
version:
type: integer
- $ref: '#/components/schemas/NewRevisionVersion'
NewRevisionVersion:
type: object
properties:
name:
type: string
title: Campaign Name
description: A user-facing name for this campaign.
minLength: 1
example: Summer promotions
startTime:
type: string
format: date-time
description: Timestamp when the campaign will become active.
example: '2021-07-20T22:00:00Z'
nullable: true
endTime:
type: string
format: date-time
description: Timestamp when the campaign will become inactive.
example: '2021-09-22T22:00:00Z'
nullable: true
attributes:
type: object
description: Arbitrary properties associated with this campaign.
additionalProperties: true
description:
type: string
title: Campaign Description
description: A detailed description of the campaign.
example: Campaign for all summer 2021 promotions
nullable: true
activeRulesetId:
type: integer
description: The ID of the ruleset this campaign template will use.
example: 5
nullable: true
tags:
type: array
description: A list of tags for the campaign template.
maxItems: 50
items:
type: string
minLength: 1
maxLength: 50
couponSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
referralSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
limits:
type: array
description: The set of limits that will operate for this campaign version.
items:
$ref: '#/components/schemas/LimitConfig'
features:
type: array
description: A list of features for the campaign template.
items:
type: string
enum:
- coupons
- referrals
- loyalty
- giveaways
- strikethrough
- achievements
CampaignBudget:
type: object
required:
- action
- limit
- counter
properties:
action:
type: string
description: |
The limitable action to which this limit applies. For example:
- `setDiscount`
- `setDiscountEffect`
- `redeemCoupon`
- `createCoupon`
example: createCoupon
limit:
type: number
minimum: 0
example: 1000
description: The value to set for the limit.
counter:
type: number
minimum: 0
example: 42
description: The number of occurrences of the limited action in the context of the campaign.
AdditionalCampaignProperties:
type: object
properties:
budgets:
type: array
items:
$ref: '#/components/schemas/CampaignBudget'
description: |
A list of all the budgets that are defined by this campaign and their usage.
**Note:** Budgets that are not defined do not appear in this list and their usage is
not counted until they are defined.
couponRedemptionCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Number of coupons redeemed in the campaign.
example: 163
referralRedemptionCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Number of referral codes redeemed in the campaign.
example: 3
discountCount:
type: number
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total amount of discounts redeemed in the campaign.
example: 288
discountEffectCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of times discounts were redeemed in this campaign.
example: 343
couponCreationCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of coupons created by rules in this campaign.
example: 16
customEffectCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of custom effects triggered by rules in this campaign.
example: 0
referralCreationCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of referrals created by rules in this campaign.
example: 8
addFreeItemEffectCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign.
example: 0
awardedGiveawaysCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of giveaways awarded by rules in this campaign.
example: 9
createdLoyaltyPointsCount:
type: number
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of loyalty points created by rules in this campaign.
example: 9
createdLoyaltyPointsEffectCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of loyalty point creation effects triggered by rules in this campaign.
example: 2
redeemedLoyaltyPointsCount:
type: number
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of loyalty points redeemed by rules in this campaign.
example: 8
redeemedLoyaltyPointsEffectCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of loyalty point redemption effects triggered by rules in this campaign.
example: 9
callApiEffectCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of webhooks triggered by rules in this campaign.
example: 0
reservecouponEffectCount:
type: integer
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of reserve coupon effects triggered by rules in this campaign.
example: 9
lastActivity:
type: string
format: date-time
example: '2022-11-10T23:00:00Z'
description: Timestamp of the most recent event received by this campaign.
updated:
type: string
format: date-time
example: '2022-10-97T35:00:00Z'
description: |
Timestamp of the most recent update to the campaign's property. Updates to external entities used in this campaign
are **not** registered by this property, such as collection or coupon updates.
createdBy:
type: string
description: Name of the user who created this campaign if available.
example: John Doe
updatedBy:
type: string
description: Name of the user who last updated this campaign if available.
example: Jane Doe
templateId:
type: integer
description: The ID of the Campaign Template this Campaign was created from.
example: 3
frontendState:
type: string
description: A campaign state described exactly as in the Campaign Manager.
enum:
- expired
- scheduled
- running
- disabled
- archived
example: running
storesImported:
type: boolean
description: Indicates whether the linked stores were imported via a CSV file.
example: true
required:
- state
- description
- type
- budgets
- frontendState
- storesImported
NewRuleset:
type: object
required:
- rules
- bindings
properties:
rules:
type: array
description: Set of rules to apply.
items:
$ref: '#/components/schemas/Rule'
strikethroughRules:
type: array
description: Set of rules to apply for strikethrough.
items:
$ref: '#/components/schemas/Rule'
bindings:
type: array
description: An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array.
items:
$ref: '#/components/schemas/Binding'
example: []
rbVersion:
type: string
description: The version of the rulebuilder used to create this ruleset.
example: v2
activate:
type: boolean
description: Indicates whether this created ruleset should be activated for the campaign that owns it.
example: true
Ruleset:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/UserEntity'
- $ref: '#/components/schemas/NewRuleset'
- type: object
properties:
campaignId:
type: integer
title: Campaign ID
description: The ID of the campaign that owns this entity.
example: 320
templateId:
type: integer
title: Campaign Template ID
description: The ID of the campaign template that owns this entity.
example: 3
activatedAt:
type: string
format: date-time
description: Timestamp indicating when this Ruleset was activated.
Binding:
type: object
required:
- name
- expression
properties:
name:
type: string
description: A descriptive name for the value to be bound.
example: my property
type:
type: string
description: |
The kind of binding. Possible values are:
- `bundle`
- `cartItemFilter`
- `subledgerBalance`
- `templateParameter`
example: templateParameter
expression:
type: array
description: A Talang expression that will be evaluated and its result attached to the name of the binding.
items: {}
valueType:
type: string
description: |
Can be one of the following:
- `string`
- `number`
- `boolean`
example: string
Rule:
type: object
required:
- title
- condition
- effects
properties:
id:
type: string
format: uuid
description: A unique identifier for the rule.
example: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23
parentId:
type: string
format: uuid
description: The ID of the rule that was copied to create this rule.
example: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23
title:
type: string
description: A short description of the rule.
example: Give discount via coupon
description:
type: string
description: A longer, more detailed description of the rule.
example: Creates a discount when a coupon is valid
bindings:
type: array
description: An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array.
items:
$ref: '#/components/schemas/Binding'
condition:
type: array
description: A Talang expression that will be evaluated in the context of the given event.
minItems: 1
example:
- and
- - couponValid
items: {}
effects:
type: array
description: An array of effectful Talang expressions in arrays that will be evaluated when a rule matches.
items:
type: array
items: {}
example:
- catch
- - noop
- - setDiscount
- 10% off
- - '*'
- - .
- Session
- Total
- - /
- 10
- 100
TemplateLimitConfig:
allOf:
- $ref: '#/components/schemas/LimitConfig'
LimitConfig:
type: object
required:
- action
- limit
- entities
properties:
action:
type: string
description: |
The limitable action to which this limit applies. For example:
- `setDiscount`
- `setDiscountEffect`
- `redeemCoupon`
- `createCoupon`
example: createCoupon
limit:
type: number
minimum: 0
example: 1000
description: The value to set for the limit.
period:
description: The period on which the budget limit recurs.
type: string
enum:
- daily
- weekly
- monthly
- yearly
example: yearly
entities:
type: array
description: The entity that this limit applies to.
example:
- Coupon
items:
type: string
enum:
- Coupon
- Referral
- Profile
- Identifier
CampaignSet:
allOf:
- $ref: '#/components/schemas/ApplicationEntity'
- type: object
required:
- set
- version
- id
properties:
id:
type: integer
description: Internal ID of this entity.
example: 6
version:
type: integer
minimum: 1
description: Version of the campaign set.
example: 3
set:
$ref: '#/components/schemas/CampaignSetBranchNode'
updatedBy:
type: string
description: Name of the user who last updated this campaign set, if available.
example: Jane Doe
CampaignSetNode:
type: object
required:
- type
properties:
type:
type: string
example: type
oneOf:
- $ref: '#/components/schemas/CampaignSetBranchNode'
- $ref: '#/components/schemas/CampaignSetLeafNode'
CampaignSetBranchNode:
type: object
additionalProperties: false
required:
- type
- name
- operator
- elements
- groupId
- evaluationMode
- locked
- evaluationScope
properties:
type:
type: string
description: Indicates the node type.
enum:
- SET
example: SET
name:
type: string
description: Name of the set.
example: name
operator:
type: string
description: An indicator of how the set operates on its elements.
enum:
- ALL
- FIRST
example: ALL
elements:
type: array
description: Child elements of this set.
items:
$ref: '#/components/schemas/CampaignSetNode'
groupId:
type: integer
description: The ID of the campaign set.
locked:
type: boolean
description: An indicator of whether the campaign set is locked for modification.
description:
type: string
description: A description of the campaign set.
evaluationMode:
type: string
enum:
- stackable
- listOrder
- lowestDiscount
- highestDiscount
description: The mode by which campaigns in the campaign evaluation group are evaluated.
evaluationScope:
type: string
enum:
- cartItem
- session
description: The evaluation scope of the campaign evaluation group.
CampaignSetLeafNode:
type: object
additionalProperties: false
required:
- type
- campaignId
properties:
type:
type: string
description: Indicates the node type.
enum:
- CAMPAIGN
campaignId:
type: integer
description: ID of the campaign
NewCampaignSet:
allOf:
- $ref: '#/components/schemas/ApplicationEntity'
- type: object
required:
- set
- version
properties:
version:
type: integer
minimum: 1
example: 2
description: Version of the campaign set.
set:
$ref: '#/components/schemas/CampaignSetBranchNode'
NewCampaignEvaluationGroup:
type: object
required:
- name
- parentId
- evaluationMode
- locked
- evaluationScope
properties:
name:
type: string
description: The name of the campaign evaluation group.
example: Summer campaigns
parentId:
type: integer
minimum: 1
description: The ID of the parent group that contains the campaign evaluation group.
example: 2
description:
type: string
description: A description of the campaign evaluation group.
example: This campaign evaluation group contains all campaigns that are running in the summer.
evaluationMode:
type: string
enum:
- stackable
- listOrder
- lowestDiscount
- highestDiscount
description: The mode by which campaigns in the campaign evaluation group are evaluated.
evaluationScope:
type: string
enum:
- cartItem
- session
description: The evaluation scope of the campaign evaluation group.
locked:
description: An indicator of whether the campaign evaluation group is locked for modification.
type: boolean
example: false
UpdateCampaignEvaluationGroup:
allOf:
- $ref: '#/components/schemas/NewCampaignEvaluationGroup'
CampaignEvaluationGroup:
allOf:
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/NewCampaignEvaluationGroup'
- $ref: '#/components/schemas/IdentifiableEntity'
ReferralConstraints:
type: object
properties:
startDate:
type: string
format: date-time
minimum: 0
title: Referral code valid from
description: Timestamp at which point the referral code becomes valid.
example: '2020-11-10T23:00:00Z'
expiryDate:
type: string
format: date-time
minimum: 0
title: Referral code valid until
description: Expiration date of the referral code. Referral never expires if this is omitted.
example: '2021-11-10T23:00:00Z'
usageLimit:
type: integer
title: Referral code Usage Limit
description: |
The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply.
minimum: 0
maximum: 999999
example: 1
NewReferral:
allOf:
- $ref: '#/components/schemas/ReferralConstraints'
- type: object
required:
- campaignId
- advocateProfileIntegrationId
properties:
campaignId:
type: integer
title: Referral's Campaign ID
description: ID of the campaign from which the referral received the referral code.
example: 78
advocateProfileIntegrationId:
type: string
title: Advocate's Profile ID
description: The Integration ID of the Advocate's Profile.
maxLength: 1000
example: URNGV8294NV
friendProfileIntegrationId:
type: string
title: Friend's Profile ID
description: An optional Integration ID of the Friend's Profile.
example: BZGGC2454PA
attributes:
type: object
description: Arbitrary properties associated with this item.
additionalProperties: true
example:
channel: web
ImportEntity:
type: object
properties:
importId:
type: integer
description: The ID of the Import which created this referral.
example: 4
Referral:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/NewReferral'
- $ref: '#/components/schemas/ImportEntity'
- type: object
required:
- code
- usageCounter
- usageLimit
properties:
code:
type: string
title: Referral code
description: The referral code.
minLength: 4
example: 27G47Y54VH9L
usageCounter:
type: integer
title: Referral code Usages
description: The number of times this referral code has been successfully used.
example: 1
batchId:
type: string
title: Batch ID
description: The ID of the batch the referrals belong to.
example: tqyrgahe
UpdateReferral:
type: object
additionalProperties: false
properties:
friendProfileIntegrationId:
type: string
title: Friend's Profile ID
description: An optional Integration ID of the Friend's Profile.
example: BZGGC2454PA
maxLength: 1000
startDate:
type: string
format: date-time
minimum: 0
title: Referral code valid from
description: Timestamp at which point the referral code becomes valid.
example: '2020-11-10T23:00:00Z'
expiryDate:
type: string
format: date-time
minimum: 0
title: Referral code valid until
description: Expiration date of the referral code. Referral never expires if this is omitted.
example: '2021-11-10T23:00:00Z'
usageLimit:
type: integer
title: Referral code Usage Limit
description: |
The number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply.
minimum: 0
maximum: 999999
example: 1
attributes:
type: object
description: Arbitrary properties associated with this item.
additionalProperties: true
NewReferralsForMultipleAdvocates:
allOf:
- $ref: '#/components/schemas/ReferralConstraints'
- type: object
required:
- campaignId
- advocateProfileIntegrationIds
- usageLimit
properties:
campaignId:
type: integer
title: Referral's Campaign ID
description: The ID of the campaign from which the referral received the referral code.
example: 45
advocateProfileIntegrationIds:
type: array
title: Advocate Profile List
description: An array containing all the respective advocate profiles.
example:
- URNGV8294NV
- DRPVV9476AF
items:
type: string
maxItems: 1000
minItems: 1
attributes:
type: object
description: Arbitrary properties associated with this referral code.
additionalProperties: true
example:
channel: web
validCharacters:
type: array
description: |
List of characters used to generate the random parts of a code. By default, the list of characters
is equivalent to the `[A-Z, 0-9]` regular expression.
example:
- 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
items:
type: string
referralPattern:
type: string
description: |
The pattern used to generate referrals. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set.
example: REF-###-###
maxLength: 100
minLength: 3
InventoryReferral:
allOf:
- $ref: '#/components/schemas/Referral'
- type: object
required:
- referredCustomers
properties:
referredCustomers:
type: array
description: An array of referred customers.
items:
type: string
AttributeQuery:
type: object
additionalProperties: true
description: Object representing a set of of attributes and their respective values.
example:
my_attribute_1: some value
my_attribute_2: some other value
my_attribute_3: some other value
CampaignSearch:
type: object
required:
- attributes
properties:
attributes:
type: object
description: Properties to match against a campaign. All provided attributes will be exactly matched against campaign attributes.
additionalProperties: true
CampaignCopy:
type: object
required:
- applicationIds
properties:
name:
type: string
description: Name of the copied campaign (Defaults to "Copy of original campaign name").
example: Copy of Summer promotions
applicationIds:
type: array
description: Application IDs of the applications to which a campaign should be copied to.
additionalProperties: true
items:
type: integer
example:
- 1
- 2
- 3
description:
type: string
title: Campaign Description
description: A detailed description of the campaign.
example: Campaign for all summer 2021 promotions
startTime:
type: string
format: date-time
description: Timestamp when the campaign will become active.
example: '2021-06-01T09:00:27.993483Z'
endTime:
type: string
format: date-time
description: Timestamp when the campaign will become inactive.
example: '2021-09-10T01:00:00.993483Z'
tags:
type: array
description: A list of tags for the campaign.
maxItems: 50
items:
type: string
minLength: 1
maxLength: 50
example:
- Summer
- Shoes
evaluationGroupId:
type: integer
example: 2
description: The ID of the campaign evaluation group the campaign belongs to.
NewCoupons:
allOf:
- $ref: '#/components/schemas/CouponConstraints'
- $ref: '#/components/schemas/CouponLimitConfigs'
- type: object
additionalProperties: false
required:
- numberOfCoupons
- usageLimit
properties:
numberOfCoupons:
type: integer
description: The number of new coupon codes to generate for the campaign. Must be at least 1.
example: 1
uniquePrefix:
title: Coupon code unique prefix
type: string
description: |
**DEPRECATED** To create more than 20,000 coupons in one request, use [Create coupons asynchronously](https://docs.talon.one/management-api#operation/createCouponsAsync) endpoint.
example: ''
attributes:
type: object
description: Arbitrary properties associated with this item.
additionalProperties: true
example:
venueId: 12
recipientIntegrationId:
title: Receiving customer profile integration ID
type: string
maxLength: 1000
description: The integration ID for this coupon's beneficiary's profile.
example: URNGV8294NV
validCharacters:
type: array
description: |
List of characters used to generate the random parts of a code. By default,
the list of characters is equivalent to the `[A-Z, 0-9]` regular expression.
items:
type: string
example:
- A
- B
- G
- 'Y'
couponPattern:
type: string
description: |
The pattern used to generate coupon codes.
The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set.
maxLength: 100
minLength: 3
example: SUMMER-#####
isReservationMandatory:
title: Is reservation mandatory
type: boolean
example: false
description: An indication of whether the code can be redeemed only if it has been reserved first.
default: false
implicitlyReserved:
title: Is coupon implicitly reserved for all customers
description: An indication of whether the coupon is implicitly reserved for all customers.
type: boolean
example: false
NewCouponsForMultipleRecipients:
allOf:
- $ref: '#/components/schemas/CouponConstraints'
- type: object
additionalProperties: false
required:
- recipientsIntegrationIds
- usageLimit
properties:
attributes:
type: object
description: Arbitrary properties associated with this item.
additionalProperties: true
example:
venueId: 12
recipientsIntegrationIds:
title: Receiving customer profiles integration IDs
type: array
example:
- URNGV8294NV
- BZGGC2454PA
items:
type: string
description: The integration IDs for recipients.
maxItems: 1000
minItems: 1
validCharacters:
type: array
description: |
List of characters used to generate the random parts of a code. By default, the list of
characters is equivalent to the `[A-Z, 0-9]` regular expression.
example:
- 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
items:
type: string
couponPattern:
type: string
description: |
The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set.
example: SUMMER-#####
maxLength: 100
minLength: 3
UpdateCoupon:
allOf:
- $ref: '#/components/schemas/CouponConstraints'
- $ref: '#/components/schemas/CouponLimitConfigs'
- type: object
additionalProperties: false
properties:
recipientIntegrationId:
title: Receiving customer profile integration ID
type: string
maxLength: 1000
description: The integration ID for this coupon's beneficiary's profile.
example: URNGV8294NV
attributes:
type: object
description: Arbitrary properties associated with this item.
additionalProperties: true
isReservationMandatory:
title: Is reservation mandatory
type: boolean
example: false
description: An indication of whether the code can be redeemed only if it has been reserved first.
default: false
implicitlyReserved:
title: Is coupon implicitly reserved for all customers
description: An indication of whether the coupon is implicitly reserved for all customers.
type: boolean
example: false
UpdateCouponBatch:
allOf:
- $ref: '#/components/schemas/CouponConstraints'
- type: object
additionalProperties: false
properties:
attributes:
type: object
description: |
Optional property to set the value of custom coupon attributes. They are defined in the Campaign Manager,
see [Managing attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes).
Coupon attributes can also be set to _mandatory_ in your Application [settings](https://docs.talon.one/docs/product/applications/using-attributes#making-attributes-mandatory).
If your Application uses mandatory attributes, you must use this property to set their value.
additionalProperties: true
batchID:
title: Batch ID
type: string
description: The ID of the batch the coupon(s) belong to.
Coupon:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/CampaignEntity'
- $ref: '#/components/schemas/CouponValue'
- $ref: '#/components/schemas/CouponConstraints'
- $ref: '#/components/schemas/CouponLimitConfigs'
- type: object
required:
- value
- usageCounter
- usageLimit
properties:
usageCounter:
type: integer
title: Total coupon redemptions
example: 10
description: The number of times the coupon has been successfully redeemed.
discountCounter:
type: number
title: Discounts Given
description: The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon.
example: 10
discountRemainder:
type: number
title: Coupon Discount Remainder
description: The remaining discount this coupon can give.
example: 5
reservationCounter:
type: number
title: Number of reservations
description: The number of times this coupon has been reserved.
example: 1
attributes:
type: object
title: Attributes of coupon
description: Custom attributes associated with this coupon.
additionalProperties: true
referralId:
type: integer
title: Advocate ID
description: The integration ID of the referring customer (if any) for whom this coupon was created as an effect.
example: 326632952
recipientIntegrationId:
title: Recipient ID
example: URNGV8294NV
type: string
maxLength: 1000
description: The Integration ID of the customer that is allowed to redeem this coupon.
importId:
title: Import ID
type: integer
description: The ID of the Import which created this coupon.
example: 4
reservation:
title: Reservation Type
type: boolean
example: false
description: |
Defines the reservation type:
- `true`: The coupon can be reserved for multiple customers.
- `false`: The coupon can be reserved only for one customer. It is a personal code.
default: true
batchId:
title: Batch ID
type: string
description: The id of the batch the coupon belongs to.
example: 32535-43255
isReservationMandatory:
title: Is reservation mandatory
type: boolean
example: false
description: An indication of whether the code can be redeemed only if it has been reserved first.
default: false
implicitlyReserved:
title: Is coupon implicitly reserved for all customers
description: An indication of whether the coupon is implicitly reserved for all customers.
type: boolean
example: false
IntegrationCoupon:
allOf:
- $ref: '#/components/schemas/Coupon'
- type: object
required:
- profileRedemptionCount
properties:
profileRedemptionCount:
type: integer
title: Coupon redemptions for the profile
description: The number of times the coupon was redeemed by the profile.
example: 5
InventoryCoupon:
allOf:
- $ref: '#/components/schemas/Coupon'
- type: object
required:
- state
- profileRedemptionCount
properties:
profileRedemptionCount:
type: integer
title: Number of coupon usages per profile
description: The number of times the coupon was redeemed by the profile.
example: 5
state:
type: string
example: active
description: |
Can be:
- `active`: The coupon can be used. It is a reserved coupon that is not pending, used, or expired, and it has a non-exhausted limit counter.
**Note:** This coupon state is returned for [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule), but the coupon cannot be used until the campaign is **running**.
- `used`: The coupon has been redeemed and cannot be used again. It is not pending and has reached its redemption limit or was redeemed by the profile before expiration.
- `expired`: The coupon was never redeemed, and it is now expired. It is non-pending, non-active, and non-used by the profile.
- `pending`: The coupon will be usable in the future.
- `disabled`: The coupon is part of a non-active campaign.
CampaignAnalytics:
allOf:
- type: object
required:
- date
- campaignRevenue
- totalCampaignRevenue
- campaignRefund
- totalCampaignRefund
- campaignDiscountCosts
- totalCampaignDiscountCosts
- campaignRefundedDiscounts
- totalCampaignRefundedDiscounts
- campaignFreeItems
- totalCampaignFreeItems
- referralRedemptions
- totalReferralRedemptions
- couponRedemptions
- totalCouponRedemptions
- couponRolledbackRedemptions
- totalCouponRolledbackRedemptions
- couponsCreated
- totalCouponsCreated
- referralsCreated
- totalReferralsCreated
- addedLoyaltyPoints
- totalAddedLoyaltyPoints
- deductedLoyaltyPoints
- totalDeductedLoyaltyPoints
properties:
date:
type: string
format: date-time
example: '2021-10-12T10:12:42Z'
campaignRevenue:
type: number
description: Amount of revenue in this campaign (for coupon or discount sessions).
example: 3539.76
totalCampaignRevenue:
type: number
description: Amount of revenue in this campaign since it began (for coupon or discount sessions).
example: 5784.63
campaignRefund:
type: number
description: Amount of refunds in this campaign (for coupon or discount sessions).
totalCampaignRefund:
type: number
description: Amount of refunds in this campaign since it began (for coupon or discount sessions).
campaignDiscountCosts:
type: number
description: Amount of cost caused by discounts given in the campaign.
totalCampaignDiscountCosts:
type: number
description: Amount of cost caused by discounts given in the campaign since it began.
campaignRefundedDiscounts:
type: number
description: Amount of discounts rolledback due to refund in the campaign.
totalCampaignRefundedDiscounts:
type: number
description: Amount of discounts rolledback due to refund in the campaign since it began.
campaignFreeItems:
type: integer
description: Amount of free items given in the campaign.
totalCampaignFreeItems:
type: integer
description: Amount of free items given in the campaign since it began.
example: 86
couponRedemptions:
type: integer
description: Number of coupon redemptions in the campaign.
totalCouponRedemptions:
type: integer
description: Number of coupon redemptions in the campaign since it began.
couponRolledbackRedemptions:
type: integer
description: Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign.
totalCouponRolledbackRedemptions:
type: integer
description: Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign since it began.
referralRedemptions:
type: integer
description: Number of referral redemptions in the campaign.
totalReferralRedemptions:
type: integer
description: Number of referral redemptions in the campaign since it began.
couponsCreated:
type: integer
description: Number of coupons created in the campaign by the rule engine.
totalCouponsCreated:
type: integer
description: Number of coupons created in the campaign by the rule engine since it began.
referralsCreated:
type: integer
description: Number of referrals created in the campaign by the rule engine.
totalReferralsCreated:
type: integer
description: Number of referrals created in the campaign by the rule engine since it began.
addedLoyaltyPoints:
type: number
description: Number of added loyalty points in the campaign in a specific interval.
example: 250
totalAddedLoyaltyPoints:
type: number
description: Number of added loyalty points in the campaign since it began.
example: 340
deductedLoyaltyPoints:
type: number
description: Number of deducted loyalty points in the campaign in a specific interval.
example: 120
totalDeductedLoyaltyPoints:
type: number
description: Number of deducted loyalty points in the campaign since it began.
example: 220
LoyaltyDashboardData:
type: object
description: Datapoint for the graphs and cards on a loyalty program dashboard.
required:
- date
- totalActivePoints
- totalPendingPoints
- totalSpentPoints
- totalExpiredPoints
- totalMembers
- newMembers
- spentPoints
- earnedPoints
properties:
date:
type: string
format: date-time
description: Date at which data point was collected.
totalActivePoints:
type: number
description: Total of active points for this loyalty program.
example: 9756
totalPendingPoints:
type: number
description: Total of pending points for this loyalty program.
example: 548
totalSpentPoints:
type: number
description: Total of spent points for this loyalty program.
example: 25668
totalExpiredPoints:
type: number
description: Total of expired points for this loyalty program.
example: 1156
totalMembers:
type: number
description: Number of loyalty program members.
example: 2582
newMembers:
type: number
description: Number of members who joined on this day.
example: 3
spentPoints:
description: Points spent on this day.
$ref: '#/components/schemas/LoyaltyDashboardPointsBreakdown'
earnedPoints:
description: Points that were earned on this day.
$ref: '#/components/schemas/LoyaltyDashboardPointsBreakdown'
LoyaltyDashboardPointsBreakdown:
type: object
required:
- createdManually
- createdViaRuleEngine
properties:
createdManually:
type: number
example: 125
createdViaRuleEngine:
type: number
example: 9631
ApplicationApiHealth:
type: object
description: Report of health of the API connection of an application.
required:
- summary
- lastUsed
properties:
summary:
type: string
description: |
One-word summary of the health of the API connection of an application. Possible values are:
- `OK`: The Application has received only successful API requests in the last 5 minutes.
- `WARNING`: The Application received at least one failed request in the last 50 minutes.
- `ERROR`: More than 50% of received requests failed.
- `CRITICAL`: All received requests failed.
- `NONE`: During the last 5 minutes, the Application hasn't recorded any integration API requests.
enum:
- OK
- WARNING
- ERROR
- CRITICAL
- NONE
lastUsed:
type: string
format: date-time
description: time of last request relevant to the API health test.
example: '2021-09-12T10:12:42Z'
AccessLogEntry:
type: object
description: Log of application accesses.
required:
- uuid
- status
- method
- requestUri
- time
- requestPayload
- responsePayload
properties:
uuid:
type: string
description: UUID reference of request.
example: 606e7d34-2d36-4d53-ac71-d4442c325985
status:
type: integer
description: HTTP status code of response.
example: 200
method:
type: string
description: HTTP method of request.
example: PUT
requestUri:
type: string
description: target URI of request
example: /v2/customer_sessions/Session136667
time:
type: string
format: date-time
description: timestamp of request
example: '2023-01-16T16:00:00.700763Z'
requestPayload:
type: string
description: payload of request
example: |-
{
"customerSession": {
"profileId": "customer123",
"state": "closed",
...
}
responsePayload:
type: string
description: payload of response
example: '{"coupons":[],"createdCoupons":[],...}'
WebhookLogEntry:
type: object
description: Log of webhook API calls.
required:
- id
- integrationRequestUuid
- webhookId
- url
- request
- requestTime
properties:
id:
type: string
description: UUID reference of the webhook request.
example: 2
integrationRequestUuid:
type: string
description: UUID reference of the integration request linked to this webhook request.
example: 472075793
webhookId:
type: integer
description: ID of the webhook that triggered the request.
example: 5
applicationId:
type: integer
description: ID of the application that triggered the webhook.
example: 12
url:
type: string
description: Target url of request
example: www.my-company.com/my-endpoint-name
request:
type: string
description: Request message
example: |
{
mydata: "somevalue"
}
response:
type: string
description: Response message
example: ''
status:
type: integer
description: HTTP status code of response.
example: 204
requestTime:
type: string
format: date-time
description: Timestamp of request
example: '2021-07-20T22:00:00Z'
responseTime:
type: string
format: date-time
description: Timestamp of response
example: '2021-07-20T22:00:50Z'
WebhookActivationLogEntry:
type: object
description: Log of activated webhooks.
required:
- integrationRequestUuid
- webhookId
- applicationId
- campaignId
- created
properties:
integrationRequestUuid:
type: string
description: UUID reference of the integration request that triggered the effect with the webhook.
example: 6d3699cf-95bd-444a-b62f-80d6e8391dc9
webhookId:
type: integer
description: ID of the webhook that triggered the request.
example: 1
applicationId:
type: integer
description: ID of the application that triggered the webhook.
example: 13
campaignId:
type: integer
description: ID of the campaign that triggered the webhook.
example: 86
created:
type: string
format: date-time
description: Timestamp of request
example: '2023-03-21T13:55:08.571144Z'
User:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/EmailEntity'
- $ref: '#/components/schemas/AccountEntity'
- type: object
required:
- inviteToken
- state
- name
- policy
properties:
name:
type: string
description: Name of the user.
example: John Doe
state:
type: string
enum:
- invited
- active
- deactivated
description: State of the user.
example: invited
inviteToken:
type: string
description: |
Invitation token of the user.
**Note**: If the user has already accepted their invitation, this is `null`.
example: Gy9b8w1irmQtEPo5RmbMmSPheL5h4
isAdmin:
type: boolean
description: Indicates whether the user is an `admin`.
example: false
policy:
type: object
format: acl
description: Access level of the user.
example:
Role: 127
Applications: null
roles:
type: array
description: A list of the IDs of the roles assigned to the user.
example:
- 71
items:
type: integer
authMethod:
type: string
description: Authentication method for this user.
example: basic_auth
applicationNotificationSubscriptions:
type: object
description: Application notifications that the user is subscribed to.
additionalProperties: true
example: null
lastSignedIn:
type: string
format: date-time
description: Timestamp when the user last signed in to Talon.One.
example: '2021-09-12T10:12:42Z'
lastAccessed:
type: string
format: date-time
description: Timestamp of the user's last activity after signing in to Talon.One.
example: '2021-09-12T10:14:42Z'
latestFeedTimestamp:
type: string
format: date-time
description: Timestamp when the user was notified for feed.
example: '2020-06-01T00:00:00Z'
additionalAttributes:
type: object
description: Additional user attributes, created and used by external identity providers.
additionalProperties: true
example: null
DeactivateUserRequest:
allOf:
- $ref: '#/components/schemas/EmailEntity'
ActivateUserRequest:
allOf:
- $ref: '#/components/schemas/EmailEntity'
DeleteUserRequest:
allOf:
- $ref: '#/components/schemas/EmailEntity'
ScimBaseUser:
type: object
description: Schema definition for base user fields, provisioned using the SCIM protocol and used by Talon.One.
properties:
active:
type: boolean
description: Status of the user.
example: true
displayName:
type: string
description: Display name of the user.
example: John Doe
userName:
type: string
description: Unique identifier of the user. This is usually an email address.
example: john.doe@example.com
name:
type: object
description: The components of the user’s real name.
properties:
formatted:
type: string
description: The full name, including all middle names, titles, and suffixes as appropriate, formatted for display.
example: Mr. John J Doe
ScimNewUser:
type: object
description: Payload for users that are created using the SCIM provisioning protocol with an identity provider, for example, Microsoft Entra ID.
required:
- userName
allOf:
- $ref: '#/components/schemas/ScimBaseUser'
- type: object
additionalProperties: true
description: Additional user properties, that are not processed by Talon.One, but only stored and returned in the User response.
ScimUser:
type: object
description: Schema definition for users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID.
allOf:
- $ref: '#/components/schemas/ScimNewUser'
- type: object
required:
- id
properties:
id:
type: string
description: ID of the user.
example: 359
ScimResource:
type: object
description: Resource definition for the SCIM provisioning protocol.
properties:
id:
type: string
description: ID of the resource.
name:
type: string
description: Name of the resource.
description:
type: string
description: Human-readable description of the resource.
example:
id: User
name: User
description: User Account
ScimSchemaResource:
type: object
description: Resource schema definition for the SCIM provisioning protocol.
properties:
id:
type: string
description: ID of the resource.
name:
type: string
description: Name of the resource.
description:
type: string
description: Human-readable description of the schema resource.
attributes:
type: array
items:
type: object
additionalProperties: true
description: Key-value attributes of the resource.
example:
id: urn:ietf:params:scim:schemas:core:2.0:User
name: User
description: User Account
attributes:
- name: userName
required: true
mutability: readWrite
- name: profileUrl
required: false
mutability: readWrite
ScimUsersListResponse:
type: object
description: List of users that have been provisioned using the SCIM protocol with an identity provider, for example, Microsoft Entra ID.
required:
- Resources
properties:
Resources:
type: array
items:
$ref: '#/components/schemas/ScimUser'
schemas:
type: array
description: SCIM schema for the given resource.
items:
type: string
example: urn:ietf:params:scim:api:messages:2.0:ListResponse
totalResults:
type: integer
description: Number of total results in the response.
example:
Resources:
- active: true
displayName: John Doe
id: 283
meta:
resourceType: User
created: '2024-06-25T17:43:46+02:00'
userName: john.doe@example.com
schemas:
- urn:ietf:params:scim:schemas:core:2.0:User
- urn:ietf:params:scim:schemas:extension:enterprise:2.0:User
schemas:
- urn:ietf:params:scim:api:messages:2.0:ListResponse
totalResults: 1
ScimPatchOperation:
type: object
description: Patch operation that is used to update the information.
required:
- op
properties:
op:
type: string
enum:
- add
- remove
- replace
description: The method that should be used in the operation.
path:
type: string
description: The path specifying the attribute that should be updated.
value:
type: string
description: The value that should be updated. Required if `op` is `add` or `replace`.
example:
op: add
path: nickName
value: John
ScimPatchRequest:
type: object
description: SCIM Patch request
required:
- Operations
properties:
schemas:
type: array
description: SCIM schema for the given resource.
items:
type: string
example: urn:ietf:params:scim:api:messages:2.0:PatchOp
Operations:
type: array
items:
$ref: '#/components/schemas/ScimPatchOperation'
example:
Operations:
- op: replace
path: active
value: false
- op: add
path: nickName
value: johndoe
schemas:
- urn:ietf:params:scim:api:messages:2.0:PatchOp
ScimResourceTypesListResponse:
type: object
description: List of resource types supported by the SCIM provisioning protocol.
required:
- Resources
properties:
Resources:
type: array
items:
$ref: '#/components/schemas/ScimResource'
ScimServiceProviderConfigResponse:
type: object
description: Service provider configuration details.
properties:
bulk:
type: object
description: Configuration related to bulk operations, which allow multiple SCIM requests to be processed in a single HTTP request.
properties:
maxOperations:
type: integer
description: The maximum number of individual operations that can be included in a single bulk request.
maxPayloadSize:
type: integer
description: The maximum size, in bytes, of the entire payload for a bulk operation request.
supported:
type: boolean
description: Indicates whether the SCIM service provider supports bulk operations.
changePassword:
type: object
description: Configuration settings related to the ability to change user passwords.
properties:
supported:
type: boolean
description: Indicates whether the service provider supports password changes via the SCIM API.
documentationUri:
type: string
description: The URI that points to the SCIM service provider's documentation, providing further details about the service's capabilities and usage.
filter:
type: object
description: Configuration settings related to filtering SCIM resources based on specific criteria.
properties:
maxResults:
type: integer
description: The maximum number of resources that can be returned in a single filtered query response.
supported:
type: boolean
description: Indicates whether the SCIM service provider supports filtering operations.
patch:
type: object
description: Configuration settings related to patch operations, which allow partial updates to SCIM resources.
properties:
supported:
type: boolean
description: Indicates whether the service provider supports patch operations for modifying resources.
schemas:
type: array
description: A list of SCIM schemas that define the structure and data types supported by the service provider.
items:
type: string
sort:
type: object
description: Configuration settings related to sorting SCIM resources in query responses.
properties:
supported:
type: boolean
description: Indicates whether the service provider supports sorting operations for ordered query results.
example:
bulk:
maxOperations: 1000
maxPayloadSize: 1048576
supported: true
changePassword:
supported: false
documentationUri: example.com/scim/docs
filter:
maxResults: 100
supported: true
patch:
supported: true
schemas:
- urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig
x-sort:
supported: false
ScimSchemasListResponse:
type: object
description: List of resource schemas supported by the SCIM provisioning protocol.
required:
- Resources
properties:
Resources:
type: array
items:
$ref: '#/components/schemas/ScimSchemaResource'
schemas:
type: array
description: SCIM schema for the given resource.
items:
type: string
example: urn:ietf:params:scim:api:messages:2.0:ListResponse
totalResults:
type: integer
description: Number of total results in the response.
NewInvitation:
type: object
description: Parameters for inviting a new user.
required:
- email
properties:
name:
type: string
description: Name of the user.
example: John Doe
email:
type: string
format: email
description: Email address of the user.
example: john.doe@example.com
isAdmin:
type: boolean
description: Indicates whether the user is an `admin`.
example: false
roles:
type: array
description: A list of the IDs of the roles assigned to the user.
items:
type: integer
example:
- 2
- 4
- 13
acl:
type: string
description: Indicates the access level of the user.
NewExternalInvitation:
type: object
description: Parameters for inviting a new user from an external identity provider.
required:
- email
properties:
name:
type: string
description: Name of the user.
example: John Doe
userGroups:
type: array
items:
type: string
description: |
List of user groups in the external identity provider.
If there are roles in Talon.One whose names match these user groups,
those roles will be automatically assigned to the user upon invitation.
example:
- Managers
- Customer support
email:
type: string
format: email
description: Email address of the user.
example: john.doe@example.com
Change:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/UserEntity'
- type: object
required:
- entity
properties:
applicationId:
type: integer
description: ID of application associated with change.
example: 359
entity:
type: string
description: API endpoint on which the change was initiated.
example: /v1/applications/359/campaigns/6727
old:
type: object
description: Resource before the change occurred.
additionalProperties: true
example: null
new:
type: object
description: Resource after the change occurred.
additionalProperties: true
example:
applicationId": 359
attributes": {}
campaignGroups": []
created": '2022-07-08T13:04:02.972762328Z'
description": ''
features":
- referrals
- loyalty
id: 6727
managementKeyId:
type: integer
description: ID of management key used to perform changes.
example: 3
AddLoyaltyPoints:
type: object
description: Points to add.
required:
- points
properties:
points:
type: number
minimum: 0
exclusiveMinimum: true
maximum: 999999999999.99
exclusiveMaximum: false
description: Amount of loyalty points.
example: 300
name:
type: string
description: Name / reason for the point addition.
example: Compensation
validityDuration:
type: string
description: |
The time format is either:
- `immediate` or,
- an **integer** followed by one letter indicating the time unit.
Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`.
Available units:
- `s`: seconds
- `m`: minutes
- `h`: hours
- `D`: days
- `W`: weeks
- `M`: months
- `Y`: years
You can round certain units up or down:
- `_D` for rounding down days only. Signifies the start of the day.
- `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year.
If passed, `validUntil` should be omitted.
example: 5D
validUntil:
type: string
format: date-time
description: |
Date and time when points should expire. The value should be provided in RFC 3339 format.
If passed, `validityDuration` should be omitted.
example: '2021-07-20T22:00:00Z'
pendingDuration:
type: string
description: |
The amount of time before the points are considered valid.
The time format is either:
- `immediate` or,
- an **integer** followed by one letter indicating the time unit.
Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`.
Available units:
- `s`: seconds
- `m`: minutes
- `h`: hours
- `D`: days
- `W`: weeks
- `M`: months
- `Y`: years
You can round certain units up or down:
- `_D` for rounding down days only. Signifies the start of the day.
- `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year.
example: 12h
pendingUntil:
type: string
format: date-time
description: |
Date and time after the points are considered valid. The value should be provided in RFC 3339 format.
If passed, `pendingDuration` should be omitted.
example: '2021-07-20T22:00:00Z'
subledgerId:
type: string
description: ID of the subledger the points are added to. If there is no existing subledger with this ID, the subledger is created automatically.
example: sub-123
applicationId:
type: integer
description: ID of the Application that is connected to the loyalty program. It is displayed in your Talon.One deployment URL.
example: 322
DeductLoyaltyPoints:
type: object
description: Points to deduct.
required:
- points
properties:
points:
type: number
minimum: 0
exclusiveMinimum: true
maximum: 999999999999.99
exclusiveMaximum: false
description: Amount of loyalty points.
example: 300
name:
type: string
description: Name / reason for the point deduction.
example: Penalty
subledgerId:
type: string
description: ID of the subledger the points are deducted from.
example: sub-123
applicationId:
type: integer
description: ID of the Application that is connected to the loyalty program.
example: 322
LoyaltyProgram:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/BaseLoyaltyProgram'
- type: object
description: A Loyalty Program
required:
- id
- name
- title
- description
- accountID
- defaultValidity
- defaultPending
- subscribedApplications
- allowSubledger
- timezone
- cardBased
- sandbox
properties:
id:
type: integer
description: The ID of loyalty program.
example: 139
accountID:
type: integer
description: The ID of the Talon.One account that owns this program.
example: 1
name:
type: string
description: The internal name for the Loyalty Program. This is an immutable value.
example: my_program
tiers:
type: array
description: The tiers in this loyalty program.
items:
$ref: '#/components/schemas/LoyaltyTier'
example:
- name: Gold
minPoints: 300
id: 3
created: '2021-06-10T09:05:27.993483Z'
programID: 139
- name: Silver
minPoints: 200
id: 2
created: '2021-06-10T09:04:59.355258Z'
programId: 139
- name: Bronze
minPoints: 100
id: 1
created: '2021-06-10T09:04:39.355258Z'
programId: 139
timezone:
type: string
description: A string containing an IANA timezone descriptor.
example: Europe/Berlin
minLength: 1
cardBased:
type: boolean
description: |
Defines the type of loyalty program:
- `true`: the program is a card-based.
- `false`: the program is profile-based.
default: false
example: true
canUpdateTiers:
type: boolean
description: |
`True` if the tier definitions can be updated.
default: false
example: true
canUpdateJoinPolicy:
type: boolean
description: |
`True` if the program join policy can be updated.
example: true
canUpdateTierExpirationPolicy:
type: boolean
description: |
`True` if the tier expiration policy can be updated.
example: true
canUpgradeToAdvancedTiers:
type: boolean
description: |
`True` if the program can be upgraded to use the `tiersExpireIn` and `tiersDowngradePolicy` properties.
default: false
example: true
canUpdateSubledgers:
type: boolean
description: |
`True` if the `allowSubledger` property can be updated in the loyalty program.
default: false
example: true
LoyaltyTier:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/LoyaltyProgramEntity'
- $ref: '#/components/schemas/NewLoyaltyTier'
NewLoyaltyTier:
type: object
description: A tier in a loyalty program.
required:
- name
- minPoints
properties:
name:
type: string
description: The name of the tier
example: Gold
minPoints:
type: number
minimum: 0
maximum: 999999999999.99
exclusiveMaximum: false
description: The minimum amount of points required to be eligible for the tier.
example: 300
BaseLoyaltyProgram:
type: object
properties:
title:
type: string
description: The display title for the Loyalty Program.
example: Point collection
description:
type: string
description: Description of our Loyalty Program.
example: Customers collect 10 points per 1$ spent
subscribedApplications:
type: array
description: A list containing the IDs of all applications that are subscribed to this Loyalty Program.
example:
- 132
- 97
items:
type: integer
defaultValidity:
type: string
description: |
The default duration after which new loyalty points should expire. Can be 'unlimited' or a specific time.
The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported:
- '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day.
- '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month.
example: 2W_U
defaultPending:
type: string
description: |
The default duration of the pending time after which points should be valid. Can be 'immediate' or a specific time.
The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported:
- '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day.
- '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month.
example: immediate
allowSubledger:
type: boolean
description: Indicates if this program supports subledgers inside the program.
example: false
usersPerCardLimit:
type: integer
minimum: 0
example: 111
description: |
The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit.
This property is only used when `cardBased` is `true`.
sandbox:
type: boolean
description: Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type.
title: Sandbox
example: true
programJoinPolicy:
type: string
enum:
- not_join
- points_activated
- points_earned
description: |
The policy that defines when the customer joins the loyalty program.
- `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points.
**Note**: The customer does not have a program join date.
- `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time.
- `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time.
tiersExpirationPolicy:
type: string
enum:
- tier_start_date
- program_join_date
- customer_attribute
- absolute_expiration
description: |
The policy that defines how tier expiration, used to reevaluate the customer's current tier, is determined.
- `tier_start_date`: The tier expiration is relative to when the customer joined the current tier.
- `program_join_date`: The tier expiration is relative to when the customer joined the loyalty program.
- `customer_attribute`: The tier expiration is determined by a custom customer attribute.
- `absolute_expiration`: The tier is reevaluated at the start of each tier cycle. For this policy, it is required to provide a `tierCycleStartDate`.
tierCycleStartDate:
type: string
format: date-time
description: |
Timestamp at which the tier cycle starts for all customers in the loyalty program.
**Note**: This is only required when the tier expiration policy is set to `absolute_expiration`.
example: '2021-09-12T10:12:42Z'
tiersExpireIn:
type: string
description: |
The amount of time after which the tier expires and is reevaluated.
The time format is an **integer** followed by one letter indicating the time unit.
Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`.
Available units:
- `s`: seconds
- `m`: minutes
- `h`: hours
- `D`: days
- `W`: weeks
- `M`: months
- `Y`: years
You can round certain units up or down:
- `_D` for rounding down days only. Signifies the start of the day.
- `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year.
example: 27W_U
tiersDowngradePolicy:
type: string
enum:
- one_down
- balance_based
description: |
The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation.
- `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier.
- `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment.
cardCodeSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
NewLoyaltyProgram:
allOf:
- $ref: '#/components/schemas/BaseLoyaltyProgram'
- type: object
description: A new loyalty program
required:
- name
- title
- defaultValidity
- defaultPending
- allowSubledger
- timezone
- cardBased
- sandbox
properties:
name:
type: string
description: The internal name for the Loyalty Program. This is an immutable value.
example: GeneralPointCollection
tiers:
type: array
description: The tiers in this loyalty program.
items:
$ref: '#/components/schemas/NewLoyaltyTier'
timezone:
type: string
description: A string containing an IANA timezone descriptor.
minLength: 1
cardBased:
type: boolean
description: |
Defines the type of loyalty program:
- `true`: the program is a card-based.
- `false`: the program is profile-based.
default: false
example: true
UpdateLoyaltyProgram:
allOf:
- $ref: '#/components/schemas/BaseLoyaltyProgram'
- type: object
description: An updated loyalty program.
properties:
tiers:
type: array
description: The tiers in this loyalty program.
items:
$ref: '#/components/schemas/NewLoyaltyTier'
LoyaltyLedgerEntry:
type: object
description: A single row of the ledger, describing one addition or deduction.
required:
- programID
- type
- amount
- created
- name
- subLedgerID
properties:
created:
type: string
format: date-time
example: '2021-07-20T22:00:00Z'
programID:
type: integer
example: 5
customerProfileID:
type: string
example: URNGV8294NV
cardID:
type: integer
example: 241
customerSessionID:
type: string
example: t2gy5s-47274
eventID:
type: integer
example: 5
type:
type: string
description: |
The type of the ledger transaction. Possible values are:
- `addition`
- `subtraction`
- `expire`
- `expiring` (for expiring points ledgers)
example: addition
amount:
type: number
example: 100
startDate:
type: string
format: date-time
example: '2021-07-20T22:00:00Z'
expiryDate:
type: string
format: date-time
example: '2022-07-20T22:00:00Z'
name:
type: string
description: A name referencing the condition or effect that added this entry, or the specific name provided in an API call.
example: Add points on purchase
subLedgerID:
type: string
description: This specifies if we are adding loyalty points to the main ledger or a subledger.
example: mysubledger
userID:
type: integer
description: This is the ID of the user who created this entry, if the addition or subtraction was done manually.
example: 499
archived:
type: boolean
description: Indicates if the entry belongs to the archived session.
example: false
LoyaltyCardBalances:
allOf:
- $ref: '#/components/schemas/LoyaltyBalances'
- type: object
description: List of customer profiles linked to the loyalty card.
properties:
profiles:
type: array
description: Customer profiles linked to the loyalty card.
items:
$ref: '#/components/schemas/LoyaltyCardProfileRegistration'
LoyaltyBalances:
type: object
description: List of loyalty balances for a ledger and its subledgers.
properties:
balance:
title: Loyalty points balance of a ledger
$ref: '#/components/schemas/LoyaltyBalance'
subledgerBalances:
type: object
description: Map of the loyalty balances of the subledgers of a ledger.
additionalProperties:
$ref: '#/components/schemas/LoyaltyBalance'
example:
mysubledger:
activePoints: 286
pendingPoints: 50
spentPoints: 150
expiredPoints: 25
LoyaltyBalance:
type: object
description: Point balance of a ledger in the Loyalty Program.
properties:
activePoints:
type: number
title: Current Balance
description: Total amount of points awarded to this customer and available to spend.
example: 286
pendingPoints:
type: number
title: Total pending points
description: Total amount of points awarded to this customer but not available until their start date.
example: 50
spentPoints:
type: number
title: Total spent points
description: Total amount of points already spent by this customer.
example: 150
expiredPoints:
type: number
title: Total expired points
description: Total amount of points awarded but never redeemed. They cannot be used anymore.
example: 286
LoyaltyBalanceWithTier:
allOf:
- $ref: '#/components/schemas/LoyaltyBalance'
- type: object
properties:
currentTier:
$ref: '#/components/schemas/Tier'
description: Customer's current tier.
example: bronze
projectedTier:
$ref: '#/components/schemas/ProjectedTier'
pointsToNextTier:
type: number
description: The number of points required to move up a tier.
example: 20
nextTierName:
type: string
description: The name of the tier consecutive to the current tier.
example: silver
LoyaltyLedger:
type: object
description: Ledger of Balance in Loyalty Program for a Customer.
required:
- ledger
properties:
ledger:
title: Customer's current loyalty program balance.
description: The balance of the main ledger in the loyalty program.
$ref: '#/components/schemas/LoyaltySubLedger'
subLedgers:
type: object
description: A map containing a list of all loyalty subledger balances.
additionalProperties:
$ref: '#/components/schemas/LoyaltySubLedger'
example:
mysubledger:
activePoints: 286
pendingPoints: 50
spentPoints: 150
expiredPoints: 25
LoyaltySubLedger:
type: object
description: Ledger of Balance in Loyalty Program for a Customer.
required:
- total
- totalActivePoints
- totalPendingPoints
- totalSpentPoints
- totalExpiredPoints
properties:
total:
type: number
title: Current Balance (Deprecated)
description: |
**DEPRECATED** Use `totalActivePoints` property instead. Total amount of currently active and available points in the customer's balance.
totalActivePoints:
type: number
title: Current Balance
description: Total amount of currently active and available points in the customer's balance.
totalPendingPoints:
type: number
title: Total pending points
description: Total amount of pending points, which are not active yet but will become active in the future.
totalSpentPoints:
type: number
title: Total spent points
description: Total amount of points already spent by this customer.
totalExpiredPoints:
type: number
title: Total expired points
description: Total amount of points, that expired without ever being spent.
transactions:
description: List of all events that have happened such as additions, subtractions and expiries.
type: array
items:
$ref: '#/components/schemas/LoyaltyLedgerEntry'
expiringPoints:
description: List of all points that will expire.
type: array
items:
$ref: '#/components/schemas/LoyaltyLedgerEntry'
activePoints:
description: List of all currently active points.
type: array
items:
$ref: '#/components/schemas/LoyaltyLedgerEntry'
pendingPoints:
description: List of all points pending activation.
type: array
items:
$ref: '#/components/schemas/LoyaltyLedgerEntry'
expiredPoints:
description: List of expired points.
type: array
items:
$ref: '#/components/schemas/LoyaltyLedgerEntry'
currentTier:
description: Tier for which the ledger is eligible.
$ref: '#/components/schemas/Tier'
LedgerInfo:
allOf:
- $ref: '#/components/schemas/LoyaltyProgramBalance'
- type: object
properties:
currentTier:
$ref: '#/components/schemas/Tier'
description: Tier for which the ledger is eligible.
example: bronze
pointsToNextTier:
type: number
description: Points required to move up a tier.
example: 20
Tier:
type: object
required:
- id
- name
properties:
id:
type: integer
description: The internal ID of the tier.
example: 11
name:
type: string
description: The name of the tier.
example: bronze
startDate:
type: string
format: date-time
description: Date and time when the customer moved to this tier. This value uses the loyalty program's time zone setting.
example: 2021-05-03T12:32:00Z07:00
expiryDate:
type: string
format: date-time
description: Date when tier level expires in the RFC3339 format (in the Loyalty Program's timezone).
example: 2022-08-02T15:04:05Z07:00
downgradePolicy:
type: string
enum:
- one_down
- balance_based
description: |
The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation.
- `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier.
- `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment.
ProjectedTier:
type: object
required:
- projectedActivePoints
properties:
projectedActivePoints:
type: number
description: The active points of the customer when their current tier expires.
example: 198
stayInTierPoints:
type: number
description: |
The number of points the customer needs to stay in the current tier.
**Note**: This is included in the response when the customer is projected to be downgraded.
example: 2
projectedTierName:
type: string
description: The name of the tier the user will enter once their current tier expires.
example: Tier 1
TimePoint:
type: object
required:
- hour
- minute
- second
description: |
The absolute duration after which the achievement ends and resets for a particular customer profile.
**Note**: The duration follows the time zone of the Application this achievement belongs to.
properties:
month:
type: integer
minimum: 1
maximum: 12
description: |
The achievement ends and resets in this month.
**Note**: Only applicable if the period is set to `Y`.
example: 11
dayOfMonth:
type: integer
minimum: 1
maximum: 31
description: |
The achievement ends and resets on this day of the month.
**Note**: Only applicable if the period is set to `Y` or `M`.
example: 23
dayOfWeek:
type: integer
minimum: 1
maximum: 7
description: |
The achievement ends and resets on this day of the week. `1` represents `Monday` and `7` represents `Sunday`.
**Note**: Only applicable if the period is set to `W`.
hour:
type: integer
description: The achievement ends and resets at this hour.
example: 23
minute:
type: integer
description: The achievement ends and resets at this minute.
example: 59
second:
type: integer
description: The achievement ends and resets at this second.
example: 59
example:
month: 11
dayOfMonth: 23
hour: 23
minute: 59
second: 59
LoyaltyCard:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/LoyaltyProgramEntity'
- $ref: '#/components/schemas/UpdateLoyaltyCard'
- type: object
required:
- identifier
- usersPerCardLimit
properties:
identifier:
$ref: '#/components/schemas/LoyaltyCardIdentifier'
usersPerCardLimit:
type: integer
minimum: 0
example: 111
description: |
The max amount of customer profiles that can be linked to the card. 0 means unlimited.
profiles:
type: array
description: Integration IDs of the customers profiles linked to the card.
items:
$ref: '#/components/schemas/LoyaltyCardProfileRegistration'
ledger:
description: Displays point balances of the card in the main ledger of the loyalty program.
$ref: '#/components/schemas/LedgerInfo'
subledgers:
type: object
description: Displays point balances of the card in the subledgers of the loyalty program.
additionalProperties:
$ref: '#/components/schemas/LedgerInfo'
modified:
type: string
format: date-time
description: Timestamp of the most recent update of the loyalty card.
example: '2021-09-12T10:12:42Z'
oldCardIdentifier:
description: The identifier of the card from which the points were transferred.
$ref: '#/components/schemas/LoyaltyCardIdentifier'
example: summer-loyalty-card-0543
newCardIdentifier:
description: The identifier of the card to which the points were transferred.
$ref: '#/components/schemas/LoyaltyCardIdentifier'
example: autumn-loyalty-card-5822
batchId:
description: The ID of the batch in which the loyalty card was created.
type: string
example: wdefpov
LoyaltyCardIdentifier:
type: string
description: |
The alphanumeric identifier of the loyalty card.
maxLength: 108
example: summer-loyalty-card-0543
CardLedgerTransactionLogEntry:
type: object
description: Log entry for a given loyalty card transaction.
required:
- created
- programId
- cardIdentifier
- type
- name
- startDate
- expiryDate
- subledgerId
- amount
- id
properties:
created:
type: string
format: date-time
description: Date and time the loyalty card transaction occurred.
example: 2022-01-02T15:04:05Z07:00
programId:
type: integer
description: ID of the loyalty program.
example: 324
cardIdentifier:
$ref: '#/components/schemas/LoyaltyCardIdentifier'
applicationId:
type: integer
description: The ID of the Application that owns this entity.
example: 322
sessionId:
description: |
The **internal** ID of the session.
type: integer
example: 233
customerSessionId:
type: string
description: ID of the customer session where the transaction occurred.
maxLength: 255
example: 05c2da0d-48fa-4aa1-b629-898f58f1584d
type:
type: string
enum:
- addition
- subtraction
description: |
Type of transaction. Possible values:
- `addition`: Signifies added points.
- `subtraction`: Signifies deducted points.
maxLength: 255
example: addition
name:
type: string
description: Name or reason of the loyalty ledger transaction.
maxLength: 255
example: Reward 10% points of a purchase's current total
startDate:
type: string
description: |
When points become active. Possible values:
- `immediate`: Points are immediately active.
- a timestamp value: Points become active at a given date and time.
maxLength: 64
example: 2022-01-02T15:04:05Z07:00
expiryDate:
type: string
description: |
Date when points expire. Possible values are:
- `unlimited`: Points have no expiration date.
- `timestamp value`: Points become active from the given date.
example: 2022-08-02T15:04:05Z07:00
subledgerId:
type: string
description: ID of the subledger.
maxLength: 64
example: sub-123
amount:
type: number
description: Amount of loyalty points added or deducted in the transaction.
example: 10.25
id:
type: integer
description: ID of the loyalty ledger entry.
example: 123
LoyaltyProgramTransaction:
type: object
required:
- id
- created
- programId
- type
- amount
- name
- subledgerId
- startDate
- expiryDate
properties:
id:
type: integer
description: ID of the loyalty ledger transaction.
example: 123
programId:
type: integer
description: ID of the loyalty program.
example: 324
campaignId:
type: integer
description: ID of the campaign.
example: 324
created:
type: string
format: date-time
description: Date and time the loyalty transaction occurred.
example: 2022-01-02T15:04:05Z07:00
type:
type: string
enum:
- addition
- subtraction
description: |
Type of transaction. Possible values:
- `addition`: Signifies added points.
- `subtraction`: Signifies deducted points.
maxLength: 255
example: addition
amount:
type: number
description: Amount of loyalty points added or deducted in the transaction.
example: 10.25
name:
type: string
description: Name or reason for the loyalty ledger transaction.
maxLength: 255
example: Reward 50 points for each $500 purchase
startDate:
type: string
description: |
When points become active. Possible values:
- `immediate`: Points are immediately active.
- a timestamp value: Points become active at a given date and time.
maxLength: 64
example: 2022-01-02T15:04:05Z07:00
expiryDate:
type: string
description: |
When points expire. Possible values:
- `unlimited`: Points have no expiration date.
- a timestamp value: Points expire at a given date and time.
example: 2022-01-02T15:04:05Z07:00
customerProfileId:
type: string
description: Customer profile integration ID used in the loyalty program.
maxLength: 255
example: kda0fajs0-fad9f-fd9dfsa9-fd9dasjf9
cardIdentifier:
$ref: '#/components/schemas/LoyaltyCardIdentifier'
subledgerId:
type: string
description: ID of the subledger.
maxLength: 64
example: sub-123
customerSessionId:
type: string
description: ID of the customer session where the transaction occurred.
maxLength: 255
example: 05c2da0d-48fa-4aa1-b629-898f58f1584d
importId:
type: integer
description: ID of the import where the transaction occurred.
example: 4
userId:
type: integer
description: ID of the user who manually added or deducted points. Applies only to manual transactions.
example: 5
userEmail:
type: string
description: The email of the Campaign Manager account that manually added or deducted points. Applies only to manual transactions.
example: john.doe@example.com
rulesetId:
type: integer
description: ID of the ruleset containing the rule that triggered the effect. Applies only for transactions that resulted from a customer session.
example: 11
ruleName:
type: string
description: Name of the rule that triggered the effect. Applies only for transactions that resulted from a customer session.
example: 10 points for every $100 spent
TransferLoyaltyCard:
type: object
required:
- newCardIdentifier
properties:
newCardIdentifier:
$ref: '#/components/schemas/LoyaltyCardIdentifier'
blockReason:
type: string
description: |
Reason for transferring and blocking the loyalty card.
example: Current card lost. Customer needs a new card.
UpdateLoyaltyCard:
type: object
required:
- status
properties:
status:
type: string
description: |
Status of the loyalty card. Can be `active` or `inactive`.
example: active
blockReason:
type: string
description: |
Reason for transferring and blocking the loyalty card.
example: Current card lost. Customer needs a new card.
LoyaltyCardProfileRegistration:
type: object
required:
- integrationId
- timestamp
properties:
integrationId:
type: string
maxLength: 1000
description: Integration ID of the customer profile linked to the card.
example: R195412
timestamp:
type: string
format: date-time
description: Timestamp the customer profile was linked to the card.
example: '2021-09-12T10:12:42Z'
LoyaltyProgramBalance:
type: object
required:
- currentBalance
- pendingBalance
- expiredBalance
- spentBalance
- tentativeCurrentBalance
description: The balance in a Loyalty Program for some Customer.
properties:
currentBalance:
type: number
title: Current balance
description: Sum of currently active points.
example: 100
pendingBalance:
type: number
title: Pending balance
description: Sum of pending points.
example: 10
expiredBalance:
type: number
title: Expired balance
description: |
**DEPRECATED** Value is shown as 0.
example: 0
spentBalance:
type: number
title: Spent balance
description: |
**DEPRECATED** Value is shown as 0.
example: 0
tentativeCurrentBalance:
type: number
title: Tentative current balance
description: Sum of the tentative active points (including additions and deductions) inside the currently open session. The `currentBalance` is updated to this value when you close the session, and the effects are applied.
example: 100
tentativePendingBalance:
type: number
title: Tentative pending balance
description: Sum of pending points (including additions and deductions) inside the currently open session. The `pendingBalance` is updated to this value when you close the session, and the effects are applied.
example: 20
CustomerProfileSearchQuery:
type: object
properties:
attributes:
type: object
description: Properties to match against a customer profile. All provided attributes will be exactly matched against profile attributes.
additionalProperties: true
integrationIDs:
type: array
items:
type: string
profileIDs:
type: array
items:
type: integer
NewCustomerProfile:
type: object
properties:
attributes:
type: object
description: Arbitrary properties associated with this item.
additionalProperties: true
example:
Language: english
ShippingCountry: DE
EvaluableCampaignIds:
type: object
properties:
evaluableCampaignIds:
type: array
items:
type: integer
maxLength: 999
description: |
When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine.
These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them.
title: Campaigns to evaluate
example:
- 10
- 12
CustomerProfile:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/IntegrationEntity'
- $ref: '#/components/schemas/NewCustomerProfile'
- type: object
properties:
accountId:
type: integer
title: Profile belongs to Account
description: The ID of the Talon.One account that owns this profile.
example: 31
closedSessions:
type: integer
title: Closed sessions
description: The total amount of closed sessions by a customer. A closed session is a successful purchase.
example: 3
totalSales:
type: number
description: |
The total amount of money spent by the customer **before** discounts are applied.
The total sales amount excludes the following:
- Cancelled or reopened sessions.
- Returned items.
example: 299.99
title: Total Sales
loyaltyMemberships:
type: array
description: |
**DEPRECATED** A list of loyalty programs joined by the customer.
items:
$ref: '#/components/schemas/LoyaltyMembership'
title: Loyalty programed joined
audienceMemberships:
type: array
description: The audiences the customer belongs to.
items:
$ref: '#/components/schemas/AudienceMembership'
title: Audience memberships
lastActivity:
type: string
format: date-time
title: Last activity
description: |
Timestamp of the most recent event received from this customer.
This field is updated on calls that trigger the Rule Engine and that are
not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay).
For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation)
for a customer doesn't impact this field.
example: '2020-02-08T14:15:20Z'
sandbox:
type: boolean
description: |
An indicator of whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments).
title: Sandbox
example: false
required:
- accountId
- closedSessions
- totalSales
- lastActivity
- attributes
LoyaltyCardBatch:
allOf:
- type: object
required:
- numberOfCards
properties:
numberOfCards:
type: integer
description: Number of loyalty cards in the batch.
example: 5000
batchId:
type: string
description: ID of the loyalty card batch.
minLength: 4
maxLength: 20
pattern: ^[A-Za-z0-9_-]*$
example: hwernpjz
status:
type: string
enum:
- active
- inactive
default: active
description: Status of the loyalty cards in the batch.
example: active
LoyaltyCardBatchResponse:
type: object
required:
- numberOfCardsGenerated
- batchId
properties:
numberOfCardsGenerated:
type: integer
description: Number of loyalty cards in the batch.
example: 5000
batchId:
type: string
description: ID of the loyalty card batch.
example: hwernpjz
NewCustomerSession:
allOf:
- $ref: '#/components/schemas/IntegrationProfileEntity'
- type: object
properties:
coupon:
type: string
maxLength: 100
description: Any coupon code entered.
title: Coupon entered in session
example: XMAS-2021
referral:
type: string
maxLength: 100
description: Any referral code entered.
title: Referral code entered in session
example: 2740-tbjua-6720
state:
type: string
enum:
- open
- closed
- partially_returned
- cancelled
default: open
example: open
description: |
Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are:
1. `open` → `closed`
2. `open` → `cancelled`
3. `closed` → `cancelled` or `partially_returned`
4. `partially_returned` → `cancelled`
For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions).
title: Customer's session state
cartItems:
type: array
description: Serialized JSON representation.
title: Items in customer's cart
items:
$ref: '#/components/schemas/CartItem'
identifiers:
type: array
maxItems: 5
items:
type: string
title: Session identifiers
description: |
Session custom identifiers that you can set limits on or use inside your rules.
For example, you can use IP addresses as identifiers to potentially identify devices
and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers).
example:
- 91.11.156.141
total:
type: number
title: Session Total
description: The total sum of the cart in one session.
attributes:
type: object
description: |
A key-value map of the sessions attributes. The potentially valid attributes are configured in your accounts developer settings.
additionalProperties: true
NewCustomerSessionV2:
description: The representation of the customer session.
allOf:
- $ref: '#/components/schemas/IntegrationProfileEntity'
- $ref: '#/components/schemas/IntegrationStoreEntity'
- $ref: '#/components/schemas/EvaluableCampaignIds'
- type: object
properties:
couponCodes:
type: array
items:
type: string
maxLength: 100
description: |
Any coupon codes entered.
**Important - for requests only**:
- If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it.
- In requests where `dry=false`, providing an empty array discards any previous coupons. To avoid this, provide `"couponCodes": null` or omit the parameter entirely.
title: Coupons entered in session
example:
- XMAS-20-2021
referralCode:
type: string
description: |
Any referral code entered.
**Important - for requests only**:
- If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it.
- In requests where `dry=false`, providing an empty value discards the previous referral code. To avoid this, provide `"referralCode": null` or omit the parameter entirely.
title: Referral code entered in session
maxLength: 100
example: NT2K54D9
loyaltyCards:
type: array
maxItems: 1
items:
type: string
description: Identifier of a loyalty card.
example:
- loyalty-card-1
state:
type: string
enum:
- open
- closed
- partially_returned
- cancelled
default: open
example: open
description: |
Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are:
1. `open` → `closed`
2. `open` → `cancelled`
3. Either:
- `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or
- `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems))
- `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession))
4. `partially_returned` → `cancelled`
For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions).
title: Customer's session state
cartItems:
type: array
description: |
The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request.
title: Customer session's cart items
items:
$ref: '#/components/schemas/CartItem'
additionalCosts:
type: object
description: |
Use this property to set a value for the additional costs of this session, such as a shipping cost.
They must be created in the Campaign Manager
before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs).
additionalProperties:
$ref: '#/components/schemas/AdditionalCost'
example:
shipping:
price: 9
identifiers:
type: array
maxItems: 5
items:
type: string
title: Session identifiers
description: |
Session custom identifiers that you can set limits on or use inside your rules.
For example, you can use IP addresses as identifiers to potentially identify devices
and limit discounts abuse in case of customers creating multiple accounts.
See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers).
**Important**: Ensure the session contains an identifier by the time you close it if:
- You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types)
for your campaign.
- Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview).
example:
- 91.11.156.141
attributes:
type: object
description: |
Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city.
You can use [built-in attributes](https://docs.talon.one/docs/dev/concepts/attributes#built-in-attributes) or [custom ones](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes).
Custom attributes must be created in the Campaign Manager before you set them with this property.
additionalProperties: true
example:
ShippingCity: Berlin
CustomerAnalytics:
description: A summary report of customer activity for a given time range.
allOf:
- type: object
properties:
acceptedCoupons:
type: integer
description: Total accepted coupons for this customer.
createdCoupons:
type: integer
description: Total created coupons for this customer.
freeItems:
type: integer
description: Total free items given to this customer.
totalOrders:
type: integer
description: Total orders made by this customer.
totalDiscountedOrders:
type: integer
description: Total orders made by this customer that had a discount.
totalRevenue:
type: number
description: Total Revenue across all closed sessions.
totalDiscounts:
type: number
description: The sum of discounts that were given across all closed sessions.
required:
- acceptedCoupons
- createdCoupons
- freeItems
- totalOrders
- totalDiscountedOrders
- totalRevenue
- totalDiscounts
CustomerActivityReport:
description: A summary report of customer activity for a given time range.
allOf:
- $ref: '#/components/schemas/IntegrationEntity'
- type: object
required:
- name
- customerId
- integrationId
- created
- couponRedemptions
- couponUseAttempts
- couponFailedAttempts
- accruedDiscounts
- accruedRevenue
- totalOrders
- totalOrdersNoCoupon
- campaignName
properties:
name:
type: string
description: The name for this customer profile.
customerId:
type: integer
description: The internal Talon.One ID of the customer.
lastActivity:
type: string
format: date-time
description: The last activity of the customer.
couponRedemptions:
type: integer
description: Number of coupon redemptions in all customer campaigns.
couponUseAttempts:
type: integer
description: Number of coupon use attempts in all customer campaigns.
couponFailedAttempts:
type: integer
description: Number of failed coupon use attempts in all customer campaigns.
accruedDiscounts:
type: number
description: Number of accrued discounts in all customer campaigns.
accruedRevenue:
type: number
description: Amount of accrued revenue in all customer campaigns.
totalOrders:
type: integer
description: Number of orders in all customer campaigns.
totalOrdersNoCoupon:
type: integer
description: Number of orders without coupon used in all customer campaigns.
campaignName:
type: string
description: The name of the campaign this customer belongs to.
CustomerSession:
allOf:
- $ref: '#/components/schemas/IntegrationEntity'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/NewCustomerSession'
- type: object
properties:
firstSession:
type: boolean
description: Indicates whether this is the first session for the customer's profile. Will always be true for anonymous sessions.
title: First session ever?
example: true
discounts:
type: object
title: Customer's current discounts
description: A map of labelled discount values, values will be in the same currency as the application associated with the session.
additionalProperties:
type: number
integrationId:
type: string
maxLength: 1000
updated:
type: string
format: date-time
description: Timestamp of the most recent event received on this session.
title: Last activity on the session
example: '2021-09-12T10:12:42Z'
required:
- profileId
- firstSession
- coupon
- referral
- state
- cartItems
- integrationId
- applicationId
- attributes
- discounts
- total
- updated
CustomerSessionV2:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/IntegrationEntity'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/NewCustomerSessionV2'
- type: object
properties:
firstSession:
type: boolean
description: Indicates whether this is the first session for the customer's profile. Will always be true for anonymous sessions.
title: First session ever?
example: true
total:
type: number
title: Session Total
description: The total value of cart items and additional costs in the session, before any discounts are applied.
example: 119.99
cartItemTotal:
type: number
title: Cart Items Total
description: The total value of cart items, before any discounts are applied.
example: 99.99
additionalCostTotal:
type: number
title: Additional Costs Total
description: The total value of additional costs, before any discounts are applied.
example: 20
updated:
type: string
format: date-time
description: Timestamp of the most recent event received on this session.
title: Last activity on the session
example: '2020-02-08T14:15:22Z'
required:
- profileId
- firstSession
- coupon
- referral
- state
- cartItems
- integrationId
- applicationId
- attributes
- total
- cartItemTotal
- additionalCostTotal
- updated
CartItem:
type: object
required:
- sku
- quantity
properties:
name:
title: Name of item
type: string
description: Name of item.
example: Air Glide
sku:
title: SKU of item
type: string
description: Stock keeping unit of item.
minLength: 1
example: SKU1241028
quantity:
title: Quantity of item
type: integer
description: |
Number of units of this item. Due to [cart item flattening](https://docs.talon.one/docs/product/rules/understanding-cart-item-flattening),
if you provide a quantity greater than 1, the item will be split in as many items as the provided quantity.
This will impact the number of **per-item** effects triggered from your campaigns.
minimum: 1
example: 1
returnedQuantity:
title: Returned quantity of item
type: integer
description: Number of returned items, calculated internally based on returns of this item.
example: 1
remainingQuantity:
title: Remaining quantity of item
type: integer
description: Remaining quantity of the item, calculated internally based on returns of this item.
example: 1
price:
title: Price of item
type: number
description: |
Price of the item in the currency defined by your Application. This field is required if this item is not part of a [catalog](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). If it is part of a catalog, setting a price here overrides the price from the catalog.
example: 99.99
category:
title: Item category
type: string
description: Type, group or model of the item.
example: shoes
product:
title: Item product
$ref: '#/components/schemas/Product'
weight:
title: Weight of item
type: number
description: Weight of item in grams.
example: 1130
height:
title: Height of item
type: number
description: Height of item in mm.
width:
title: Width of item
type: number
description: Width of item in mm.
length:
title: Length of item
type: number
description: Length of item in mm.
position:
title: Position of Cart Item
type: number
description: Position of the Cart Item in the Cart (calculated internally).
attributes:
title: Item attributes
type: object
description: |
Use this property to set a value for the attributes of your choice. [Attributes](https://docs.talon.one/docs/dev/concepts/attributes) represent any information to attach to this cart item.
Custom _cart item_ attributes must be created in the Campaign Manager before you set them with this property.
**Note:** Any previously defined attributes that you do not include in the array will be removed.
additionalProperties: true
example:
image: 11.jpeg
material: leather
additionalCosts:
type: object
description: |
Use this property to set a value for the additional costs of this item, such as a shipping cost. They must be created in the Campaign Manager
before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs).
additionalProperties:
$ref: '#/components/schemas/AdditionalCost'
example:
shipping:
price: 9
catalogItemID:
title: The catalog item ID
type: integer
description: The [catalog item ID](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/#synchronizing-a-cart-item-catalog).
NewApplicationCIF:
type: object
required:
- name
properties:
name:
type: string
description: The name of the Application cart item filter used in API requests.
example: Filter items by product
description:
type: string
description: A short description of the Application cart item filter.
example: This filter allows filtering by shoes
activeExpressionId:
type: integer
description: The ID of the expression that the Application cart item filter uses.
example: 1
modifiedBy:
type: integer
description: The ID of the user who last updated the Application cart item filter.
example: 334
createdBy:
type: integer
description: The ID of the user who created the Application cart item filter.
example: 216
modified:
type: string
format: date-time
description: Timestamp of the most recent update to the Application cart item filter.
ApplicationCIF:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/NewApplicationCIF'
- type: object
required:
- applicationId
properties:
applicationId:
type: integer
description: The ID of the application that owns this entity.
example: 322
NewApplicationCIFExpression:
type: object
properties:
cartItemFilterId:
type: integer
description: The ID of the Application cart item filter.
example: 216
createdBy:
type: integer
description: The ID of the user who created the Application cart item filter.
example: 216
expression:
type: array
description: Arbitrary additional JSON data associated with the Application cart item filter.
example:
expr:
- filter
- - .
- Session
- CartItems
- - - Item
- - catch
- false
- - '='
- - .
- Item
- Category
- Kitchen
items: {}
ApplicationCIFExpression:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/NewApplicationCIFExpression'
- type: object
required:
- applicationId
properties:
applicationId:
type: integer
description: The ID of the application that owns this entity.
example: 322
AdditionalCost:
type: object
required:
- price
properties:
price:
title: Price of additional cost
type: number
example: 4.5
IntegrationEvent:
allOf:
- $ref: '#/components/schemas/IntegrationProfileEntity'
- $ref: '#/components/schemas/IntegrationStoreEntity'
- type: object
properties:
type:
type: string
title: Event Type
description: A string representing the event. Must not be a reserved event name.
minLength: 1
example: pageViewed
attributes:
type: object
description: Arbitrary additional JSON data associated with the event.
additionalProperties: true
example:
myAttribute: myValue
required:
- type
- attributes
NewEvent:
allOf:
- $ref: '#/components/schemas/IntegrationEvent'
- type: object
properties:
sessionId:
type: string
description: The ID of the session that this event occurred in.
minLength: 1
example: 175KJPS947296
required:
- sessionId
Event:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/IntegrationEvent'
- type: object
required:
- effects
properties:
sessionId:
type: string
title: Session ID of Event
description: The ID of the session that this event occurred in.
example: 175KJPS947296
effects:
type: array
description: |
An array of effects generated by the rules of the enabled campaigns of the Application.
You decide how to apply them in your system. See the list of [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects).
items:
type: array
items: {}
ledgerEntries:
type: array
description: Ledger entries for the event.
items:
$ref: '#/components/schemas/LedgerEntry'
meta:
$ref: '#/components/schemas/Meta'
ApplicationCustomer:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/IntegrationEntity'
- $ref: '#/components/schemas/CustomerProfile'
- type: object
required:
- accountId
properties:
accountId:
type: integer
description: The ID of the Talon.One account that owns this profile.
advocateIntegrationId:
type: string
maxLength: 1000
description: The Integration ID of the Customer Profile that referred this Customer in the Application.
AudienceCustomer:
allOf:
- $ref: '#/components/schemas/CustomerProfile'
- type: object
properties:
connectedApplicationsIds:
type: array
description: A list of the IDs of the Applications that are connected to this customer profile.
example:
- 1
- 2
- 3
items:
type: integer
connectedAudiences:
type: array
description: A list of the IDs of the audiences that are connected to this customer profile.
example:
- 1
- 2
- 3
items:
type: integer
ApplicationReferee:
allOf:
- $ref: '#/components/schemas/ApplicationEntity'
- type: object
required:
- sessionId
- advocateIntegrationId
- friendIntegrationId
- code
- created
properties:
sessionId:
type: string
description: Integration ID of the session in which the customer redeemed the referral.
advocateIntegrationId:
type: string
maxLength: 1000
title: Advocate's Profile ID
description: Integration ID of the Advocate's Profile.
friendIntegrationId:
type: string
maxLength: 1000
title: Friend's Profile ID
description: Integration ID of the Friend's Profile.
code:
type: string
description: Advocate's referral code.
created:
type: string
format: date-time
description: Timestamp of the moment the customer redeemed the referral.
ApplicationSession:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/IntegrationEntity'
- $ref: '#/components/schemas/IntegrationStoreEntity'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/ApplicationCustomerEntity'
- type: object
properties:
profileintegrationid:
type: string
maxLength: 1000
description: Integration ID of the customer for the session.
example: 382370BKDB946
coupon:
type: string
description: Any coupon code entered.
example: BKDB946
referral:
type: string
description: Any referral code entered.
example: BKDB946
state:
type: string
enum:
- open
- closed
- partially_returned
- cancelled
description: |
Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are:
1. `open` → `closed`
2. `open` → `cancelled`
3. `closed` → `cancelled` or `partially_returned`
4. `partially_returned` → `cancelled`
For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions).
example: closed
cartItems:
type: array
description: Serialized JSON representation.
items:
$ref: '#/components/schemas/CartItem'
discounts:
type: object
description: |
**API V1 only.** A map of labeled discount values, in the same currency as the session.
If you are using the V2 endpoints, refer to the `totalDiscounts` property instead.
additionalProperties:
type: number
totalDiscounts:
type: number
description: The total sum of the discounts applied to this session.
example: 100
total:
type: number
description: The total sum of the session before any discounts applied.
example: 200
attributes:
type: object
description: Arbitrary properties associated with this item.
additionalProperties: true
required:
- coupon
- referral
- state
- cartItems
- discounts
- total
- totalDiscounts
ApplicationEvent:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/ApplicationCustomerEntity'
- $ref: '#/components/schemas/ApplicationStoreEntity'
- $ref: '#/components/schemas/IntegrationStoreEntity'
- type: object
required:
- type
- attributes
- effects
properties:
sessionId:
type: integer
description: The globally unique Talon.One ID of the session that contains this event.
type:
type: string
description: A string representing the event. Must not be a reserved event name.
attributes:
type: object
description: Additional JSON serialized data associated with the event.
additionalProperties: true
effects:
type: array
description: An array containing the effects that were applied as a result of this event.
items:
$ref: '#/components/schemas/Effect'
ruleFailureReasons:
type: array
description: An array containing the rule failure reasons which happened during this event.
items:
$ref: '#/components/schemas/RuleFailureReason'
NewAccount:
type: object
required:
- companyName
properties:
companyName:
type: string
minLength: 1
AccountAnalytics:
type: object
required:
- applications
- liveApplications
- sandboxApplications
- campaigns
- activeCampaigns
- liveActiveCampaigns
- coupons
- activeCoupons
- expiredCoupons
- referralCodes
- activeReferralCodes
- expiredReferralCodes
- activeRules
- users
- roles
- customAttributes
- webhooks
- loyaltyPrograms
- liveLoyaltyPrograms
- lastUpdatedAt
properties:
applications:
type: integer
description: Total number of applications in the account.
example: 11
liveApplications:
type: integer
description: Total number of live applications in the account.
example: 6
sandboxApplications:
type: integer
description: Total number of sandbox applications in the account.
example: 2
campaigns:
type: integer
description: Total number of campaigns in the account.
example: 35
activeCampaigns:
type: integer
description: Total number of active campaigns in the account.
example: 15
liveActiveCampaigns:
type: integer
description: Total number of active campaigns in live applications in the account.
example: 10
coupons:
type: integer
description: Total number of coupons in the account.
example: 850
activeCoupons:
type: integer
description: Total number of active coupons in the account.
example: 650
expiredCoupons:
type: integer
description: Total number of expired coupons in the account.
example: 200
referralCodes:
type: integer
description: Total number of referral codes in the account.
example: 500
activeReferralCodes:
type: integer
description: Total number of active referral codes in the account.
example: 100
expiredReferralCodes:
type: integer
description: Total number of expired referral codes in the account.
example: 400
activeRules:
type: integer
description: Total number of active rules in the account.
example: 35
users:
type: integer
description: Total number of users in the account.
roles:
type: integer
description: Total number of roles in the account.
example: 10
customAttributes:
type: integer
description: Total number of custom attributes in the account.
example: 18
webhooks:
type: integer
description: Total number of webhooks in the account.
example: 2
loyaltyPrograms:
type: integer
description: Total number of all loyalty programs in the account.
example: 5
liveLoyaltyPrograms:
type: integer
description: Total number of live loyalty programs in the account.
example: 5
lastUpdatedAt:
type: string
format: date-time
description: The point in time when the analytics numbers were updated last.
example: '2022-12-12T12:12:12Z'
Account:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/NewAccount'
- type: object
required:
- domainName
- state
- billingEmail
- applicationCount
- userCount
- campaignsActiveCount
- campaignsInactiveCount
properties:
domainName:
type: string
description: Subdomain Name for yourcompany.talon.one.
state:
type: string
enum:
- active
- deactivated
description: State of the account (active, deactivated).
billingEmail:
type: string
format: email
description: The billing email address associated with your company account.
planName:
type: string
description: The name of your booked plan.
planExpires:
type: string
format: date-time
description: The point in time at which your current plan expires.
applicationLimit:
type: integer
description: The maximum number of Applications covered by your plan.
userLimit:
type: integer
description: The maximum number of Campaign Manager Users covered by your plan.
campaignLimit:
type: integer
description: The maximum number of Campaigns covered by your plan.
apiLimit:
type: integer
description: The maximum number of Integration API calls covered by your plan per billing period.
applicationCount:
type: integer
description: The current number of Applications in your account.
userCount:
type: integer
description: The current number of Campaign Manager Users in your account.
campaignsActiveCount:
type: integer
description: The current number of active Campaigns in your account.
campaignsInactiveCount:
type: integer
description: The current number of inactive Campaigns in your account.
attributes:
type: object
description: Arbitrary properties associated with this campaign.
additionalProperties: true
NewAccountSignUp:
allOf:
- $ref: '#/components/schemas/LoginParams'
- $ref: '#/components/schemas/NewAccount'
NewUser:
allOf:
- $ref: '#/components/schemas/LoginParams'
- type: object
required:
- inviteToken
properties:
name:
type: string
description: Your name.
inviteToken:
type: string
minLength: 1
example: Gy9b8w1irmQtEPo5RmbMmSPheL5h4
UpdateUser:
type: object
properties:
name:
type: string
description: Name of the user.
example: John Doe
state:
type: string
enum:
- deactivated
- active
description: |
The state of the user.
- `deactivated`: The user has been deactivated.
- `active`: The user is active.
**Note**: Only `admin` users can update the state of another user.
example: deactivated
isAdmin:
type: boolean
description: Indicates whether the user is an `admin`.
example: false
policy:
type: string
description: Indicates the access level of the user.
example:
Role: 127
Applications: null
roles:
type: array
items:
type: integer
description: |
A list of the IDs of the roles assigned to the user.
**Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint.
example:
- 1
- 3
applicationNotificationSubscriptions:
type: object
description: Application notifications that the user is subscribed to.
additionalProperties: true
NewInviteEmail:
type: object
required:
- email
- token
properties:
email:
type: string
description: Email address of the user.
format: email
example: john.doe@example.com
token:
type: string
description: Invitation token of the user.
example: Gy9b8w1irmQtEPo5RmbMmSPheL5h4
NewPasswordEmail:
type: object
required:
- email
properties:
email:
type: string
format: email
minLength: 1
NewPassword:
type: object
required:
- password
- resetToken
properties:
password:
type: string
description: The new password for your account.
example: Admin&12943!7
resetToken:
type: string
minLength: 1
example: Z2VgacVNkexLKBUIzsRDDZSGxnIkC53y
Environment:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/ApplicationEntity'
- type: object
required:
- slots
- functions
- templates
- variables
properties:
slots:
type: array
description: The slots defined for this application.
items:
$ref: '#/components/schemas/SlotDef'
functions:
type: array
description: The functions defined for this application.
items:
$ref: '#/components/schemas/FunctionDef'
templates:
type: array
description: The templates defined for this application.
items:
$ref: '#/components/schemas/TemplateDef'
variables:
type: string
description: A stringified version of the environment's Talang variables scope.
giveawaysPools:
type: array
description: The giveaways pools that the application is subscribed to.
items:
$ref: '#/components/schemas/GiveawaysPool'
loyaltyPrograms:
type: array
description: The loyalty programs that the application is subscribed to.
items:
$ref: '#/components/schemas/LoyaltyProgram'
achievements:
type: array
description: The achievements, linked to the campaigns, belonging to the application.
items:
$ref: '#/components/schemas/Achievement'
attributes:
type: array
description: The attributes that the application is subscribed to.
items:
$ref: '#/components/schemas/Attribute'
additionalCosts:
type: array
description: The additional costs that the application is subscribed to.
items:
$ref: '#/components/schemas/AccountAdditionalCost'
audiences:
type: array
description: The audiences contained in the account which the application belongs to.
items:
$ref: '#/components/schemas/Audience'
collections:
type: array
description: The account-level collections that the application is subscribed to.
items:
$ref: '#/components/schemas/Collection'
applicationCartItemFilters:
type: array
description: The cart item filters belonging to the Application.
items:
$ref: '#/components/schemas/ApplicationCIF'
SlotDef:
type: object
required:
- name
- type
- title
- writable
properties:
name:
type: string
description: The dot-separated path to this slot for use in Talang.
type:
type: string
description: The type of this slot, one of string, number, boolean, or list[type].
title:
type: string
description: Campaigner-friendly name for the slot.
description:
type: string
description: A short description of the slot.
help:
type: string
description: Extended help text for the slot.
writable:
type: boolean
description: Whether or not this slot can be updated by rule effects.
FuncArgDef:
type: object
required:
- type
properties:
type:
type: string
enum:
- string
- boolean
- number
- time
- (list string)
description: The type of value this argument expects.
minLength: 1
description:
type: string
description: A campaigner-friendly description of the argument, this will also be shown in the rule editor.
TemplateArgDef:
allOf:
- $ref: '#/components/schemas/FuncArgDef'
- type: object
required:
- ui
- title
properties:
title:
type: string
description: A campaigner friendly name for the argument, this will be shown in the rule editor.
minLength: 1
ui:
type: object
description: Arbitrary metadata that may be used to render an input for this argument.
additionalProperties: true
picklistID:
type: integer
description: ID of the picklist linked to a template.
restrictedByPicklist:
type: boolean
description: Whether or not this attribute's value is restricted by picklist (`picklist` property)
FunctionDef:
type: object
required:
- name
- type
- args
properties:
name:
type: string
description: The function name used in Talang.
minLength: 1
type:
type: string
description: The type of this function argument.
description:
type: string
description: A short description of the function.
help:
type: string
description: Extended help text for the function.
args:
type: array
description: An array of argument definitions.
items:
$ref: '#/components/schemas/FuncArgDef'
CampaignTemplateParams:
type: object
required:
- name
- type
- description
properties:
name:
type: string
description: Name of the campaign template parameter.
minLength: 1
example: discount_value
type:
type: string
enum:
- string
- number
- boolean
- percent
- (list string)
- time
description: Defines the type of parameter value.
example: number
description:
type: string
description: Explains the meaning of this template parameter and the placeholder value that will define it. It is used on campaign creation from this template.
example: This is a template parameter of type `number`.
attributeId:
type: integer
description: ID of the corresponding attribute.
example: 42
UpdateCampaignTemplate:
type: object
required:
- name
- state
- description
- instructions
- applicationsIds
properties:
name:
type: string
description: The campaign template name.
minLength: 1
example: Discount campaign
description:
type: string
description: Customer-facing text that explains the objective of the template.
example: This is a template for a discount campaign.
instructions:
type: string
description: Customer-facing text that explains how to use the template. For example, you can use this property to explain the available attributes of this template, and how they can be modified when a user uses this template to create a new campaign.
example: Use this template for discount campaigns. Set the campaign properties according to the campaign goals, and don't forget to set an end date.
campaignAttributes:
type: object
description: The campaign attributes that campaigns created from this template will have by default.
additionalProperties: true
couponAttributes:
type: object
description: The campaign attributes that coupons created from this template will have by default.
additionalProperties: true
state:
type: string
enum:
- draft
- enabled
- disabled
description: Only campaign templates in 'available' state may be used to create campaigns.
activeRulesetId:
type: integer
description: The ID of the ruleset this campaign template will use.
example: 5
tags:
type: array
description: A list of tags for the campaign template.
maxItems: 50
example:
- discount
items:
type: string
minLength: 1
maxLength: 50
features:
type: array
description: A list of features for the campaign template.
items:
type: string
enum:
- coupons
- referrals
- loyalty
- giveaways
- strikethrough
- achievements
couponSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
referralSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
limits:
type: array
description: The set of limits that operate for this campaign template.
items:
$ref: '#/components/schemas/TemplateLimitConfig'
templateParams:
type: array
description: Fields which can be used to replace values in a rule.
items:
$ref: '#/components/schemas/CampaignTemplateParams'
applicationsIds:
type: array
description: A list of IDs of the Applications that are subscribed to this campaign template.
items:
type: integer
example:
- 1
- 2
- 3
campaignCollections:
type: array
description: The campaign collections from the blueprint campaign for the template.
items:
$ref: '#/components/schemas/CampaignTemplateCollection'
defaultCampaignGroupId:
type: integer
description: The default campaign group ID.
example: 42
campaignType:
type: string
enum:
- cartItem
- advanced
default: advanced
example: advanced
description: |
The campaign type. Possible type values:
- `cartItem`: Type of campaign that can apply effects only to cart items.
- `advanced`: Type of campaign that can apply effects to customer sessions and cart items.
CampaignTemplateCollection:
type: object
required:
- name
properties:
name:
type: string
minLength: 1
pattern: ^[A-Za-z](\w|\s)*$
description: The name of this collection.
example: My collection
description:
type: string
description: A short description of the purpose of this collection.
example: My collection of SKUs
CampaignTemplate:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/UserEntity'
- $ref: '#/components/schemas/UpdateCampaignTemplate'
- type: object
required:
- validApplicationIds
- applicationIds
- campaignType
properties:
applicationsIds:
type: array
items:
type: integer
example:
- 1
- 2
- 3
updated:
type: string
format: date-time
description: Timestamp of the most recent update to the campaign template or any of its elements.
example: '2022-08-24T14:15:22Z'
updatedBy:
type: string
description: Name of the user who last updated this campaign template, if available.
example: Jane Doe
validApplicationIds:
type: array
description: The IDs of the Applications that are related to this entity.
items:
type: integer
example:
- 1
- 2
- 3
CreateTemplateCampaign:
type: object
required:
- name
- templateId
properties:
name:
type: string
title: Campaign Name
description: A user-facing name for this campaign.
example: Discount campaign
minLength: 1
description:
type: string
title: Campaign Description
description: A detailed description of the campaign.
example: This template is for discount campaigns.
templateId:
type: integer
description: The ID of the Campaign Template which will be used in order to create the Campaign.
example: 4
campaignAttributesOverrides:
type: object
description: Custom Campaign Attributes. If the Campaign Template defines the same values, they will be overridden.
additionalProperties: true
templateParamValues:
type: array
description: Actual values to replace the template placeholder values in the Ruleset bindings. Values for all Template Parameters must be provided.
items:
$ref: '#/components/schemas/Binding'
limitOverrides:
type: array
description: Limits for this Campaign. If the Campaign Template or Application define default values for the same limits, they will be overridden.
items:
$ref: '#/components/schemas/LimitConfig'
campaignGroups:
type: array
description: |
The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups) this campaign belongs to.
example:
- 1
- 3
items:
type: integer
tags:
type: array
description: A list of tags for the campaign. If the campaign template has tags, they will be overridden by this list.
example:
- summer
maxItems: 50
items:
type: string
minLength: 1
maxLength: 50
evaluationGroupId:
type: integer
example: 2
description: The ID of the campaign evaluation group the campaign belongs to.
linkedStoreIds:
type: array
description: |
A list of store IDs that are linked to the campaign.
**Note:** Campaigns with linked store IDs will only be evaluated when there is a
[customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)
that references a linked store.
items:
type: integer
example:
- 1
- 2
- 3
CreateTemplateCampaignResponse:
type: object
required:
- campaign
- ruleset
properties:
campaign:
$ref: '#/components/schemas/Campaign'
ruleset:
$ref: '#/components/schemas/Ruleset'
collections:
type: array
items:
$ref: '#/components/schemas/Collection'
NewTemplateDef:
type: object
required:
- title
- category
- args
- expr
properties:
title:
type: string
description: Campaigner-friendly name for the template that will be shown in the rule editor.
minLength: 1
description:
type: string
description: A short description of the template that will be shown in the rule editor.
help:
type: string
description: Extended help text for the template.
category:
description: Used for grouping templates in the rule editor sidebar.
type: string
minLength: 1
expr:
type: array
description: A Talang expression that contains variable bindings referring to args.
items: {}
args:
type: array
description: An array of argument definitions.
items:
$ref: '#/components/schemas/TemplateArgDef'
expose:
type: boolean
description: A flag to control exposure in Rule Builder.
default: false
TemplateDef:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/NewTemplateDef'
- type: object
required:
- name
- description
- help
properties:
name:
type: string
description: The template name used in Talang.
minLength: 1
NewAttribute:
allOf:
- type: object
required:
- entity
- name
- title
- type
- description
- suggestions
- editable
properties:
entity:
type: string
description: The name of the entity that can have this attribute. When creating or updating the entities of a given type, you can include an `attributes` object with keys corresponding to the `name` of the custom attributes for that type.
enum:
- Application
- Campaign
- CustomerProfile
- CustomerSession
- CartItem
- Coupon
- Event
- Giveaway
- Referral
- Store
example: Event
eventType:
type: string
example: pageViewed
name:
type: string
pattern: ^[A-Za-z]\w*$
description: The attribute name that will be used in API requests and Talang. E.g. if `name == "region"` then you would set the region attribute by including an `attributes.region` property in your request payload.
example: pageViewed
title:
type: string
pattern: ^[A-Za-z][A-Za-z0-9_.!~*'() -]*$
description: The human-readable name for the attribute that will be shown in the Campaign Manager. Like `name`, the combination of entity and title must also be unique.
example: Page view event
type:
type: string
enum:
- string
- number
- boolean
- time
- (list string)
- (list number)
- (list time)
- location
- (list location)
description: The data type of the attribute, a `time` attribute must be sent as a string that conforms to the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) timestamp format.
example: string
description:
type: string
description: A description of this attribute.
example: Event triggered when a customer displays a page.
suggestions:
type: array
description: A list of suggestions for the attribute.
maxItems: 50
items:
type: string
minLength: 1
hasAllowedList:
type: boolean
description: Whether or not this attribute has an allowed list of values associated with it.
default: false
example: false
restrictedBySuggestions:
type: boolean
description: |
Whether or not this attribute's value is restricted by suggestions (`suggestions` property)
or by an allowed list of value (`hasAllowedList` property).
default: false
example: false
editable:
type: boolean
description: Whether or not this attribute can be edited.
example: true
subscribedApplicationsIds:
type: array
description: A list of the IDs of the applications where this attribute is available.
items:
type: integer
example:
- 1
- 4
- 9
subscribedCatalogsIds:
type: array
description: A list of the IDs of the catalogs where this attribute is available.
items:
type: integer
example:
- 2
- 5
allowedSubscriptions:
type: array
description: |
A list of allowed subscription types for this attribute.
**Note:** This only applies to attributes associated with the `CartItem` entity.
example:
- application
- catalog
maxItems: 2
items:
type: string
enum:
- application
- catalog
Attribute:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/NewAttribute'
- type: object
properties:
eventTypeId:
type: integer
example: 22
NewAdditionalCost:
allOf:
- type: object
required:
- name
- title
- description
properties:
name:
type: string
pattern: ^[A-Za-z]\w*$
description: The internal name used in API requests.
example: shippingFee
title:
type: string
pattern: ^[A-Za-z][A-Za-z0-9_.!~*'() -]*$
description: The human-readable name for the additional cost that will be shown in the Campaign Manager. Like `name`, the combination of entity and title must also be unique.
example: Shipping fee
description:
type: string
description: A description of this additional cost.
example: A shipping fee
subscribedApplicationsIds:
type: array
description: A list of the IDs of the applications that are subscribed to this additional cost.
items:
type: integer
example:
- 3
- 13
type:
type: string
enum:
- session
- item
- both
example: session
description: |
The type of additional cost. Possible value:
- `session`: Additional cost will be added per session.
- `item`: Additional cost will be added per item.
- `both`: Additional cost will be added per item and session.
default: session
AccountAdditionalCost:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/NewAdditionalCost'
NewEventType:
allOf:
- type: object
required:
- title
- name
properties:
title:
type: string
minLength: 1
description: The human-friendly name for this event type.
example: Survey Completed
name:
type: string
minLength: 1
description: The integration name for this event type. This will be used in URLs and cannot be changed after an event type has been created.
example: surveyCompleted
description:
type: string
description: |
A description of what the event represents.
example: The survey was submitted by the customer.
EventType:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/NewEventType'
NewWebhook:
allOf:
- $ref: '#/components/schemas/MultiApplicationEntity'
- type: object
required:
- title
- verb
- url
- headers
- params
- enabled
properties:
title:
type: string
pattern: ^[A-Za-z][A-Za-z0-9_.!~*'() -]*$
description: Name or title for this webhook.
example: Send message
description:
type: string
description: A description of the webhook.
example: A webhook to send a coupon to the user.
verb:
type: string
enum:
- POST
- PUT
- GET
- DELETE
- PATCH
description: API method for this webhook.
example: POST
url:
type: string
description: API URL (supports templating using parameters) for this webhook.
example: www.my-company.com/my-endpoint-name
headers:
type: array
description: List of API HTTP headers for this webhook.
items:
type: string
pattern: ^([^:,]*):([^]*|[^,]*)$
example:
- '{"Authorization": "Basic bmF2ZWVua3VtYXIU="}'
- '{"Content-Type": "application/json"}'
payload:
type: string
description: API payload (supports templating using parameters) for this webhook.
example: "{\n\t\"message\": \"${message}\"\n}"
params:
type: array
description: Array of template argument definitions.
items:
$ref: '#/components/schemas/TemplateArgDef'
example: []
enabled:
type: boolean
description: Enables or disables webhook from showing in the Rule Builder.
example: true
Webhook:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/MultiApplicationEntity'
- $ref: '#/components/schemas/NewWebhook'
- type: object
WebhookWithOutgoingIntegrationDetails:
allOf:
- $ref: '#/components/schemas/Webhook'
- type: object
properties:
outgoingIntegrationTemplateId:
type: integer
description: Identifier of the outgoing integration template.
example: 1
outgoingIntegrationTypeId:
type: integer
description: Identifier of the outgoing integration type.
example: 1
outgoingIntegrationTypeName:
type: string
description: Name of the outgoing integration.
example: Braze
AudienceIntegrationID:
type: object
properties:
integrationId:
type: string
minLength: 1
maxLength: 1000
description: The ID of this audience in the third-party integration.
example: 382370BKDB946
NewMultipleAudiencesItem:
allOf:
- $ref: '#/components/schemas/UpdateAudience'
- $ref: '#/components/schemas/AudienceIntegrationID'
- type: object
required:
- name
MultipleAudiencesItem:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/NewMultipleAudiencesItem'
- type: object
required:
- name
- integrationId
- status
properties:
status:
type: string
description: |
Indicates whether the audience is new, updated or unmodified by the request.
enum:
- unmodified
- updated
- new
example: new
NewInternalAudience:
type: object
required:
- name
properties:
name:
type: string
minLength: 1
description: The human-friendly display name for this audience.
example: Travel audience
sandbox:
type: boolean
description: Indicates if this is a live or sandbox Application.
example: true
description:
type: string
description: A description of the audience.
example: Travel audience 18-27
NewAudience:
allOf:
- $ref: '#/components/schemas/NewInternalAudience'
- type: object
required:
- name
properties:
integration:
type: string
description: |
The Talon.One-supported [3rd-party platform](https://docs.talon.one/docs/dev/technology-partners/overview) that this audience was created in.
For example, `mParticle`, `Segment`, `Selligent`, `Braze`, or `Iterable`.
**Note:** If you do not integrate with any of these platforms, do not use this property.
example: mparticle
integrationId:
type: string
minLength: 1
maxLength: 1000
description: |
The ID of this audience in the third-party integration.
**Note:** To create an audience that doesn't come from a 3rd party platform, do not use this property.
example: 382370BKDB946
createdIn3rdParty:
type: boolean
description: Determines if this audience is a 3rd party audience or not.
example: false
lastUpdate:
type: string
format: date-time
description: The last time that the audience memberships changed.
example: '2022-04-26T11:02:38Z'
UpdateAudience:
type: object
required:
- name
properties:
name:
type: string
minLength: 1
description: The human-friendly display name for this audience.
example: Travel audience
Audience:
allOf:
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/NewAudience'
AudienceAnalytics:
type: object
description: The audiences and their member count.
properties:
audienceId:
type: integer
description: The ID of the audience.
example: 1
membersCount:
type: integer
description: The member count of the audience.
example: 1234
Export:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/UserEntity'
- type: object
required:
- entity
- filter
properties:
entity:
type: string
enum:
- Coupon
- Referral
- Effect
- CustomerSession
- LoyaltyLedger
- LoyaltyLedgerLog
- Collection
description: The name of the entity that was exported.
filter:
type: object
description: Map of keys and values that were used to filter the exported rows.
additionalProperties: true
Import:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/UserEntity'
- type: object
required:
- amount
- entity
properties:
entity:
type: string
example: AttributeAllowedList
description: |
The name of the entity that was imported.
amount:
type: integer
minimum: 0
example: 10
description: The number of values that were imported.
FeaturesFeed:
allOf:
- type: object
properties:
title:
type: string
pubDate:
type: string
LibraryAttribute:
allOf:
- type: object
required:
- entity
- name
- title
- type
- description
- presets
- tags
- suggestions
properties:
entity:
type: string
description: The name of the entity that can have this attribute. When creating or updating the entities of a given type, you can include an `attributes` object with keys corresponding to the `name` of the custom attributes for that type.
enum:
- Application
- Campaign
- CustomerProfile
- CustomerSession
- CartItem
- Coupon
- Event
name:
type: string
description: |
The attribute name that will be used in API requests and Talang. E.g. if `name == "region"` then you would set the region attribute by including an `attributes.region` property in your request payload.
title:
type: string
description: The human-readable name for the attribute that will be shown in the Campaign Manager. Like `name`, the combination of entity and title must also be unique.
type:
type: string
enum:
- string
- number
- boolean
- time
description: The data type of the attribute, a `time` attribute must be sent as a string that conforms to the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) timestamp format.
description:
type: string
description: A description of the attribute.
presets:
type: array
description: The presets that indicate to which industry the attribute applies to.
items:
type: string
suggestions:
type: array
description: Short suggestions that are used to group attributes.
items:
type: string
TalangAttribute:
allOf:
- type: object
required:
- name
- type
- visible
- kind
- campaignsCount
properties:
entity:
type: string
description: The name of the entity of the attribute.
enum:
- AdvocateProfile
- Account
- Application
- AwardedGiveaway
- Bundle
- Campaign
- CartItem
- Coupon
- CustomerProfile
- CustomerSession
- Event
- Item
- Loyalty
- Profile
- Giveaway
- Referral
- Session
- Store
- Achievements
name:
type: string
description: |
The attribute name that will be used in API requests and Talang. E.g. if `name == "region"` then you would set the region attribute by including an `attributes.region` property in your request payload.
title:
type: string
description: The name of the attribute that is displayed to the user in the Campaign Manager.
type:
type: string
description: The talang type of the attribute.
description:
type: string
description: A description of the attribute.
visible:
type: boolean
default: true
description: Indicates whether the attribute is visible in the UI or not.
kind:
type: string
description: Indicate the kind of the attribute.
enum:
- built-in
- custom
campaignsCount:
type: integer
description: The number of campaigns that refer to the attribute.
exampleValue:
type: array
description: Examples of values that can be assigned to the attribute.
items:
type: string
Role:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/AccountEntity'
- type: object
required:
- name
- acl
properties:
campaignGroupID:
type: integer
description: |
The ID of the [Campaign Group](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups)
this role was created for.
example: 3
name:
type: string
description: Name of the role.
example: Campaign Reviewer
description:
type: string
description: Description of the role.
example: Reviews the campaigns
members:
type: array
items:
type: integer
description: A list of user identifiers assigned to this role.
example:
- 48
- 562
- 475
- 18
acl:
type: object
format: aclRole
description: The `Access Control List` json defining the role of the user. This represents the access control on the user level.
example:
Role: 127
Applications: null
NewRole:
allOf:
- $ref: '#/components/schemas/UpdateRole'
- type: object
required:
- name
- acl
- members
UpdateRole:
type: object
properties:
name:
type: string
description: Name of the role.
example: Campaign Manager
description:
type: string
description: Description of the role.
example: Manages the campaigns
acl:
type: string
description: The `Access Control List` json defining the role of the user. This represents the access control on the user level.
example:
Role: 128
Applications: null
members:
type: array
items:
type: integer
description: An array of user identifiers.
example:
- 48
- 562
- 475
- 18
RoleAssign:
allOf:
- type: object
required:
- users
- roles
properties:
users:
type: array
items:
type: integer
description: An array of user IDs.
example:
- 48
- 562
- 475
- 18
roles:
type: array
items:
type: integer
description: An array of role IDs.
example:
- 128
- 147
NewRoleV2:
allOf:
- $ref: '#/components/schemas/RoleV2Base'
- type: object
required:
- name
- description
UpdateRoleV2:
$ref: '#/components/schemas/RoleV2Base'
RoleV2:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/RoleV2Base'
RoleV2Base:
type: object
properties:
name:
type: string
description: Name of the role.
example: Campaign and campaign access group manager
description:
type: string
description: Description of the role.
example: Allows you to create and edit campaigns for specific Applications, delete specific campaign access groups, and view loyalty programs.
permissions:
type: object
$ref: '#/components/schemas/RoleV2Permissions'
description: The permissions that this role gives.
members:
type: array
items:
type: integer
description: A list of user IDs the role is assigned to.
example:
- 10
- 12
RoleV2Permissions:
type: object
properties:
permissionSets:
type: array
description: List of grouped logical operations referenced by roles.
maxItems: 500
items:
type: object
$ref: '#/components/schemas/RoleV2PermissionSet'
example:
- name: Application permission set
logicalOperations:
- getApplicationOperations
- editApplicationOperations
- name: Campaign manager permission set
logicalOperations:
- getCampaignOperations
- createCampaignOperations
- updateCampaignOperations
- name: Campaign read-only permission set
logicalOperations:
- getCampaignOperations
- name: Loyalty program read-only permission set
logicalOperations:
- getLoyaltyProgramOperations
- name: Campaign access group manager permission set
logicalOperations:
- getCampaignAccessGroupOperations
- updateCampaignAccessGroupOperations
- deleteCampaignAccessGroupOperations
roles:
type: object
$ref: '#/components/schemas/RoleV2RolesGroup'
RoleV2RolesGroup:
type: object
properties:
applications:
type: object
$ref: '#/components/schemas/RoleV2Application'
loyaltyPrograms:
type: object
$ref: '#/components/schemas/RoleV2LoyaltyGroup'
campaignAccessGroups:
type: object
$ref: '#/components/schemas/RoleV2CampaignAccessGroup'
RoleV2Application:
type: object
description: A map of the link between the Application, campaign, or draft campaign-related permission set and the Application ID the permissions apply to.
additionalProperties:
type: object
$ref: '#/components/schemas/RoleV2ApplicationDetails'
example:
'1':
application: Application permission set
'3':
campaign: Campaign manager permission set
'4':
draftCampaign: Campaign read-only permission set
'5':
tools: Tools permission set
RoleV2ApplicationDetails:
type: object
properties:
application:
type: string
description: Name of the Application-related permission set for the given Application.
campaign:
type: string
description: Name of the campaign-related permission set for the given Application.
draftCampaign:
type: string
description: Name of the draft campaign-related permission set for the given Application.
tools:
type: string
description: Name of the tools-related permission set.
example: Tools permission set
RoleV2LoyaltyGroup:
type: object
description: A map of the link between the loyalty program-related permission set and the Application ID the permissions apply to.
additionalProperties:
type: string
description: Name of the loyalty program-related permission set.
example:
'10': Loyalty program manager permission set
RoleV2CampaignAccessGroup:
type: object
description: A map of the link between the campaign access group-related permission set and the Application ID the permissions apply to.
additionalProperties:
type: string
description: Name of the campaign access group-related permission set.
example:
'5': Campaign access group manager permission set
RoleV2PermissionSet:
type: object
required:
- name
- logicalOperations
properties:
name:
type: string
description: Name of the permission set.
example: Campaign manager permission set
logicalOperations:
type: array
maxItems: 1000
description: |
List of logical operations in the permission set.
Each logical operation must be shown under the `x-permission` tag on an endpoint level.
items:
type: string
example:
- createCampaignOperations
- getCampaignOperations
- deleteCampaignOperations
LedgerEntry:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/IntegrationProfileEntity'
- type: object
description: Entry in the point ledger.
required:
- eventId
- accountId
- profileId
- loyaltyProgramId
- amount
- reason
- expiryDate
properties:
accountId:
type: integer
description: The ID of the Talon.One account that owns this profile.
loyaltyProgramId:
type: integer
description: ID of the ledger.
example: 323414846
eventId:
type: integer
description: ID of the related event.
example: 3
amount:
type: integer
description: Amount of loyalty points.
example: 100
reason:
type: string
description: reason for awarding/deducting points.
example: Customer appeasement.
expiryDate:
type: string
format: date-time
description: Expiration date of the points.
example: '2022-04-26T11:02:38Z'
referenceId:
type: integer
description: The ID of the balancing ledgerEntry.
LoyaltyMembership:
type: object
required:
- loyaltyProgramId
properties:
joined:
type: string
format: date-time
title: Loyalty program joined at
description: The moment in which the loyalty program was joined.
example: '2012-03-20T14:15:22Z'
loyaltyProgramId:
type: integer
title: Loyalty program ID
description: The ID of the loyalty program belonging to this entity.
example: 323414846
Meta:
type: object
properties:
campaigns:
description: Maps each evaluated campaign ID to a key-value list of that campaigns attributes. Campaigns without attributes will be omitted.
type: object
additionalProperties: true
coupons:
description: Maps the coupon value to a key-value list of that coupons attributes.
type: object
additionalProperties: true
couponRejectionReason:
$ref: '#/components/schemas/CouponRejectionReason'
referralRejectionReason:
$ref: '#/components/schemas/ReferralRejectionReason'
warnings:
description: Contains warnings about possible misuse.
type: object
additionalProperties: true
CouponRejectionReason:
description: Holds a reference to the campaign, the coupon and the reason for which that coupon was rejected. Should only be present when there is a 'rejectCoupon' effect.
type: object
required:
- campaignId
- couponId
- reason
properties:
campaignId:
type: integer
example: 244
couponId:
type: integer
example: 4928
reason:
type: string
enum:
- CouponNotFound
- CouponPartOfNotRunningCampaign
- CampaignLimitReached
- ProfileLimitReached
- CouponRecipientDoesNotMatch
- CouponExpired
- CouponStartDateInFuture
- CouponRejectedByCondition
- EffectCouldNotBeApplied
- CouponPartOfNotTriggeredCampaign
- CouponReservationRequired
- ProfileRequired
example: CouponNotFound
ReferralRejectionReason:
description: Holds a reference to the campaign, the referral and the reason for which that referral was rejected. Should only be present when there is a 'rejectReferral' effect.
type: object
required:
- campaignId
- referralId
- reason
properties:
campaignId:
type: integer
referralId:
type: integer
reason:
type: string
enum:
- ReferralNotFound
- ReferralRecipientIdSameAsAdvocate
- ReferralPartOfNotRunningCampaign
- ReferralLimitReached
- CampaignLimitReached
- ProfileLimitReached
- ReferralRecipientDoesNotMatch
- ReferralExpired
- ReferralStartDateInFuture
- ReferralRejectedByCondition
- EffectCouldNotBeApplied
- ReferralPartOfNotTriggeredCampaign
example: ReferralNotFound
ApplicationAPIKey:
allOf:
- $ref: '#/components/schemas/CreateApplicationAPIKey'
- type: object
required:
- id
- title
- accountID
- applicationID
- created
- expires
- createdBy
properties:
id:
type: integer
description: ID of the API Key.
example: 34
createdBy:
type: integer
description: ID of user who created.
example: 280
accountID:
type: integer
description: ID of account the key is used for.
example: 13
applicationID:
type: integer
description: ID of application the key is used for.
example: 54
created:
type: string
format: date-time
description: The date the API key was created.
example: '2022-03-02T16:46:17.758585Z'
NewApplicationAPIKey:
allOf:
- $ref: '#/components/schemas/ApplicationAPIKey'
- type: object
required:
- key
properties:
key:
type: string
description: The API key.
example: f45f90d21dcd9bac965c45e547e9754a3196891d09948e35adbcbedc4e9e4b01
CreateApplicationAPIKey:
type: object
required:
- title
- expires
properties:
title:
type: string
description: Title of the API key.
example: My generated key
expires:
type: string
format: date-time
description: The date the API key expires.
example: '2023-08-24T14:00:00Z'
platform:
type: string
enum:
- none
- segment
- braze
- mparticle
- selligent
- iterable
- customer_engagement
- customer_data
- salesforce
- emarsys
description: |
The third-party platform the API key is valid for. Use `none` for a generic API key to be used
from your own integration layer.
example: none
type:
type: string
enum:
- staging
description: |
The API key type. Can be empty or `staging`.
Staging API keys can only be used for dry requests with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint, [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint, and [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint.
When using the _Update customer profile_ endpoint with a staging API key, the query parameter `runRuleEngine` must be `true`.
example: staging
timeOffset:
type: integer
description: |
A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date.
example: 100000
CreateManagementKey:
type: object
required:
- name
- expiryDate
- endpoints
properties:
name:
type: string
description: Name for management key.
example: My generated key
expiryDate:
type: string
format: date-time
description: The date the management key expires.
example: '2023-08-24T14:00:00Z'
endpoints:
type: array
description: The list of endpoints that can be accessed with the key
items:
$ref: '#/components/schemas/Endpoint'
allowedApplicationIds:
type: array
description: |
A list of Application IDs that you can access with the management key.
An empty or missing list means the management key can be used for all Applications in the account.
items:
type: integer
example:
- 1
- 2
- 3
ManagementKey:
allOf:
- $ref: '#/components/schemas/CreateManagementKey'
- type: object
required:
- id
- name
- endpoints
- accountID
- created
- expiryDate
- createdBy
properties:
id:
type: integer
description: ID of the management key.
example: 34
createdBy:
type: integer
description: ID of the user who created it.
example: 280
accountID:
type: integer
description: ID of account the key is used for.
example: 13
created:
type: string
format: date-time
description: The date the management key was created.
example: '2022-03-02T16:46:17.758585Z'
NewManagementKey:
allOf:
- $ref: '#/components/schemas/ManagementKey'
- type: object
required:
- key
properties:
key:
type: string
description: The management key.
example: f45f90d21dcd9bac965c45e547e9754a3196891d09948e35adbcbedc4e9e4b01
Endpoint:
type: object
required:
- path
properties:
path:
type: string
description: allowed endpoint
example: /coupons
SamlConnection:
allOf:
- type: object
description: A SAML 2.0 connection.
required:
- assertionConsumerServiceURL
- audienceURI
properties:
assertionConsumerServiceURL:
type: string
description: The location where the SAML assertion is sent with a HTTP POST.
- $ref: '#/components/schemas/BaseSamlConnection'
- $ref: '#/components/schemas/Entity'
NewSamlConnection:
allOf:
- type: object
description: A new SAML 2.0 connection.
required:
- x509certificate
properties:
x509certificate:
type: string
description: X.509 Certificate.
minLength: 1
- $ref: '#/components/schemas/BaseSamlConnection'
BaseSamlConnection:
type: object
required:
- accountId
- name
- enabled
- issuer
- signOnURL
properties:
accountId:
type: integer
description: The ID of the account that owns this entity.
example: 3885
name:
type: string
description: ID of the SAML service.
minLength: 1
enabled:
type: boolean
description: Determines if this SAML connection active.
issuer:
type: string
description: Identity Provider Entity ID.
minLength: 1
signOnURL:
type: string
description: Single Sign-On URL.
minLength: 1
signOutURL:
type: string
description: Single Sign-Out URL.
metadataURL:
type: string
description: Metadata URL.
audienceURI:
type: string
description: |
The application-defined unique identifier that is the intended audience of the SAML assertion.
This is most often the SP Entity ID of your application. When not specified, the ACS URL will be used.
Effect:
allOf:
- $ref: '#/components/schemas/EffectEntity'
- type: object
description: A generic effect that is fired by a triggered campaign. The props property will contain information specific to the specific effect type.
required:
- props
properties:
props:
$ref: '#/components/schemas/EffectProps'
EffectEntity:
type: object
description: Definition of all properties that are present on all effects, independent of their type.
required:
- campaignId
- rulesetId
- ruleIndex
- ruleName
- effectType
properties:
campaignId:
type: integer
description: The ID of the campaign that triggered this effect.
example: 244
rulesetId:
type: integer
description: The ID of the ruleset that was active in the campaign when this effect was triggered.
example: 73
ruleIndex:
type: integer
description: The position of the rule that triggered this effect within the ruleset.
example: 2
ruleName:
type: string
description: The name of the rule that triggered this effect.
example: Give 20% discount
effectType:
type: string
description: The type of effect that was triggered. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects).
example: rejectCoupon
triggeredByCoupon:
type: integer
example: 4928
description: The ID of the coupon that was being evaluated when this effect was triggered.
triggeredForCatalogItem:
type: integer
example: 786
description: The ID of the catalog item that was being evaluated when this effect was triggered.
conditionIndex:
type: integer
example: 786
description: The index of the condition that was triggered.
evaluationGroupID:
type: integer
example: 3
description: The ID of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation).
evaluationGroupMode:
type: string
example: stackable
description: The evaluation mode of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation).
campaignRevisionId:
type: integer
example: 1
description: The revision ID of the campaign that was used when triggering the effect.
campaignRevisionVersionId:
type: integer
example: 5
description: The revision version ID of the campaign that was used when triggering the effect.
EffectProps:
type: object
description: The properties of the effect. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects).
oneOf:
- $ref: '#/components/schemas/AcceptCouponEffectProps'
- $ref: '#/components/schemas/AcceptReferralEffectProps'
- $ref: '#/components/schemas/RedeemReferralEffectProps'
- $ref: '#/components/schemas/RejectCouponEffectProps'
- $ref: '#/components/schemas/RejectReferralEffectProps'
- $ref: '#/components/schemas/CouponCreatedEffectProps'
- $ref: '#/components/schemas/ReferralCreatedEffectProps'
- $ref: '#/components/schemas/SetDiscountEffectProps'
- $ref: '#/components/schemas/SetDiscountPerItemEffectProps'
- $ref: '#/components/schemas/SetDiscountPerAdditionalCostEffectProps'
- $ref: '#/components/schemas/TriggerWebhookEffectProps'
- $ref: '#/components/schemas/AddLoyaltyPointsEffectProps'
- $ref: '#/components/schemas/DeductLoyaltyPointsEffectProps'
- $ref: '#/components/schemas/ChangeLoyaltyTierLevelEffectProps'
- $ref: '#/components/schemas/AddFreeItemEffectProps'
- $ref: '#/components/schemas/ShowNotificationEffectProps'
- $ref: '#/components/schemas/UpdateAttributeEffectProps'
- $ref: '#/components/schemas/RollbackCouponEffectProps'
- $ref: '#/components/schemas/RollbackReferralEffectProps'
- $ref: '#/components/schemas/RollbackDiscountEffectProps'
- $ref: '#/components/schemas/RollbackAddedLoyaltyPointsEffectProps'
- $ref: '#/components/schemas/RollbackDeductedLoyaltyPointsEffectProps'
- $ref: '#/components/schemas/ShowBundleMetadataEffectProps'
- $ref: '#/components/schemas/AwardGiveawayEffectProps'
- $ref: '#/components/schemas/WillAwardGiveawayEffectProps'
- $ref: '#/components/schemas/ErrorEffectProps'
- $ref: '#/components/schemas/CustomEffectProps'
- $ref: '#/components/schemas/SetDiscountPerAdditionalCostPerItemEffectProps'
- $ref: '#/components/schemas/ReserveCouponEffectProps'
- $ref: '#/components/schemas/AddToAudienceEffectProps'
- $ref: '#/components/schemas/RemoveFromAudienceEffectProps'
- $ref: '#/components/schemas/IncreaseAchievementProgressEffectProps'
- $ref: '#/components/schemas/RollbackIncreasedAchievementProgressEffectProps'
AcceptCouponEffectProps:
type: object
description: The properties specific to the "acceptCoupon" effect. This gets triggered whenever the coupon is valid and all other conditions in the rules of its campaign are met.
required:
- value
properties:
value:
type: string
description: The coupon code that was accepted.
AcceptReferralEffectProps:
type: object
description: The properties specific to the "acceptReferral" effect. TThis gets triggered whenever the referral code is valid and all other conditions in the rules of its campaign are met.
required:
- value
properties:
value:
type: string
description: The referral code that was accepted.
RedeemReferralEffectProps:
type: object
description: |
This effect is **deprecated**. The properties specific to the "redeemReferral" effect.
This gets triggered whenever the referral code is valid, and a rule was triggered that contains a "redeem referral" effect.
required:
- id
- value
properties:
id:
type: integer
description: The id of the referral code that was redeemed.
value:
type: string
description: The referral code that was redeemed.
RejectCouponEffectProps:
type: object
description: The properties specific to the "rejectCoupon" effect. This gets triggered whenever the coupon was rejected. See rejectionReason for more info on why.
required:
- value
- rejectionReason
properties:
value:
type: string
description: The coupon code that was rejected.
rejectionReason:
type: string
description: The reason why this coupon was rejected.
conditionIndex:
type: integer
description: The index of the condition that caused the rejection of the coupon.
effectIndex:
type: integer
description: The index of the effect that caused the rejection of the coupon.
details:
type: string
description: More details about the failure.
campaignExclusionReason:
type: string
example: CampaignGaveLowerDiscount
description: The reason why the campaign was not applied.
RejectReferralEffectProps:
type: object
description: The properties specific to the "rejectReferral" effect. This gets triggered whenever the referral code was rejected. See rejectionReason for more info on why.
required:
- value
- rejectionReason
properties:
value:
type: string
description: The referral code that was rejected.
rejectionReason:
type: string
description: The reason why this referral code was rejected.
conditionIndex:
type: integer
description: The index of the condition that caused the rejection of the referral.
effectIndex:
type: integer
description: The index of the effect that caused the rejection of the referral.
details:
type: string
description: More details about the failure.
campaignExclusionReason:
type: string
example: CampaignGaveLowerDiscount
description: The reason why the campaign was not applied.
CouponCreatedEffectProps:
type: object
description: The properties specific to the "couponCreated" effect. This gets triggered whenever a validated rule contained a "create coupon" effect, and a coupon was created for a customer. See "createdCoupons" on the response for all details of this coupon.
required:
- value
- profileId
properties:
value:
type: string
description: The coupon code that was created.
profileId:
type: string
description: The integration identifier of the customer for whom this coupon was created.
ReferralCreatedEffectProps:
type: object
description: The properties specific to the "referralCreated" effect. This gets triggered whenever a validated rule contained a "create referral" effect, and a referral code was created for a customer. See "createdReferrals" on the response for all details of this referral code.
required:
- value
properties:
value:
type: string
description: The referral code that was created.
SetDiscountEffectProps:
type: object
description: The properties specific to the "setDiscount" effect. This gets triggered whenever a validated rule contained a "set discount" effect. This is a discount that should be applied on the scope of defined with it.
required:
- name
- value
properties:
name:
type: string
description: The name / description of this discount
value:
type: number
description: The total monetary value of the discount.
scope:
type: string
description: The scope which the discount was applied on, can be one of (cartItems,additionalCosts,sessionTotal).
desiredValue:
type: number
description: The original value of the discount.
SetDiscountPerItemEffectProps:
type: object
description: |
The properties specific to the `setDiscountPerItem` effect, triggered whenever a validated rule contained a
"set per item discount" effect.
This is a discount that will be applied either on a specific item, on a specific item + additional cost or on all additional costs per item.
This depends on the chosen scope.
required:
- name
- value
- position
properties:
name:
type: string
description: |
The name of the discount. Contains a hashtag character indicating the index of the position of the item the discount applies
to. It is identical to the value of the `position` property.
value:
type: number
description: The total monetary value of the discount.
position:
type: number
description: The index of the item in the cart items list on which this discount should be applied.
subPosition:
type: number
description: |
For cart items with `quantity` > 1, the sub position indicates which item the discount applies to.
desiredValue:
type: number
description: The original value of the discount.
scope:
type: string
description: |
The scope of the discount:
- `additionalCosts`: The discount applies to all the additional costs of the item.
- `itemTotal`: The discount applies to the price of the item + the additional costs of the item.
- `price`: The discount applies to the price of the item.
totalDiscount:
type: number
description: The total discount given if this effect is a result of a prorated discount.
desiredTotalDiscount:
type: number
description: The original total discount to give if this effect is a result of a prorated discount.
bundleIndex:
type: integer
description: The position of the bundle in a list of item bundles created from the same bundle definition.
bundleName:
type: string
description: The name of the bundle definition.
targetedItemPosition:
type: number
description: The index of the targeted bundle item on which the applied discount is based.
targetedItemSubPosition:
type: number
description: |
The sub-position of the targeted bundle item on which the applied discount is based.
SetDiscountPerAdditionalCostPerItemEffectProps:
type: object
description: The properties specific to the "setDiscountPerAdditionalCostPerItem" effect. This gets triggered whenever a validated rule contained a "set discount per additional cost per item" effect. This is a discount that should be applied on a specific additional cost in a specific item.
required:
- name
- value
- additionalCostId
- additionalCost
- position
properties:
name:
type: string
description: The name / description of this discount
additionalCostId:
type: integer
description: The ID of the additional cost.
value:
type: number
description: The total monetary value of the discount.
position:
type: number
description: The index of the item in the cart item list containing the additional cost to be discounted.
subPosition:
type: number
description: |
For cart items with `quantity` > 1, the sub position indicates which item the discount applies to.
additionalCost:
type: string
description: The name of the additional cost.
desiredValue:
type: number
description: |
Only with [partial discounts enabled](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#partial-discounts).
Represents the monetary value of the discount to be applied to additional discount without considering budget limitations.
ReserveCouponEffectProps:
type: object
description: The properties specific to the "reserveCoupon" effect. This gets triggered whenever a validated rule contained a "reserve coupon" effect. This reserves the coupon currently on scope to the profile on scope.
required:
- couponValue
- profileIntegrationId
- isNewReservation
properties:
couponValue:
type: string
description: The value of the coupon currently on scope.
profileIntegrationId:
type: string
description: The ID of this customer profile in the third-party integration.
isNewReservation:
type: boolean
description: Indicates whether this is a new coupon reservation or not.
SetDiscountPerAdditionalCostEffectProps:
type: object
description: The properties specific to the "setDiscountPerAdditionalCost" effect. This gets triggered whenever a validated rule contained a "set per additional cost discount" effect. This is a discount that should be applied on a specific additional cost.
required:
- name
- value
- additionalCostId
- additionalCost
properties:
name:
type: string
description: The name / description of this discount
additionalCostId:
type: integer
description: The ID of the additional cost.
additionalCost:
type: string
description: The name of the additional cost.
value:
type: number
description: The total monetary value of the discount.
desiredValue:
type: number
description: The original value of the discount.
TriggerWebhookEffectProps:
type: object
description: The properties specific to the "triggerWebhook" effect. This gets triggered whenever a validated rule contained a "trigger webhook" effect. This is communicated as an FYI and should usually not require action on your side.
required:
- webhookId
- webhookName
properties:
webhookId:
type: number
description: The ID of the webhook that was triggered.
webhookName:
type: string
description: The name of the webhook that was triggered.
AddLoyaltyPointsEffectProps:
type: object
description: |
The properties specific to the "addLoyaltyPoints" effect. This gets triggered whenever a validated rule contained an "add loyalty" effect. These points are automatically stored and managed inside Talon.One.
required:
- name
- programId
- subLedgerId
- value
- recipientIntegrationId
- transactionUUID
properties:
name:
type: string
description: The name / description of this loyalty point addition.
programId:
type: integer
description: The ID of the loyalty program where these points were added.
subLedgerId:
type: string
description: The ID of the subledger within the loyalty program where these points were added.
value:
type: number
description: The amount of points that were added.
desiredValue:
type: number
description: The original amount of loyalty points to be awarded.
recipientIntegrationId:
type: string
maxLength: 1000
description: The user for whom these points were added.
example: URNGV8294NV
startDate:
type: string
format: date-time
description: Date after which points will be valid.
expiryDate:
type: string
format: date-time
description: Date after which points will expire.
transactionUUID:
type: string
description: The identifier of this addition in the loyalty ledger.
cartItemPosition:
type: number
description: The index of the item in the cart items list on which the loyal points addition should be applied.
cartItemSubPosition:
type: number
description: |
For cart items with `quantity` > 1, the sub position indicates to which item the loyalty points addition is applied.
cardIdentifier:
description: The card on which these points were added.
$ref: '#/components/schemas/LoyaltyCardIdentifier'
bundleIndex:
type: integer
description: The position of the bundle in a list of item bundles created from the same bundle definition.
bundleName:
type: string
description: The name of the bundle definition.
DeductLoyaltyPointsEffectProps:
type: object
description: The properties specific to the "deductLoyaltyPoints" effect. This gets triggered whenever a validated rule contained a condition to only trigger when the given number of loyalty points could be deduced. These points are automatically stored and managed inside Talon.One.
required:
- ruleTitle
- programId
- subLedgerId
- value
- transactionUUID
- name
properties:
ruleTitle:
type: string
description: The title of the rule that contained triggered this points deduction.
programId:
type: integer
description: The ID of the loyalty program where these points were added.
subLedgerId:
type: string
description: The ID of the subledger within the loyalty program where these points were added.
value:
type: number
description: The amount of points that were deducted.
transactionUUID:
type: string
description: The identifier of this deduction in the loyalty ledger.
name:
type: string
description: |
The name property gets one of the following two values. It can be the loyalty program name or it can represent a reason for the respective deduction of loyalty points. The latter is an optional value defined in a deduction rule.
cardIdentifier:
description: The card on which these points were added.
$ref: '#/components/schemas/LoyaltyCardIdentifier'
ChangeLoyaltyTierLevelEffectProps:
type: object
description: |
The properties specific to the "changeLoyaltyTierLevel" effect.
This is triggered whenever the user's loyalty tier is upgraded due to a validated rule that contained an "addLoyaltyPoints" effect.
required:
- ruleTitle
- programId
- subLedgerId
- newTierName
properties:
ruleTitle:
type: string
description: The title of the rule that triggered the tier upgrade.
programId:
type: integer
description: The ID of the loyalty program where these points were added.
subLedgerId:
type: string
description: The ID of the subledger within the loyalty program where these points were added.
previousTierName:
type: string
description: The name of the tier from which the user was upgraded.
newTierName:
type: string
description: The name of the tier to which the user has been upgraded.
expiryDate:
type: string
format: date-time
description: The expiration date of the new tier.
AddFreeItemEffectProps:
type: object
description: The properties specific to the "addFreeItem" effect. This gets triggered whenever a validated rule contained an "add free item" effect.
required:
- sku
- name
properties:
sku:
type: string
description: SKU of the item that needs to be added.
example: SKU1241028
name:
type: string
description: The name / description of the effect
ShowNotificationEffectProps:
type: object
description: The properties specific to the "showNotification" effect. This gets triggered whenever a validated rule contained a "show notification" effect.
required:
- notificationType
- title
- body
properties:
notificationType:
type: string
description: The type of notification that should be shown (e.g. error/warning/info).
title:
type: string
description: Title of the notification.
body:
type: string
description: Body of the notification.
UpdateAttributeEffectProps:
type: object
description: The properties specific to the "updateAttribute" effect. This gets triggered whenever a validated rule contained an "update an attribute" effect.
required:
- path
- value
properties:
path:
type: string
description: The exact path of the attribute that was updated.
value:
description: |
The new value of this attribute. The value can be of the following types:
- boolean
- location
- number
- string
- time
- list of any of those types
RollbackCouponEffectProps:
type: object
description: The properties specific to the "rollbackCoupon" effect. This gets triggered whenever previously closed session is now cancelled and a coupon redemption was cancelled on our internal usage limit counters.
required:
- value
properties:
value:
type: string
description: The coupon code whose usage has been rolled back.
RollbackReferralEffectProps:
type: object
description: The properties specific to the "rollbackReferral" effect. This gets triggered whenever previously closed session is now cancelled and a referral redemption was cancelled on our internal usage limit counters.
required:
- value
properties:
value:
type: string
description: The referral code whose usage has been rolled back.
RollbackDiscountEffectProps:
type: object
description: The properties specific to the "rollbackDiscount" effect. This gets triggered whenever previously closed session is now cancelled or partially returned and a setDiscount effect was cancelled on our internal discount limit counters.
required:
- name
- value
properties:
name:
type: string
description: The name of the "setDiscount" effect that was rolled back.
value:
type: number
description: The value of the discount that was rolled back.
cartItemPosition:
type: number
description: The index of the item in the cart items for which the discount was rolled back.
cartItemSubPosition:
type: number
description: |
For cart items with `quantity` > 1, the subposition returns the index of the item unit in its line item.
additionalCostId:
type: integer
description: The ID of the additional cost that was rolled back.
additionalCost:
type: string
description: The name of the additional cost that was rolled back.
scope:
type: string
description: |
The scope of the rolled back discount
- For a discount per session, it can be one of `cartItems`, `additionalCosts` or `sessionTotal`
- For a discount per item, it can be one of `price`, `additionalCosts` or `itemTotal`
RollbackAddedLoyaltyPointsEffectProps:
type: object
description: The properties specific to the "rollbackAddedLoyaltyPoints" effect. This gets triggered whenever previously a closed session with an addLoyaltyPoints effect is cancelled.
required:
- programId
- subLedgerId
- value
- recipientIntegrationId
- transactionUUID
properties:
programId:
type: integer
description: The ID of the loyalty program where the points were originally added.
subLedgerId:
type: string
description: The ID of the subledger within the loyalty program where these points were originally added.
value:
type: number
description: The amount of points that were rolled back.
recipientIntegrationId:
type: string
maxLength: 1000
description: The user for whom these points were originally added.
example: URNGV8294NV
transactionUUID:
type: string
description: The identifier of 'deduction' entry added to the ledger as the `addLoyaltyPoints` effect is rolled back.
cartItemPosition:
type: number
description: The index of the item in the cart items for which the loyalty points were rolled back.
cartItemSubPosition:
type: number
description: |
For cart items with `quantity` > 1, the sub-position indicates to which item the loyalty points were rolled back.
cardIdentifier:
description: The card on which these points were originally added.
$ref: '#/components/schemas/LoyaltyCardIdentifier'
RollbackDeductedLoyaltyPointsEffectProps:
type: object
description: The properties specific to the "rollbackDeductedLoyaltyPoints" effect. This effect is triggered whenever a previously closed session is cancelled and a deductLoyaltyPoints effect was revoked.
required:
- programId
- subLedgerId
- value
- recipientIntegrationId
- transactionUUID
properties:
programId:
type: integer
description: The ID of the loyalty program where these points were reimbursed.
subLedgerId:
type: string
description: The ID of the subledger within the loyalty program where these points were reimbursed.
value:
type: number
description: The amount of reimbursed points that were added.
recipientIntegrationId:
type: string
maxLength: 1000
description: The user for whom these points were reimbursed.
example: URNGV8294NV
startDate:
type: string
format: date-time
description: Date after which the reimbursed points will be valid.
expiryDate:
type: string
format: date-time
description: Date after which the reimbursed points will expire.
transactionUUID:
type: string
description: The identifier of 'addition' entries added to the ledger as the `deductLoyaltyPoints` effect is rolled back.
cardIdentifier:
description: The card on which these points were added.
$ref: '#/components/schemas/LoyaltyCardIdentifier'
ShowBundleMetadataEffectProps:
type: object
description: |
This effect is **deprecated**.
The properties specific to the "ShowBundleMetadata" effect. This effect contains information that allows you to associate the discounts from a rule in a bundle campaign with specific cart items. This way you can distinguish from "normal" discounts that were not the result of a product bundle.
required:
- description
- bundleAttributes
- itemsIndices
properties:
description:
type: string
description: Description of the product bundle.
bundleAttributes:
type: array
items:
type: string
description: The cart item attributes that determined which items are being bundled together.
itemsIndices:
type: array
items:
type: number
description: The indices in the cart items array of the bundled items.
AwardGiveawayEffectProps:
type: object
description: The properties specific to the "awardGiveaway" effect. This effect contains information on the giveaway item, and which profile it was awarded to.
required:
- poolId
- poolName
- recipientIntegrationId
- giveawayId
- code
properties:
poolId:
type: integer
description: The ID of the giveaways pool the code was taken from.
example: 2
poolName:
type: string
description: The name of the giveaways pool the code was taken from.
example: My pool
recipientIntegrationId:
type: string
maxLength: 1000
description: The integration ID of the profile that was awarded the giveaway.
example: URNGV8294NV
giveawayId:
type: integer
description: The internal ID for the giveaway that was awarded.
example: 5
code:
type: string
description: The giveaway code that was awarded.
example: 57638t-67439hty
WillAwardGiveawayEffectProps:
type: object
description: The properties specific to the "awardGiveaway" effect when the session is not closed yet. This effect replaces "awardGiveaway" only when updating a session with any state other than "closed". This is to ensure no giveaway codes are leaked when they are still not guaranteed to be awarded.
required:
- poolId
- poolName
- recipientIntegrationId
properties:
poolId:
type: integer
description: The ID of the giveaways pool the code will be taken from.
example: 2
poolName:
type: string
description: The name of the giveaways pool the code will be taken from.
example: My pool
recipientIntegrationId:
type: string
maxLength: 1000
description: The integration ID of the profile that will be awarded the giveaway.
example: URNGV8294NV
AddToAudienceEffectProps:
type: object
description: The properties specific to the "addToAudience" effect. This gets triggered whenever a validated rule contains an "addToAudience" effect.
properties:
audienceId:
type: integer
description: The internal ID of the audience.
example: 10
audienceName:
type: string
description: The name of the audience.
example: My audience
profileIntegrationId:
type: string
description: The ID of the customer profile in the third-party integration platform.
example: URNGV8294NV
profileId:
type: integer
description: The internal ID of the customer profile.
example: 150
RemoveFromAudienceEffectProps:
type: object
description: The properties specific to the "removeFromAudience" effect. This gets triggered whenever a validated rule contains a "removeFromAudience" effect.
properties:
audienceId:
type: integer
description: The internal ID of the audience.
example: 10
audienceName:
type: string
description: The name of the audience.
example: My audience
profileIntegrationId:
type: string
description: The ID of the customer profile in the third-party integration platform.
example: URNGV8294NV
profileId:
type: integer
description: The internal ID of the customer profile.
example: 150
IncreaseAchievementProgressEffectProps:
type: object
description: The properties specific to the "increaseAchievementProgress" effect. This gets triggered whenever a validated rule contained an "increase customer progress" effect.
required:
- achievementId
- achievementName
- delta
- value
- target
- isJustCompleted
properties:
achievementId:
type: integer
description: The internal ID of the achievement.
example: 10
achievementName:
type: string
description: The name of the achievement.
example: FreeCoffee10Orders
progressTrackerId:
type: integer
description: The internal ID of the achievement progress tracker.
delta:
type: number
description: The value by which the customer's current progress in the achievement is increased.
value:
type: number
description: The current progress of the customer in the achievement.
target:
type: number
description: The target value to complete the achievement.
isJustCompleted:
type: boolean
description: Indicates if the customer has completed the achievement in the current session.
RollbackIncreasedAchievementProgressEffectProps:
type: object
description: The properties specific to the "rollbackIncreasedAchievementProgress" effect. This gets triggered whenever a closed session where the `increaseAchievementProgress` effect was triggered is cancelled. This is applicable only when the customer has not completed the achievement.
required:
- achievementId
- achievementName
- progressTrackerId
- decreaseProgressBy
- currentProgress
- target
properties:
achievementId:
type: integer
description: The internal ID of the achievement.
example: 10
achievementName:
type: string
description: The name of the achievement.
example: FreeCoffee10Orders
progressTrackerId:
type: integer
description: The internal ID of the achievement progress tracker.
decreaseProgressBy:
type: number
description: The value by which the customer's current progress in the achievement is decreased.
currentProgress:
type: number
description: The current progress of the customer in the achievement.
target:
type: number
description: The target value to complete the achievement.
ErrorEffectProps:
type: object
description: Whenever an error occurred during evaluation, we return an error effect. This should never happen for rules created in the rule builder.
required:
- message
properties:
message:
type: string
description: The error message.
CustomEffectProps:
type: object
description: Effect containing custom payload.
required:
- effectId
- name
- payload
properties:
effectId:
type: integer
description: The ID of the custom effect that was triggered.
example: 1
name:
type: string
description: The type of the custom effect.
example: my_custom_effect
cartItemPosition:
type: number
description: The index of the item in the cart item list to which the custom effect is applied.
example: 1
cartItemSubPosition:
type: number
description: |
For cart items with quantity > 1, the sub position indicates to which item unit the custom effect is applied.
example: 2
bundleIndex:
type: integer
description: The position of the bundle in a list of item bundles created from the same bundle definition.
example: 1
bundleName:
type: string
description: The name of the bundle definition.
example: my_bundle
payload:
description: The JSON payload of the custom effect.
type: object
additionalProperties: true
x-arbitraryJSON: true
CustomerProfileIntegrationRequestV2:
allOf:
- $ref: '#/components/schemas/NewCustomerProfile'
- $ref: '#/components/schemas/EvaluableCampaignIds'
- type: object
description: The body of a V2 integration API request (customer profile update). Next to the customer profile details, this contains an optional listing of extra properties that should be returned in the response.
properties:
audiencesChanges:
type: object
description: Audiences memberships changes for this profile.
$ref: '#/components/schemas/ProfileAudiencesChanges'
responseContent:
type: array
description: |
Extends the response with the chosen data entities. Use this property to get as much data
as you need in one _Update customer profile_ request instead of sending extra requests to other endpoints.
example:
- triggeredCampaigns
- customerProfile
items:
type: string
enum:
- customerProfile
- triggeredCampaigns
- loyalty
- event
- awardedGiveaways
- ruleFailureReasons
ProfileAudiencesChanges:
type: object
required:
- adds
- deletes
properties:
adds:
title: Audiences to join
type: array
items:
type: integer
description: The IDs of the audiences for the customer to join.
example:
- 2
- 4
deletes:
title: Audiences to leave
type: array
items:
type: integer
description: The IDs of the audiences for the customer to leave.
example:
- 7
AudienceMembership:
type: object
required:
- id
- name
properties:
id:
type: integer
title: Audience ID
description: The ID of the audience belonging to this entity.
example: 2
name:
type: string
title: Audience Name
description: The Name of the audience belonging to this entity.
example: Travel audience
MultipleCustomerProfileIntegrationRequestItem:
allOf:
- $ref: '#/components/schemas/NewCustomerProfile'
- type: object
description: |
The body of a V2 integration API request (customer profile update).
Next to the customer profile details, this contains an optional listing of extra properties that should be returned in the response.
required:
- integrationId
properties:
integrationId:
description: |
The identifier of this profile, set by your integration layer. It must be unique within the account.
To get the `integrationId` of the profile from a `sessionId`, use the
[Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2).
type: string
example: R195412
maxLength: 1000
RuleFailureReason:
type: object
description: Details about why a rule failed.
required:
- campaignID
- campaignName
- rulesetID
- ruleIndex
- ruleName
properties:
campaignID:
type: integer
description: The ID of the campaign that contains the rule that failed.
campaignName:
type: string
description: The name of the campaign that contains the rule that failed.
rulesetID:
type: integer
description: The ID of the ruleset that contains the rule that failed.
couponID:
type: integer
description: The ID of the coupon that was being evaluated at the time of the rule failure.
example: 4928
couponValue:
type: string
description: The code of the coupon that was being evaluated at the time of the rule failure.
referralID:
type: integer
description: The ID of the referral that was being evaluated at the time of the rule failure.
referralValue:
type: string
description: The code of the referral that was being evaluated at the time of the rule failure.
ruleIndex:
type: integer
description: The index of the rule that failed within the ruleset.
ruleName:
type: string
description: The name of the rule that failed within the ruleset.
conditionIndex:
type: integer
description: The index of the condition that failed.
effectIndex:
type: integer
description: The index of the effect that failed.
details:
type: string
description: More details about the failure.
evaluationGroupID:
type: integer
example: 3
description: The ID of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-evaluation).
evaluationGroupMode:
type: string
example: stackable
description: The evaluation mode of the evaluation group. For more information, see [Managing campaign evaluation](https://docs.talon.one/docs/product/applications/managing-campaign-
Giveaway:
allOf:
- $ref: '#/components/schemas/Entity'
- type: object
required:
- id
- created
- code
- poolId
properties:
code:
type: string
description: The code value of this giveaway.
example: GIVEAWAY1
poolId:
type: integer
description: The ID of the pool to return giveaway codes from.
example: 1
startDate:
format: date-time
description: Timestamp at which point the giveaway becomes valid.
type: string
example: 2022-01-02T15:04:05Z07:00
endDate:
format: date-time
description: Timestamp at which point the giveaway becomes invalid.
type: string
example: 2023-01-02T15:04:05Z07:00
attributes:
type: object
description: Arbitrary properties associated with this giveaway.
additionalProperties: true
used:
type: boolean
description: Indicates whether this giveaway code was given before.
example: true
importId:
type: integer
description: The ID of the Import which created this giveaway.
example: 4
profileIntegrationId:
type: string
description: The third-party integration ID of the customer profile that was awarded the giveaway, if the giveaway was awarded.
example: R195412
profileId:
type: integer
description: The internal ID of the customer profile that was awarded the giveaway, if the giveaway was awarded and an internal ID exists.
example: 1
NewGiveawaysPool:
type: object
required:
- name
- sandbox
properties:
name:
type: string
description: The name of this giveaways pool.
example: My giveaway pool
description:
type: string
description: The description of this giveaways pool.
example: Generic pool
subscribedApplicationsIds:
type: array
description: A list of the IDs of the applications that this giveaways pool is enabled for.
items:
type: integer
example:
- 2
- 4
sandbox:
type: boolean
description: Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type.
title: Sandbox
example: true
GiveawaysPool:
description: Giveaways pools is an entity for managing multiple similar giveaways.
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/NewGiveawaysPool'
- type: object
required:
- createdBy
properties:
modified:
type: string
format: date-time
description: Timestamp of the most recent update to the giveaways pool.
createdBy:
type: integer
description: ID of the user who created this giveaways pool.
modifiedBy:
type: integer
description: ID of the user who last updated this giveaways pool if available.
NewCustomEffect:
allOf:
- $ref: '#/components/schemas/MultiApplicationEntity'
- type: object
required:
- name
- title
- enabled
- payload
properties:
isPerItem:
type: boolean
x-fieldType: bool
description: Indicates if this effect is per item or not.
name:
type: string
pattern: ^[A-Za-z](\w|\s)*$
description: The name of this effect.
title:
type: string
pattern: ^[^[:cntrl:]\s][^[:cntrl:]]*$
description: The title of this effect.
payload:
type: string
description: The JSON payload of this effect.
description:
type: string
description: The description of this effect.
enabled:
type: boolean
description: Determines if this effect is active.
params:
type: array
description: Array of template argument definitions.
items:
$ref: '#/components/schemas/TemplateArgDef'
NewPicklist:
type: object
required:
- type
- values
properties:
type:
type: string
description: The type of allowed values in the picklist. If the type `time` is chosen, it must be an RFC3339 timestamp string.
enum:
- string
- boolean
- number
- time
example: '2012-11-01T22:08:41+00:00'
values:
type: array
maxItems: 50
example:
- Jeans
- Shirt
- Coat
description: The list of allowed values provided by this picklist.
items:
type: string
Picklist:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/NewPicklist'
- type: object
required:
- createdBy
properties:
modifiedBy:
type: integer
description: ID of the user who last updated this effect if available.
example: 124
createdBy:
type: integer
description: ID of the user who created this effect.
example: 134
accountId:
type: integer
description: The ID of the account that owns this entity.
example: 3886
imported:
type: boolean
description: Imported flag shows that a picklist is imported by a CSV file or not
example: true
UpdatePicklist:
allOf:
- $ref: '#/components/schemas/NewPicklist'
UpdateCustomEffect:
allOf:
- $ref: '#/components/schemas/NewCustomEffect'
CustomEffect:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/NewCustomEffect'
- type: object
required:
- createdBy
properties:
modifiedBy:
type: integer
description: ID of the user who last updated this effect if available.
example: 334
createdBy:
type: integer
description: ID of the user who created this effect.
example: 216
UpdateCampaignCollection:
type: object
properties:
description:
type: string
description: A short description of the purpose of this collection.
example: My collection of SKUs
NewCampaignCollection:
allOf:
- $ref: '#/components/schemas/UpdateCampaignCollection'
- type: object
required:
- name
properties:
name:
type: string
minLength: 1
pattern: ^[^[:cntrl:]\s][^[:cntrl:]]*$
description: The name of this collection.
example: My collection
CampaignCollectionWithoutPayload:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/NewCampaignCollection'
- type: object
required:
- createdBy
properties:
modifiedBy:
type: integer
description: ID of the user who last updated this effect if available.
example: 48
createdBy:
type: integer
description: ID of the user who created this effect.
example: 134
applicationId:
type: integer
description: The ID of the Application that owns this entity.
example: 1
campaignId:
type: integer
description: The ID of the campaign that owns this entity.
example: 7
CampaignCollection:
allOf:
- $ref: '#/components/schemas/CampaignCollectionWithoutPayload'
- type: object
properties:
payload:
type: array
description: The content of the collection.
maxItems: 50
example:
- KTL-WH-ET-1
- KTL-BL-ET-1
items:
type: string
UpdateCollection:
type: object
properties:
description:
type: string
description: A short description of the purpose of this collection.
example: My collection of SKUs
subscribedApplicationsIds:
type: array
description: A list of the IDs of the Applications where this collection is enabled.
example:
- 1
- 2
- 3
items:
type: integer
NewCollection:
allOf:
- $ref: '#/components/schemas/UpdateCollection'
- type: object
required:
- name
properties:
name:
type: string
minLength: 1
pattern: ^[^[:cntrl:]\s][^[:cntrl:]]*$
description: The name of this collection.
example: My collection
CollectionWithoutPayload:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/NewCollection'
- type: object
required:
- createdBy
properties:
modifiedBy:
type: integer
description: ID of the user who last updated this effect if available.
example: 48
createdBy:
type: integer
description: ID of the user who created this effect.
example: 134
applicationId:
type: integer
description: The ID of the Application that owns this entity.
example: 1
campaignId:
type: integer
description: The ID of the campaign that owns this entity.
example: 7
Collection:
allOf:
- $ref: '#/components/schemas/CollectionWithoutPayload'
- type: object
properties:
payload:
type: array
description: The content of the collection.
maxItems: 50
example:
- KTL-WH-ET-1
- KTL-BL-ET-1
items:
type: string
CollectionItem:
allOf:
- type: object
required:
- item
properties:
item:
type: string
NewCouponCreationJob:
allOf:
- $ref: '#/components/schemas/CouponConstraints'
- type: object
required:
- numberOfCoupons
- usageLimit
- attributes
additionalProperties: false
properties:
numberOfCoupons:
type: integer
description: The number of new coupon codes to generate for the campaign.
minimum: 1
maximum: 5000000
example: 200000
couponSettings:
$ref: '#/components/schemas/CodeGeneratorSettings'
attributes:
type: object
description: Arbitrary properties associated with coupons.
additionalProperties: true
CouponCreationJob:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/CampaignEntity'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/NewCouponCreationJob'
- type: object
required:
- createdBy
- status
- batchId
- requestedAmount
- createdAmount
- failCount
- errors
- attributes
- usageLimit
- communicated
- chunkExecutionCount
properties:
batchId:
title: Batch ID
type: string
description: The batch ID coupons created by this job will bear.
example: tqyrgahe
status:
title: Job Status
type: string
description: |
The current status of this request. Possible values:
- `pending verification`
- `pending`
- `completed`
- `failed`
- `coupon pattern full`
example: pending
createdAmount:
title: Created Amount
type: integer
description: The number of coupon codes that were already created for this request.
example: 1000000
failCount:
title: Fail Count
type: integer
description: The number of times this job failed.
example: 10
errors:
title: Errors
type: array
description: An array of individual problems encountered during the request.
example:
- Connection to database was reset
- failed to generate enough unique codes
- attribute 'PizzaLover' not found on entity 'Coupons'
items:
type: string
createdBy:
title: Created By
type: integer
description: ID of the user who created this effect.
example: 1
communicated:
type: boolean
description: Whether or not the user that created this job was notified of its final state.
example: false
chunkExecutionCount:
title: Iterations
type: integer
example: 0
description: The number of times an attempt to create a chunk of coupons was made during the processing of the job.
chunkSize:
title: Chunk size
type: integer
example: 20000
description: The number of coupons that will be created in a single transactions. Coupons will be created in chunks until arriving at the requested amount.
AsyncCouponCreationResponse:
type: object
required:
- batchId
properties:
batchId:
type: string
description: The batch ID that all coupons created by the request will have.
example: tqyrgahe
NewCouponDeletionJob:
type: object
required:
- filters
properties:
filters:
$ref: '#/components/schemas/CouponDeletionFilters'
CouponDeletionFilters:
type: object
properties:
createdBefore:
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
type: string
format: date-time
createdAfter:
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
type: string
format: date-time
startsAfter:
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
type: string
format: date-time
startsBefore:
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
type: string
format: date-time
valid:
enum:
- expired
- validNow
- validFuture
description: |
- `expired`: Matches coupons in which the expiration date is set and in the past.
- `validNow`: Matches coupons in which the start date is null or in the past and the expiration date is null or in the future.
- `validFuture`: Matches coupons in which the start date is set and in the future.
type: string
usable:
type: boolean
description: |
- `true`: only coupons where `usageCounter < usageLimit` will be returned.
- `false`: only coupons where `usageCounter >= usageLimit` will be returned.
- This field cannot be used in conjunction with the `usable` query parameter.
redeemed:
type: boolean
description: |
- `true`: only coupons where `usageCounter > 0` will be returned.
- `false`: only coupons where `usageCounter = 0` will be returned.
**Note:** This field cannot be used in conjunction with the `usable` query parameter.
recipientIntegrationId:
description: |
Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field.
type: string
exactMatch:
description: Filter results to an exact case-insensitive matching against the coupon code
type: boolean
default: false
value:
description: Filter results by the coupon code
type: string
default: false
batchId:
description: Filter results by batches of coupons
type: string
referralId:
description: Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.
type: integer
expiresAfter:
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
type: string
format: date-time
expiresBefore:
description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
type: string
format: date-time
CouponDeletionJob:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/NewCouponDeletionJob'
- type: object
required:
- createdBy
- status
- failCount
- errors
- communicated
properties:
status:
title: Job Status
type: string
description: |
The current status of this request. Possible values:
- `not_ready`
- `pending`
- `completed`
- `failed`
example: pending
deletedAmount:
title: Deleted Amount
type: integer
description: The number of coupon codes that were already deleted for this request.
example: 1000000
failCount:
title: Fail Count
type: integer
description: The number of times this job failed.
example: 10
errors:
title: Errors
type: array
description: An array of individual problems encountered during the request.
example:
- Connection to database was reset
- failed to delete codes
items:
type: string
createdBy:
title: Created By
type: integer
description: ID of the user who created this effect.
example: 1
communicated:
type: boolean
description: Indicates whether the user that created this job was notified of its final state.
example: false
campaignIDs:
type: array
items:
type: integer
title: Campaign ID
AsyncCouponDeletionJobResponse:
allOf:
- $ref: '#/components/schemas/IdentifiableEntity'
- type: object
LimitCounter:
allOf:
- $ref: '#/components/schemas/CampaignEntity'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/AccountEntity'
- type: object
required:
- id
- action
- limit
- counter
properties:
id:
type: integer
description: Unique ID for this entity.
example: 6
action:
type: string
example: setDiscount
description: The limitable action of the limit counter.
profileId:
type: integer
description: The profile ID for which this limit counter is used.
example: 335
profileIntegrationId:
type: string
maxLength: 1000
description: The profile integration ID for which this limit counter is used.
example: URNGV8294NV
couponId:
type: integer
description: The internal coupon ID for which this limit counter is used.
example: 34
couponValue:
type: string
description: The coupon value for which this limit counter is used.
example: XMAS-20-2021
referralId:
type: integer
description: The referral ID for which this limit counter is used.
example: 4
referralValue:
type: string
description: The referral value for which this limit counter is used.
example: ''
identifier:
type: string
description: The arbitrary identifier for which this limit counter is used.
example: 91.11.156.141
period:
type: string
example: Y2021M8
description: The time period for which this limit counter is used.
limit:
type: number
example: 10
description: The highest possible value for this limit counter.
counter:
type: number
example: 5
description: The current value for this limit counter.
NewBaseNotification:
allOf:
- $ref: '#/components/schemas/BaseNotificationEntity'
- type: object
required:
- webhook
properties:
webhook:
$ref: '#/components/schemas/NewNotificationWebhook'
BaseNotificationEntity:
type: object
required:
- policy
properties:
policy:
$ref: '#/components/schemas/BaseNotificationPolicy'
enabled:
type: boolean
description: Indicates whether the notification is activated.
default: true
BaseNotificationPolicy:
type: object
description: Indicates which notification properties to apply.
oneOf:
- $ref: '#/components/schemas/ExpiringCouponsNotificationPolicy'
- $ref: '#/components/schemas/CardExpiringPointsNotificationPolicy'
- $ref: '#/components/schemas/ExpiringPointsNotificationPolicy'
- $ref: '#/components/schemas/AddedDeductedPointsNotificationPolicy'
- $ref: '#/components/schemas/CardAddedDeductedPointsNotificationPolicy'
- $ref: '#/components/schemas/CouponsNotificationPolicy'
- $ref: '#/components/schemas/CatalogsStrikethroughNotificationPolicy'
- $ref: '#/components/schemas/PendingPointsNotificationPolicy'
- $ref: '#/components/schemas/CampaignNotificationPolicy'
- $ref: '#/components/schemas/TierDowngradeNotificationPolicy'
- $ref: '#/components/schemas/TierUpgradeNotificationPolicy'
- $ref: '#/components/schemas/TierWillDowngradeNotificationPolicy'
ExpiringCouponsNotificationPolicy:
type: object
required:
- name
- triggers
properties:
name:
type: string
description: Notification name.
example: Notification to Google
minLength: 1
triggers:
type: array
maxItems: 3
minItems: 1
items:
$ref: '#/components/schemas/ExpiringCouponsNotificationTrigger'
batchingEnabled:
type: boolean
description: Indicates whether batching is activated.
default: true
example: true
ExpiringPointsNotificationPolicy:
type: object
required:
- name
- triggers
properties:
name:
type: string
description: Notification name.
example: Notification to Google
minLength: 1
triggers:
type: array
maxItems: 3
minItems: 1
items:
$ref: '#/components/schemas/ExpiringPointsNotificationTrigger'
batchingEnabled:
type: boolean
description: Indicates whether batching is activated.
default: true
example: true
CardExpiringPointsNotificationPolicy:
type: object
required:
- name
- triggers
properties:
name:
type: string
description: Notification name.
example: Notification to Google
minLength: 1
triggers:
type: array
maxItems: 3
minItems: 1
items:
$ref: '#/components/schemas/CardExpiringPointsNotificationTrigger'
batchingEnabled:
type: boolean
description: Indicates whether batching is activated.
default: true
example: true
AddedDeductedPointsNotificationPolicy:
type: object
required:
- name
- scopes
properties:
name:
type: string
description: Notification name.
example: Christmas Sale
minLength: 1
scopes:
type: array
minItems: 1
maxItems: 4
items:
type: string
enum:
- all
- campaign_manager
- management_api
- rule_engine
CardAddedDeductedPointsNotificationPolicy:
type: object
required:
- name
- scopes
properties:
name:
type: string
description: Notification name.
example: Christmas Sale
minLength: 1
scopes:
type: array
minItems: 1
maxItems: 4
items:
type: string
enum:
- all
- campaign_manager
- management_api
- rule_engine
CouponsNotificationPolicy:
type: object
required:
- name
- scopes
properties:
name:
type: string
description: Notification name.
example: Christmas Sale
minLength: 1
scopes:
type: array
minItems: 1
maxItems: 4
items:
type: string
enum:
- all
- campaign_manager
- management_api
- rule_engine
batchingEnabled:
type: boolean
description: Indicates whether batching is activated.
default: true
example: true
CatalogsStrikethroughNotificationPolicy:
type: object
required:
- name
properties:
name:
type: string
description: Notification name.
example: Christmas Sale
minLength: 1
PendingPointsNotificationPolicy:
type: object
required:
- name
properties:
name:
type: string
description: Notification name.
example: Christmas Sale
minLength: 1
batchingEnabled:
type: boolean
description: Indicates whether batching is activated.
default: true
example: false
TierUpgradeNotificationPolicy:
type: object
required:
- name
properties:
name:
type: string
description: Notification name.
example: Christmas Sale
minLength: 1
batchingEnabled:
type: boolean
description: Indicates whether batching is activated.
default: true
example: false
TierDowngradeNotificationPolicy:
type: object
required:
- name
properties:
name:
type: string
description: The name of the notification.
example: Christmas Sale
minLength: 1
batchingEnabled:
type: boolean
description: Indicates whether batching is activated.
default: true
example: false
CampaignNotificationPolicy:
type: object
required:
- name
properties:
name:
type: string
description: Notification name.
example: Christmas Sale
minLength: 1
batchingEnabled:
type: boolean
description: Indicates whether batching is activated.
default: true
example: false
TierWillDowngradeNotificationPolicy:
type: object
required:
- name
- triggers
properties:
name:
type: string
description: The name of the notification.
example: Notification to Google
minLength: 1
batchingEnabled:
type: boolean
description: Indicates whether batching is activated.
default: true
example: false
triggers:
type: array
maxItems: 3
minItems: 1
items:
$ref: '#/components/schemas/TierWillDowngradeNotificationTrigger'
ExpiringCouponsNotificationTrigger:
type: object
required:
- amount
- period
properties:
amount:
type: integer
description: The amount of period.
minimum: 0
period:
type: string
description: Notification period indicated by a letter; "w" means week, "d" means day.
enum:
- w
- d
ExpiringPointsNotificationTrigger:
type: object
required:
- amount
- period
properties:
amount:
type: integer
description: The amount of period.
minimum: 1
period:
type: string
description: Notification period indicated by a letter; "w" means week, "d" means day.
enum:
- w
- d
CardExpiringPointsNotificationTrigger:
type: object
required:
- amount
- period
properties:
amount:
type: integer
description: The amount of period.
minimum: 1
period:
type: string
description: Notification period indicated by a letter; "w" means week, "d" means day.
enum:
- w
- d
TierWillDowngradeNotificationTrigger:
type: object
required:
- amount
- period
properties:
amount:
type: integer
description: The amount of period.
period:
type: string
description: Notification period indicated by a letter; "w" means week, "d" means day.
enum:
- w
- d
BaseNotification:
allOf:
- $ref: '#/components/schemas/BaseNotificationEntity'
- type: object
required:
- webhook
- id
- type
properties:
webhook:
$ref: '#/components/schemas/BaseNotificationWebhook'
id:
type: integer
description: Unique ID for this entity.
example: 6
minimum: 1
type:
type: string
enum:
- campaign
- loyalty_added_deducted_points
- card_added_deducted_points
- coupon
- expiring_coupons
- expiring_points
- card_expiring_points
- pending_to_active_points
- strikethrough_pricing
- tier_downgrade
- tier_upgrade
- tier_will_downgrade
description: The notification type.
example: loyalty_added_deducted_points
BaseNotificationWebhook:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/NewNotificationWebhook'
- type: object
NewNotificationWebhook:
type: object
required:
- url
- headers
properties:
url:
type: string
description: API URL for the given webhook-based notification.
example: www.my-company.com/my-endpoint-name
headers:
type: array
description: List of API HTTP headers for the given webhook-based notification.
items:
type: string
pattern: ^[^:,]+:[^,]*$
example: 'content-type: application/json'
enabled:
type: boolean
description: Indicates whether the notification is activated.
default: true
example: true
NotificationActivation:
type: object
required:
- enabled
properties:
enabled:
type: boolean
description: Indicates whether the notification is activated.
OutgoingIntegrationConfigurationPolicy:
type: object
description: The outgoing integration policy specific to each integration type.
oneOf:
- $ref: '#/components/schemas/OutgoingIntegrationBrazePolicy'
- $ref: '#/components/schemas/OutgoingIntegrationCleverTapPolicy'
- $ref: '#/components/schemas/OutgoingIntegrationMoEngagePolicy'
- $ref: '#/components/schemas/OutgoingIntegrationIterablePolicy'
OutgoingIntegrationBrazePolicy:
type: object
required:
- baseUrl
- apiKey
properties:
baseUrl:
type: string
description: The base URL of your Braze deployment.
example: your-braze-url.com
apiKey:
type: string
description: The API key of your Braze deployment.
example: Your-REST-API-Key
OutgoingIntegrationCleverTapPolicy:
type: object
required:
- baseUrl
- accountId
- passcode
properties:
baseUrl:
type: string
description: The base URL that is based on the region key of your CleverTap account.
example: your-clevertap-url.com
accountId:
type: string
description: The CleverTap Project ID.
example: A9X-7A6-4A6B
passcode:
type: string
description: The CleverTap Project passcode.
example: ABB-BAF-AWZP
OutgoingIntegrationMoEngagePolicy:
type: object
required:
- baseUrl
- appId
- dataApiId
- dataApiKey
properties:
baseUrl:
type: string
description: The base URL of your MoEngage deployment, containing the MoEngage data center number (represented by `0X`).
example: https://api-01.moengage.com
appId:
type: string
description: MoEngage APP ID. See [MoEngage Developer Guide](https://developers.moengage.com/hc/en-us/articles/4404674776724-Overview).
example: LDUBEU9PLTPYXV30SMTYAAAA
dataApiId:
type: string
description: MoEngage DATA API ID. See [MoEngage Developer Guide](https://developers.moengage.com/hc/en-us/articles/4404674776724-Overview).
example: LDUBEU9PLTPYXV30SMTYAAAA
dataApiKey:
type: string
description: MoEngage DATA API Key. See [MoEngage Developer Guide](https://developers.moengage.com/hc/en-us/articles/4404674776724-Overview).
example: R95crrAAdZ747QLXe8LwnGLX
OutgoingIntegrationIterablePolicy:
type: object
required:
- baseUrl
- apiKey
properties:
baseUrl:
type: string
description: The base URL that is based on the region key of your Iterable account.
example: https://api.iterable.com
apiKey:
type: string
description: The API key generated from your Iterable account. See [Iterable API Key Guide](https://support.iterable.com/hc/en-us/articles/360043464871-API-Keys-)
example: 1234df4ba16940ca59c9352936d080a8
OutgoingIntegrationTemplate:
type: object
required:
- id
- integrationType
- title
- description
- payload
- method
- relativeUrl
- headers
properties:
id:
type: integer
description: Unique ID for this entity.
example: 6
integrationType:
type: integer
description: Unique ID of outgoing integration type.
example: 2
title:
type: string
description: The title of the integration template.
example: Email coupon codes
minLength: 1
maxLength: 255
description:
type: string
description: The description of the specific outgoing integration template.
example: This template sends a coupon code to the specified audience by email.
minLength: 1
maxLength: 1000
payload:
type: string
description: The API payload (supports templating using parameters) for this integration template.
example: "{\n\t\"message\": \"${message}\"\n}"
method:
type: string
enum:
- POST
- PUT
- GET
- DELETE
- PATCH
description: API method for this webhook.
example: POST
relativeUrl:
type: string
description: The relative URL corresponding to each integration template.
example: /campaigns/trigger/send
headers:
type: array
description: The list of HTTP headers for this integration template.
items:
type: string
pattern: ^([^:,]*):([^]*|[^,]*)$
example:
- '{"Content-Type": "application/json"}'
OutgoingIntegrationTemplateWithConfigurationDetails:
allOf:
- $ref: '#/components/schemas/OutgoingIntegrationTemplate'
- type: object
required:
- policy
properties:
policy:
$ref: '#/components/schemas/OutgoingIntegrationConfigurationPolicy'
CouponLimitConfigs:
type: object
properties:
limits:
type: array
description: |
Limits configuration for a coupon. These limits will override the limits
set from the campaign.
**Note:** Only usable when creating a single coupon which is not tied to a specific recipient.
Only per-profile limits are allowed to be configured.
items:
$ref: '#/components/schemas/LimitConfig'
Return:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/ApplicationEntity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/NewReturn'
- type: object
required:
- eventId
- sessionId
- sessionIntegrationId
properties:
eventId:
title: Event ID
type: integer
description: The event ID of that was generated for this return.
example: 123
sessionId:
title: Session ID
type: integer
description: The internal ID of the session this return was requested on.
example: 123
sessionIntegrationId:
title: Session Integration ID
type: string
maxLength: 1000
description: The integration ID of the session this return was requested on.
example: 0c0e0207-eb30-4e06-a56c-2b7c8a64953c
profileId:
title: Profile ID
type: integer
description: The internal ID of the profile this return was requested on.
example: 123
profileIntegrationId:
title: Profile Integration ID
type: string
maxLength: 1000
description: The integration ID of the profile this return was requested on.
example: 0c0e0207-eb30-4e06-a56c-2b7c8a64953c
createdBy:
title: Created By
type: integer
description: ID of the user who requested this return.
example: 123
NewReturn:
type: object
required:
- returnedCartItems
properties:
returnedCartItems:
type: array
description: List of cart items to be returned.
items:
$ref: '#/components/schemas/ReturnedCartItem'
ReturnedCartItem:
type: object
required:
- position
properties:
position:
description: The index of the cart item in the provided customer session's `cartItems` property.
type: integer
example: 2
quantity:
description: |
Number of cart items to return.
type: integer
example: 1
EventV2:
allOf:
- $ref: '#/components/schemas/IntegrationProfileEntity'
- $ref: '#/components/schemas/IntegrationStoreEntity'
- $ref: '#/components/schemas/EvaluableCampaignIds'
- type: object
required:
- type
properties:
type:
type: string
title: Event Type
description: |
A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) of type `event` in the Campaign Manager.
minLength: 1
example: pageViewed
attributes:
type: object
description: Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-a-custom-attribute).
additionalProperties: true
example:
myAttribute: myValue
IntegrationEventV2Request:
allOf:
- $ref: '#/components/schemas/EventV2'
- type: object
properties:
responseContent:
type: array
description: |
Optional list of requested information to be present on the response related to the tracking custom event.
example:
- triggeredCampaigns
- customerProfile
items:
type: string
enum:
- customerProfile
- triggeredCampaigns
- loyalty
- event
- awardedGiveaways
- ruleFailureReasons
NewCatalog:
allOf:
- type: object
required:
- name
- description
properties:
name:
type: string
description: The cart item catalog name.
example: seafood
description:
type: string
description: A description of this cart item catalog.
example: seafood catalog
subscribedApplicationsIds:
type: array
description: A list of the IDs of the applications that are subscribed to this catalog.
example:
- 1
- 2
- 3
items:
type: integer
Catalog:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/AccountEntity'
- $ref: '#/components/schemas/MutableEntity'
- $ref: '#/components/schemas/NewCatalog'
- type: object
required:
- version
- createdBy
properties:
version:
type: integer
description: The current version of this catalog.
example: 6
createdBy:
type: integer
description: The ID of user who created this catalog.
example: 6
CatalogItem:
allOf:
- $ref: '#/components/schemas/Entity'
- type: object
required:
- sku
- catalogid
- version
properties:
sku:
type: string
description: The stock keeping unit of the item.
example: SKU1241028
price:
type: number
description: Price of the item.
example: 99.99
x-fieldType: NullDecimal
catalogid:
type: integer
description: The ID of the catalog the item belongs to.
example: 6
version:
type: integer
minimum: 1
description: The version of the catalog item.
example: 5
attributes:
type: array
items:
$ref: '#/components/schemas/ItemAttribute'
product:
$ref: '#/components/schemas/Product'
Product:
type: object
description: The specific properties of the product this item belongs to, if available.
required:
- name
properties:
name:
type: string
description: The name of the product.
maxLength: 50
example: sample_product
ItemAttribute:
allOf:
- type: object
required:
- attributeid
- name
- value
properties:
attributeid:
type: integer
description: The ID of the attribute of the item.
example: 6
name:
type: string
description: The name of the attribute.
value:
description: The value of the attribute.
UpdateStore:
type: object
required:
- name
- description
properties:
name:
type: string
description: The name of the store.
example: South US store
minLength: 1
maxLength: 200
description:
type: string
description: The description of the store.
example: This is the description of the store in south US.
attributes:
type: object
description: The attributes of the store.
additionalProperties: true
example:
country: USA
code: 1234
NewStore:
allOf:
- $ref: '#/components/schemas/UpdateStore'
- type: object
required:
- integrationId
properties:
integrationId:
type: string
format: string
example: STORE-001
maxLength: 1000
minLength: 1
description: |
The integration ID of the store. You choose this ID when you create a store.
**Note**: You cannot edit the `integrationId` after the store has been created.
Store:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/NewStore'
- type: object
required:
- updated
- applicationId
- integrationId
- created
properties:
created:
type: string
format: date-time
description: The time this entity was created.
example: '2020-02-07T08:15:22Z'
applicationId:
type: integer
description: The ID of the application that owns this entity.
example: 322
updated:
type: string
format: date-time
description: Timestamp of the most recent update on this entity.
example: '2021-09-23T10:12:42Z'
linkedCampaignIds:
type: array
description: A list of IDs of the campaigns that are linked with current store.
items:
type: integer
example:
- 4
- 6
- 8
CampaignStoreBudget:
allOf:
- $ref: '#/components/schemas/Entity'
- type: object
required:
- campaignId
- storeId
- limits
properties:
campaignId:
type: integer
description: The ID of the campaign that owns this entity.
example: 322
storeId:
type: integer
description: The ID of the store.
limits:
type: array
description: The set of budget limits for stores linked to the campaign.
items:
$ref: '#/components/schemas/LimitConfig'
CreateAchievement:
type: object
required:
- name
- title
- description
- target
- period
properties:
name:
type: string
pattern: ^[a-zA-Z]\w+$
example: Order50Discount
maxLength: 1000
minLength: 1
description: |
The internal name of the achievement used in API requests.
**Note**: The name should start with a letter. This cannot be changed after the achievement has been created.
title:
type: string
description: The display name for the achievement in the Campaign Manager.
example: 50% off on 50th purchase.
description:
type: string
format: string
description: A description of the achievement.
example: 50% off for every 50th purchase in a year.
target:
type: number
description: The required number of actions or the transactional milestone to complete the achievement.
example: 50
period:
type: string
description: |
The relative duration after which the achievement ends and resets for a particular customer profile.
**Note**: The `period` does not start when the achievement is created.
The period is a **positive real number** followed by one letter indicating the time unit.
Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`.
Available units:
- `s`: seconds
- `m`: minutes
- `h`: hours
- `D`: days
- `W`: weeks
- `M`: months
- `Y`: years
You can also round certain units down to the beginning of period and up to the end of period.:
- `_D` for rounding down days only. Signifies the start of the day.
Example: `30D_D`
- `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year.
Example: `23W_U`
**Note**: You can either use the round down and round up option or set an absolute period.
example: 1Y
periodEndOverride:
$ref: '#/components/schemas/TimePoint'
AchievementAdditionalProperties:
type: object
required:
- campaignId
- userId
- createdBy
properties:
campaignId:
type: integer
description: ID of the campaign, to which the achievement belongs to
example: 1
userId:
type: integer
description: ID of the user that created this achievement.
example: 1234
createdBy:
type: string
description: |
Name of the user that created the achievement.
**Note**: This is not available if the user has been deleted.
example: John Doe
hasProgress:
type: boolean
description: Indicates if a customer has made progress in the achievement.
Achievement:
allOf:
- $ref: '#/components/schemas/Entity'
- $ref: '#/components/schemas/CreateAchievement'
- $ref: '#/components/schemas/AchievementAdditionalProperties'
- type: object
UpdateAchievement:
type: object
properties:
name:
type: string
pattern: ^[a-zA-Z]\w+$
example: Order50Discount
maxLength: 1000
minLength: 1
description: |
The internal name of the achievement used in API requests.
title:
type: string
description: The display name for the achievement in the Campaign Manager.
example: 50% off on 50th purchase.
description:
type: string
format: string
description: A description of the achievement.
example: 50% off for every 50th purchase in a year.
target:
type: number
description: The required number of actions or the transactional milestone to complete the achievement.
example: 50
period:
type: string
description: |
The relative duration after which the achievement ends and resets for a particular customer profile.
example: 1Y
periodEndOverride:
$ref: '#/components/schemas/TimePoint'
AchievementProgress:
type: object
required:
- achievementId
- name
- title
- description
- campaignId
- status
- progress
- startDate
- endDate
properties:
achievementId:
type: integer
example: 3
description: The internal ID of the achievement.
name:
type: string
pattern: ^[a-zA-Z]\w+$
example: FreeCoffee10Orders
maxLength: 1000
minLength: 1
description: |
The internal name of the achievement used in API requests.
title:
type: string
description: The display name of the achievement in the Campaign Manager.
example: 50% off on 50th purchase.
description:
type: string
format: string
description: The description of the achievement in the Campaign Manager.
example: 50% off for every 50th purchase in a year.
campaignId:
type: integer
description: The ID of the campaign the achievement belongs to.
example: 3
status:
type: string
enum:
- inprogress
- completed
- expired
example: completed
description: The status of the achievement.
target:
type: number
example: 10
description: The required number of actions or the transactional milestone to complete the achievement.
progress:
type: number
example: 10
description: The current progress of the customer in the achievement.
startDate:
format: date-time
description: Timestamp at which the customer started the achievement.
type: string
example: 2024-01-01T15:04:05Z07:00
completionDate:
format: date-time
description: Timestamp at which point the customer completed the achievement.
type: string
example: 2024-01-15T15:04:05Z07:00
endDate:
format: date-time
description: Timestamp at which point the achievement ends and resets for the customer.
type: string
example: 2024-02-01T15:04:05Z07:00