Categorygithub.com/talon-one/talon_go
repository
7.0.0
Repository: https://github.com/talon-one/talon_go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Go API client for talon

Use the Talon.One API to integrate with your application and to manage applications and campaigns:

Determining the base URL of the endpoints

The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at https://yourbaseurl.talon.one/, the URL for the updateCustomerSessionV2 endpoint is https://yourbaseurl.talon.one/v2/customer_sessions/{Id}

Overview

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:
  • Package version: 7.0.0
  • Build package: org.openapitools.codegen.languages.GoClientExperimentalCodegen

Installation

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 sw "./talon"

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)

Templated Server URL

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(), sw.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identifield 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(), sw.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Getting Started

Integration API

Note: The Integration API's V1 Update customer session and Update customer profile endpoints are now deprecated. Use their V2 instead. See Migrating to V2 for more information.

package main

import (
	"context"
	"encoding/json"
	"fmt"

	talon "github.com/talon-one/talon_go/v7"
)

func main() {
	configuration := talon.NewConfiguration()
	// Set API base path
	configuration.Servers = talon.ServerConfigurations{
		{
			// Notice that there is no trailing '/'
			URL:         "https://yourbaseurl.talon.one",
			Description: "Talon.One's API base URL",
		},
	}
	// If you wish to inject a custom implementation of HTTPClient
	// configuration.HTTPClient = &customHTTPClient

	integrationClient := talon.NewAPIClient(configuration)

	// Create integration authentication context using api key
	integrationAuthContext := context.WithValue(context.Background(), talon.ContextAPIKeys, map[string]talon.APIKey{
		"Authorization": {
			Prefix: "ApiKey-v1",
			Key:    "fd1fd219b1e953a6b2700e8034de5bfc877462ae106127311ddd710978654312",
		},
	})

	// Instantiating a NewCustomerSessionV2 struct
	newCustomerSession := talon.NewCustomerSessionV2{
		// You can use either struct literals
		ProfileId:   talon.PtrString("DEADBEEF"),
		CouponCodes: &[]string{"Cool-Stuff!"},
	}

	// Or alternatively, using the relevant setter in a later stage in the code
	newCustomerSession.SetCartItems([]talon.CartItem{
		{
			Name:     talon.PtrString("Pad Thai - Veggie"),
			Sku:      "pad-332",
			Quantity: 1,
			Price:    talon.PtrFloat32(5.5),
			Category: talon.PtrString("Noodles"),
		},
		{
			Name:     talon.PtrString("Chang"),
			Sku:      "chang-br-42",
			Quantity: 1,
			Price:    talon.PtrFloat32(2.3),
			Category: talon.PtrString("Beverages"),
		},
	})

	// Instantiating a new IntegrationRequest
	integrationRequest := talon.IntegrationRequest{
		CustomerSession: newCustomerSession,
	}

	// Optional list of requested information to be present on the response.
  // See docs/IntegrationRequest.md for full list of supported values
	// integrationRequest.SetResponseContent([]string{
	// 	"customerSession",
	// 	"customerProfile",
	// 	"loyalty",
	// })

	// Create/update a customer session using `UpdateCustomerSessionV2` function
	integrationState, _, err := integrationClient.IntegrationApi.
		UpdateCustomerSessionV2(integrationAuthContext, "deetdoot_2").
		Body(integrationRequest).
		Execute()

	if err != nil {
		fmt.Printf("ERROR while calling UpdateCustomerSessionV2: %s\n", err)
		return
	}
	fmt.Printf("%#v\n", integrationState)

	// Parsing the returned effects list, please consult https://developers.talon.one/Integration-API/handling-effects-v2 for the full list of effects and their corresponding properties
	for _, effect := range integrationState.GetEffects() {
		effectType := effect.GetEffectType()
		switch {
		case "setDiscount" == effectType:
			// Initiating right props instance according to the effect type
			effectProps := talon.SetDiscountEffectProps{}
			if err := decodeHelper(effect.GetProps(), &effectProps); err != nil {
				fmt.Printf("ERROR while decoding 'setDiscount' props: %s\n", err)
				continue
			}

			// Access the specific effect's properties
			fmt.Printf("Set a discount '%s' of %2.3f\n", effectProps.GetName(), effectProps.GetValue())
		case "acceptCoupon" == effectType:
			// Initiating right props instance according to the effect type
			effectProps := talon.AcceptCouponEffectProps{}
			if err := decodeHelper(effect.GetProps(), &effectProps); err != nil {
				fmt.Printf("ERROR while decoding props: %s\n", err)
				continue
			}

			// Work with AcceptCouponEffectProps' properties
			// ...
		default:
			fmt.Printf("Encounter unknown effect type: %s\n", effectType)
		}
	}
}

