GET/email_campaign/{email_campaign_id}
This method returns the details of a single email campaign specified by the email_campaign_id path parameter.
Call getEmailCampaigns to retrieve a list of all email campaigns from a seller's eBay store.
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 |
---|---|---|
email_campaign_id | string | This path parameter specifies the unique eBay-assigned identifier of the email campaign being retrieved. Use the getEmailCampaigns method to retrieve a list of email campaign IDs for a seller. 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 |
---|---|---|
audiences | array of CampaignAudience | An array of one or more audiences associated with the email campaign. Occurrence: Always |
audiences.audienceType | AudienceTypeEnum | This enum value indicates the audience type. For the complete list of audience types and their associated enum values, see AudienceTypeEnum. Occurrence: Always |
audiences.code | string | The unique code for an audience. Occurrence: Always |
audiences.name | string | The display name for an audience. Occurrence: Always |
categoryId | string | The unique identifier of an eBay category or an eBay store category. This field is returned if a seller has applied the email campaign to a specific category. Occurrence: Conditional |
categoryType | CategoryTypeEnum | The enumeration value returned here indicates if the categoryId value is the identifier of an eBay category or an eBay store category. Occurrence: Conditional |
creationDate | string | The date and time that the email campaign was created, given in UTC format. Occurrence: Always |
emailCampaignId | string | The unique identifier of the email campaign. Occurrence: Always |
emailCampaignStatus | EmailCampaignStatusEnum | The email campaign status. See EmailCampaignStatusEnum for a list of valid statuses. Occurrence: Always |
emailCampaignType | CampaignTypeEnum | The email campaign type. See CampaignTypeEnum for valid email campaign types. Occurrence: Always |
itemIds | array of string | The listing IDs of the items that were manually added to the email campaign. Occurrence: Always |
itemSelectMode | ItemSelectModeEnum | The mode used to select the items listed in the email campaign. Occurrence: Always |
marketplaceId | string | The eBay marketplace where the email campaign is active. See MarketplaceIdEnum for a list of marketplace IDs. Occurrence: Always |
modificationDate | string | The date and time the email campaign was last modified, given in UTC format. Occurrence: Conditional |
personalizedMessage | string | The body of the email campaign sent to the audience. Occurrence: Always |
priceRange | PriceRange | The price range and currency set within the email campaign. This container will only return if a price range was set. Occurrence: Conditional |
priceRange.currency | string | Specifies the currency of the listings in an email campaign using one of the three-digit codes of the CurrencyCodeEnum type. Occurrence: Conditional |
priceRange.gte | number | The listings selected will be greater than or equal to this value. The value entered must be given in number format, such as 20.00. Occurrence: Conditional |
priceRange.lte | number | The listings selected will be less than or equal to this value. The value entered must be given in number format, such as 100.00. Occurrence: Conditional |
promotionId | string | The ID of the discount that was assigned to the email campaign. Occurrence: Conditional |
promotionSelectMode | PromotionSelectModeEnum | Indicates whether the listings that the discount was applied to were selected manually or automatically. Occurrence: Conditional |
scheduleDate | string | The date and time that the email campaign newsletter is scheduled to send, given in UTC format. This field is only returned if the seller set the start of the email campaign to a date in the future. Occurrence: Conditional |
scheduleDateType | ScheduleDateTypeEnum | The schedule type of the email campaign. See ScheduleDateTypeEnum. Occurrence: Conditional |
sentDate | string | The date and time that the email campaign was sent, given in UTC format. Occurrence: Conditional |
sort | ItemSortEnum | The sort rule is used to display the items in the email campaign. If no sort rule was selected, the default will be Occurrence: Conditional |
subject | string | The email campaign subject. Occurrence: Always |
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 | Not Found |
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. |
35501 | STORE_CRM | REQUEST | No email campaign found for email campaign ID {email_campaign_id}. |
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 a Specific Email Campaign by ID
This method returns the details for a specific email campaign. In this case, the email campaign associated with ID 4********2
is retrieved.
Input
The email_campaign_id path parameter is required in order to specify the email campaign to retrieve. This call has no request payload. In this sample, the email_campaign_id is 4********2
.
GEThttps://api.ebay.com/sell/marketing/v1/email_campaign/4********2
Output
If the call is successful, information on the specified email campaign is returned. This includes information such as the markeplaceId, emailcampaignType, emailcampaignStatus, and subject. The audience container shows which specified audiences associated with the email campaign. The personalizedMessage associated with the email campaign and the creationDate of the email campaign are also returned.
In addition to these fields that are always returned, several conditional fields, such as the categoryType, categoryId, promotionId, priceRange, and itemIds can be returned based on the email campaign type.
In this sample, the emailCampaignType is ITEM_SHOWCASE
and it has been sent to FOLLOWERS
and ALL_SUBSCRIBERS
.