All URIs are relative to https://yourbaseurl.talon.one
Method | HTTP request | Description |
---|---|---|
CreateAudienceV2 | POST /v2/audiences | Create audience |
CreateCouponReservation | POST /v1/coupon_reservations/{couponValue} | Create coupon reservation |
CreateReferral | POST /v1/referrals | Create referral code for an advocate |
CreateReferralsForMultipleAdvocates | POST /v1/referrals_for_multiple_advocates | Create referral codes for multiple advocates |
DeleteAudienceMembershipsV2 | DELETE /v2/audiences/{audienceId}/memberships | Delete audience memberships |
DeleteAudienceV2 | DELETE /v2/audiences/{audienceId} | Delete audience |
DeleteCouponReservation | DELETE /v1/coupon_reservations/{couponValue} | Delete coupon reservations |
DeleteCustomerData | DELETE /v1/customer_data/{integrationId} | Delete customer's personal data |
GenerateLoyaltyCard | POST /v1/loyalty_programs/{loyaltyProgramId}/cards | Generate loyalty card |
GetCustomerInventory | GET /v1/customer_profiles/{integrationId}/inventory | List customer data |
GetCustomerSession | GET /v2/customer_sessions/{customerSessionId} | Get customer session |
GetLoyaltyBalances | GET /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances | Get customer's loyalty points |
GetLoyaltyCardBalances | GET /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances | Get card's point balances |
GetLoyaltyCardPoints | GET /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/points | List card's unused loyalty points |
GetLoyaltyCardTransactions | GET /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactions | List card's transactions |
GetLoyaltyProgramProfilePoints | GET /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/points | List customer's unused loyalty points |
GetLoyaltyProgramProfileTransactions | GET /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | List customer's loyalty transactions |
GetReservedCustomers | GET /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved |
LinkLoyaltyCardToProfile | POST /v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile | Link customer profile to card |
ReopenCustomerSession | PUT /v2/customer_sessions/{customerSessionId}/reopen | Reopen customer session |
ReturnCartItems | POST /v2/customer_sessions/{customerSessionId}/returns | Return cart items |
SyncCatalog | PUT /v1/catalogs/{catalogId}/sync | Sync cart item catalog |
TrackEventV2 | POST /v2/events | Track event |
UpdateAudienceCustomersAttributes | PUT /v2/audience_customers/{audienceId}/attributes | Update profile attributes for all customers in audience |
UpdateAudienceV2 | PUT /v2/audiences/{audienceId} | Update audience name |
UpdateCustomerProfileAudiences | POST /v2/customer_audiences | Update multiple customer profiles' audiences |
UpdateCustomerProfileV2 | PUT /v2/customer_profiles/{integrationId} | Update customer profile |
UpdateCustomerProfilesV2 | PUT /v2/customer_profiles | Update multiple customer profiles |
UpdateCustomerSessionV2 | PUT /v2/customer_sessions/{customerSessionId} | Update customer session |
Audience CreateAudienceV2 (NewAudience body)
Create audience
Create an audience. The audience can be created directly from scratch or can come from third party platforms. Note: Audiences can also be created from scratch via the Campaign Manager. See the docs. To create an audience from an existing audience from a technology partner: 1. Set the integration
property to mparticle
, segment
etc., depending on a third-party platform. 1. Set integrationId
to the ID of this audience in a third-party platform. To create an audience from an existing audience in another platform: 1. Do not use the integration
property. 1. Set integrationId
to the ID of this audience in the 3rd-party platform. To create an audience from scratch: 1. Only set the name
property. Once you create your first audience, audience-specific rule conditions are enabled in the Rule Builder.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class CreateAudienceV2Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var body = new NewAudience(); // NewAudience | body
try
{
// Create audience
Audience result = apiInstance.CreateAudienceV2(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.CreateAudienceV2: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | NewAudience | body |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | Bad request | - |
401 | Unauthorized | - |
409 | Conflict. An Audience with this ID already exists for this integration. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Coupon CreateCouponReservation (string couponValue, CouponReservations body)
Create coupon reservation
Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the Create coupon code reservation effect. - If the Reservation mandatory option was selected when creating the specified coupon, the endpoint creates a hard reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a soft reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the List customer data endpoint), but any user can redeem it. This can be useful, for example, to display a coupon wallet for customers when they visit your store. - If the Coupon visibility option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the List customer data endpoint. To delete a reservation, use the Delete reservation endpoint.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class CreateCouponReservationExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var couponValue = couponValue_example; // string | The code of the coupon.
var body = new CouponReservations(); // CouponReservations | body
try
{
// Create coupon reservation
Coupon result = apiInstance.CreateCouponReservation(couponValue, body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.CreateCouponReservation: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
couponValue | string | The code of the coupon. | |
body | CouponReservations | body |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Referral CreateReferral (NewReferral body)
Create referral code for an advocate
Creates a referral code for an advocate. The code will be valid for the referral campaign for which is created, indicated in the campaignId
parameter, and will be associated with the profile specified in the advocateProfileIntegrationId
parameter as the advocate's profile.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class CreateReferralExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var body = new NewReferral(); // NewReferral | body
try
{
// Create referral code for an advocate
Referral result = apiInstance.CreateReferral(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.CreateReferral: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | NewReferral | body |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse201 CreateReferralsForMultipleAdvocates (NewReferralsForMultipleAdvocates body, string silent = null)
Create referral codes for multiple advocates
Creates unique referral codes for multiple advocates. The code will be valid for the referral campaign for which it is created, indicated in the campaignId
parameter, and one referral code will be associated with one advocate using the profile specified in the advocateProfileIntegrationId
parameter as the advocate's profile.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class CreateReferralsForMultipleAdvocatesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var body = new NewReferralsForMultipleAdvocates(); // NewReferralsForMultipleAdvocates | body
var silent = silent_example; // string | 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. (optional) (default to "yes")
try
{
// Create referral codes for multiple advocates
InlineResponse201 result = apiInstance.CreateReferralsForMultipleAdvocates(body, silent);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.CreateReferralsForMultipleAdvocates: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | NewReferralsForMultipleAdvocates | body | |
silent | string | 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. | [optional] [default to "yes"] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
204 | No Content | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteAudienceMembershipsV2 (int audienceId)
Delete audience memberships
Remove all members from this audience.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class DeleteAudienceMembershipsV2Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var audienceId = 56; // int | The ID of the audience.
try
{
// Delete audience memberships
apiInstance.DeleteAudienceMembershipsV2(audienceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.DeleteAudienceMembershipsV2: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
audienceId | int | The ID of the audience. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteAudienceV2 (int audienceId)
Delete audience
Delete an audience created by a third-party integration. Warning: This endpoint also removes any associations recorded between a customer profile and this audience. Note: Audiences can also be deleted via the Campaign Manager. See the docs.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class DeleteAudienceV2Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var audienceId = 56; // int | The ID of the audience.
try
{
// Delete audience
apiInstance.DeleteAudienceV2(audienceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.DeleteAudienceV2: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
audienceId | int | The ID of the audience. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | Bad request | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteCouponReservation (string couponValue, CouponReservations body)
Delete coupon reservations
Remove all the coupon reservations from the provided customer profile integration IDs and the provided coupon code.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class DeleteCouponReservationExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var couponValue = couponValue_example; // string | The code of the coupon.
var body = new CouponReservations(); // CouponReservations | body
try
{
// Delete coupon reservations
apiInstance.DeleteCouponReservation(couponValue, body);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.DeleteCouponReservation: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
couponValue | string | The code of the coupon. | |
body | CouponReservations | body |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteCustomerData (string integrationId)
Delete customer's personal data
Delete all attributes on the customer profile and on entities that reference this customer profile. Important: To preserve performance, we recommend avoiding deleting customer data during peak-traffic hours.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class DeleteCustomerDataExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var integrationId = integrationId_example; // string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
try
{
// Delete customer's personal data
apiInstance.DeleteCustomerData(integrationId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.DeleteCustomerData: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
integrationId | string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the Update customer session endpoint. - The Management API with the List application's customers endpoint. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
401 | Unauthorized - Invalid API key | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LoyaltyCard GenerateLoyaltyCard (int loyaltyProgramId, GenerateLoyaltyCard body)
Generate loyalty card
Generate a loyalty card in a specified card-based loyalty program. To link the card to one or more customer profiles, use the customerProfileIds
parameter in the request body. Note: - The number of customer profiles linked to the loyalty card cannot exceed the loyalty program's usersPerCardLimit
. To find the program's limit, use the Get loyalty program endpoint. - If the loyalty program has a defined code format, it will be used for the loyalty card identifier.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class GenerateLoyaltyCardExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var loyaltyProgramId = 56; // int | 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.
var body = new GenerateLoyaltyCard(); // GenerateLoyaltyCard | body
try
{
// Generate loyalty card
LoyaltyCard result = apiInstance.GenerateLoyaltyCard(loyaltyProgramId, body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.GenerateLoyaltyCard: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
loyaltyProgramId | int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the List loyalty programs endpoint. | |
body | GenerateLoyaltyCard | body |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerInventory GetCustomerInventory (string integrationId, bool? profile = null, bool? referrals = null, bool? coupons = null, bool? loyalty = null, bool? giveaways = null, bool? achievements = null)
List customer data
Return the customer inventory regarding entities referencing this customer profile's integrationId
. Typical entities returned are: customer profile information, referral codes, loyalty points, loyalty cards and reserved coupons. Reserved coupons also include redeemed coupons.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class GetCustomerInventoryExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var integrationId = integrationId_example; // string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
var profile = true; // bool? | Set to `true` to include customer profile information in the response. (optional)
var referrals = true; // bool? | Set to `true` to include referral information in the response. (optional)
var coupons = true; // bool? | Set to `true` to include coupon information in the response. (optional)
var loyalty = true; // bool? | Set to `true` to include loyalty information in the response. (optional)
var giveaways = true; // bool? | Set to `true` to include giveaways information in the response. (optional)
var achievements = true; // bool? | Set to `true` to include achievement information in the response. (optional)
try
{
// List customer data
CustomerInventory result = apiInstance.GetCustomerInventory(integrationId, profile, referrals, coupons, loyalty, giveaways, achievements);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.GetCustomerInventory: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
integrationId | string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the Update customer session endpoint. - The Management API with the List application's customers endpoint. | |
profile | bool? | Set to `true` to include customer profile information in the response. | [optional] |
referrals | bool? | Set to `true` to include referral information in the response. | [optional] |
coupons | bool? | Set to `true` to include coupon information in the response. | [optional] |
loyalty | bool? | Set to `true` to include loyalty information in the response. | [optional] |
giveaways | bool? | Set to `true` to include giveaways information in the response. | [optional] |
achievements | bool? | Set to `true` to include achievement information in the response. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized - Invalid API key | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationCustomerSessionResponse GetCustomerSession (string customerSessionId)
Get customer session
Get the details of the given customer session. You can get the same data via other endpoints that also apply changes, which can help you save requests and increase performance. See: - Update customer session - Update customer profile
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class GetCustomerSessionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var customerSessionId = customerSessionId_example; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
try
{
// Get customer session
IntegrationCustomerSessionResponse result = apiInstance.GetCustomerSession(customerSessionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.GetCustomerSession: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
customerSessionId | string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's Sessions menu, or via the List Application session endpoint. |
IntegrationCustomerSessionResponse
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LoyaltyBalancesWithTiers GetLoyaltyBalances (int loyaltyProgramId, string integrationId, DateTime? endDate = null, string subledgerId = null, bool? includeTiers = null, bool? includeProjectedTier = null)
Get customer's loyalty points
Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. Note: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - Managing card-based loyalty program data - Managing profile-based loyalty program data
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class GetLoyaltyBalancesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var loyaltyProgramId = 56; // int | 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.
var integrationId = integrationId_example; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
var endDate = 2013-10-20T19:20:30+01:00; // DateTime? | 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. (optional)
var subledgerId = subledgerId_example; // string | The ID of the subledger by which we filter the data. (optional)
var includeTiers = true; // bool? | Indicates whether tier information is included in the response. When set to `true`, the response includes information about the current tier and the number of points required to move to next tier. (optional) (default to false)
var includeProjectedTier = true; // bool? | Indicates whether the customer's projected tier information is included in the response. When set to `true`, the response includes information about the customer’s active points and the name of the projected tier. **Note** We recommend filtering by `subledgerId` for better performance. (optional) (default to false)
try
{
// Get customer's loyalty points
LoyaltyBalancesWithTiers result = apiInstance.GetLoyaltyBalances(loyaltyProgramId, integrationId, endDate, subledgerId, includeTiers, includeProjectedTier);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.GetLoyaltyBalances: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
loyaltyProgramId | int | Identifier of the profile-based loyalty program. You can get the ID with the List loyalty programs endpoint. | |
integrationId | string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | |
endDate | DateTime? | 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. | [optional] |
subledgerId | string | The ID of the subledger by which we filter the data. | [optional] |
includeTiers | bool? | Indicates whether tier information is included in the response. When set to `true`, the response includes information about the current tier and the number of points required to move to next tier. | [optional] [default to false] |
includeProjectedTier | bool? | Indicates whether the customer's projected tier information is included in the response. When set to `true`, the response includes information about the customer’s active points and the name of the projected tier. Note We recommend filtering by `subledgerId` for better performance. | [optional] [default to false] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LoyaltyCardBalances GetLoyaltyCardBalances (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = null, List subledgerId = null)
Get card's point balances
Retrieve loyalty balances for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, all loyalty balances for the given loyalty card are returned.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class GetLoyaltyCardBalancesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var loyaltyProgramId = 56; // int | 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.
var loyaltyCardId = loyaltyCardId_example; // string | 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.
var endDate = 2013-10-20T19:20:30+01:00; // DateTime? | 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. (optional)
var subledgerId = new List<string>(); // List<string> | Filter results by one or more subledger IDs. Must be exact match. (optional)
try
{
// Get card's point balances
LoyaltyCardBalances result = apiInstance.GetLoyaltyCardBalances(loyaltyProgramId, loyaltyCardId, endDate, subledgerId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.GetLoyaltyCardBalances: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
loyaltyProgramId | int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the List loyalty programs endpoint. | |
loyaltyCardId | string | Identifier of the loyalty card. You can get the identifier with the List loyalty cards endpoint. | |
endDate | DateTime? | 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. | [optional] |
subledgerId | List<string> | Filter results by one or more subledger IDs. Must be exact match. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2003 GetLoyaltyCardPoints (int loyaltyProgramId, string loyaltyCardId, string status = null, List subledgerId = null, int? pageSize = null, int? skip = null)
List card's unused loyalty points
Get paginated results of loyalty points for a given loyalty card identifier in a card-based loyalty program. This endpoint returns only the balances of unused points on a loyalty card. You can filter points by status: - active
: Points ready to be redeemed. - pending
: Points with a start date in the future. - expired
: Points with an expiration date in the past.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class GetLoyaltyCardPointsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var loyaltyProgramId = 56; // int | 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.
var loyaltyCardId = loyaltyCardId_example; // string | 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.
var status = status_example; // string | Filter points based on their status. (optional) (default to active)
var subledgerId = new List<string>(); // List<string> | Filter results by one or more subledger IDs. Must be exact match. (optional)
var pageSize = 56; // int? | The number of items in the response. (optional) (default to 50)
var skip = 56; // int? | The number of items to skip when paging through large result sets. (optional)
try
{
// List card's unused loyalty points
InlineResponse2003 result = apiInstance.GetLoyaltyCardPoints(loyaltyProgramId, loyaltyCardId, status, subledgerId, pageSize, skip);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.GetLoyaltyCardPoints: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
loyaltyProgramId | int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the List loyalty programs endpoint. | |
loyaltyCardId | string | Identifier of the loyalty card. You can get the identifier with the List loyalty cards endpoint. | |
status | string | Filter points based on their status. | [optional] [default to active] |
subledgerId | List<string> | Filter results by one or more subledger IDs. Must be exact match. | [optional] |
pageSize | int? | The number of items in the response. | [optional] [default to 50] |
skip | int? | The number of items to skip when paging through large result sets. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2001 GetLoyaltyCardTransactions (int loyaltyProgramId, string loyaltyCardId, List subledgerId = null, string loyaltyTransactionType = null, DateTime? startDate = null, DateTime? endDate = null, int? pageSize = null, int? skip = null)
List card's transactions
Retrieve loyalty transaction logs for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class GetLoyaltyCardTransactionsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var loyaltyProgramId = 56; // int | 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.
var loyaltyCardId = loyaltyCardId_example; // string | 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.
var subledgerId = new List<string>(); // List<string> | Filter results by one or more subledger IDs. Must be exact match. (optional)
var loyaltyTransactionType = loyaltyTransactionType_example; // string | 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. (optional)
var startDate = 2013-10-20T19:20:30+01:00; // DateTime? | 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. (optional)
var endDate = 2013-10-20T19:20:30+01:00; // DateTime? | 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. (optional)
var pageSize = 56; // int? | The number of items in the response. (optional) (default to 1000)
var skip = 56; // int? | The number of items to skip when paging through large result sets. (optional)
try
{
// List card's transactions
InlineResponse2001 result = apiInstance.GetLoyaltyCardTransactions(loyaltyProgramId, loyaltyCardId, subledgerId, loyaltyTransactionType, startDate, endDate, pageSize, skip);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.GetLoyaltyCardTransactions: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
loyaltyProgramId | int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the List loyalty programs endpoint. | |
loyaltyCardId | string | Identifier of the loyalty card. You can get the identifier with the List loyalty cards endpoint. | |
subledgerId | List<string> | Filter results by one or more subledger IDs. Must be exact match. | [optional] |
loyaltyTransactionType | string | 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. | [optional] |
startDate | DateTime? | 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. | [optional] |
endDate | DateTime? | 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. | [optional] |
pageSize | int? | The number of items in the response. | [optional] [default to 1000] |
skip | int? | The number of items to skip when paging through large result sets. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2004 GetLoyaltyProgramProfilePoints (int loyaltyProgramId, string integrationId, string status = null, string subledgerId = null, int? pageSize = null, int? skip = null)
List customer's unused loyalty points
Get paginated results of loyalty points for a given Integration ID in the specified profile-based loyalty program. This endpoint returns only the balances of unused points linked to a customer profile. You can filter points by status: - active
: Points ready to be redeemed. - pending
: Points with a start date in the future. - expired
: Points with an expiration date in the past.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class GetLoyaltyProgramProfilePointsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var loyaltyProgramId = 56; // int | 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.
var integrationId = integrationId_example; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
var status = status_example; // string | Filter points based on their status. (optional) (default to active)
var subledgerId = subledgerId_example; // string | The ID of the subledger by which we filter the data. (optional)
var pageSize = 56; // int? | The number of items in the response. (optional) (default to 50)
var skip = 56; // int? | The number of items to skip when paging through large result sets. (optional)
try
{
// List customer's unused loyalty points
InlineResponse2004 result = apiInstance.GetLoyaltyProgramProfilePoints(loyaltyProgramId, integrationId, status, subledgerId, pageSize, skip);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.GetLoyaltyProgramProfilePoints: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
loyaltyProgramId | int | Identifier of the profile-based loyalty program. You can get the ID with the List loyalty programs endpoint. | |
integrationId | string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | |
status | string | Filter points based on their status. | [optional] [default to active] |
subledgerId | string | The ID of the subledger by which we filter the data. | [optional] |
pageSize | int? | The number of items in the response. | [optional] [default to 50] |
skip | int? | The number of items to skip when paging through large result sets. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2002 GetLoyaltyProgramProfileTransactions (int loyaltyProgramId, string integrationId, string subledgerId = null, string loyaltyTransactionType = null, DateTime? startDate = null, DateTime? endDate = null, int? pageSize = null, int? skip = null)
List customer's loyalty transactions
Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date. If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. Note: To retrieve all loyalty program transaction logs in a given loyalty program, use the List loyalty program transactions endpoint.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class GetLoyaltyProgramProfileTransactionsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var loyaltyProgramId = 56; // int | 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.
var integrationId = integrationId_example; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
var subledgerId = subledgerId_example; // string | The ID of the subledger by which we filter the data. (optional)
var loyaltyTransactionType = loyaltyTransactionType_example; // string | 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. (optional)
var startDate = 2013-10-20T19:20:30+01:00; // DateTime? | 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. (optional)
var endDate = 2013-10-20T19:20:30+01:00; // DateTime? | 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. (optional)
var pageSize = 56; // int? | The number of items in the response. (optional) (default to 50)
var skip = 56; // int? | The number of items to skip when paging through large result sets. (optional)
try
{
// List customer's loyalty transactions
InlineResponse2002 result = apiInstance.GetLoyaltyProgramProfileTransactions(loyaltyProgramId, integrationId, subledgerId, loyaltyTransactionType, startDate, endDate, pageSize, skip);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.GetLoyaltyProgramProfileTransactions: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
loyaltyProgramId | int | Identifier of the profile-based loyalty program. You can get the ID with the List loyalty programs endpoint. | |
integrationId | string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | |
subledgerId | string | The ID of the subledger by which we filter the data. | [optional] |
loyaltyTransactionType | string | 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. | [optional] |
startDate | DateTime? | 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. | [optional] |
endDate | DateTime? | 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. | [optional] |
pageSize | int? | The number of items in the response. | [optional] [default to 50] |
skip | int? | The number of items to skip when paging through large result sets. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 GetReservedCustomers (string couponValue)
List customers that have this coupon reserved
Return all customers that have this coupon marked as reserved. This includes hard and soft reservations.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class GetReservedCustomersExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var couponValue = couponValue_example; // string | The code of the coupon.
try
{
// List customers that have this coupon reserved
InlineResponse200 result = apiInstance.GetReservedCustomers(couponValue);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.GetReservedCustomers: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
couponValue | string | The code of the coupon. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LoyaltyCard LinkLoyaltyCardToProfile (int loyaltyProgramId, string loyaltyCardId, LoyaltyCardRegistration body)
Link customer profile to card
Loyalty cards allow customers to collect and spend loyalty points within a card-based loyalty program. They are useful to gamify loyalty programs and can be used with or without customer profiles linked to them. Link a customer profile to a given loyalty card for the card to be set as Registered. This affects how it can be used. See the docs. Note: You can link as many customer profiles to a given loyalty card as the card user limit allows.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class LinkLoyaltyCardToProfileExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var loyaltyProgramId = 56; // int | 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.
var loyaltyCardId = loyaltyCardId_example; // string | 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.
var body = new LoyaltyCardRegistration(); // LoyaltyCardRegistration | body
try
{
// Link customer profile to card
LoyaltyCard result = apiInstance.LinkLoyaltyCardToProfile(loyaltyProgramId, loyaltyCardId, body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.LinkLoyaltyCardToProfile: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
loyaltyProgramId | int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the List loyalty programs endpoint. | |
loyaltyCardId | string | Identifier of the loyalty card. You can get the identifier with the List loyalty cards endpoint. | |
body | LoyaltyCardRegistration | body |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReopenSessionResponse ReopenCustomerSession (string customerSessionId)
Reopen customer session
Reopen a closed customer session. For example, if a session has been completed but still needs to be edited, you can reopen it with this endpoint. A reopen session is treated like a standard open session. When reopening a session: - The talon_session_reopened
event is triggered. You can see it in the Events view in the Campaign Manager. - The session state is updated to open
. - Modified budgets and triggered effects when the session was closed are rolled back except for the list below.
Effects and budgets unimpacted by a session reopening
The following effects and budgets are left the way they were once the session was originally closed:
- Add free item effect
- Any non-pending loyalty points
- Award giveaway
- Coupon and referral creation
- Coupon reservation
- Custom effect
- Update attribute value
- Update cart item attribute value
To see an example of roll back, see the <a href="https://docs.talon.one/docs/dev/tutorials/rolling-back-effects\">Cancelling a session with campaign budgets tutorial.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class ReopenCustomerSessionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var customerSessionId = customerSessionId_example; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
try
{
// Reopen customer session
ReopenSessionResponse result = apiInstance.ReopenCustomerSession(customerSessionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.ReopenCustomerSession: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
customerSessionId | string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's Sessions menu, or via the List Application session endpoint. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationStateV2 ReturnCartItems (string customerSessionId, ReturnIntegrationRequest body, bool? dry = null)
Return cart items
Create a new return request for the specified cart items. This endpoint automatically changes the session state from closed
to partially_returned
. Note: This will roll back any effects associated with these cart items. For more information, see our documentation on session states and this tutorial.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class ReturnCartItemsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var customerSessionId = customerSessionId_example; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
var body = new ReturnIntegrationRequest(); // ReturnIntegrationRequest | body
var dry = true; // bool? | Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional)
try
{
// Return cart items
IntegrationStateV2 result = apiInstance.ReturnCartItems(customerSessionId, body, dry);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.ReturnCartItems: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
customerSessionId | string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's Sessions menu, or via the List Application session endpoint. | |
body | ReturnIntegrationRequest | body | |
dry | bool? | Indicates whether to persist the changes. Changes are ignored when `dry=true`. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Catalog SyncCatalog (int catalogId, CatalogSyncRequest body)
Sync cart item catalog
Perform the following actions for a given cart item catalog: - Add an item to the catalog. - Add multiple items to the catalog. - Update the attributes of an item in the catalog. - Update the attributes of multiple items in the catalog. - Remove an item from the catalog. - Remove multiple items from the catalog. You can either add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique SKU
. Important: You can perform only one type of action in a single sync request. Syncing items with duplicate SKU
values in a single request returns an error message with a 400
status code. For more information, read managing cart item catalogs. ### Filtering cart items Use cart item attributes to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The filters
array contains an object with the following properties: - attr
: A cart item attribute connected to the catalog. It is applied to all items in the catalog. - op
: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the value
property for the attribute selected in attr
. The value of op
can be one of the following: - EQ
: Equal to value
- LT
: Less than value
- LE
: Less than or equal to value
- GT
: Greater than value
- GE
: Greater than or equal to value
- IN
: One of the comma-separated values that value
is set to. Note: GE
, LE
, GT
, LT
are for numeric values only. - value
: The value of the attribute selected in attr
. ### Payload examples Synchronization actions are sent as PUT
requests. See the structure for each action:
Adding an item to the catalog
json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] }
Adding multiple items to the catalog
json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] }
Updating the attributes of an item in the catalog
json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] }
Updating the attributes of multiple items in the catalog
json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] }
Removing an item from the catalog
json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] }
Removing multiple items from the catalog
json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] }
Removing shoes of sizes above 45 from the catalog
Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:
json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] }
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class SyncCatalogExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var catalogId = 56; // int | The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**.
var body = new CatalogSyncRequest(); // CatalogSyncRequest | body
try
{
// Sync cart item catalog
Catalog result = apiInstance.SyncCatalog(catalogId, body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.SyncCatalog: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
catalogId | int | The ID of the catalog. You can find the ID in the Campaign Manager in Account > Tools > Cart item catalogs. | |
body | CatalogSyncRequest | body |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TrackEventV2Response TrackEventV2 (IntegrationEventV2Request body, string silent = null, bool? dry = null)
Track event
Triggers a custom event. To use this endpoint: 1. Define a custom event in the Campaign Manager. 1. Update or create a rule to check for this event. 1. Trigger the event with this endpoint. After you have successfully sent an event to Talon.One, you can list the received events in the Events view in the Campaign Manager. Talon.One also offers a set of built-in events. Ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a customer shares a link to a product. See the tutorial. <div class="redoc-section"> <p class="title">Important
1.profileId
is required even though the schema does not say it. 1. If the customer profile ID is new, a new profile is automatically created but the customer_profile_created
built-in event is not triggered. 1. We recommend sending requests sequentially. See Managing parallel requests.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class TrackEventV2Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var body = new IntegrationEventV2Request(); // IntegrationEventV2Request | body
var silent = silent_example; // string | 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. (optional) (default to "yes")
var dry = true; // bool? | Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional)
try
{
// Track event
TrackEventV2Response result = apiInstance.TrackEventV2(body, silent, dry);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.TrackEventV2: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | IntegrationEventV2Request | body | |
silent | string | 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. | [optional] [default to "yes"] |
dry | bool? | Indicates whether to persist the changes. Changes are ignored when `dry=true`. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
409 | Too many requests or limit reached - Avoid parallel requests. See the docs. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateAudienceCustomersAttributes (int audienceId, Object body)
Update profile attributes for all customers in audience
Update the specified profile attributes to the provided values for all customers in the specified audience.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class UpdateAudienceCustomersAttributesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var audienceId = 56; // int | The ID of the audience.
var body = ; // Object | body
try
{
// Update profile attributes for all customers in audience
apiInstance.UpdateAudienceCustomersAttributes(audienceId, body);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.UpdateAudienceCustomersAttributes: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
audienceId | int | The ID of the audience. | |
body | Object | body |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Audience UpdateAudienceV2 (int audienceId, UpdateAudience body)
Update audience name
Update the name of the given audience created by a third-party integration. Sending a request to this endpoint does not trigger the Rule Engine. To update the audience's members, use the Update customer profile endpoint.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class UpdateAudienceV2Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var audienceId = 56; // int | The ID of the audience.
var body = new UpdateAudience(); // UpdateAudience | body
try
{
// Update audience name
Audience result = apiInstance.UpdateAudienceV2(audienceId, body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.UpdateAudienceV2: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
audienceId | int | The ID of the audience. | |
body | UpdateAudience | body |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateCustomerProfileAudiences (CustomerProfileAudienceRequest body)
Update multiple customer profiles' audiences
Add customer profiles to or remove them from an audience. The endpoint supports 1000 audience actions (add
or remove
) per request. Note: You can also do this using the Update audience effect.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class UpdateCustomerProfileAudiencesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var body = new CustomerProfileAudienceRequest(); // CustomerProfileAudienceRequest | body
try
{
// Update multiple customer profiles' audiences
apiInstance.UpdateCustomerProfileAudiences(body);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.UpdateCustomerProfileAudiences: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | CustomerProfileAudienceRequest | body |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | Bad request | - |
401 | Unauthorized | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerProfileIntegrationResponseV2 UpdateCustomerProfileV2 (string integrationId, CustomerProfileIntegrationRequestV2 body, bool? runRuleEngine = null, bool? dry = null)
Update customer profile
Update or create a Customer Profile. This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. <div class="redoc-section"> <p class="title">Performance tips
- Updating a customer profile returns a response with the requested integration state. - You can use theresponseContent
property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. - We recommend sending requests sequentially. See Managing parallel requests.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class UpdateCustomerProfileV2Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var integrationId = integrationId_example; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
var body = new CustomerProfileIntegrationRequestV2(); // CustomerProfileIntegrationRequestV2 | body
var runRuleEngine = true; // bool? | Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (optional) (default to false)
var dry = true; // bool? | (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional)
try
{
// Update customer profile
CustomerProfileIntegrationResponseV2 result = apiInstance.UpdateCustomerProfileV2(integrationId, body, runRuleEngine, dry);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.UpdateCustomerProfileV2: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
integrationId | string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | |
body | CustomerProfileIntegrationRequestV2 | body | |
runRuleEngine | bool? | Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. | [optional] [default to false] |
dry | bool? | (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. | [optional] |
CustomerProfileIntegrationResponseV2
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
409 | Too many requests or limit reached - Avoid parallel requests. See the docs. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MultipleCustomerProfileIntegrationResponseV2 UpdateCustomerProfilesV2 (MultipleCustomerProfileIntegrationRequest body, string silent = null)
Update multiple customer profiles
Update (or create) up to 1000 customer profiles in 1 request. The integrationId
must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. A customer profile can be linked to one or more sessions. Note: This endpoint does not trigger the Rule Engine. To trigger the Rule Engine for customer profile updates, use the Update customer profile endpoint.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class UpdateCustomerProfilesV2Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var body = new MultipleCustomerProfileIntegrationRequest(); // MultipleCustomerProfileIntegrationRequest | body
var silent = silent_example; // string | 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. (optional) (default to "yes")
try
{
// Update multiple customer profiles
MultipleCustomerProfileIntegrationResponseV2 result = apiInstance.UpdateCustomerProfilesV2(body, silent);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.UpdateCustomerProfilesV2: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | MultipleCustomerProfileIntegrationRequest | body | |
silent | string | 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. | [optional] [default to "yes"] |
MultipleCustomerProfileIntegrationResponseV2
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationStateV2 UpdateCustomerSessionV2 (string customerSessionId, IntegrationRequest body, bool? dry = null, DateTime? now = null)
Update customer session
Update or create a customer session. The endpoint responds with the potential promotion rule effects that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. Note: The currency for the session and the cart items in the session is the currency set for the Application that owns this session. ### Session management To use this endpoint, start by learning about customer sessions and their states and refer to the state
parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the profileId
parameter in the request body to a customer profile's integrationId
. - While you can create an anonymous session with profileId=\"\"
, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. Note: If the specified profile does not exist, an empty profile is created automatically. You can update it with Update customer profile. <div class="redoc-section"> <p class="title">Performance tips
responseContent
property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. - We recommend sending requests sequentially. See Managing parallel requests. For more information, see: - The introductory video in Getting started. - The integration tutorial.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class UpdateCustomerSessionV2Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://yourbaseurl.talon.one";
// Configure API key authorization: api_key_v1
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new IntegrationApi(config);
var customerSessionId = customerSessionId_example; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
var body = new IntegrationRequest(); // IntegrationRequest | body
var dry = true; // bool? | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). (optional)
var now = 2013-10-20T19:20:30+01:00; // DateTime? | A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`. (optional)
try
{
// Update customer session
IntegrationStateV2 result = apiInstance.UpdateCustomerSessionV2(customerSessionId, body, dry, now);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.UpdateCustomerSessionV2: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
customerSessionId | string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's Sessions menu, or via the List Application session endpoint. | |
body | IntegrationRequest | body | |
dry | bool? | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers only the payload that you pass when closing the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. See the docs. | [optional] |
now | DateTime? | A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, scheduled campaigns). Note: - It must be an RFC3339 timestamp string. - It can only be a date in the future. - It can only be used if the `dry` parameter in the query is set to `true`. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
409 | Too many requests or limit reached - Avoid parallel requests. See the docs. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]