// quick decoding of props-map into our library structures using JSON marshaling,
// or alternatively using a library like https://github.com/mitchellh/mapstructure
func decodeHelper(propsMap map[string]interface{}, v interface{}) error {
	propsJSON, err := json.Marshal(propsMap)
	if err != nil {
		return err
	}
	return json.Unmarshal(propsJSON, v)
}

Management API

package main

import (
	"context"
	"fmt"

	talon "github.com/talon-one/talon_go/v7"
)

func main() {
	configuration := talon.NewConfiguration()
	// Set API base path
	configuration.Servers = talon.ServerConfigurations{
		{
			// Notice that there is no trailing '/'
			URL:         "https://yourbaseurl.talon.one",
			Description: "Talon.One's API base URL",
		},
	}
	// If you wish to inject a custom implementation of HTTPClient
	// configuration.HTTPClient = &customHTTPClient

	managementClient := talon.NewAPIClient(configuration)

	// Create integration authentication context using the logged-in session
	managerAuthContext := context.WithValue(context.Background(), talon.ContextAPIKeys, map[string]talon.APIKey{
		"Authorization": talon.APIKey{
			Prefix: "ManagementKey-v1",
			Key:    "2f0dce055da01ae595005d7d79154bae7448d319d5fc7c5b2951fadd6ba1ea07",
		},
	})

	// Calling `GetApplication` function with the desired id (7)
	application, response, err := managementClient.ManagementApi.
		GetApplication(managerAuthContext, 7).
		Execute()

	if err != nil {
		fmt.Printf("ERROR while calling GetApplication: %s\n", err)
		return
	}

	fmt.Printf("%#v\n\n", application)
	fmt.Printf("%#v\n\n", response)
}

Documentation for API Endpoints

All URIs are relative to https://yourbaseurl.talon.one

