### GET /promotionstartDate Source: https://developer.ebay.com/api-docs/sell/marketing/fields Retrieves start dates for multiple promotions. This endpoint is used to get commencement information for a collection of promotions. ```APIDOC ## GET /promotionstartDate ### Description Retrieves start dates for multiple promotions. This endpoint is used to get commencement information for a collection of promotions. ### Method GET ### Endpoint /promotionstartDate ### Parameters #### Query Parameters - **promotions** (string) - Optional - Filters the results to include only specific promotions. (This seems to be a misinterpretation in the source, likely intended as a filter or part of the response structure, not a query param for startDate retrieval). ``` -------------------------------- ### Get Keywords - Example Request Source: https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/getKeywords Example of a request to retrieve keywords for a specific campaign, filtering by ad group IDs and keyword status. ```http GET https://api.ebay.com/sell/marketing/v1/ad_campaign/1234567890/keyword?ad_group_ids=111,222&keyword_status=ACTIVE ``` -------------------------------- ### Example Email Report Request URL Source: https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getEmailReport This example shows how to construct the URL for retrieving an email campaign performance report, specifying the start and end dates in UTC format. ```http GET/email_campaign/report?startDate=2022-11-01T19:09:02.768Z&endDate=2022-12-28T19:09:02.768Z ``` -------------------------------- ### Get Keywords - Example Response Source: https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/getKeywords Example of a successful response payload for the getKeywords method, containing a collection of keywords with their details. ```json { "href" : "string", "keywords" : [ { "adGroupId" : "string", "bid" : { "currency" : "CurrencyCodeEnum : [AED, AFN, ALL...]", "value" : "string" }, "keywordId" : "string", "keywordStatus" : "KeywordStatusEnum : [ACTIVE,PAUSED,ARCHIVED]", "keywordText" : "string", "matchType" : "MatchTypeEnum : [BROAD,EXACT,PHRASE]" } ], "limit" : "integer", "next" : "string", "offset" : "integer", "prev" : "string", "total" : "integer" } ``` -------------------------------- ### Create Promoted Offsite Campaign Source: https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/createCampaign Use this snippet to create a Promoted Offsite campaign. It requires campaign name, start date, funding strategy, channels, budget, and marketplace ID. The example sets a daily budget of 5 USD for the campaign. ```json { "campaignName": "Offsite ads Campaign", "startDate": "2023-07-07T21:43:00Z", "fundingStrategy": { "fundingModel": "COST_PER_CLICK" }, "channels": [ "OFF_SITE" ], "budget": { "daily": { "amount": { "currency": "USD", "value": "5" } } }, "marketplaceId": "EBAY_US" } ``` -------------------------------- ### GET /ad_campaign/get_campaign_by_namestartDate Source: https://developer.ebay.com/api-docs/sell/marketing/fields Retrieves an ad campaign by its name, including its start date. This endpoint allows finding a campaign using its name and getting its scheduled start date. ```APIDOC ## GET /ad_campaign/get_campaign_by_namestartDate ### Description Retrieves an ad campaign by its name, including its start date. This endpoint allows finding a campaign using its name and getting its scheduled start date. ### Method GET ### Endpoint /ad_campaign/get_campaign_by_namestartDate ### Parameters #### Query Parameters - **name** (string) - Required - The name of the ad campaign to retrieve. #### Response #### Success Response (200) - **startDate** (string) - Description of the campaign's start date. ``` -------------------------------- ### Retrieve Suggested Budget for an Offsite Campaign Source: https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/suggestBudget This example demonstrates how to retrieve the suggested budget for a Promoted Offsite campaign. This method does not require a request payload. ```bash GET https://api.ebay.com/sell/marketing/v1/ad_campaign/suggest_budget ``` -------------------------------- ### Create Ads in Bulk Using Seller Inventory References Source: https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkCreateAdsByInventoryReference This sample demonstrates how to create two new ads for a given campaign using seller inventory references. It highlights the structure of a request to create ads in bulk. ```APIDOC ## POST /bulkCreateAdsByInventoryReference ### Description Creates multiple ads for a campaign using seller inventory references. This method is useful for efficiently adding several ads at once. ### Method POST ### Endpoint /sell/marketing/v1/ad/bulkCreateAdsByInventoryReference ### Parameters #### Request Body - **campaign_id** (string) - Required - The ID of the campaign to which the ads will be added. - **ads** (array) - Required - A list of ad objects to be created. - **inventoryReference** (object) - Required - Details about the inventory item. - **value** (string) - Required - The inventory reference ID (e.g., listing ID, inventory item group ID). - **type** (string) - Required - The type of inventory reference. Valid values are: `INVENTORY_ITEM`, `INVENTORY_ITEM_GROUP`. - **bidPercentage** (number) - Optional - The bid percentage for the ad. This is a single precision value. Required for CPC funding model, not supported for CPS funding model. - **adGroupId** (string) - Optional - The ID of the ad group to which the ad belongs. Required for CPC funding model. ### Request Example ```json { "campaign_id": "1********4", "ads": [ { "inventoryReference": { "value": "110000000000", "type": "INVENTORY_ITEM" }, "bidPercentage": 0.75, "adGroupId": "120000000000" }, { "inventoryReference": { "value": "120000000001", "type": "INVENTORY_ITEM_GROUP" }, "bidPercentage": 0.80, "adGroupId": "120000000000" } ] } ``` ### Response #### Success Response (200 OK) - **ads** (array) - A list of ad creation results. - **inventoryReference** (object) - Details about the inventory item for which the ad was created. - **value** (string) - The inventory reference ID. - **type** (string) - The type of inventory reference. - **adId** (string) - The ID of the created ad. - **status** (string) - The status of the ad creation. Possible values: `SUCCESS`, `FAILURE`. - **errors** (array) - A list of errors if the ad creation failed. - **code** (string) - The error code. - **message** (string) - A description of the error. - **category** (string) - The category of the error. - **domain** (string) - The domain of the error. - **error_details** (object) - Additional details about the error. #### Response Example (200 OK) ```json { "ads": [ { "inventoryReference": { "value": "110000000000", "type": "INVENTORY_ITEM" }, "adId": "210000000000", "status": "SUCCESS" }, { "inventoryReference": { "value": "120000000001", "type": "INVENTORY_ITEM_GROUP" }, "status": "FAILURE", "errors": [ { "code": "35012", "message": "The inventory reference ID 120000000001 is not valid.", "category": "REQUEST", "domain": "API_MARKETING" } ] } ] } ``` ### Error Handling This call can return the following HTTP status codes: - **200 OK**: Success. - **207 Multi Status**: Partial success, some ads may have failed. - **400 Bad Request**: The request was malformed or invalid. - **404 Not Found**: The specified campaign or ad group was not found. - **409 Business error**: A business rule violation occurred. - **500 Internal Server Error**: An unexpected error occurred on the server. Specific error codes include: - **35001**: Problem with an eBay internal system or process. - **35002**: Internal error, please try again later. - **35007**: Invalid 'bidPercentage'. - **35010**: 'bidPercentage' should not be provided for DYNAMIC adRateStrategy. - **35012**: Invalid inventory reference ID. - **35018**: Duplicate listing IDs or inventoryReference IDs in the request. - **35033**: At least one request is required for bulk requests. - **35035**: Campaign has ended. - **35040**: Invalid inventory reference type. - **35045**: No campaign found for the given campaign ID. - **35061**: Campaign is being synced, please try again later. - **35063**: Campaign is ending soon, no update operations allowed. - **35064**: Operation only supported for key-based campaigns. - **35071**: Exceeded maximum number of supported IDs per call. - **35072**: InventoryReferenceId is a variation and cannot be promoted directly. Use parent ID and set type to 'INVENTORY_ITEM_GROUP'. - **35077**: Seller level or sales activity insufficient for Promoted Listings. - **35078**: Seller must be in good standing with recent sales activity. - **36106**: 'adGroupId' not supported for CPS funding model. - **36108**: 'adGroupId' required for CPC funding model. - **36210**: No adgroup found for the given ad group ID. - **36219**: Ad group has been archived. ``` -------------------------------- ### Create Ads in Bulk Using Seller Inventory References Source: https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkCreateAdsByInventoryReference This sample demonstrates how to create two new ads for a specified campaign using seller inventory references. It requires the campaign ID and a list of inventory references. ```javascript const BASE_URL = "https://api.ebay.com/sell/marketing/v1"; async function createAdsByInventoryReference(accessToken, campaignId, inventoryReferences) { const url = `${BASE_URL}/ad_campaign/${campaignId}/ad_by_inventory_reference`; const headers = { "Authorization": `Bearer ${accessToken}`, "Content-Type": "application/json" }; try { const response = await fetch(url, { method: "POST", headers: headers, body: JSON.stringify(inventoryReferences) }); if (!response.ok) { const errorData = await response.json(); console.error(`Error creating ads: ${response.status}`, errorData); return null; } const data = await response.json(); console.log("Ads created successfully:", data); return data; } catch (error) { console.error("Network error creating ads:", error); return null; } } // Example Usage: const token = "YOUR_ACCESS_TOKEN"; const campaign_id = "1********4"; const inventory_references = { "inventoryReferences": [ { "inventoryReferenceId": "1100********1", "inventoryReferenceType": "PRODUCT_SKU" }, { "inventoryReferenceId": "6300********9", "inventoryReferenceType": "INVENTORY_ITEM_GROUP" } ] }; createAdsByInventoryReference(token, campaign_id, inventory_references); ``` -------------------------------- ### Retrieve Details for Multiple Keywords Source: https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/getKeywords This example retrieves the details for all keywords associated with a specified Promoted Listings priority strategy campaign. The input required is the campaign ID. ```bash GET https://api.ebay.com/sell/marketing/v1/ad_campaign/1********4/keyword ``` -------------------------------- ### GET /ad_campaignstartDate Source: https://developer.ebay.com/api-docs/sell/marketing/fields Retrieves start dates for multiple ad campaigns. This endpoint is used to get commencement information for a collection of ad campaigns. ```APIDOC ## GET /ad_campaignstartDate ### Description Retrieves start dates for multiple ad campaigns. This endpoint is used to get commencement information for a collection of ad campaigns. ### Method GET ### Endpoint /ad_campaignstartDate ### Parameters #### Query Parameters - **campaigns** (string) - Optional - Filters the results to include only specific campaigns. (This seems to be a misinterpretation in the source, likely intended as a filter or part of the response structure, not a query param for startDate retrieval). ``` -------------------------------- ### Retrieve Listing Suggestions Source: https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/suggestItems This example retrieves ideas for listings that can be targeted for Promoted Listings campaigns. It requires the campaign ID, category IDs, offset, and limit query parameters. ```HTTP GET https://api.ebay.com/sell/marketing/v1/ad_campaign/1********4/suggest_items?category_ids=2********6,2********7&offset=10&limit=10 ``` -------------------------------- ### POST /sell/marketing/v1/item_promotion Source: https://developer.ebay.com/api-docs/sell/marketing/resources/item_promotion/methods/createItemPromotion Creates a new item promotion. This example demonstrates the creation of a volume discount promotion that applies to all items in the store. ```APIDOC ## POST /sell/marketing/v1/item_promotion ### Description Creates a new item promotion. This example demonstrates the creation of a volume discount promotion that applies to all items in the store. ### Method POST ### Endpoint https://api.ebay.com/sell/marketing/v1/item_promotion ### Request Body - **name** (string) - Required - The name of the promotion. - **startDate** (string) - Required - The start date and time of the promotion. - **endDate** (string) - Required - The end date and time of the promotion. - **marketplaceId** (string) - Required - The eBay marketplace ID where the promotion will be applied. - **promotionStatus** (string) - Required - The status of the promotion (e.g., SCHEDULED). - **promotionType** (string) - Required - The type of promotion. For volume discounts, this must be `VOLUME_DISCOUNT`. - **applyDiscountToSingleItemOnly** (boolean) - Required - Indicates if the discount applies to a single item only. Set to `false` for store-wide discounts. - **inventoryCriterion** (object) - Required - Defines the items to which the promotion applies. - **inventoryCriterionType** (string) - Required - The type of inventory criterion. Use `INVENTORY_ANY` for store-wide discounts. - **ruleCriteria** (object) - Optional - Additional rules for inventory selection. - **selectionRules** (null) - Not used in this example. - **excludeInventoryItems** (null) - Not used in this example. - **excludeListingIds** (null) - Set to `null` when `inventoryCriterionType` is `INVENTORY_ANY`. - **discountRules** (array) - Required - A list of discount rules that define the tiered discounts. - **discountSpecification** (object) - Required - Specifies the conditions for the discount. - **minQuantity** (number) - Required - The minimum quantity of items required to receive this discount. - **discountBenefit** (object) - Required - Specifies the benefit of the discount. - **percentageOffOrder** (string) - Required - The percentage off the order. Set to "0" for the first rule in this example. - **ruleOrder** (number) - Required - The order in which this discount rule should be applied. ### Request Example ```json { "name": "Volume Pricing promotion", "startDate": "2019-05-20T01:00:00.000Z", "endDate": "2019-07-30T08:00:00.000Z", "marketplaceId": "EBAY_US", "promotionStatus": "SCHEDULED", "promotionType": "VOLUME_DISCOUNT", "applyDiscountToSingleItemOnly": false, "inventoryCriterion": { "inventoryCriterionType": "INVENTORY_ANY", "ruleCriteria": { "selectionRules": null, "excludeInventoryItems": null, "excludeListingIds": null } }, "discountRules": [ { "discountSpecification": { "minQuantity": 1 }, "discountBenefit": { "percentageOffOrder": "0" }, "ruleOrder": 1 }, { "discountSpecification": { "minQuantity": 2 }, "discountBenefit": { "percentageOffOrder": "10" }, "ruleOrder": 2 } ] } ``` ### Response #### Success Response (201 Created) - **location** (string) - The URI to the newly created discount, including its ID. #### Response Example (No specific response body example provided in the source, but a 201 Created status and a Location header are expected.) ``` -------------------------------- ### POST /item_promotionstartDate Source: https://developer.ebay.com/api-docs/sell/marketing/fields Creates a new item promotion with a specified start date. This endpoint initiates the creation of an item promotion and sets its beginning date. ```APIDOC ## POST /item_promotionstartDate ### Description Creates a new item promotion with a specified start date. This endpoint initiates the creation of an item promotion and sets its beginning date. ### Method POST ### Endpoint /item_promotionstartDate ### Parameters #### Request Body - **startDate** (string) - Required - The start date for the item promotion. ``` -------------------------------- ### Get Promotions Source: https://developer.ebay.com/api-docs/sell/marketing/resources/promotion/methods/getPromotions Retrieves a paginated list of promotions. You can control the number of results per page and the starting offset. ```APIDOC ## GET /promotions ### Description Retrieves a list of promotions. This endpoint supports pagination using `limit` and `offset` query parameters. ### Method GET ### Endpoint /promotions ### Query Parameters - **limit** (integer) - Optional - The number of items to return per page. - **offset** (integer) - Optional - The number of results to skip before returning. ### Response #### Success Response (200) - **href** (string) - The URI of the current page of results. - **limit** (integer) - The number of items returned on this page. - **next** (string) - The URI for the next page of results (conditional). - **offset** (integer) - The number of results skipped. - **prev** (string) - The URI for the previous page of results (conditional). - **promotions** (array of PromotionDetail) - A list of promotion details. - **promotions.couponCode** (string) - The unique coupon code for the promotion. - **promotions.description** (string) - A seller-defined tagline for the offer. - **promotions.endDate** (string) - The date and time the promotion ends (UTC). - **promotions.marketplaceId** (MarketplaceIdEnum) - The eBay marketplace ID. - **promotions.name** (string) - The seller-defined name of the promotion. - **promotions.priority** (PromotionPriorityEnum) - The priority of the promotion (for ORDER_DISCOUNT). - **promotions.promotionHref** (string) - The URI of the promotion details. - **promotions.promotionId** (string) - The unique eBay-assigned ID for the promotion. - **promotions.promotionImageUrl** (string) - URL to an image for the promotion. - **promotions.promotionStatus** (PromotionStatusEnum) - The current status of the promotion. - **promotions.promotionType** (PromotionTypeEnum) - The type of the promotion. - **promotions.startDate** (string) - The date and time the promotion starts (UTC). - **total** (integer) - The total number of items retrieved in the result set. #### Response Example { "href": "https://api.ebay.com/sell/marketing/v1/promotions?limit=2&offset=0", "limit": 2, "next": "https://api.ebay.com/sell/marketing/v1/promotions?limit=2&offset=2", "offset": 0, "promotions": [ { "couponCode": "SUMMER20", "description": "Get 20% off summer items!", "endDate": "2024-08-31T23:59:59Z", "marketplaceId": "EBAY_US", "name": "Summer Sale", "promotionHref": "https://api.ebay.com/sell/marketing/v1/promotion/12345", "promotionId": "12345", "promotionImageUrl": "https://example.com/images/summer_sale.jpg", "promotionStatus": "ACTIVE", "promotionType": "MARKDOWN_SALE", "startDate": "2024-07-01T00:00:00Z" }, { "couponCode": "BACK2SCHOOL", "description": "Save on school supplies.", "endDate": "2024-09-15T23:59:59Z", "marketplaceId": "EBAY_US", "name": "Back to School Discount", "promotionHref": "https://api.ebay.com/sell/marketing/v1/promotion/67890", "promotionId": "67890", "promotionImageUrl": "https://example.com/images/back_to_school.png", "promotionStatus": "SCHEDULED", "promotionType": "CODED_COUPON", "startDate": "2024-08-01T00:00:00Z" } ], "total": 5 } ``` -------------------------------- ### Get Ads with Pagination Source: https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/getAds Retrieves a paginated list of ads. You can control the number of results per page and the starting offset. ```APIDOC ## GET /ads ### Description Retrieves a paginated list of ads. Supports specifying the number of results per page and the offset for pagination. ### Method GET ### Endpoint /ads ### Query Parameters - **limit** (integer) - Optional - The number of items to return on a single page. Defaults to 10. - **offset** (integer) - Optional - The number of results to skip before returning the first result. Defaults to 0. ### Response #### Success Response (200) - **limit** (integer) - The number of items returned on a single page. - **next** (string) - The URI to retrieve the next page of results. Conditional. - **offset** (integer) - The number of results skipped in the result set. - **prev** (string) - The URI to retrieve the previous page of results. Conditional. - **total** (integer) - The total number of items retrieved in the result set. ``` -------------------------------- ### Retrieve Keyword Suggestions Source: https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/suggestKeywords This example retrieves a list of keyword ideas for listings to be targeted for Promoted Listings campaigns. ```APIDOC ## POST /ad_group/{ad_group_id}/suggestKeywords ### Description Retrieves a list of suggested keywords for a given ad group, which can be used to target listings for Promoted Listings campaigns. ### Method POST ### Endpoint /ad_group/{ad_group_id}/suggestKeywords ### Parameters #### Path Parameters - **ad_group_id** (string) - Required - The unique identifier of the ad group for which to suggest keywords. #### Request Body - **listingIds** (array of string) - Optional - A list of listing IDs for which to generate keyword suggestions. If not provided, suggestions will be based on the listings already associated with the ad group. - **campaignId** (string) - Required - The unique identifier of the campaign associated with the ad group. - **marketplaceId** (string) - Required - The identifier of the marketplace where the campaign is active. ### Request Example ```json { "listingIds": ["123456789012", "345678901234"], "campaignId": "987654321", "marketplaceId": "EBAY_US" } ``` ### Response #### Success Response (200) - **suggestedKeywords** (array of SuggestedKeywords) - A list of suggested keywords in the paged collection. - **keywordText** (string) - The text for the keyword. - **matchType** (MatchTypeEnum) - A field that defines the match type for the keyword. Valid Values: BROAD, EXACT, PHRASE. - **additionalInfo** (array of AdditionalInfo) - A container for the additional information and compiled insight data for suggested keywords. - **infoType** (AdditionalInfoEnum) - The type of additional information provided for the suggested keyword. Valid Value: KEYWORD_INSIGHTS. - **metrics** (array of AdditionalInfoData) - A list of additional data provided for the suggested keyword. - **metricKey** (MetricEnum) - The metric used to provide additional information for the suggested keyword. Valid Values: ACTIVE_SELLER_COUNT, SEARCH_VOLUME. - **value** (string) - The data provided for the specified metric. #### Response Example ```json { "suggestedKeywords": [ { "keywordText": "red shoes", "matchType": "BROAD", "additionalInfo": [ { "infoType": "KEYWORD_INSIGHTS", "metrics": [ { "metricKey": "SEARCH_VOLUME", "value": "1500" } ] } ] } ] } ``` ``` -------------------------------- ### Update a markdown discount Source: https://developer.ebay.com/api-docs/sell/marketing/resources/item_price_markdown/methods/updateItemPriceMarkdownPromotion This sample demonstrates how to update an existing markdown promotion. It shows how to change the `applyFreeShipping` value to `true` and increase the discount `value` from $5 to $10. The example also includes setting `ruleCriteria` to null values to prevent potential null pointer exceptions when no specific inventory criteria are provided. Use the `getItemPriceMarkdownPromotion` call to retrieve the original discount details before updating. ```APIDOC ## PUT /sell/marketing/v1/item_price_markdown/{promotionId} ### Description Updates an existing item price markdown promotion. This allows modification of discount values, shipping options, and inventory criteria. ### Method PUT ### Endpoint /sell/marketing/v1/item_price_markdown/{promotionId} ### Parameters #### Path Parameters - **promotionId** (string) - Required - The unique identifier of the promotion to be updated. #### Request Body - **name** (string) - Required - The name of the promotion. - **description** (string) - Optional - A description for the promotion. - **startDate** (string) - Required - The start date and time for the promotion in ISO 8601 format. - **endDate** (string) - Required - The end date and time for the promotion in ISO 8601 format. - **marketplaceId** (string) - Required - The eBay marketplace ID where the promotion is active. - **promotionStatus** (string) - Required - The status of the promotion (e.g., SCHEDULED, ACTIVE, PAUSED, ENDED). - **promotionImageUrl** (string) - Optional - URL for an image to display with the promotion. - **blockPriceIncreaseInItemRevision** (string) - Optional - If set to `true`, prevents price increases in item revisions during the promotion. - **applyFreeShipping** (string) - Optional - If set to `true`, free shipping is applied as part of the promotion. - **autoSelectFutureInventory** (string) - Optional - If set to `true`, the promotion will automatically apply to newly listed inventory. - **selectedInventoryDiscounts** (array) - Required - A list of inventory items and their associated discounts. - **inventoryCriterion** (object) - Required - Defines the inventory to which the discount applies. - **inventoryCriterionType** (string) - Required - The type of inventory criterion (e.g., INVENTORY_ANY, INVENTORY_ITEM_GROUP, INVENTORY_LOCATION). - **ruleCriteria** (object) - Optional - Specific rules for selecting inventory. - **selectionRules** (object) - Optional - Rules for selecting items based on criteria. - **excludeInventoryItems** (array) - Optional - List of inventory items to exclude. - **excludeListingIds** (array) - Optional - List of listing IDs to exclude. - **discountBenefit** (object) - Required - The type and details of the discount. - **amountOffItem** (object) - Optional - Specifies a fixed amount off the item price. - **value** (string) - Required - The discount amount. - **currency** (string) - Required - The currency of the discount amount (e.g., USD). ### Request Example ```json { "name": "Save up to $5 (All inventory example)", "description": "Save up to $5 (All inventory example)", "startDate": "2019-01-01T00:00:00.000Z", "endDate": "2019-01-31T23:59:59.000Z", "marketplaceId": "EBAY_US", "promotionStatus": "SCHEDULED", "promotionImageUrl": "https://i.ebayimg.com/********/********/********/s-500.jpg", "blockPriceIncreaseInItemRevision": "true", "applyFreeShipping": "true", "autoSelectFutureInventory": "true", "selectedInventoryDiscounts": [ { "inventoryCriterion": { "inventoryCriterionType": "INVENTORY_ANY", "ruleCriteria": { "selectionRules": null, "excludeInventoryItems": null, "excludeListingIds": null } }, "discountBenefit": { "amountOffItem": { "value": "10.00", "currency": "USD" } } } ] } ``` ### Response #### Success Response (204 No Content) This method returns a **204 No Content** status code upon successful update. There is no response payload. ``` -------------------------------- ### Get Email Report Response Payload Source: https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getEmailReport This is an example of the JSON payload returned by the getEmailReport method, containing metrics such as openCount, clickCount, and totalSales. ```json { "clickCount" : "integer", "openCount" : "integer", "totalSales" : { "currency" : "CurrencyCodeEnum : [AED, AFN, ALL...]", "value" : "string" } } ``` -------------------------------- ### Ad Creation Output Example Source: https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/createAdsByInventoryReference This JSON output shows the structure returned after successfully creating an ad. It includes the ad ID and a direct URL to the ad resource. ```json { "ads": [ { "adId": "4********", "href": "https://api.ebay.com/sell/marketing/v1/ad_campaign/1********4/ad/4********4" } ] } ``` -------------------------------- ### GET /item_promotion/{promotion_id}startDate Source: https://developer.ebay.com/api-docs/sell/marketing/fields Retrieves the start date of a specific item promotion. This provides information on when the item promotion is scheduled to commence. ```APIDOC ## GET /item_promotion/{promotion_id}startDate ### Description Retrieves the start date of a specific item promotion. This provides information on when the item promotion is scheduled to commence. ### Method GET ### Endpoint /item_promotion/{promotion_id}startDate ### Parameters #### Path Parameters - **promotion_id** (string) - Required - The unique identifier of the item promotion. ``` -------------------------------- ### Create an Ad Group Source: https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/createAdGroup This example demonstrates how to create an ad group for an existing priority strategy ad campaign. It requires the campaign ID, ad group name, and default bid details. ```APIDOC ## POST /sell/marketing/v1/ad_campaign/{campaign_id}/ad_group ### Description Creates an ad group for a specified ad campaign. ### Method POST ### Endpoint /sell/marketing/v1/ad_campaign/{campaign_id}/ad_group ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The ID of the campaign for which to create the ad group. #### Request Body - **name** (string) - Required - The name of the ad group. - **defaultBid** (object) - Required - The default bid details for the ad group. - **currency** (string) - Required - The currency of the default bid (e.g., USD). - **value** (string) - Required - The value of the default bid. ### Request Example ```json { "name": "PLA ad group", "defaultBid": { "currency": "USD", "value": "0.2" } } ``` ### Response #### Success Response (201 Created) - **location** (string) - The URI for the newly-created ad group. #### Response Example (No payload, only location header) ``` -------------------------------- ### GET /ad_campaign/{campaign_id}startDate Source: https://developer.ebay.com/api-docs/sell/marketing/fields Retrieves the start date of a specific ad campaign. This provides information on when the ad campaign is scheduled to begin. ```APIDOC ## GET /ad_campaign/{campaign_id}startDate ### Description Retrieves the start date of a specific ad campaign. This provides information on when the ad campaign is scheduled to begin. ### Method GET ### Endpoint /ad_campaign/{campaign_id}startDate ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The unique identifier of the ad campaign. ``` -------------------------------- ### Retrieve Suggested Budget for an Offsite Campaign Source: https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/suggestBudget This example retrieves the suggested budget for a Promoted Offsite campaign. This method does not have a request payload. ```APIDOC ## GET /sell/marketing/v1/ad_campaign/suggest_budget ### Description Retrieves the suggested allocated daily budget for an offsite campaign. ### Method GET ### Endpoint https://api.ebay.com/sell/marketing/v1/ad_campaign/suggest_budget ### Parameters This method does not accept any parameters. ### Request Example This method does not have a request payload. ### Response #### Success Response (200) - **suggestedBudget** (array of BudgetRecommendationResponse) - The suggested allocated daily budget for an offsite campaign. Occurrence: Conditional - **budget** (CampaignBudget) - The allocated daily budget for the Cost Per Click (CPC) Promoted Listings campaign. Occurrence: Conditional - **daily** (Budget) - The daily budget limit for the Cost Per Click (CPC) Promoted Listings campaign. Occurrence: Conditional - **amount** (Amount) - The allocated budget amount for a CPC Promoted Listings campaign. Occurrence: Conditional - **currency** (CurrencyCodeEnum) - The base currency applied to the **value** field to establish a monetary amount. Occurrence: Conditional - **value** (string) - The monetary amount in the specified **currency**. Occurrence: Conditional - **budgetStatus** (BudgetStatusEnum) - The budget status for a CPC Promoted Listings campaign. Occurrence: Conditional - **campaignId** (string) - The unique eBay-assigned ID for a campaign. Occurrence: Conditional - **channels** (array of ChannelEnum) - The channel for the campaign. Occurrence: Conditional #### Response Example { "suggestedBudget": [ { "budget": { "daily": { "amount": { "currency": "USD", "value": "50.00" }, "budgetStatus": "EXCEEDED" } }, "campaignId": "1234567890", "channels": [ "OFF_SITE" ] } ] } ### HTTP status codes - **200**: Success - **400**: Bad Request - **404**: Not Found - **409**: Business error - **500**: Internal Server error ### Error codes - **35001**: API_MARKETING, APPLICATION - There was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance. - **35002**: API_MARKETING, APPLICATION - Internal error. Please wait a few minutes and try the call again. - **35041**: API_MARKETING, REQUEST - The 'marketplaceId' is required. - **35095**: API_MARKETING, BUSINESS - 'marketplaceId' {marketplaceId} is not supported. Offsite Ads is supported only on these marketplaces: {supportedMarketplaces}. ``` -------------------------------- ### GET /item_price_markdown/{promotion_id}startDate Source: https://developer.ebay.com/api-docs/sell/marketing/fields Retrieves the start date of a specific item price markdown promotion. This provides details on when the promotion is set to begin. ```APIDOC ## GET /item_price_markdown/{promotion_id}startDate ### Description Retrieves the start date of a specific item price markdown promotion. This provides details on when the promotion is set to begin. ### Method GET ### Endpoint /item_price_markdown/{promotion_id}startDate ### Parameters #### Path Parameters - **promotion_id** (string) - Required - The unique identifier of the promotion. ``` -------------------------------- ### GET /promotion Source: https://developer.ebay.com/api-docs/sell/marketing/types/api%3APromotionsPagedCollection Retrieves a paginated collection of discounts. This endpoint allows for fetching discounts with control over the number of items per page and the starting offset. ```APIDOC ## GET /promotion ### Description Retrieves a paginated collection of discounts. This endpoint allows for fetching discounts with control over the number of items per page and the starting offset. ### Method GET ### Endpoint /promotion ### Query Parameters - **limit** (integer) - Optional - The number of items to return on a single page from the result set. - **offset** (integer) - Optional - The number of results to skip in the result set before listing the first returned result. ### Response #### Success Response (200) - **href** (string) - The URI of the current page of results from the result set. - **limit** (integer) - The number of items returned on a single page from the result set. - **next** (string) - The URI for the following page of results. Returned only if there is an additional page of results. - **offset** (integer) - The number of results skipped in the result set before listing the first returned result. - **prev** (string) - The URI for the preceding page of results. Returned only if there is a previous page of results. - **promotions** (array of PromotionDetail) - A list containing the details of each returned discount. - **total** (integer) - The total number of items retrieved in the result set. If no items are found, this field is returned with a value of `0`. ``` -------------------------------- ### Sample Promotion Response Source: https://developer.ebay.com/api-docs/sell/marketing/resources/promotion/methods/getPromotions This is a sample JSON output for a promotion retrieval call, showing details like promotion name, dates, marketplace, status, and a unique promotion href. The response includes pagination information. ```JSON { "href": "https://api.ebay.com/sell/marketing/v1/promotion?limit=5&offset=0&promotion_status=DRAFT&sort=START_DATE&marketplace_id=EBAY_US", "total": 5, "promotions": [ { "name": "Save $20 when you spend $20 ", "startDate": "2016-09-02T23:34:49.000Z", "endDate": "2016-09-11T11:34:49.000Z", "marketplaceId": "EBAY_US", "promotionStatus": "DRAFT", "priority": "PRIORITY_2", "promotionHref": "https://api.ebay.com/sell/marketing/v1/item_promotion/1**********1@EBAY_US" }, { "name": "For each 4 you get $20 off", "startDate": "2016-09-02T23:34:49.000Z", "endDate": "2016-09-11T11:34:49.000Z", "marketplaceId": "EBAY_US", "promotionStatus": "DRAFT", "priority": "PRIORITY_2", "promotionHref": "https://api.ebay.com/sell/marketing/v1/item_promotion/1**********1@EBAY_US" }, { "name": "For each 4 you get $20 off", "startDate": "2016-09-02T23:34:49.000Z", "endDate": "2016-09-11T11:34:49.000Z", "marketplaceId": "EBAY_US", "promotionStatus": "DRAFT", "priority": "PRIORITY_2", "promotionHref": "https://api.ebay.com/sell/marketing/v1/item_promotion/1**********1@EBAY_US" } ] } ``` -------------------------------- ### Retrieve Listing Suggestions Source: https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/suggestItems This example retrieves ideas for listings, which can be targeted for Promoted Listings campaigns. It requires the campaign ID and allows specifying category IDs, offset, and limit for pagination. ```APIDOC ## GET /sell/marketing/v1/ad_campaign/{campaign_id}/suggest_items ### Description Retrieves a list of suggested items that can be targeted for Promoted Listings campaigns. This endpoint is useful for identifying potential listings to promote based on campaign context and specified categories. ### Method GET ### Endpoint /sell/marketing/v1/ad_campaign/{campaign_id}/suggest_items ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The ID of the ad campaign for which suggestions shall be retrieved. #### Query Parameters - **category_ids** (string) - Required - A comma-separated list of category IDs to filter suggestions. - **offset** (integer) - Optional - The number of results skipped in the result set before listing the first returned result. Default: 0. - **limit** (integer) - Optional - The number of items returned on a single page from the result set. Must be greater than zero and less than a specified maximum value. ### Response #### Success Response (200) - **href** (string) - The URI of the current page of results. - **limit** (integer) - The number of items returned on a single page. - **next** (string) - The call URI to retrieve the next page of results. - **offset** (integer) - The number of results skipped in the result set. - **prev** (string) - The call URI to retrieve the previous page of results. - **suggestedItems** (array of TargetingItems) - A list of suggested items. - **suggestedItems.bases** (array of ItemBasis) - Metrics and additional information for the items. - **suggestedItems.bases.estimatedValue** (integer) - The estimated value of the search impressions for items. - **suggestedItems.bases.metric** (TargetingMetricsEnum) - The basis of the statistics. - **suggestedItems.listingId** (string) - The listing ID of the targeted item. - **total** (integer) - The total number of items retrieved in the result set. #### Response Example { "href": "https://api.ebay.com/sell/marketing/v1/ad_campaign/1********4/suggest_items?limit=10&offset=0", "limit": 10, "next": "https://api.ebay.com/sell/marketing/v1/ad_campaign/1********4/suggest_items?limit=10&offset=10", "offset": 0, "prev": null, "suggestedItems": [ { "bases": [ { "estimatedValue": 1000, "metric": "IMPRESSIONS" } ], "listingId": "111111111111" } ], "total": 200 } ### Error Codes - **35001**: API_MARKETING/APPLICATION - There was a problem with an eBay internal system or process. - **35008**: API_MARKETING/REQUEST - The category Id {categoryId} is not valid. - **35029**: API_MARKETING/REQUEST - The 'limit' has to be greater than zero and less than {maxLimitValue}. - **35030**: API_MARKETING/REQUEST - The 'offset' cannot be less than zero. - **35041**: API_MARKETING/REQUEST - The 'marketplaceId' is required. - **35045**: API_MARKETING/REQUEST - No campaign found for campaign id {campaign_id}. - **35051**: API_MARKETING/BUSINESS - 'marketplaceId' {marketplaceId} is not supported. - **35090**: API_MARKETING/REQUEST - Category ID limit exceeded. ``` -------------------------------- ### GET /ad_campaign/find_campaign_by_ad_referencestartDate Source: https://developer.ebay.com/api-docs/sell/marketing/fields Finds ad campaigns by their ad reference and retrieves their start dates. This endpoint allows searching for campaigns using an ad reference and obtaining their commencement dates. ```APIDOC ## GET /ad_campaign/find_campaign_by_ad_referencestartDate ### Description Finds ad campaigns by their ad reference and retrieves their start dates. This endpoint allows searching for campaigns using an ad reference and obtaining their commencement dates. ### Method GET ### Endpoint /ad_campaign/find_campaign_by_ad_referencestartDate ### Parameters #### Query Parameters - **ad_reference** (string) - Required - The ad reference to search for. #### Response #### Success Response (200) - **campaigns.startDate** (string) - Description of the campaign's start date within the campaigns array. ```