Skip to main content

create email campaign request payload

Types that use CreateEmailCampaignRequest

Not used by any types.

Call that uses CreateEmailCampaignRequest

Fields

Field
Type
Description
audienceCodes
array of string
An array of audience codes for the audiences of the email campaign. At least one audience code is required. There is no upper limit to the number of audience codes.

To retrieve seller audiences, call getAudiences. Use the code values in the response to populate audienceCodes.
categoryId
The unique identifier of either an eBay category or a store category.

This field is used if a seller wants to apply an email campaign to a specific eBay category or store category. The categoryType determines whether the categoryId value is an eBay category or store category.

To retrieve eBay categories, use the getCategories or Taxonomy API. To retrieve seller store categories, use the getStore call. Use the categoryId value of the desired category from the results as the value in the request.

itemSelectMode must be set to AUTO in order to use a category ID.
categoryType
This field must be set when applying an email campaign to a specific eBay category or store category. The enumeration value used indicates which type of category the categoryId belongs to.
emailCampaignType
The email campaign type of the email campaign being created. There are six email campaigns that a user can create:
  • WELCOME - an email sent automatically to new subscribers.
  • ITEM_SHOWCASE - an email featuring new products & collections that the seller wants to highlight.
  • COUPON - an email containing a coupon code and up to 4 items that this coupon can be applied to.
  • ORDER_DISCOUNT - an email containing an order discount and up to 10 items that this discount can be applied to.
  • SALE_EVENT - an email about a sale event and up to 10 items that the sale can be applied to.
  • VOLUME_PRICING - an email containing up to 10 items that are eligible for volume pricing.

Note: emailCampaignType cannot be updated once the email campaign is created.
itemIds
array of string
An array of unique identifiers for the listings displayed in an email campaign. Used if the seller wishes to select the eBay listings in the email campaign rather than have eBay automatically select them.

Call getSellerList to retrieve all seller listings. Each Item result contains an ItemID value. Use this value in itemIds to feature that listing.

The maximum number of itemIds for the COUPON campaign type is 4, and for every other campaign type is 10

itemSelectMode must be set to MANUAL in order to use this field.
itemSelectMode
Determines whether listings featured in an email campaign are selected by the seller or by eBay.

If itemSelectMode is set to AUTO, eBay automatically choses listings based on values set for sort, categoryType, categoryId, and priceRange.

If itemSelectMode is set to MANUAL, listings are set by the seller by populating the itemIds array.

Note: itemSelectMode is always set to AUTO for WELCOME email campaigns.
personalizedMessage
The body of the email campaign. Accepts HTML and CSS.

Max length: 1000
priceRange
This container is used if the seller wants to apply the email campaign to listings based on a price range.

The priceRange container consists of the currency, gte, and lte fields.

"gte" stands for "greater than or equal to" and "lte" stands for "less than or equal to". Either gte, lte, or both must be used.

currency is a required field if including a price range. One of the three-digit currency codes from CurrencyCodeEnum must be specified.

Note: Use this object when the itemSelectMode is set to AUTO.
promotionId
The unique identifier of the discount used for an email campaign if the emailCampaignType is set to COUPON, SALE_EVENT, or ORDER_DISCOUNT. promotionSelectModeEnum must set to MANUAL if a discount is selected.

Call getPromotions to retrieve a list of the seller's discounts. Use the promotionId from an individual PromotionDetail in the result to populate the request.
promotionSelectModeEnum
The selection mode for the discount used if the emailCampaignType is set to COUPON, SALE_EVENT, or ORDER_DISCOUNT.

If promotionSelectModeEnum is set to AUTO, eBay will choose the discount to include in the email campaign. If set to MANUAL, the seller must specify the discount in the promotionId field.
scheduleDate
The date and time that the email campaign newsletter will be sent, given in UTC format. Example: 2023-05-20T03:13:35Z

This field should be used if the seller wishes to send the email campaign on a future date. If no scheduleDate is set, the email campaign will send once it is created or updated.
sort
The sort rule is used to display the listings featured in the email campaign.

Sort rules are only used if itemSelectMode is set to AUTO. If itemSelectMode is MANUAL, listings are displayed in the order in which they are listed in the itemIds array. The following sort rules are available:
  • ENDING_FIRST displays listings by ending date, from soonest to latest.
  • LOWEST_PRICED displays listings by price, from lowest to highest.
  • HIGHEST_PRICED displays listings by price, from highest to lowest.
  • NEWLY_LISTED displays listings by date listed, with the newest first.


The default sort rule is NEWLY_LISTED.
subject
The subject line of the email campaign.

Max length: 70