ClassMethodHTTP requestDescription
IntegrationApiCreateAudienceV2Post /v2/audiencesCreate audience
IntegrationApiCreateCouponReservationPost /v1/coupon_reservations/{couponValue}Create coupon reservation
IntegrationApiCreateReferralPost /v1/referralsCreate referral code for an advocate
IntegrationApiCreateReferralsForMultipleAdvocatesPost /v1/referrals_for_multiple_advocatesCreate referral codes for multiple advocates
IntegrationApiDeleteAudienceMembershipsV2Delete /v2/audiences/{audienceId}/membershipsDelete audience memberships
IntegrationApiDeleteAudienceV2Delete /v2/audiences/{audienceId}Delete audience
IntegrationApiDeleteCouponReservationDelete /v1/coupon_reservations/{couponValue}Delete coupon reservations
IntegrationApiDeleteCustomerDataDelete /v1/customer_data/{integrationId}Delete customer's personal data
IntegrationApiGetCustomerInventoryGet /v1/customer_profiles/{integrationId}/inventoryList customer data
IntegrationApiGetCustomerSessionGet /v2/customer_sessions/{customerSessionId}Get customer session
IntegrationApiGetLoyaltyBalancesGet /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balancesGet customer's loyalty points
IntegrationApiGetLoyaltyCardBalancesGet /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balancesGet card's point balances
IntegrationApiGetLoyaltyCardPointsGet /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/pointsList card's unused loyalty points
IntegrationApiGetLoyaltyCardTransactionsGet /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactionsList card's transactions
IntegrationApiGetLoyaltyProgramProfilePointsGet /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/pointsList customer's unused loyalty points
IntegrationApiGetLoyaltyProgramProfileTransactionsGet /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactionsList customer's loyalty transactions
IntegrationApiGetReservedCustomersGet /v1/coupon_reservations/customerprofiles/{couponValue}List customers that have this coupon reserved
IntegrationApiLinkLoyaltyCardToProfilePost /v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profileLink customer profile to card
IntegrationApiReopenCustomerSessionPut /v2/customer_sessions/{customerSessionId}/reopenReopen customer session
IntegrationApiReturnCartItemsPost /v2/customer_sessions/{customerSessionId}/returnsReturn cart items
IntegrationApiSyncCatalogPut /v1/catalogs/{catalogId}/syncSync cart item catalog
IntegrationApiTrackEventV2Post /v2/eventsTrack event
IntegrationApiUpdateAudienceCustomersAttributesPut /v2/audience_customers/{audienceId}/attributesUpdate profile attributes for all customers in audience
IntegrationApiUpdateAudienceV2Put /v2/audiences/{audienceId}Update audience name
IntegrationApiUpdateCustomerProfileAudiencesPost /v2/customer_audiencesUpdate multiple customer profiles' audiences
IntegrationApiUpdateCustomerProfileV2Put /v2/customer_profiles/{integrationId}Update customer profile
IntegrationApiUpdateCustomerProfilesV2Put /v2/customer_profilesUpdate multiple customer profiles
IntegrationApiUpdateCustomerSessionV2Put /v2/customer_sessions/{customerSessionId}Update customer session
ManagementApiActivateUserByEmailPost /v1/users/activateActivate user by email address
ManagementApiAddLoyaltyCardPointsPut /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/add_pointsAdd points to card
ManagementApiAddLoyaltyPointsPut /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_pointsAdd points to customer profile
ManagementApiCopyCampaignToApplicationsPost /v1/applications/{applicationId}/campaigns/{campaignId}/copyCopy the campaign into the specified Application
ManagementApiCreateAccountCollectionPost /v1/collectionsCreate account-level collection
ManagementApiCreateAchievementPost /v1/applications/{applicationId}/campaigns/{campaignId}/achievementsCreate achievement
ManagementApiCreateAdditionalCostPost /v1/additional_costsCreate additional cost
ManagementApiCreateAttributePost /v1/attributesCreate custom attribute
ManagementApiCreateCampaignFromTemplatePost /v1/applications/{applicationId}/create_campaign_from_templateCreate campaign from campaign template
ManagementApiCreateCollectionPost /v1/applications/{applicationId}/campaigns/{campaignId}/collectionsCreate campaign-level collection
ManagementApiCreateCouponsPost /v1/applications/{applicationId}/campaigns/{campaignId}/couponsCreate coupons
ManagementApiCreateCouponsAsyncPost /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_asyncCreate coupons asynchronously
ManagementApiCreateCouponsForMultipleRecipientsPost /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipientsCreate coupons for multiple recipients
ManagementApiCreateInviteEmailPost /v1/invite_emailsResend invitation email
ManagementApiCreateInviteV2Post /v2/invitesInvite user
ManagementApiCreatePasswordRecoveryEmailPost /v1/password_recovery_emailsRequest a password reset
ManagementApiCreateSessionPost /v1/sessionsCreate session
ManagementApiCreateStorePost /v1/applications/{applicationId}/storesCreate store
ManagementApiDeactivateUserByEmailPost /v1/users/deactivateDeactivate user by email address
ManagementApiDeductLoyaltyCardPointsPut /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_pointsDeduct points from card
ManagementApiDeleteAccountCollectionDelete /v1/collections/{collectionId}Delete account-level collection
ManagementApiDeleteAchievementDelete /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}Delete achievement
ManagementApiDeleteCampaignDelete /v1/applications/{applicationId}/campaigns/{campaignId}Delete campaign
ManagementApiDeleteCollectionDelete /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}Delete campaign-level collection
ManagementApiDeleteCouponDelete /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}Delete coupon
ManagementApiDeleteCouponsDelete /v1/applications/{applicationId}/campaigns/{campaignId}/couponsDelete coupons
ManagementApiDeleteLoyaltyCardDelete /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}Delete loyalty card
ManagementApiDeleteReferralDelete /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}Delete referral
ManagementApiDeleteStoreDelete /v1/applications/{applicationId}/stores/{storeId}Delete store
ManagementApiDeleteUserDelete /v1/users/{userId}Delete user
ManagementApiDeleteUserByEmailPost /v1/users/deleteDelete user by email address
ManagementApiDestroySessionDelete /v1/sessionsDestroy session
ManagementApiExportAccountCollectionItemsGet /v1/collections/{collectionId}/exportExport account-level collection's items
ManagementApiExportAchievementsGet /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/exportExport achievement customer data
ManagementApiExportAudiencesMembershipsGet /v1/audiences/{audienceId}/memberships/exportExport audience members
ManagementApiExportCollectionItemsGet /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/exportExport campaign-level collection's items
ManagementApiExportCouponsGet /v1/applications/{applicationId}/export_couponsExport coupons
ManagementApiExportCustomerSessionsGet /v1/applications/{applicationId}/export_customer_sessionsExport customer sessions
ManagementApiExportCustomersTiersGet /v1/loyalty_programs/{loyaltyProgramId}/export_customers_tiersExport customers' tier data
ManagementApiExportEffectsGet /v1/applications/{applicationId}/export_effectsExport triggered effects
ManagementApiExportLoyaltyBalanceGet /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balanceExport customer loyalty balance to CSV
ManagementApiExportLoyaltyBalancesGet /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balancesExport customer loyalty balances
ManagementApiExportLoyaltyCardBalancesGet /v1/loyalty_programs/{loyaltyProgramId}/export_card_balancesExport all card transaction logs
ManagementApiExportLoyaltyCardLedgerGet /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_logExport card's ledger log
ManagementApiExportLoyaltyLedgerGet /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_logExport customer's transaction logs
ManagementApiExportPoolGiveawaysGet /v1/giveaways/pools/{poolId}/exportExport giveaway codes of a giveaway pool
ManagementApiExportReferralsGet /v1/applications/{applicationId}/export_referralsExport referrals
ManagementApiGetAccessLogsWithoutTotalCountGet /v1/applications/{applicationId}/access_logs/no_totalGet access logs for Application
ManagementApiGetAccountGet /v1/accounts/{accountId}Get account details
ManagementApiGetAccountAnalyticsGet /v1/accounts/{accountId}/analyticsGet account analytics
ManagementApiGetAccountCollectionGet /v1/collections/{collectionId}Get account-level collection
ManagementApiGetAchievementGet /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}Get achievement
ManagementApiGetAdditionalCostGet /v1/additional_costs/{additionalCostId}Get additional cost
ManagementApiGetAdditionalCostsGet /v1/additional_costsList additional costs
ManagementApiGetAllAccessLogsGet /v1/access_logsList access logs
ManagementApiGetApplicationGet /v1/applications/{applicationId}Get Application
ManagementApiGetApplicationApiHealthGet /v1/applications/{applicationId}/health_reportGet Application health
ManagementApiGetApplicationCustomerGet /v1/applications/{applicationId}/customers/{customerId}Get application's customer
ManagementApiGetApplicationCustomerFriendsGet /v1/applications/{applicationId}/profile/{integrationId}/friendsList friends referred by customer profile
ManagementApiGetApplicationCustomersGet /v1/applications/{applicationId}/customersList application's customers
ManagementApiGetApplicationCustomersByAttributesPost /v1/applications/{applicationId}/customer_searchList application customers matching the given attributes
ManagementApiGetApplicationEventTypesGet /v1/applications/{applicationId}/event_typesList Applications event types
ManagementApiGetApplicationEventsWithoutTotalCountGet /v1/applications/{applicationId}/events/no_totalList Applications events
ManagementApiGetApplicationSessionGet /v1/applications/{applicationId}/sessions/{sessionId}Get Application session
ManagementApiGetApplicationSessionsGet /v1/applications/{applicationId}/sessionsList Application sessions
ManagementApiGetApplicationsGet /v1/applicationsList Applications
ManagementApiGetAttributeGet /v1/attributes/{attributeId}Get custom attribute
ManagementApiGetAttributesGet /v1/attributesList custom attributes
ManagementApiGetAudienceMembershipsGet /v1/audiences/{audienceId}/membershipsList audience members
ManagementApiGetAudiencesGet /v1/audiencesList audiences
ManagementApiGetAudiencesAnalyticsGet /v1/audiences/analyticsList audience analytics
ManagementApiGetCampaignGet /v1/applications/{applicationId}/campaigns/{campaignId}Get campaign
ManagementApiGetCampaignAnalyticsGet /v1/applications/{applicationId}/campaigns/{campaignId}/analyticsGet analytics of campaigns
ManagementApiGetCampaignByAttributesPost /v1/applications/{applicationId}/campaigns_searchList campaigns that match the given attributes
ManagementApiGetCampaignGroupGet /v1/campaign_groups/{campaignGroupId}Get campaign access group
ManagementApiGetCampaignGroupsGet /v1/campaign_groupsList campaign access groups
ManagementApiGetCampaignTemplatesGet /v1/campaign_templatesList campaign templates
ManagementApiGetCampaignsGet /v1/applications/{applicationId}/campaignsList campaigns
ManagementApiGetChangesGet /v1/changesGet audit logs for an account
ManagementApiGetCollectionGet /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}Get campaign-level collection
ManagementApiGetCollectionItemsGet /v1/collections/{collectionId}/itemsGet collection items
ManagementApiGetCouponsWithoutTotalCountGet /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_totalList coupons
ManagementApiGetCustomerActivityReportGet /v1/applications/{applicationId}/customer_activity_reports/{customerId}Get customer's activity report
ManagementApiGetCustomerActivityReportsWithoutTotalCountGet /v1/applications/{applicationId}/customer_activity_reports/no_totalGet Activity Reports for Application Customers
ManagementApiGetCustomerAnalyticsGet /v1/applications/{applicationId}/customers/{customerId}/analyticsGet customer's analytics report
ManagementApiGetCustomerProfileGet /v1/customers/{customerId}Get customer profile
ManagementApiGetCustomerProfileAchievementProgressGet /v1/applications/{applicationId}/achievement_progress/{integrationId}List customer achievements
ManagementApiGetCustomerProfilesGet /v1/customers/no_totalList customer profiles
ManagementApiGetCustomersByAttributesPost /v1/customer_search/no_totalList customer profiles matching the given attributes
ManagementApiGetEventTypesGet /v1/event_typesList event types
ManagementApiGetExportsGet /v1/exportsGet exports
ManagementApiGetLoyaltyCardGet /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}Get loyalty card
ManagementApiGetLoyaltyCardTransactionLogsGet /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logsList card's transactions
ManagementApiGetLoyaltyCardsGet /v1/loyalty_programs/{loyaltyProgramId}/cardsList loyalty cards
ManagementApiGetLoyaltyPointsGet /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}Get customer's full loyalty ledger
ManagementApiGetLoyaltyProgramGet /v1/loyalty_programs/{loyaltyProgramId}Get loyalty program
ManagementApiGetLoyaltyProgramTransactionsGet /v1/loyalty_programs/{loyaltyProgramId}/transactionsList loyalty program transactions
ManagementApiGetLoyaltyProgramsGet /v1/loyalty_programsList loyalty programs
ManagementApiGetLoyaltyStatisticsGet /v1/loyalty_programs/{loyaltyProgramId}/statisticsGet loyalty program statistics
ManagementApiGetReferralsWithoutTotalCountGet /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_totalList referrals
ManagementApiGetRoleV2Get /v2/roles/{roleId}Get role
ManagementApiGetRulesetGet /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}Get ruleset
ManagementApiGetRulesetsGet /v1/applications/{applicationId}/campaigns/{campaignId}/rulesetsList campaign rulesets
ManagementApiGetStoreGet /v1/applications/{applicationId}/stores/{storeId}Get store
ManagementApiGetUserGet /v1/users/{userId}Get user
ManagementApiGetUsersGet /v1/usersList users in account
ManagementApiGetWebhookGet /v1/webhooks/{webhookId}Get webhook
ManagementApiGetWebhookActivationLogsGet /v1/webhook_activation_logsList webhook activation log entries
ManagementApiGetWebhookLogsGet /v1/webhook_logsList webhook log entries
ManagementApiGetWebhooksGet /v1/webhooksList webhooks
ManagementApiImportAccountCollectionPost /v1/collections/{collectionId}/importImport data into existing account-level collection
ManagementApiImportAllowedListPost /v1/attributes/{attributeId}/allowed_list/importImport allowed values for attribute
ManagementApiImportAudiencesMembershipsPost /v1/audiences/{audienceId}/memberships/importImport audience members
ManagementApiImportCollectionPost /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/importImport data into existing campaign-level collection
ManagementApiImportCouponsPost /v1/applications/{applicationId}/campaigns/{campaignId}/import_couponsImport coupons
ManagementApiImportLoyaltyCardsPost /v1/loyalty_programs/{loyaltyProgramId}/import_cardsImport loyalty cards
ManagementApiImportLoyaltyCustomersTiersPost /v1/loyalty_programs/{loyaltyProgramId}/import_customers_tiersImport customers into loyalty tiers
ManagementApiImportLoyaltyPointsPost /v1/loyalty_programs/{loyaltyProgramId}/import_pointsImport loyalty points
ManagementApiImportPoolGiveawaysPost /v1/giveaways/pools/{poolId}/importImport giveaway codes into a giveaway pool
ManagementApiImportReferralsPost /v1/applications/{applicationId}/campaigns/{campaignId}/import_referralsImport referrals
ManagementApiInviteUserExternalPost /v1/users/inviteInvite user from identity provider
ManagementApiListAccountCollectionsGet /v1/collectionsList collections in account
ManagementApiListAchievementsGet /v1/applications/{applicationId}/campaigns/{campaignId}/achievementsList achievements
ManagementApiListAllRolesV2Get /v2/rolesList roles
ManagementApiListCatalogItemsGet /v1/catalogs/{catalogId}/itemsList items in a catalog
ManagementApiListCollectionsGet /v1/applications/{applicationId}/campaigns/{campaignId}/collectionsList collections in campaign
ManagementApiListCollectionsInApplicationGet /v1/applications/{applicationId}/collectionsList collections in Application
ManagementApiListStoresGet /v1/applications/{applicationId}/storesList stores
ManagementApiNotificationActivationPut /v1/notifications/{notificationId}/activationActivate or deactivate notification
ManagementApiPostAddedDeductedPointsNotificationPost /v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_pointsCreate notification about added or deducted loyalty points
ManagementApiPostCatalogsStrikethroughNotificationPost /v1/applications/{applicationId}/catalogs/notifications/strikethroughCreate strikethrough notification
ManagementApiPostPendingPointsNotificationPost /v1/loyalty_programs/{loyaltyProgramId}/notifications/pending_pointsCreate notification about pending loyalty points
ManagementApiRemoveLoyaltyPointsPut /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_pointsDeduct points from customer profile
ManagementApiResetPasswordPost /v1/reset_passwordReset password
ManagementApiSearchCouponsAdvancedApplicationWideWithoutTotalCountPost /v1/applications/{applicationId}/coupons_search_advanced/no_totalList coupons that match the given attributes (without total count)
ManagementApiSearchCouponsAdvancedWithoutTotalCountPost /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/no_totalList coupons that match the given attributes in campaign (without total count)
ManagementApiTransferLoyaltyCardPut /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transferTransfer card data
ManagementApiUpdateAccountCollectionPut /v1/collections/{collectionId}Update account-level collection
ManagementApiUpdateAchievementPut /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}Update achievement
ManagementApiUpdateAdditionalCostPut /v1/additional_costs/{additionalCostId}Update additional cost
ManagementApiUpdateAttributePut /v1/attributes/{attributeId}Update custom attribute
ManagementApiUpdateCampaignPut /v1/applications/{applicationId}/campaigns/{campaignId}Update campaign
ManagementApiUpdateCollectionPut /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}Update campaign-level collection's description
ManagementApiUpdateCouponPut /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}Update coupon
ManagementApiUpdateCouponBatchPut /v1/applications/{applicationId}/campaigns/{campaignId}/couponsUpdate coupons
ManagementApiUpdateLoyaltyCardPut /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}Update loyalty card status
ManagementApiUpdateReferralPut /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}Update referral
ManagementApiUpdateRoleV2Put /v2/roles/{roleId}Update role
ManagementApiUpdateStorePut /v1/applications/{applicationId}/stores/{storeId}Update store
ManagementApiUpdateUserPut /v1/users/{userId}Update user

Documentation For Models

Documentation For Authorization

api_key_v1

  • 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.

management_key

  • 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.

manager_auth

  • 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.

Documentation for Utility Methods

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

Author