Skip to main content

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

GET https://api.ebay.com/sell/marketing/v1/email_campaign/{email_campaign_id}

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

ParameterTypeDescription
email_campaign_idstringThis 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/fieldTypeDescription
audiencesarray of CampaignAudience

An array of one or more audiences associated with the email campaign.

Occurrence: Always

audiences.audienceTypeAudienceTypeEnum

This enum value indicates the audience type. For the complete list of audience types and their associated enum values, see AudienceTypeEnum.

Occurrence: Always

audiences.codestring

The unique code for an audience.

Occurrence: Always

audiences.namestring

The display name for an audience.

Occurrence: Always

categoryIdstring

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.

The categoryType value will indicate if the category ID is for an eBay category or an eBay store category.

Occurrence: Conditional

categoryTypeCategoryTypeEnum

The enumeration value returned here indicates if the categoryId value is the 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

creationDatestring

The date and time that the email campaign was created, given in UTC format.

Occurrence: Always

emailCampaignIdstring

The unique identifier of the email campaign.

Occurrence: Always

emailCampaignStatusEmailCampaignStatusEnum

The email campaign status. See EmailCampaignStatusEnum for a list of valid statuses.

Occurrence: Always

emailCampaignTypeCampaignTypeEnum

The email campaign type. See CampaignTypeEnum for valid email campaign types.

Occurrence: Always

itemIdsarray of string

The listing IDs of the items that were manually added to the email campaign.

Only listings added manually by the seller are returned. Returns a null array if no listings were added.

Occurrence: Always

itemSelectModeItemSelectModeEnum

The mode used to select the items listed in the email campaign.

Occurrence: Always

marketplaceIdstring

The eBay marketplace where the email campaign is active. See MarketplaceIdEnum for a list of marketplace IDs.

Occurrence: Always

modificationDatestring

The date and time the email campaign was last modified, given in UTC format.

Occurrence: Conditional

personalizedMessagestring

The body of the email campaign sent to the audience.

Occurrence: Always

priceRangePriceRange

The price range and currency set within the email campaign. This container will only return if a price range was set.

Occurrence: Conditional

priceRange.currencystring

Specifies the currency of the listings in an email campaign using one of the three-digit codes of the CurrencyCodeEnum type.

Occurrence: Conditional

priceRange.gtenumber

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.

Either gte, lte, or both must contain a value if the seller wishes to use a price range.

Occurrence: Conditional

priceRange.ltenumber

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.

Either gte, lte, or both must contain a value if the seller wishes to use a price range.

Occurrence: Conditional

promotionIdstring

The ID of the discount that was assigned to the email campaign.

Occurrence: Conditional

promotionSelectModePromotionSelectModeEnum

Indicates whether the listings that the discount was applied to were selected manually or automatically.

This field will only return if a discount was applied.

Occurrence: Conditional

scheduleDatestring

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

scheduleDateTypeScheduleDateTypeEnum

The schedule type of the email campaign. See ScheduleDateTypeEnum.

Occurrence: Conditional

sentDatestring

The date and time that the email campaign was sent, given in UTC format.

Occurrence: Conditional

sortItemSortEnum

The sort rule is used to display the items in the email campaign. If no sort rule was selected, the default will be NEWLY_LISTED.

Occurrence: Conditional

subjectstring

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.

StatusMeaning
200OK
400Not Found
500Internal Server Error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
35000STORE_CRMAPPLICATIONInternal server error encountered. If this problem persists, contact the eBay Developers Program for support.
35001STORE_CRMBUSINESSA store subscription is required for this call, please check the store subscription status for current seller.
35501STORE_CRMREQUESTNo 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.

Got thoughts? Click the feedback button – your insights help us improve!