All URIs are relative to http://localhost
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 the personal data of a customer |
GetCustomerInventory | GET /v1/customer_profiles/{integrationId}/inventory | List customer data |
GetCustomerSession | GET /v2/customer_sessions/{customerSessionId} | Get customer session |
GetReservedCustomers | GET /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved |
ReturnCartItems | POST /v2/customer_sessions/{customerSessionId}/returns | Return cart items |
TrackEvent | POST /v1/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 |
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. To create an audience from an existing audience in mParticle or Segment: 1. Set the integration
property to mparticle
or segment
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 than mParticle: 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 = "http://localhost";
// 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 |
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 |
- 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 specified customer profiles on the specified coupon. Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the List customer data endpoint. If a coupon gets created for a specific user, it will automatically show up in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the List customer data endpoint. Important: - This endpoint creates a soft reservation. Any customer can use a reserved coupon code and proceed to checkout. - To create a hard reservation, use the Create coupons or Create coupons for multiple recipients endpoints setting the recipientsIntegrationId
property. For example, you can use this endpoint and List customer data
to create a "coupon wallet" by reserving coupon codes for a customer, and then displaying their "coupon wallet" when they visit your store.
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 = "http://localhost";
// 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 value of a coupon
var body = new CouponReservations(); // CouponReservations |
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 value of a coupon | |
body | CouponReservations |
- 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 = "http://localhost";
// 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 |
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 |
- 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 = "http://localhost";
// 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 |
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 essential data such as the updated customer profiles and session-related information. (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 | ||
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 essential data such as the updated customer profiles and session-related information. | [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 = "http://localhost";
// Configure API key authorization: manager_auth
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. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
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. You get it via the `id` property when creating an 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.
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 = "http://localhost";
// Configure API key authorization: manager_auth
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. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
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. You get it via the `id` property when creating an 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 passed customer profiles reservation from this coupon.
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 = "http://localhost";
// 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 value of a coupon
var body = new CouponReservations(); // CouponReservations |
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 value of a coupon | |
body | CouponReservations |
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 the personal data of a customer
Delete all attributes on the customer profile and on entities that reference that 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 = "http://localhost";
// 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 custom identifier for this profile, must be unique within the account.
try
{
// Delete the personal data of a customer
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 custom identifier for this profile, must be unique within the account. |
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]
CustomerInventory GetCustomerInventory (string integrationId, bool? profile = null, bool? referrals = null, bool? coupons = null, bool? loyalty = null, bool? giveaways = null, DateTime? loyaltyProjectionEndDate = 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 and reserved coupons. Reserved coupons also include redeemed coupons. You can also use this endpoint to get the projected loyalty balances in order to notify your customers about points that are about to expire, or to remind them how many points they have.
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 = "http://localhost";
// 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 custom identifier for this profile, must be unique within the account. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](/integration-api/#operation/updateCustomerSessionV2).
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 loyaltyProjectionEndDate = 2013-10-20T19:20:30+01:00; // DateTime? | Set an end date to query the projected loyalty balances. You can project results up to 31 days from today. (optional)
try
{
// List customer data
CustomerInventory result = apiInstance.GetCustomerInventory(integrationId, profile, referrals, coupons, loyalty, giveaways, loyaltyProjectionEndDate);
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 custom identifier for this profile, must be unique within the account. To get the `integrationId` of the profile from a `sessionId`, use the Update customer session. | |
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] |
loyaltyProjectionEndDate | DateTime? | Set an end date to query the projected loyalty balances. You can project results up to 31 days from today. | [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 customer session data.
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 = "http://localhost";
// 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 custom identifier for this session.
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 custom identifier for this session. |
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]
InlineResponse200 GetReservedCustomers (string couponValue)
List customers that have this coupon reserved
Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the Create coupon reservation endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given recipientIntegrationId
or use the Create coupons or Create coupons for multiple recipients endpoints.
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 = "http://localhost";
// 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 value of a 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 value of a 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]
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
. Its behavior depends on whether cart item flattening is enabled for the campaign. 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 = "http://localhost";
// 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 custom identifier for the session on which the return request will be applied.
var body = new ReturnIntegrationRequest(); // ReturnIntegrationRequest |
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 custom identifier for the session on which the return request will be applied. | |
body | ReturnIntegrationRequest | ||
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]
IntegrationState TrackEvent (NewEvent body, bool? dry = null)
Track event
Triggers a custom event in a customer session. You can then check this event in your rules. Important: Talon.One 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 user updates their payment information. Before using this endpoint, create your event as a custom attribute of type event
. See the Developer docs. An event is always part of a session. If either the profile or the session does not exist, a new empty profile/session is created. If the specified session already exists, it must belong to the same profileId
or an error will be returned. Note: While this endpoint is not deprecated, we suggest you use the Track event V2 instead, for new integrations.
using System.Collections.Generic;
using System.Diagnostics;
using TalonOne.Api;
using TalonOne.Client;
using TalonOne.Model;
namespace Example
{
public class TrackEventExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
// 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 NewEvent(); // NewEvent |
var dry = true; // bool? | Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional)
try
{
// Track event
IntegrationState result = apiInstance.TrackEvent(body, dry);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling IntegrationApi.TrackEvent: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | NewEvent | ||
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 |
---|---|---|
201 | Created | - |
400 | Bad request | - |
401 | Unauthorized - Invalid API key | - |
409 | Too many requests - 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 value 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 = "http://localhost";
// 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. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
var body = ; // Object |
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. You get it via the `id` property when creating an audience. | |
body | Object |
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
Update an Audience created by a third-party integration.
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 = "http://localhost";
// 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. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
var body = new UpdateAudience(); // UpdateAudience |
try
{
// Update audience
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. You get it via the `id` property when creating an audience. | |
body | UpdateAudience |
- 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
Update the specified customer profiles with the specified audiences. The limit of customer profiles per request is 1000.
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 = "http://localhost";
// 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 |
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 |
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]
IntegrationStateV2 UpdateCustomerProfileV2 (string integrationId, CustomerProfileIntegrationRequestV2 body, bool? runRuleEngine = null, bool? dry = null)
Update customer profile
Update (or create) a Customer Profile. 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. Performance tips Updating a customer profile returns a response with the requested integration state. You can use the responseContent
property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. You can also set runRuleEngine
to false
to prevent unwanted rule executions. This allows you to improve response times. If runRuleEngine
is set to true
, the response includes: - The effects generated by the triggered campaigns. - The created coupons and referral objects.
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 = "http://localhost";
// 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 custom identifier for this profile. Must be unique within the account.
var body = new CustomerProfileIntegrationRequestV2(); // CustomerProfileIntegrationRequestV2 |
var runRuleEngine = true; // bool? | Indicates whether to run the rule engine. Setting this property to `false` improves response times. (optional) (default to false)
var dry = true; // bool? | Indicates whether to persist the changes. Changes are ignored when `dry=true`. Only used when `runRuleEngine` is set to `true`. (optional)
try
{
// Update customer profile
IntegrationStateV2 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 custom identifier for this profile. Must be unique within the account. | |
body | CustomerProfileIntegrationRequestV2 | ||
runRuleEngine | bool? | Indicates whether to run the rule engine. Setting this property to `false` improves response times. | [optional] [default to false] |
dry | bool? | Indicates whether to persist the changes. Changes are ignored when `dry=true`. Only used when `runRuleEngine` 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 - 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.
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 = "http://localhost";
// 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 |
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 essential data such as the updated customer profiles and session-related information. (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 | ||
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 essential data such as the updated customer profiles and session-related information. | [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)
Update customer session
Update or create a customer session. For example, use this endpoint to share the content of a customer's cart with Talon.One and to check which promotion rules apply. Note: The currency for the session and the cart items in the session is the same as the Application that owns this session. Session management The Talon.One platform supports multiple simultaneous sessions for the same profile. If you have multiple ways of accessing the same Application you can either: - Track multiple independent sessions or, - Use the same session across all of them. You should share sessions when application access points share other state, such as the user's cart. If two points of access to the application have independent states, for example a user can have different items in their cart across the two) they should use independent customer session ID's. See more information and tips about session management in the documentation. 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. Note: You do not have to create a customer profile first. If the specified profile does not exist, an empty profile is created automatically. Performance tips Updating a customer session returns a response with the requested integration state. You can use the responseContent
property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. For more information, see 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 = "http://localhost";
// 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 custom identifier for this session, must be unique within the account.
var body = new IntegrationRequest(); // IntegrationRequest |
var dry = true; // bool? | Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional)
try
{
// Update customer session
IntegrationStateV2 result = apiInstance.UpdateCustomerSessionV2(customerSessionId, body, dry);
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 custom identifier for this session, must be unique within the account. | |
body | IntegrationRequest | ||
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 - Avoid parallel requests, see the docs | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]