GET/email_campaign/report
This method returns the seller's email campaign performance report for a time period specified by the startDate and endDate path parameters. The maximum date range for a report retrieved by this method is one year.
Note: The startDate and endDate must be given in UTC format, as shown in the following example: sell/marketing/v1/email_campaign/report?startDate=2022-11-01T19:09:02.768Z&endDate=2022-12-28T19:09:02.768Z
The email report returns a list of metrics, such as the number of times an email report has been opened and resulted in clicks.
Input
Resource URI
This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com
root URI with api.sandbox.ebay.com
URI parameters
Parameter | Type | Description |
---|---|---|
startDate | string | The start date for the report, given in UTC format. The maximum date range for a report retrieved by this method is one year. Occurrence: Required |
endDate | string | The end date for the report, given in UTC format. The maximum date range for a report retrieved by this method is one year. Occurrence: Required |
HTTP request headers
All requests made to eBay REST operations require you to provide the Authorization
HTTP header for authentication authorization.
All other standard RESTful request headers are optional. For more information on standard RESTful request headers, see the HTTP request headers- opens rest request components page table.
OAuth scope
This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):
https://api.ebay.com/oauth/api_scope/sell.marketing
See OAuth access tokens for more information.
Request payload
This call has no payload.
Request fields
This call has no field definitions.
Output
HTTP response headers
This call has no response headers.
Response payload
Response fields
Output container/field | Type | Description |
---|---|---|
clickCount | integer | The number of item listing links clicked from the body of campaign emails for the time range specified by the query. Occurrence: Always |
openCount | integer | The total email opened count for all email campaigns from a seller for the time range specified by the query. Occurrence: Always |
totalSales | Amount | A seller's total sale amount for the time range specified by the query. Occurrence: Always |
totalSales.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
totalSales.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
HTTP status codes
This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.
Status | Meaning |
---|---|
200 | OK |
400 | Bad Request |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
35000 | STORE_CRM | APPLICATION | Internal server error encountered. If this problem persists, contact the eBay Developers Program for support. |
35001 | STORE_CRM | BUSINESS | A store subscription is required for this call, please check the store subscription status for current seller. |
35701 | STORE_CRM | REQUEST | 'startDate' value is missing or invalid, please use a valid UTC format(yyyy-MM-ddThh:mm:sssZ) string. |
35702 | STORE_CRM | REQUEST | 'endDate' value is missing or invalid, please use a valid UTC format(yyyy-MM-ddThh:mm:sssZ) string. |
35703 | STORE_CRM | REQUEST | The query start date {startDate} cannot be later than query end date {endDate}. |
35704 | STORE_CRM | REQUEST | The time interval between start date and end date exceeds maximum limit. For maximum limits, please see the documentation for this call. |
35705 | STORE_CRM | REQUEST | 'currency' value is not supported. For the valid values, see the documentation for this call. |
Warnings
This call has no warnings.
Samples
New to making API calls? Please see Making a Call.
Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.
Sample 1: Retrieve an Email Campaign Performance Report
This method returns a seller's email campaign performance report for a specified time period.
Input
The startDate and endDate path parameters are required for this call. These parameters specify the time period, in UTC format, that the performance report is for.
In this sample, the start date is 2022-11-01T19:09:02.768Z and the end date is 2022-12-28T19:09:02.768Z.
GEThttps://api.ebay.com/sell/marketing/v1/email_campaign/report?startDate=2022-11-01T19:09:02.768Z&endDate=2022-12-28T19:09:02.768Z
Output
If the call is successful, a list of metrics such as the clickCount, openCount, and totalSales are returned.
In this sample, the email campaign was opened four times and clicked zero times. It generated 4.21 USD in total sales.