Skip to content

Commit

Permalink
v2.4.0: Customer Inventory Enhancements, Referral Updates and Import …
Browse files Browse the repository at this point in the history
…Endpoints

<i id="toc"></i>
## Summary
  - [Management API](#user-content-management-api)
    - [Expose Import Endpoints](#user-content-expose-import-endpoints)
    - [Introduce `updateReferral` Endpoint](#user-content-update-referral)
  - [Integration API](#user-content-integration-api)
    - [Extended Customer Inventory Endpoint](#user-content-customer-inventory)
    - [A reminder of The Deprecation Notice: Integration API@v1 endpoints](#user-content-deprecation-reminder)

<i id="management-api"></i>
## Management API

<i id="expose-import-endpoints"></i>
### Expose import endpoints as integral part of the SDK

All of our CSV import endpoints are accessible via the Web Application from the corresponding entity pages (refer to our [Help Center](https://help.talon.one/hc/en-us/articles/360010114599-Import-and-Export-Coupons#ImportCoupons) for an example regarding Coupons).

Now these are also available endpoints as part of the SDK (links to our developer docs):
  - [Coupons Import](https://developers.talon.one/Management-API/API-Reference#importCoupons)
  - [Referrals Import](https://developers.talon.one/Management-API/API-Reference#importReferrals)
  - [Loyalty Points Import](https://developers.talon.one/Management-API/API-Reference#importLoyaltyPoints)
  - [Giveaway Codes Import](https://developers.talon.one/Management-API/API-Reference#importPoolGiveaways)

Example code snippet demonstrating import coupons using a CSV file:
```go
// ...preparing api client...
// An example could be seen at the repository's README file: https://github.com/talon-one/talon_go#management-api

referralsCSVFileContents, err := ioutil.ReadFile("/path/to/import-referrals.csv")
if err != nil {
	fmt.Printf("Error occurred while reading referrals csv: %s", err)
	// handle error / return / panic
	return
}

applicationId := 1
campaignId := 2

importSummary, _, err := managementClient.ManagementApi.
		ImportReferrals(managerAuthContext, applicationId, campaignId).
		UpFile(string(referralsFile)).
		Execute()
```

[☝️ Back to Table of Contents](#user-content-toc)

<i id="update-referral"></i>
### Introduce [`updateReferral`](https://developers.talon.one/Management-API/API-Reference#updateReferral) Endpoint

We introduced an endpoint to update referrals in order to allow updating their scheduling, usage limits and custom attributes attached to them.

Please consult [the endpoint reference](https://developers.talon.one/Management-API/API-Reference#updateReferral) in our developer docs for more details.

[☝️ Back to Table of Contents](#user-content-toc)

<i id="integration-api"></i>
## Integration API

<i id="customer-inventory"></i>
### Extended Customer Inventory Endpoint
We have added a couple of useful data points to our customer inventory to make integration even simpler.

The customer inventory endpoint now has the ability to return giveaway codes that belong to the profile in query.
In order to learn more about setting up such campaigns refer to [this help center article](https://help.talon.one/hc/en-us/articles/360020631099-Giveaway-Campaigns) and [this developer docs tutorial](https://developers.talon.one/Tutorials/creating-giveaways).

We have also extended the coupons objects that are returned as part of the inventory and attached these two useful data-points to each returned coupon:

  - `profileRedemptionCount` - holds the number of times the coupon was redeemed by the profile
  - `state` - holds the state of the coupon and can be one of the below values:
    - **_active_**: reserved coupons that are neither pending nor used nor expired, and have a non-exhausted limit counter
    - **_used_**: coupons that are not pending, and have reached their redemption limit or were redeemed by the profile before expiration
    - **_expired_**: all non-pending, non-active, non-used coupons that were not redeemed by the profile
    - **_pending_**: coupons that have a start date in the future

[☝️ Back to Table of Contents](#user-content-toc)

<i id="deprecation-reminder"></i>
### ⚠️ A reminder of The Deprecation Notice: Integration API@v1 endpoints
The deprecation was introduced already in the last release of the SDK, here is a kind reminder of the deprecation notices for Integration API@v1 endpoints:

 - [Update a Customer Session (V1)](https://github.com/talon-one/talon_go/blob/master/docs/IntegrationApi.md#UpdateCustomerSession)
 - [Update a Customer Profile (V1)](https://github.com/talon-one/talon_go/blob/master/docs/IntegrationApi.md#UpdateCustomerProfile)

These endpoints will be flagged deprecated on _15.07.2021_, meaning support for requests to these endpoints will end on that date. **We will not remove the endpoints**, and they will still be accessible for you to use.

We highly encourage migrating to the correspondent v2 endpoints for easier and more granular integration, as well as new features support (See [our developer docs section](https://developers.talon.one/Getting-Started/APIV2) about API V2.0).

[☝️ Back to Table of Contents](#user-content-toc)
  • Loading branch information
altJake authored Apr 30, 2021
1 parent b12070e commit 1a61921
Show file tree
Hide file tree
Showing 123 changed files with 12,356 additions and 1,996 deletions.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The API is available at the same hostname as these docs. For example, if you are
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 1.0.0
- Package version: 2.3.0
- Package version: 2.4.0
- Build package: org.openapitools.codegen.languages.GoClientExperimentalCodegen

## Installation
Expand Down Expand Up @@ -339,6 +339,7 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*IntegrationApi* | [**CreateCouponReservation**](docs/IntegrationApi.md#createcouponreservation) | **Post** /v1/coupon_reservations/{couponValue} | Create a new coupon reservation
*IntegrationApi* | [**CreateReferral**](docs/IntegrationApi.md#createreferral) | **Post** /v1/referrals | Create a referral code for an advocate
*IntegrationApi* | [**CreateReferralsForMultipleAdvocates**](docs/IntegrationApi.md#createreferralsformultipleadvocates) | **Post** /v1/referrals_for_multiple_advocates | Create referral codes for multiple advocates
*IntegrationApi* | [**DeleteCouponReservation**](docs/IntegrationApi.md#deletecouponreservation) | **Delete** /v1/coupon_reservations/{couponValue} | Delete coupon reservations
*IntegrationApi* | [**DeleteCustomerData**](docs/IntegrationApi.md#deletecustomerdata) | **Delete** /v1/customer_data/{integrationId} | Delete the personal data of a customer
*IntegrationApi* | [**GetCustomerInventory**](docs/IntegrationApi.md#getcustomerinventory) | **Get** /v1/customer_profiles/{integrationId}/inventory | Get an inventory of all data associated with a specific customer profile
Expand Down Expand Up @@ -426,6 +427,10 @@ Class | Method | HTTP request | Description
*ManagementApi* | [**GetWebhookActivationLogs**](docs/ManagementApi.md#getwebhookactivationlogs) | **Get** /v1/webhook_activation_logs | List Webhook activation Log Entries
*ManagementApi* | [**GetWebhookLogs**](docs/ManagementApi.md#getwebhooklogs) | **Get** /v1/webhook_logs | List Webhook Log Entries
*ManagementApi* | [**GetWebhooks**](docs/ManagementApi.md#getwebhooks) | **Get** /v1/webhooks | List Webhooks
*ManagementApi* | [**ImportCoupons**](docs/ManagementApi.md#importcoupons) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons | Import coupons via CSV file
*ManagementApi* | [**ImportLoyaltyPoints**](docs/ManagementApi.md#importloyaltypoints) | **Post** /v1/loyalty_programs/{programID}/import_points | Import loyalty points via CSV file
*ManagementApi* | [**ImportPoolGiveaways**](docs/ManagementApi.md#importpoolgiveaways) | **Post** /v1/giveaways/pools/{poolId}/import | Import giveaways codes into a giveaways pool
*ManagementApi* | [**ImportReferrals**](docs/ManagementApi.md#importreferrals) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals | Import referrals via CSV file
*ManagementApi* | [**RemoveLoyaltyPoints**](docs/ManagementApi.md#removeloyaltypoints) | **Put** /v1/loyalty_programs/{programID}/profile/{integrationID}/deduct_points | Deduct points in a certain loyalty program for the specified customer
*ManagementApi* | [**ResetPassword**](docs/ManagementApi.md#resetpassword) | **Post** /v1/reset_password | Reset password
*ManagementApi* | [**SearchCouponsAdvanced**](docs/ManagementApi.md#searchcouponsadvanced) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced | Get a list of the coupons that match the given attributes (with total count)
Expand All @@ -437,6 +442,7 @@ Class | Method | HTTP request | Description
*ManagementApi* | [**UpdateCampaign**](docs/ManagementApi.md#updatecampaign) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId} | Update a Campaign
*ManagementApi* | [**UpdateCoupon**](docs/ManagementApi.md#updatecoupon) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId} | Update a Coupon
*ManagementApi* | [**UpdateCouponBatch**](docs/ManagementApi.md#updatecouponbatch) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Update a Batch of Coupons
*ManagementApi* | [**UpdateReferral**](docs/ManagementApi.md#updatereferral) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Update one Referral
*ManagementApi* | [**UpdateRuleset**](docs/ManagementApi.md#updateruleset) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Update a Ruleset


Expand All @@ -457,18 +463,21 @@ Class | Method | HTTP request | Description
- [Application](docs/Application.md)
- [ApplicationApiHealth](docs/ApplicationApiHealth.md)
- [ApplicationApiKey](docs/ApplicationApiKey.md)
- [ApplicationCampaignStats](docs/ApplicationCampaignStats.md)
- [ApplicationCustomer](docs/ApplicationCustomer.md)
- [ApplicationCustomerEntity](docs/ApplicationCustomerEntity.md)
- [ApplicationCustomerSearch](docs/ApplicationCustomerSearch.md)
- [ApplicationEntity](docs/ApplicationEntity.md)
- [ApplicationEvent](docs/ApplicationEvent.md)
- [ApplicationReferee](docs/ApplicationReferee.md)
- [ApplicationSession](docs/ApplicationSession.md)
- [ApplicationSessionEntity](docs/ApplicationSessionEntity.md)
- [Attribute](docs/Attribute.md)
- [AttributesMandatory](docs/AttributesMandatory.md)
- [AttributesSettings](docs/AttributesSettings.md)
- [Audience](docs/Audience.md)
- [AudienceMembership](docs/AudienceMembership.md)
- [AwardGiveawayEffectProps](docs/AwardGiveawayEffectProps.md)
- [BaseSamlConnection](docs/BaseSamlConnection.md)
- [Binding](docs/Binding.md)
- [Campaign](docs/Campaign.md)
Expand All @@ -494,6 +503,8 @@ Class | Method | HTTP request | Description
- [CouponSearch](docs/CouponSearch.md)
- [CouponValue](docs/CouponValue.md)
- [CreateApplicationApiKey](docs/CreateApplicationApiKey.md)
- [CustomEffect](docs/CustomEffect.md)
- [CustomEffectProps](docs/CustomEffectProps.md)
- [CustomerActivityReport](docs/CustomerActivityReport.md)
- [CustomerAnalytics](docs/CustomerAnalytics.md)
- [CustomerInventory](docs/CustomerInventory.md)
Expand Down Expand Up @@ -523,7 +534,10 @@ Class | Method | HTTP request | Description
- [FeedNotification](docs/FeedNotification.md)
- [FuncArgDef](docs/FuncArgDef.md)
- [FunctionDef](docs/FunctionDef.md)
- [Giveaway](docs/Giveaway.md)
- [GiveawaysPool](docs/GiveawaysPool.md)
- [Import](docs/Import.md)
- [ImportEntity](docs/ImportEntity.md)
- [InlineResponse200](docs/InlineResponse200.md)
- [InlineResponse2001](docs/InlineResponse2001.md)
- [InlineResponse20010](docs/InlineResponse20010.md)
Expand All @@ -548,19 +562,20 @@ Class | Method | HTTP request | Description
- [InlineResponse20028](docs/InlineResponse20028.md)
- [InlineResponse20029](docs/InlineResponse20029.md)
- [InlineResponse2003](docs/InlineResponse2003.md)
- [InlineResponse20030](docs/InlineResponse20030.md)
- [InlineResponse2004](docs/InlineResponse2004.md)
- [InlineResponse2005](docs/InlineResponse2005.md)
- [InlineResponse2006](docs/InlineResponse2006.md)
- [InlineResponse2007](docs/InlineResponse2007.md)
- [InlineResponse2008](docs/InlineResponse2008.md)
- [InlineResponse2009](docs/InlineResponse2009.md)
- [InlineResponse201](docs/InlineResponse201.md)
- [IntegrationEntity](docs/IntegrationEntity.md)
- [IntegrationEvent](docs/IntegrationEvent.md)
- [IntegrationProfileEntity](docs/IntegrationProfileEntity.md)
- [IntegrationRequest](docs/IntegrationRequest.md)
- [IntegrationState](docs/IntegrationState.md)
- [IntegrationStateV2](docs/IntegrationStateV2.md)
- [InventoryCoupon](docs/InventoryCoupon.md)
- [LedgerEntry](docs/LedgerEntry.md)
- [LibraryAttribute](docs/LibraryAttribute.md)
- [LimitConfig](docs/LimitConfig.md)
Expand All @@ -572,9 +587,11 @@ Class | Method | HTTP request | Description
- [LoyaltyPoints](docs/LoyaltyPoints.md)
- [LoyaltyProgram](docs/LoyaltyProgram.md)
- [LoyaltyProgramBalance](docs/LoyaltyProgramBalance.md)
- [LoyaltyProgramEntity](docs/LoyaltyProgramEntity.md)
- [LoyaltyProgramLedgers](docs/LoyaltyProgramLedgers.md)
- [LoyaltyStatistics](docs/LoyaltyStatistics.md)
- [LoyaltySubLedger](docs/LoyaltySubLedger.md)
- [LoyaltyTier](docs/LoyaltyTier.md)
- [ManagerConfig](docs/ManagerConfig.md)
- [Meta](docs/Meta.md)
- [MultiApplicationEntity](docs/MultiApplicationEntity.md)
Expand All @@ -594,18 +611,22 @@ Class | Method | HTTP request | Description
- [NewCampaignSet](docs/NewCampaignSet.md)
- [NewCoupons](docs/NewCoupons.md)
- [NewCouponsForMultipleRecipients](docs/NewCouponsForMultipleRecipients.md)
- [NewCustomEffect](docs/NewCustomEffect.md)
- [NewCustomerProfile](docs/NewCustomerProfile.md)
- [NewCustomerSession](docs/NewCustomerSession.md)
- [NewCustomerSessionV2](docs/NewCustomerSessionV2.md)
- [NewEvent](docs/NewEvent.md)
- [NewEventType](docs/NewEventType.md)
- [NewFeatureFlags](docs/NewFeatureFlags.md)
- [NewGiveawaysPool](docs/NewGiveawaysPool.md)
- [NewInvitation](docs/NewInvitation.md)
- [NewInviteEmail](docs/NewInviteEmail.md)
- [NewLoyaltyProgram](docs/NewLoyaltyProgram.md)
- [NewLoyaltyTier](docs/NewLoyaltyTier.md)
- [NewPassword](docs/NewPassword.md)
- [NewPasswordEmail](docs/NewPasswordEmail.md)
- [NewReferral](docs/NewReferral.md)
- [NewReferralsForMultipleAdvocates](docs/NewReferralsForMultipleAdvocates.md)
- [NewRole](docs/NewRole.md)
- [NewRuleset](docs/NewRuleset.md)
- [NewSamlConnection](docs/NewSamlConnection.md)
Expand All @@ -616,6 +637,7 @@ Class | Method | HTTP request | Description
- [ProfileAudiencesChanges](docs/ProfileAudiencesChanges.md)
- [RedeemReferralEffectProps](docs/RedeemReferralEffectProps.md)
- [Referral](docs/Referral.md)
- [ReferralConstraints](docs/ReferralConstraints.md)
- [ReferralCreatedEffectProps](docs/ReferralCreatedEffectProps.md)
- [ReferralRejectionReason](docs/ReferralRejectionReason.md)
- [RejectCouponEffectProps](docs/RejectCouponEffectProps.md)
Expand Down Expand Up @@ -651,7 +673,10 @@ Class | Method | HTTP request | Description
- [UpdateCampaignGroup](docs/UpdateCampaignGroup.md)
- [UpdateCoupon](docs/UpdateCoupon.md)
- [UpdateCouponBatch](docs/UpdateCouponBatch.md)
- [UpdateCustomEffect](docs/UpdateCustomEffect.md)
- [UpdateLoyaltyProgram](docs/UpdateLoyaltyProgram.md)
- [UpdateLoyaltyTier](docs/UpdateLoyaltyTier.md)
- [UpdateReferral](docs/UpdateReferral.md)
- [UpdateRole](docs/UpdateRole.md)
- [UpdateUser](docs/UpdateUser.md)
- [UpdateUserLatestFeedTimestamp](docs/UpdateUserLatestFeedTimestamp.md)
Expand All @@ -661,6 +686,7 @@ Class | Method | HTTP request | Description
- [Webhook](docs/Webhook.md)
- [WebhookActivationLogEntry](docs/WebhookActivationLogEntry.md)
- [WebhookLogEntry](docs/WebhookLogEntry.md)
- [WillAwardGiveawayEffectProps](docs/WillAwardGiveawayEffectProps.md)


## Documentation For Authorization
Expand Down
Loading

0 comments on commit 1a61921

Please sign in to comment.