Use the Integration API to push data to and retrieve data from Talon.One in real time. For more background information about this API, see Integration API overview
For example, use this API to share shopping cart information as a session with Talon.One and evaluate promotion rules. You can also create custom events to track specific actions that do not fit into the session data model.
Ensure you authenticate to make requests to the API.
Are you looking for a different API?
If you need the API to:
- Interact with the Campaign Manager for backoffice operations, see the Management API reference docs.
- Integrate with Talon.One from a CEP or CDP platform, see the Third-party API reference docs.
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import talon "github.com/GIT_USER_ID/GIT_REPO_ID"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), talon.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), talon.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), talon.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), talon.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to https://goflink.europe-west1.talon.one
Class | Method | HTTP request | Description |
---|---|---|---|
AudiencesApi | CreateAudienceV2 | Post /v2/audiences | Create audience |
AudiencesApi | DeleteAudienceMembershipsV2 | Delete /v2/audiences/{audienceId}/memberships | Delete audience memberships |
AudiencesApi | DeleteAudienceV2 | Delete /v2/audiences/{audienceId} | Delete audience |
AudiencesApi | UpdateAudienceCustomersAttributes | Put /v2/audience_customers/{audienceId}/attributes | Update profile attributes for all customers in audience |
AudiencesApi | UpdateAudienceV2 | Put /v2/audiences/{audienceId} | Update audience name |
AudiencesApi | UpdateCustomerProfileAudiences | Post /v2/customer_audiences | Update multiple customer profiles' audiences |
CatalogsApi | SyncCatalog | Put /v1/catalogs/{catalogId}/sync | Sync cart item catalog |
CouponsApi | CreateCouponReservation | Post /v1/coupon_reservations/{couponValue} | Create coupon reservation |
CouponsApi | DeleteCouponReservation | Delete /v1/coupon_reservations/{couponValue} | Delete coupon reservations |
CouponsApi | GetReservedCustomers | Get /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved |
CustomerProfilesApi | DeleteCustomerData | Delete /v1/customer_data/{integrationId} | Delete customer's personal data |
CustomerProfilesApi | GetCustomerInventory | Get /v1/customer_profiles/{integrationId}/inventory | List customer data |
CustomerProfilesApi | UpdateCustomerProfileV2 | Put /v2/customer_profiles/{integrationId} | Update customer profile |
CustomerProfilesApi | UpdateCustomerProfilesV2 | Put /v2/customer_profiles | Update multiple customer profiles |
CustomerSessionsApi | GetCustomerSession | Get /v2/customer_sessions/{customerSessionId} | Get customer session |
CustomerSessionsApi | ReturnCartItems | Post /v2/customer_sessions/{customerSessionId}/returns | Return cart items |
CustomerSessionsApi | UpdateCustomerSessionV2 | Put /v2/customer_sessions/{customerSessionId} | Update customer session |
EventsApi | TrackEvent | Post /v1/events | Track event |
EventsApi | TrackEventV2 | Post /v2/events | Track event V2 |
ReferralsApi | CreateReferral | Post /v1/referrals | Create referral code for an advocate |
ReferralsApi | CreateReferralsForMultipleAdvocates | Post /v1/referrals_for_multiple_advocates | Create referral codes for multiple advocates |
- APIError
- AcceptCouponEffectProps
- AcceptReferralEffectProps
- AccessLogEntry
- Account
- AccountAdditionalCost
- AccountAnalytics
- AccountEntity
- AccountLimits
- AddFreeItemEffectProps
- AddItemCatalogAction
- AddLoyaltyPointsEffectProps
- AdditionalCost
- Application
- ApplicationAPIKey
- ApplicationApiHealth
- ApplicationCampaignStats
- ApplicationCustomer
- ApplicationCustomerEntity
- ApplicationEntity
- ApplicationEvent
- ApplicationNotification
- ApplicationReferee
- ApplicationSession
- ApplicationSessionEntity
- AsyncCouponCreationResponse
- Attribute
- AttributesMandatory
- AttributesSettings
- Audience
- AudienceAnalytics
- AudienceIntegrationID
- AudienceMembership
- AwardGiveawayEffectProps
- BaseLoyaltyProgram
- BaseSamlConnection
- Binding
- BulkApplicationNotification
- BulkCampaignNotification
- Campaign
- CampaignActivationRequest
- CampaignAnalytics
- CampaignCollection
- CampaignCollectionWithoutPayload
- CampaignCopy
- CampaignCreatedNotification
- CampaignDeletedNotification
- CampaignEditedNotification
- CampaignEntity
- CampaignGroup
- CampaignGroupEntity
- CampaignNotification
- CampaignPrioritiesChangedNotification
- CampaignPrioritiesV2
- CampaignRulesetChangedNotification
- CampaignSearch
- CampaignSet
- CampaignSetBranchNode
- CampaignSetIDs
- CampaignSetLeafNode
- CampaignSetNode
- CampaignSetV2
- CampaignStateChangedNotification
- CampaignTemplate
- CampaignTemplateCollection
- CampaignTemplateParams
- CardLedgerTransactionLogEntry
- CartItem
- Catalog
- CatalogAction
- CatalogActionFilter
- CatalogItem
- CatalogSyncRequest
- Change
- ChangeProfilePassword
- CodeGeneratorSettings
- Collection
- CollectionItem
- CollectionWithoutPayload
- Coupon
- CouponConstraints
- CouponCreatedEffectProps
- CouponCreationJob
- CouponLimitConfigs
- CouponRejectionReason
- CouponReservations
- CouponSearch
- CouponValue
- CreateApplicationAPIKey
- CreateReferralsForMultipleAdvocates201Response
- CreateTemplateCampaign
- CreateTemplateCampaignResponse
- CustomEffect
- CustomEffectProps
- CustomerActivityReport
- CustomerAnalytics
- CustomerInventory
- CustomerProfile
- CustomerProfileAudienceRequest
- CustomerProfileAudienceRequestItem
- CustomerProfileIntegrationRequestV2
- CustomerProfileSearchQuery
- CustomerSession
- CustomerSessionV2
- DeductLoyaltyPointsEffectProps
- Effect
- EffectEntity
- EmailEntity
- Entity
- EntityWithTalangVisibleID
- Environment
- ErrorEffectProps
- ErrorResponse
- ErrorResponseWithStatus
- ErrorSource
- Event
- EventType
- EventV2
- Export
- FeatureFlag
- FeaturesFeed
- FeedNotification
- FuncArgDef
- FunctionDef
- GetReservedCustomers200Response
- Giveaway
- GiveawaysPool
- Import
- ImportEntity
- IntegrationCustomerSessionResponse
- IntegrationEntity
- IntegrationEvent
- IntegrationEventV2Request
- IntegrationProfileEntity
- IntegrationRequest
- IntegrationState
- IntegrationStateV2
- InventoryCoupon
- InventoryReferral
- ItemAttribute
- LedgerEntry
- LedgerInfo
- LibraryAttribute
- LimitConfig
- LimitCounter
- LoginParams
- Loyalty
- LoyaltyBalance
- LoyaltyBalances
- LoyaltyCard
- LoyaltyCardProfileRegistration
- LoyaltyCardRegistration
- LoyaltyDashboardData
- LoyaltyDashboardPointsBreakdown
- LoyaltyLedger
- LoyaltyLedgerEntry
- LoyaltyLedgerTransactions
- LoyaltyMembership
- LoyaltyPoints
- LoyaltyProgram
- LoyaltyProgramBalance
- LoyaltyProgramEntity
- LoyaltyProgramLedgers
- LoyaltyProjection
- LoyaltyProjectionData
- LoyaltyStatistics
- LoyaltySubLedger
- LoyaltyTier
- ManagerConfig
- Meta
- MultiApplicationEntity
- MultipleAttribute
- MultipleAudiences
- MultipleAudiencesItem
- MultipleCustomerProfileIntegrationRequest
- MultipleCustomerProfileIntegrationRequestItem
- MultipleCustomerProfileIntegrationResponseV2
- MultipleNewAttribute
- MultipleNewAudiences
- MutableEntity
- NewAccount
- NewAccountSignUp
- NewAdditionalCost
- NewApplication
- NewApplicationAPIKey
- NewAttribute
- NewAudience
- NewCampaign
- NewCampaignCollection
- NewCampaignGroup
- NewCampaignSet
- NewCampaignSetV2
- NewCampaignTemplate
- NewCatalog
- NewCollection
- NewCouponCreationJob
- NewCoupons
- NewCouponsForMultipleRecipients
- NewCustomEffect
- NewCustomerProfile
- NewCustomerSession
- NewCustomerSessionV2
- NewEvent
- NewEventType
- NewGiveawaysPool
- NewInvitation
- NewInviteEmail
- NewLoyaltyProgram
- NewLoyaltyTier
- NewMultipleAudiencesItem
- NewNotificationWebhook
- NewPassword
- NewPasswordEmail
- NewReferral
- NewReferralsForMultipleAdvocates
- NewReturn
- NewRole
- NewRuleset
- NewSamlConnection
- NewTemplateDef
- NewUser
- NewWebhook
- Notification
- NotificationWebhook
- PatchItemCatalogAction
- PatchManyItemsCatalogAction
- ProfileAudiencesChanges
- RedeemReferralEffectProps
- Referral
- ReferralConstraints
- ReferralCreatedEffectProps
- ReferralRejectionReason
- RejectCouponEffectProps
- RejectReferralEffectProps
- RemoveItemCatalogAction
- RemoveManyItemsCatalogAction
- Return
- ReturnIntegrationRequest
- ReturnedCartItem
- Role
- RoleAssign
- RoleMembership
- RollbackAddedLoyaltyPointsEffectProps
- RollbackCouponEffectProps
- RollbackDeductedLoyaltyPointsEffectProps
- RollbackDiscountEffectProps
- RollbackReferralEffectProps
- Rule
- RuleFailureReason
- Ruleset
- SamlConnection
- SamlConnectionMetadata
- SamlLoginEndpoint
- Session
- SetDiscountEffectProps
- SetDiscountPerAdditionalCostEffectProps
- SetDiscountPerAdditionalCostPerItemEffectProps
- SetDiscountPerItemEffectProps
- ShowBundleMetadataEffectProps
- ShowNotificationEffectProps
- SlotDef
- TemplateArgDef
- TemplateDef
- TemplateLimitConfig
- Tier
- TriggerWebhookEffectProps
- UpdateAccount
- UpdateApplication
- UpdateAttributeEffectProps
- UpdateAudience
- UpdateCampaign
- UpdateCampaignCollection
- UpdateCampaignGroup
- UpdateCampaignTemplate
- UpdateCatalog
- UpdateCollection
- UpdateCoupon
- UpdateCouponBatch
- UpdateCustomEffect
- UpdateLoyaltyCard
- UpdateLoyaltyProgram
- UpdateReferral
- UpdateReferralBatch
- UpdateRole
- UpdateUser
- UpdateUserLatestFeedTimestamp
- User
- UserEntity
- UserFeedNotifications
- Webhook
- WebhookActivationLogEntry
- WebhookLogEntry
- WillAwardGiveawayEffectProps
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Note, each API key must be added to a map of map[string]APIKey
where the key is: Authorization and passed in as the auth context for each request.
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime