Skip to content

Commit 4d4f64c

Browse files
authored
v4.0.0: Reopen session endpoint, loyalty data integration endpoints and loyalty card management endpoints (#20)
## Summary ### Integration API - [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession) - [Get customer's loyalty points](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyBalances) - [List customer's loyalty transactions](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions) - [Get card's point balances](https://docs.talon.one/integration-api#tag/Loyalty-cards/operation/getLoyaltyCardBalances) - [List card's transactions](https://docs.talon.one/integration-api#tag/Loyalty-cards/operation/getLoyaltyCardTransactions) - [Link customer profile to card](https://docs.talon.one/integration-api#tag/Loyalty-cards/operation/linkLoyaltyCardToProfile) ### Management API - [Add points to card](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/addLoyaltyCardPoints) - [Deduct points from card](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/deductLoyaltyCardPoints) - [Delete loyalty card](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/deleteLoyaltyCard) - [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) - [Get loyalty card](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCard) - [Import loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/importLoyaltyCards) - [Transfer card data](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/transferLoyaltyCard) - [Update loyalty card status](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/updateLoyaltyCard) - [List card's transactions](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCardTransactionLogs) - [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) - [Export customer loyalty balances](https://docs.talon.one/management-api#tag/Loyalty/operation/exportLoyaltyBalances) -- please note deprecation notice blow - [Export all card transaction logs](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/exportLoyaltyCardBalances) - [Export card's ledger log](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/exportLoyaltyCardLedger) ## ⚠️ Deprecation Notice: Export customer loyalty balance to CSV endpoint Please note that the [Export customer loyalty balance to CSV](https://docs.talon.one/management-api#tag/Loyalty/operation/exportLoyaltyBalance) endpoint is getting deprecated, please update your code to point at the new [Export customer loyalty balances](https://docs.talon.one/management-api#tag/Loyalty/operation/exportLoyaltyBalances)
1 parent a35a4af commit 4d4f64c

File tree

1,020 files changed

+42601
-12215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,020 files changed

+42601
-12215
lines changed

README.md

Lines changed: 114 additions & 33 deletions
Large diffs are not rendered by default.

docs/Account.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**id** | **int** | 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. |
8-
**created** | **datetime** | The exact moment this entity was created. |
9-
**modified** | **datetime** | The exact moment this entity was last modified. |
7+
**id** | **int** | Internal ID of this entity. |
8+
**created** | **datetime** | The time this entity was created. |
9+
**modified** | **datetime** | The time this entity was last modified. |
1010
**company_name** | **str** | |
1111
**domain_name** | **str** | Subdomain Name for yourcompany.talon.one. |
1212
**state** | **str** | State of the account (active, deactivated). |

docs/AccountAdditionalCost.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**id** | **int** | 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. |
8-
**created** | **datetime** | The exact moment this entity was created. |
7+
**id** | **int** | Internal ID of this entity. |
8+
**created** | **datetime** | The time this entity was created. |
99
**account_id** | **int** | The ID of the account that owns this entity. |
10-
**name** | **str** | The additional cost name that will be used in API requests and Talang. E.g. if `name == \"shipping\"` then you would set the shipping additional cost by including an `additionalCosts.shipping` property in your request payload. |
10+
**name** | **str** | The internal name used in API requests. |
1111
**title** | **str** | 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. |
1212
**description** | **str** | A description of this additional cost. |
1313
**subscribed_applications_ids** | **list[int]** | A list of the IDs of the applications that are subscribed to this additional cost. | [optional]
14-
**type** | **str** | The type of additional cost. The following options can be chosen: - `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. | [optional] [default to 'session']
14+
**type** | **str** | 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. | [optional] [default to 'session']
1515

1616
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1717

docs/AccountDashboardStatistic.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# AccountDashboardStatistic
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**revenue** | [**list[AccountDashboardStatisticRevenue]**](AccountDashboardStatisticRevenue.md) | Aggregated statistic for account revenue. | [optional]
7+
**discounts** | [**list[AccountDashboardStatisticDiscount]**](AccountDashboardStatisticDiscount.md) | Aggregated statistic for account discount. | [optional]
8+
**loyalty_points** | [**list[AccountDashboardStatisticLoyaltyPoints]**](AccountDashboardStatisticLoyaltyPoints.md) | Aggregated statistic for account loyalty points. | [optional]
9+
**referrals** | [**list[AccountDashboardStatisticReferrals]**](AccountDashboardStatisticReferrals.md) | Aggregated statistic for account referrals. | [optional]
10+
**api_calls** | [**list[AccountDashboardStatisticApiCalls]**](AccountDashboardStatisticApiCalls.md) | Aggregated statistic for the number of account API calls. | [optional]
11+
**campaigns** | [**AccountDashboardStatisticCampaigns**](AccountDashboardStatisticCampaigns.md) | |
12+
13+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+
15+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AccountDashboardStatisticApiCalls
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **float** | Total number of API calls received. |
7+
**datetime** | **datetime** | Values aggregated for the specified date. |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AccountDashboardStatisticCampaigns
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**live** | **int** | Number of campaigns that are active and live (across all Applications). |
7+
**ending_soon** | **int** | Campaigns with a schedule ending in 7 days or with only 10% of budget left. |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# AccountDashboardStatisticDiscount
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **float** | Total discount value redeemed by users. |
7+
**average** | **float** | Average discount percentage. |
8+
**datetime** | **datetime** | Values aggregated for the specified date. |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AccountDashboardStatisticLoyaltyPoints
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **float** | Total loyalty points earned by users. |
7+
**datetime** | **datetime** | Values aggregated for the specified date. |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AccountDashboardStatisticReferrals
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **float** | Total number of referrals initiated by users. |
7+
**datetime** | **datetime** | Values aggregated for the specified date. |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# AccountDashboardStatisticRevenue
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **float** | All revenue that went through the client's shop (including purchases that didn’t trigger an effect). |
7+
**influenced** | **float** | The revenue that was created by a purchase that triggered an effect (excluding web hooks, notifications). |
8+
**datetime** | **datetime** | Values aggregated for the specified date. |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

docs/AddFreeItemEffectProps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The properties specific to the \"addFreeItem\" effect. This gets triggered whene
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**sku** | **str** | SKU of the item that needs to be added. |
8-
**name** | **str** | The name/description of the effect. |
8+
**name** | **str** | The name / description of the effect |
99

1010
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1111

docs/AddLoyaltyPoints.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# AddLoyaltyPoints
2+
3+
Points to add.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**points** | **float** | Amount of loyalty points. |
8+
**name** | **str** | Name / reason for the point addition. | [optional]
9+
**validity_duration** | **str** | 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`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months 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 and months. Signifies the end of the day, week, or month. If passed, `validUntil` should be omitted. | [optional]
10+
**valid_until** | **datetime** | Date and time when points should expire. The value should be provided in RFC 3339 format. If passed, `validityDuration` should be omitted. | [optional]
11+
**pending_duration** | **str** | 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`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months 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 and months. Signifies the end of the day, week, or month. | [optional]
12+
**pending_until** | **datetime** | Date and time after the points are considered valid. The value should be provided in RFC 3339 format. If passed, `pendingDuration` should be omitted. | [optional]
13+
**subledger_id** | **str** | ID of the subledger the points are added to. If there is no existing subledger with this ID, the subledger is created automatically. | [optional]
14+
**application_id** | **int** | ID of the Application that is connected to the loyalty program. It is displayed in your Talon.One deployment URL. | [optional]
15+
16+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17+
18+

docs/AddLoyaltyPointsEffectProps.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The properties specific to the \"addLoyaltyPoints\" effect. This gets triggered
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**name** | **str** | The reason of the point addition. |
7+
**name** | **str** | The name / description of this loyalty point addition. |
88
**program_id** | **int** | The ID of the loyalty program where these points were added. |
99
**sub_ledger_id** | **str** | The ID of the subledger within the loyalty program where these points were added. |
1010
**value** | **float** | The amount of points that were added. |
@@ -15,7 +15,9 @@ Name | Type | Description | Notes
1515
**transaction_uuid** | **str** | The identifier of this addition in the loyalty ledger. |
1616
**cart_item_position** | **float** | The index of the item in the cart items list on which the loyal points addition should be applied. | [optional]
1717
**cart_item_sub_position** | **float** | The sub position is triggered when application flattening is enabled. It indicates to which item the loyalty points addition applies, for cart items with `quantity` > 1. | [optional]
18-
**card_identifier** | **str** | The card on which these points were added. | [optional]
18+
**card_identifier** | **str** | The alphanumeric identifier of the loyalty card. | [optional]
19+
**bundle_index** | **int** | The position of the bundle in a list of item bundles created from the same bundle definition. | [optional]
20+
**bundle_name** | **str** | The name of the bundle definition. | [optional]
1921

2022
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2123

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AddedDeductedPointsNotificationPolicy
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | **str** | Notification name. |
7+
**scopes** | **list[str]** | |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/Application.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**id** | **int** | 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. |
8-
**created** | **datetime** | The exact moment this entity was created. |
9-
**modified** | **datetime** | The exact moment this entity was last modified. |
7+
**id** | **int** | Internal ID of this entity. |
8+
**created** | **datetime** | The time this entity was created. |
9+
**modified** | **datetime** | The time this entity was last modified. |
1010
**account_id** | **int** | The ID of the account that owns this entity. |
1111
**name** | **str** | The name of this application. |
1212
**description** | **str** | A longer description of the application. | [optional]
@@ -19,7 +19,7 @@ Name | Type | Description | Notes
1919
**exclusive_campaigns_strategy** | **str** | The strategy used when choosing exclusive campaigns for evaluation. | [optional] [default to 'listOrder']
2020
**default_discount_scope** | **str** | The default scope to apply `setDiscount` effects on if no scope was provided with the effect. | [optional]
2121
**enable_cascading_discounts** | **bool** | Indicates if discounts should cascade for this Application. | [optional]
22-
**enable_flattened_cart_items** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See [the docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items). | [optional]
22+
**enable_flattened_cart_items** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). | [optional]
2323
**attributes_settings** | [**AttributesSettings**](AttributesSettings.md) | | [optional]
2424
**sandbox** | **bool** | Indicates if this is a live or sandbox Application. | [optional]
2525
**enable_partial_discounts** | **bool** | Indicates if this Application supports partial discounts. | [optional]

docs/ApplicationApiHealth.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Report of health of the API connection of an application.
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**summary** | **str** | One-word summary of the health of the API connection of an application. |
7+
**summary** | **str** | 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. |
88
**last_used** | **datetime** | time of last request relevant to the API health test. |
99

1010
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/ApplicationCustomer.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**id** | **int** | 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. 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. |
8-
**created** | **datetime** | The exact moment this entity was created. The exact moment this entity was created. The exact moment this entity was created. The exact moment this entity was created. |
7+
**id** | **int** | Internal ID of this entity. Internal ID of this entity. |
8+
**created** | **datetime** | The time this entity was created. The time this entity was created. The time this entity was created. The time this entity was created. |
99
**integration_id** | **str** | The integration ID set by your integration layer. The integration ID set by your integration layer. |
1010
**attributes** | [**object**](.md) | Arbitrary properties associated with this item. |
1111
**account_id** | **int** | The ID of the Talon.One account that owns this profile. The ID of the Talon.One account that owns this profile. |
1212
**closed_sessions** | **int** | The total amount of closed sessions by a customer. A closed session is a successful purchase. |
13-
**total_sales** | **float** | Sum of all purchases made by this customer. |
13+
**total_sales** | **float** | 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. |
1414
**loyalty_memberships** | [**list[LoyaltyMembership]**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional]
15-
**audience_memberships** | [**list[AudienceMembership]**](AudienceMembership.md) | A list of audiences the customer belongs to. | [optional]
16-
**last_activity** | **datetime** | 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. |
15+
**audience_memberships** | [**list[AudienceMembership]**](AudienceMembership.md) | The audiences the customer belongs to. | [optional]
16+
**last_activity** | **datetime** | 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. |
17+
**sandbox** | **bool** | Shows whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). | [optional]
1718
**advocate_integration_id** | **str** | The Integration ID of the Customer Profile that referred this Customer in the Application. | [optional]
1819

1920
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

0 commit comments

Comments
 (0)