Skip to content

Commit

Permalink
v4.0.0: Reopen session endpoint, loyalty data integration endpoints a…
Browse files Browse the repository at this point in the history
…nd 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)
  • Loading branch information
altJake authored May 3, 2023
1 parent a35a4af commit 4d4f64c
Show file tree
Hide file tree
Showing 1,020 changed files with 42,601 additions and 12,215 deletions.
147 changes: 114 additions & 33 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/Account.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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. |
**created** | **datetime** | The exact moment this entity was created. |
**modified** | **datetime** | The exact moment this entity was last modified. |
**id** | **int** | Internal ID of this entity. |
**created** | **datetime** | The time this entity was created. |
**modified** | **datetime** | The time this entity was last modified. |
**company_name** | **str** | |
**domain_name** | **str** | Subdomain Name for yourcompany.talon.one. |
**state** | **str** | State of the account (active, deactivated). |
Expand Down
8 changes: 4 additions & 4 deletions docs/AccountAdditionalCost.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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. |
**created** | **datetime** | The exact moment this entity was created. |
**id** | **int** | Internal ID of this entity. |
**created** | **datetime** | The time this entity was created. |
**account_id** | **int** | The ID of the account that owns this entity. |
**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. |
**name** | **str** | The internal name used in API requests. |
**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. |
**description** | **str** | A description of this additional cost. |
**subscribed_applications_ids** | **list[int]** | A list of the IDs of the applications that are subscribed to this additional cost. | [optional]
**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']
**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']

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

Expand Down
15 changes: 15 additions & 0 deletions docs/AccountDashboardStatistic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# AccountDashboardStatistic

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**revenue** | [**list[AccountDashboardStatisticRevenue]**](AccountDashboardStatisticRevenue.md) | Aggregated statistic for account revenue. | [optional]
**discounts** | [**list[AccountDashboardStatisticDiscount]**](AccountDashboardStatisticDiscount.md) | Aggregated statistic for account discount. | [optional]
**loyalty_points** | [**list[AccountDashboardStatisticLoyaltyPoints]**](AccountDashboardStatisticLoyaltyPoints.md) | Aggregated statistic for account loyalty points. | [optional]
**referrals** | [**list[AccountDashboardStatisticReferrals]**](AccountDashboardStatisticReferrals.md) | Aggregated statistic for account referrals. | [optional]
**api_calls** | [**list[AccountDashboardStatisticApiCalls]**](AccountDashboardStatisticApiCalls.md) | Aggregated statistic for the number of account API calls. | [optional]
**campaigns** | [**AccountDashboardStatisticCampaigns**](AccountDashboardStatisticCampaigns.md) | |

