Skip to content

Commit 2d015fa

Browse files
Arthur FlageulArthurFlag
authored andcommitted
Add link to V2 migration
1 parent 494f52c commit 2d015fa

File tree

1 file changed

+14
-52
lines changed

1 file changed

+14
-52
lines changed

README.md

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@
33
Talon.One API
44
- API version: 1.0.0
55

6-
The Talon.One API is used to manage applications and campaigns, as well as to
7-
integrate with your application. The operations in the _Integration API_ section
8-
are used to integrate with our platform, while the other operations are
9-
used to manage applications and campaigns.
6+
Use the Talon.One API to integrate with your application and to
7+
manage applications and campaigns:
108

11-
### Where is the API?
9+
- Use the operations in the [Integration API section](#integration-api)
10+
are used to integrate with our platform
11+
- Use the operation in the [Management API section](#management-api) to
12+
manage applications and campaigns.
1213

13-
The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id`
14+
## Determining the base URL of the endpoints
1415

15-
[updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put
16+
The API is available at the same hostname as your Campaign Manager deployment.
17+
For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`,
18+
the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint
19+
is `https://mycompany.talon.one/v2/customer_sessions/{Id}`
1620

1721

1822

@@ -81,7 +85,7 @@ Please follow the [installation](#installation) instruction and execute the foll
8185

8286
### Integration API
8387

84-
#### V2
88+
**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](https://docs.talon.one/docs/dev/tutorials/migrating-to-v2) for more information.
8589

8690
```java
8791
package com.example.consumer;
@@ -97,7 +101,7 @@ public class TalonApiTest {
97101
public static void main(String[] args) {
98102
Gson gson = new Gson();
99103
IntegrationApi iApi = new IntegrationApi(new ApiClient("api_key_v1"));
100-
104+
101105
// Setup: basePath
102106
iApi.getApiClient().setBasePath("https://mycompany.talon.one");
103107
// Setup: when using 'api_key_v1', set apiKey & apiKeyPrefix must be provided
@@ -164,46 +168,6 @@ public class TalonApiTest {
164168
}
165169
```
166170

167-
#### V1
168-
169-
```java
170-
package com.example.consumer;
171-
172-
import one.talon.ApiClient;
173-
import one.talon.api.IntegrationApi;
174-
import one.talon.api.ManagementApi;
175-
import one.talon.model.*;
176-
177-
public class TalonApiTest {
178-
public static void main(String[] args) {
179-
IntegrationApi iApi = new IntegrationApi(new ApiClient("integration_auth"));
180-
181-
// Setup: basePath
182-
iApi.getApiClient().setBasePath("https://mycompany.talon.one");
183-
// Setup: When using 'integration_auth', applicationId & applicationKey must be provided
184-
iApi.getApiClient().setApplicationId("1");
185-
iApi.getApiClient().setApplicationKey("fee29ed73f67db39");
186-
187-
try {
188-
// Integration API example to send a session update
189-
NewCustomerSession customerSession = new NewCustomerSession();
190-
customerSession.setProfileId("Cool_Dude");
191-
customerSession.setState(NewCustomerSession.StateEnum.OPEN);
192-
customerSession.setTotal(new java.math.BigDecimal("42.0"));
193-
194-
// Flag to communicate whether the request is a "dry run"
195-
Boolean dryRun = false;
196-
197-
// Create/update a customer session using `updateCustomerSession` function
198-
IntegrationState ie = iApi.updateCustomerSession("deetdoot", customerSession, dryRun);
199-
System.out.println(ie.toString());
200-
} catch (Exception e) {
201-
System.out.println(e);
202-
}
203-
}
204-
}
205-
```
206-
207171
### Management API
208172

209173
```java
@@ -222,7 +186,7 @@ public class TalonApiTest {
222186
// Setup: basePath and bearer prefix
223187
mApi.getApiClient().setBasePath("https://mycompany.talon.one");
224188
mApi.getApiClient().setApiKeyPrefix("Bearer");
225-
189+
226190
LoginParams lp = new LoginParams();
227191
lp.setEmail("admin@talon.one");
228192
lp.setPassword("yourpassword");
@@ -256,11 +220,9 @@ Class | Method | HTTP request | Description
256220
*IntegrationApi* | [**getCustomerInventory**](docs/IntegrationApi.md#getCustomerInventory) | **GET** /v1/customer_profiles/{integrationId}/inventory | Get an inventory of all data associated with a specific customer profile
257221
*IntegrationApi* | [**getReservedCustomers**](docs/IntegrationApi.md#getReservedCustomers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | Get the users that have this coupon reserved
258222
*IntegrationApi* | [**trackEvent**](docs/IntegrationApi.md#trackEvent) | **POST** /v1/events | Track an Event
259-
*IntegrationApi* | [**updateCustomerProfile**](docs/IntegrationApi.md#updateCustomerProfile) | **PUT** /v1/customer_profiles/{integrationId} | Update a Customer Profile V1
260223
*IntegrationApi* | [**updateCustomerProfileAudiences**](docs/IntegrationApi.md#updateCustomerProfileAudiences) | **POST** /v2/customer_audiences | Update a Customer Profile Audiences
261224
*IntegrationApi* | [**updateCustomerProfileV2**](docs/IntegrationApi.md#updateCustomerProfileV2) | **PUT** /v2/customer_profiles/{integrationId} | Update a Customer Profile
262225
*IntegrationApi* | [**updateCustomerProfilesV2**](docs/IntegrationApi.md#updateCustomerProfilesV2) | **PUT** /v2/customer_profiles | Update multiple Customer Profiles
263-
*IntegrationApi* | [**updateCustomerSession**](docs/IntegrationApi.md#updateCustomerSession) | **PUT** /v1/customer_sessions/{customerSessionId} | Update a Customer Session V1
264226
*IntegrationApi* | [**updateCustomerSessionV2**](docs/IntegrationApi.md#updateCustomerSessionV2) | **PUT** /v2/customer_sessions/{customerSessionId} | Update a Customer Session
265227
*ManagementApi* | [**addLoyaltyPoints**](docs/ManagementApi.md#addLoyaltyPoints) | **PUT** /v1/loyalty_programs/{programID}/profile/{integrationID}/add_points | Add points in a certain loyalty program for the specified customer
266228
*ManagementApi* | [**copyCampaignToApplications**](docs/ManagementApi.md#copyCampaignToApplications) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/copy | Copy the campaign into every specified application

0 commit comments

Comments
 (0)