All URIs are relative to https://api.sendx.io/api/v1/rest
| Method | HTTP request | Description |
|---|---|---|
| eventsCustomPostbackGet | GET /events/custom/postback | Custom Event Postback URL |
| eventsRevenuePostbackGet | GET /events/revenue/postback | Revenue Event Postback URL |
EventsRevenuePostbackGet200Response eventsCustomPostbackGet(teamId, id, event, anyKey)
Custom Event Postback URL
Register a custom event for a specific team and event.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.EventApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
EventApi apiInstance = new EventApi(defaultClient);
String teamId = "teamId_example"; // String | The unique identifier for the team.
String id = "id_example"; // String | The unique sendx identifier for the contact/customer.
String event = "event_example"; // String | The custom event name.
String anyKey = "24.43"; // String | Arbitrary custom data as key-value pairs. Add custom parameters directly to the query string. For example, `amount=24.43` or `currency=USD`.
try {
EventsRevenuePostbackGet200Response result = apiInstance.eventsCustomPostbackGet(teamId, id, event, anyKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EventApi#eventsCustomPostbackGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| teamId | String | The unique identifier for the team. | |
| id | String | The unique sendx identifier for the contact/customer. | |
| event | String | The custom event name. | |
| anyKey | String | Arbitrary custom data as key-value pairs. Add custom parameters directly to the query string. For example, `amount=24.43` or `currency=USD`. |
EventsRevenuePostbackGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
EventsRevenuePostbackGet200Response eventsRevenuePostbackGet(teamId, id, amount, campaignId)
Revenue Event Postback URL
Trigger a revenue postback for a specific team and event.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.EventApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
EventApi apiInstance = new EventApi(defaultClient);
String teamId = "teamId_example"; // String | The unique identifier for the team.
String id = "id_example"; // String | The unique sendx identifier for the contact/customer.
Float amount = 3.4F; // Float | The revenue amount to be posted back.
String campaignId = "campaignId_example"; // String | The unique identifier for the campaign.
try {
EventsRevenuePostbackGet200Response result = apiInstance.eventsRevenuePostbackGet(teamId, id, amount, campaignId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EventApi#eventsRevenuePostbackGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| teamId | String | The unique identifier for the team. | |
| id | String | The unique sendx identifier for the contact/customer. | |
| amount | Float | The revenue amount to be posted back. | |
| campaignId | String | The unique identifier for the campaign. |
EventsRevenuePostbackGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad Request | - |
| 500 | Internal Server Error | - |