v2.4.0: Customer Inventory Enhancements, Referral Updates and Import Endpoints
Summary
Management API
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 for an example regarding Coupons).
Now these are also available endpoints as part of the SDK (links to our developer docs):
Example code snippet demonstrating import coupons using a CSV file:
// ...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()
Introduce 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 in our developer docs for more details.
Integration API
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 and this developer docs tutorial.
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 profilestate
- 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
⚠️ 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:
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 about API V2.0).