[[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 changes: 11 additions & 0 deletions docs/AccountDashboardStatisticApiCalls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AccountDashboardStatisticApiCalls

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | **float** | Total number of API calls received. |
**datetime** | **datetime** | Values aggregated for the specified date. |

[[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 changes: 11 additions & 0 deletions docs/AccountDashboardStatisticCampaigns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AccountDashboardStatisticCampaigns

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**live** | **int** | Number of campaigns that are active and live (across all Applications). |
**ending_soon** | **int** | Campaigns with a schedule ending in 7 days or with only 10% of budget left. |

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


12 changes: 12 additions & 0 deletions docs/AccountDashboardStatisticDiscount.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AccountDashboardStatisticDiscount

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | **float** | Total discount value redeemed by users. |
**average** | **float** | Average discount percentage. |
**datetime** | **datetime** | Values aggregated for the specified date. |

[[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 changes: 11 additions & 0 deletions docs/AccountDashboardStatisticLoyaltyPoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AccountDashboardStatisticLoyaltyPoints

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | **float** | Total loyalty points earned by users. |
**datetime** | **datetime** | Values aggregated for the specified date. |

[[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 changes: 11 additions & 0 deletions docs/AccountDashboardStatisticReferrals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AccountDashboardStatisticReferrals

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | **float** | Total number of referrals initiated by users. |
**datetime** | **datetime** | Values aggregated for the specified date. |

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


12 changes: 12 additions & 0 deletions docs/AccountDashboardStatisticRevenue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AccountDashboardStatisticRevenue

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | **float** | All revenue that went through the client's shop (including purchases that didn’t trigger an effect). |
**influenced** | **float** | The revenue that was created by a purchase that triggered an effect (excluding web hooks, notifications). |
**datetime** | **datetime** | Values aggregated for the specified date. |

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


2 changes: 1 addition & 1 deletion docs/AddFreeItemEffectProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The properties specific to the \"addFreeItem\" effect. This gets triggered whene
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sku** | **str** | SKU of the item that needs to be added. |
**name** | **str** | The name/description of the effect. |
**name** | **str** | The name / description of the effect |

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

Expand Down
18 changes: 18 additions & 0 deletions docs/AddLoyaltyPoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# AddLoyaltyPoints

Points to add.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **float** | Amount of loyalty points. |
**name** | **str** | Name / reason for the point addition. | [optional]
**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]
**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]
**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]
**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]
**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]
**application_id** | **int** | ID of the Application that is connected to the loyalty program. It is displayed in your Talon.One deployment URL. | [optional]

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


6 changes: 4 additions & 2 deletions docs/AddLoyaltyPointsEffectProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The properties specific to the \"addLoyaltyPoints\" effect. This gets triggered
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | The reason of the point addition. |
**name** | **str** | The name / description of this loyalty point addition. |
**program_id** | **int** | The ID of the loyalty program where these points were added. |
**sub_ledger_id** | **str** | The ID of the subledger within the loyalty program where these points were added. |
**value** | **float** | The amount of points that were added. |
Expand All @@ -15,7 +15,9 @@ Name | Type | Description | Notes
**transaction_uuid** | **str** | The identifier of this addition in the loyalty ledger. |
**cart_item_position** | **float** | The index of the item in the cart items list on which the loyal points addition should be applied. | [optional]
**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]
**card_identifier** | **str** | The card on which these points were added. | [optional]
**card_identifier** | **str** | The alphanumeric identifier of the loyalty card. | [optional]
**bundle_index** | **int** | The position of the bundle in a list of item bundles created from the same bundle definition. | [optional]
**bundle_name** | **str** | The name of the bundle definition. | [optional]

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

Expand Down
11 changes: 11 additions & 0 deletions docs/AddedDeductedPointsNotificationPolicy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AddedDeductedPointsNotificationPolicy

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Notification name. |
**scopes** | **list[str]** | |

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


8 changes: 4 additions & 4 deletions docs/Application.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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. |
**created** | **datetime** | The exact moment this entity was created. |
**modified** | **datetime** | The exact moment this entity was last modified. |
**id** | **int** | Internal ID of this entity. |
**created** | **datetime** | The time this entity was created. |
**modified** | **datetime** | The time this entity was last modified. |
**account_id** | **int** | The ID of the account that owns this entity. |
**name** | **str** | The name of this application. |
**description** | **str** | A longer description of the application. | [optional]
Expand All @@ -19,7 +19,7 @@ Name | Type | Description | Notes
**exclusive_campaigns_strategy** | **str** | The strategy used when choosing exclusive campaigns for evaluation. | [optional] [default to 'listOrder']
**default_discount_scope** | **str** | The default scope to apply `setDiscount` effects on if no scope was provided with the effect. | [optional]
**enable_cascading_discounts** | **bool** | Indicates if discounts should cascade for this Application. | [optional]
**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]
**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]
**attributes_settings** | [**AttributesSettings**](AttributesSettings.md) | | [optional]
**sandbox** | **bool** | Indicates if this is a live or sandbox Application. | [optional]
**enable_partial_discounts** | **bool** | Indicates if this Application supports partial discounts. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/ApplicationApiHealth.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Report of health of the API connection of an application.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**summary** | **str** | One-word summary of the health of the API connection of an application. |
**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. |
**last_used** | **datetime** | time of last request relevant to the API health test. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
11 changes: 6 additions & 5 deletions docs/ApplicationCustomer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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. |
**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. |
**id** | **int** | Internal ID of this entity. Internal ID of this entity. |
**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. |
**integration_id** | **str** | The integration ID set by your integration layer. The integration ID set by your integration layer. |
**attributes** | [**object**](.md) | Arbitrary properties associated with this item. |
**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. |
**closed_sessions** | **int** | The total amount of closed sessions by a customer. A closed session is a successful purchase. |
**total_sales** | **float** | Sum of all purchases made by this customer. |
**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. |
**loyalty_memberships** | [**list[LoyaltyMembership]**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional]
**audience_memberships** | [**list[AudienceMembership]**](AudienceMembership.md) | A list of audiences the customer belongs to. | [optional]
**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. |
**audience_memberships** | [**list[AudienceMembership]**](AudienceMembership.md) | The audiences the customer belongs to. | [optional]
**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. |
**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]
**advocate_integration_id** | **str** | The Integration ID of the Customer Profile that referred this Customer in the Application. | [optional]

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

0 comments on commit 4d4f64c

Please sign in to comment.