Polling API endpoint
The Polling API is used to retrieve the reporting data from a request. The Polling API endpoint will respond to successful requests with compressed gzip. The response must be uncompressed to retrieve the data.
Note: The Asynchronous API is generally available for all Responsys customers.
Service URL:
/rest/asyncApi/v1.3/performanceAnalytics/requests/{requestId}
Required Path Parameters:
requestId
- Unique identifier for the API request. Obtain this value from the successful response to your async request.
Request Method:
GET
Request Header:
Authorization=<AUTH_TOKEN>
Content-Type=application/json
Request Body - Required Properties:
Not applicable
Sample Request Body:
Not applicable
Response Notes:
- A successful response for the asynchronous API returns an HTTPS status code of 202 Accepted.
- See Common error responses for the Polling API for details about the error responses.
- Note that the date and time values consider the Responsys account’s time zone
-
The Polling API endpoint will respond to successful requests with compressed gzip. The response must be uncompressed to retrieve the data. There are various methods to uncompress the data.
- If using API development tools - The response can be saved and downloaded as gzip. Unzip the file to view uncompressed data.
- If integrating web services - The header “Responsys-Content-Encoding:gzip” indicates the response is encoded using gzip and needs to be decompressed.
private static String decompress(byte[] compressed) throws IOException {
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(compressed);
GZIPInputStream gzipInputStream = new GZIPInputStream(byteArrayInputStream);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(gzipInputStream, ENCODING));
StringBuilder uncompressedData = new StringBuilder();
String line;
while ((line = bufferedReader.readLine()) != null) {
uncompressedData.append(line);
}
bufferedReader.close();
gzipInputStream.close();
byteArrayInputStream.close();
return uncompressedData.toString();
}
Sample Response - Successful
{
"response": {
"filterCriteria": {
"sentDateFrom": "2018-10-01",
"sentDateTo": "2018-10-05",
"subjectArea": "Email"
},
"analyticsData": {
"performanceMetrics": [
{
"conversions": 42,
"unsubscribes": 4,
"purpose": "PROMOTIONAL",
"subjectLine": "Jump in NOW for this Deal",
"launchCode": "qasmscamp.77461.81321",
"delivered": 766,
"uniqueClickToOpenRate": 16.54,
"deliveredRate": 85.78,
"responders": 19,
"bounceRate": 14.22,
"launchID": 81321,
"sentDate": "2018-10-05",
"revenue": 1123.79,
"revenuePer1KEmail": 1467.09,
"unsubscribeRate": 0.52,
"uniqueClickThroughRate": 5.48,
"marketingProgram": "New Products",
"clickPerResponder": 2.32,
"uniqueClicks": 40,
"launchType": "PROGRAM TRIGGERED",
"skipRate": 0,
"openRate": 27.02,
"averageClicks": 2,
"externalCampaignID": "Not Applicable",
"averageOrderValue": 26.76,
"clickThroughRate": 10.97,
"organizationUnit": "(Unspecified)",
"bounced": 127,
"sent": 893,
"conversionRate": 5.48,
"failureRate": 0,
"uniqueOpens": 253,
"responderRate": 1.03,
"folder": "US West Campaigns",
"stage": "Send Email Campaign",
"uniqueOpenRate": 33.03,
"campaign": "Updated Recommendations 810",
"marketingStrategy": "Cross Sell",
"opens": 207,
"clicks": 84,
"uniqueConversions": 21,
"totalOrders": 1,
"uniqueConversionRate": 2.74,
"account": "responsysdemo"
},
{
"skipRate": 0,
"unsubscribes": 8,
"externalCampaignID": "Not Applicable",
"purpose": "PROMOTIONAL",
"subjectLine": "Jump in NOW for this Deal",
"organizationUnit": "SF North",
"launchCode": "qasmscamp.728101.535501",
"delivered": 5166,
"uniqueClickToOpenRate": 16.54,
"program": "Best Deal Alerts 15",
"sent": 5166,
"deliveredRate": 100,
"responders": 20,
"launchID": 535501,
"failureRate": 0,
"uniqueOpens": 130,
"sentDate": "2018-10-01",
"folder": "Shop and Save Extra",
"stage": "Send email campaign",
"unsubscribeRate": 0.15,
"campaign": "MVT_Test_Clearance_or_Best_Value",
"marketingStrategy": "Retention",
"clicks": 0,
"marketingProgram": "Retail Stores",
"clickPerResponder": 2.32,
"responderRate": 1.03,
"account": "responsysdemo",
"launchType": "PROGRAM TRIGGERED"
},
{
"conversions": 92,
"unsubscribes": 4,
"purpose": "PROMOTIONAL",
"subjectLine": "Don't Miss This - Top Brands for Less",
"launchCode": "qasmscamp.490861.280141",
"delivered": 2975,
"uniqueClickToOpenRate": 16.54,
"program": "Welcome - Newsletter 19",
"deliveredRate": 91.59,
"responders": 18,
"bounceRate": 8.41,
"launchID": 280141,
"sentDate": "2018-10-03",
"revenue": 3255.42,
"revenuePer1KEmail": 1094.26,
"unsubscribeRate": 0.13,
"uniqueClickThroughRate": 3.06,
"marketingProgram": "Retail Stores",
"clickPerResponder": 10.47,
"launchType": "PROGRAM TRIGGERED",
"skipRate": 0,
"openRate": 29.61,
"averageClicks": 2,
"externalCampaignID": "Not Applicable",
"averageOrderValue": 35.39,
"clickThroughRate": 6.12,
"organizationUnit": "US",
"bounced": 273,
"sent": 3248,
"conversionRate": 3.09,
"failureRate": 0,
"uniqueOpens": 546,
"responderRate": 0.51,
"folder": "Trending Now",
"stage": "Send email campaign",
"uniqueOpenRate": 18.35,
"campaign": "Trending Now Newsletter GT-1_1",
"marketingStrategy": "Tier 2 Markets",
"opens": 881,
"clicks": 182,
"uniqueConversions": 46,
"totalOrders": 9,
"uniqueConversionRate": 1.55,
"account": "responsysdemo"
}
]
},
"timeZone": "Australian Eastern Standard Time (New South Wales)",
"subjectArea": "Email",
"rowCount": 582
},
"requestId": "dHNYUFhJOjoxNTQ0NDI5Mjk2",
"apiName": "asyncPerformanceAnalyticsEmail",
"requestTime": "2020-10-27T09:05:44.953",
"requestProcessedTime": "2020-10-27T09:05:49.359",
"status": "SUCCESS"
}