Skip to content

Latest commit

 

History

History
81 lines (61 loc) · 2.77 KB

File metadata and controls

81 lines (61 loc) · 2.77 KB

ReportApi

All URIs are relative to https://api.sendx.io/api/v1/rest

Method HTTP request Description
getCampaignReport GET /report/campaign/{identifier} Get campaign report

getCampaignReport

RestReportData getCampaignReport(identifier)

Get campaign report

Retrieves a detailed performance report for a specific campaign.

Example

// 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.ReportApi;

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");

    ReportApi apiInstance = new ReportApi(defaultClient);
    String identifier = "contact_BnKjkbBBS500CoBCP0oChQ"; // String | Resource identifier with prefix (e.g., `contact_BnKjkbBBS500CoBCP0oChQ`)  **Format:** `<prefix>_<22-character-id>` 
    try {
      RestReportData result = apiInstance.getCampaignReport(identifier);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ReportApi#getCampaignReport");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
identifier String Resource identifier with prefix (e.g., `contact_BnKjkbBBS500CoBCP0oChQ`) Format: `<prefix>_<22-character-id>`

Return type

RestReportData

Authorization

TeamApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 ✅ Report retrieved successfully -
401 ❌ Unauthorized - Invalid or missing API key -
404 ❌ Not Found - Resource does not exist -
500 ❌ Internal Server Error - System error occurred -