GET/item_promotion/{promotion_id}
Note: As of July 8th 2024, promotions are now being referred to as discounts on Seller Hub and eBay help pages. Sell Marketing API documentation has been updated to reflect this product name change, but note that no API interface changes have been made.
This method returns the complete details of the threshold discount specified by the promotion_id path parameter. Call getPromotions to retrieve the IDs of a seller's discounts.
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 |
---|---|---|
promotion_id | string | This path parameter takes a concatenation of the ID of the discount you want to retrieve plus the marketplace ID on which the discount is hosted. Concatenate the two values by separating them with an "at sign" (@). The ID of the discount (promotionId) is a unique eBay-assigned value that's generated when the discount is created. The Marketplace ID is the ENUM value of eBay marketplace where the discount is hosted. Use the getPromotions method to retrieve promotion Ids. See MarketplaceIdEnum for supported Marketplace ID values. Example: 1********5@EBAY_US 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.readonly
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 |
---|---|---|
applyDiscountToSingleItemOnly | boolean | If set to Occurrence: Conditional |
budget | Amount | This sets the budget for the Note: The budget value for an active or paused discount can not be decreased. Note: The Currency Code for 'budget' must be the same as the Currency Code for 'maxDiscountAmount'. Occurrence: Conditional |
budget.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
budget.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
couponConfiguration | CouponConfiguration | The configuration of a coded coupon discount. Occurrence: Conditional |
couponConfiguration.couponCode | string | A unique code that buyers can use during checkout to receive a discount. The code must be unique across eBay. Occurrence: Conditional |
couponConfiguration.couponType | CouponTypeEnum | This indicates the type of Coded Coupon discount, and is required when the discount type is CODED_COUPON.
Occurrence: Conditional |
couponConfiguration.maxCouponRedemptionPerUser | integer | This sets the limit on the number of times a buyer can use this coupon. The range of values is 1-10. If no value is provided, a buyer can use the coupon an unlimited number of times. Occurrence: Conditional |
description | string | Required for CODED_COUPON discounts, this is the seller-defined "tag line" for the offer, such as "Save on designer shoes." The tag line appears under the "offer-type text" that is generated for the discount and is displayed under the offer tile that is shown on the seller's All Offers page and on the event page for the discount. This tag line is not used with volume pricing discounts. Note: Offer-type text is a teaser that's presented throughout the buyer's journey through the sales flow and is generated by eBay. This text is not editable by the seller—it's derived from the settings in the discountRules and discountSpecification fields—and can be, for example, "Extra 20% off when you buy 3+". Maximum length: 50 Occurrence: Conditional |
discountRules | array of DiscountRule | A list containing the discount benefits (discountRule) and the rules that define when the benefit is applied (discountSpecification). Occurrence: Always |
discountRules.discountBenefit | DiscountBenefit | This container defines the discount as either a monetary amount or a percentage of the sales price. Note: When configuring discount benefits, populate just one of the following fields in the discountBenefit container:
For volume pricing, only percentageOffOrder is applicable as a discountBenefit. Also, the first discountBenefit container in a volume pricing configuration must set percentageOffOrder to Tip: Refer to Configuring threshold discounts for information and examples on how to combine discountBenefit and discountSpecification to create different types of discounts. Occurrence: Always |
discountRules.discountBenefit.amountOffItem | Amount | The monetary amount that is discounted off an item (or items) when the discount criteria is met.
Occurrence: Conditional |
discountRules.discountBenefit.amountOffItem.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
discountRules.discountBenefit.amountOffItem.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
discountRules.discountBenefit.amountOffOrder | Amount | Used for threshold discounts, this is the monetary amount that is discounted off an order when the discount criteria is met. Because this field is valid only for orders, it's not a valid combination to use with markdown discounts. Occurrence: Conditional |
discountRules.discountBenefit.amountOffOrder.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
discountRules.discountBenefit.amountOffOrder.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
discountRules.discountBenefit.percentageOffItem | string | The percentage applied to the sales price that is discounted off the discounted item (or items) when the discount criteria is met. Occurrence: Conditional |
discountRules.discountBenefit.percentageOffOrder | string | Used for threshold discounts, this is the percentage of the order price that is discounted off the order when the discount criteria is met. This field is not value for markdown discounts. Occurrence: Conditional |
discountRules.discountSpecification | DiscountSpecification | This container defines the criteria for when the discounts trigger, such as the minimum quantity that the buyer must purchase before the discount kicks in. The discount is applied each time the criteria defined by this container is met. When configuring the rules that govern when the discounts are applied, populate just one of the following fields in the discountSpecification container:
Important: When configuring volume pricing discounts, only minQuantity is applicable as a discountSpecification. Also, the configuration for minQuantity in a volume pricing configuration is specific. In the first discountSpecification container, set minQuantity to Tip: see Configuring threshold discounts for information and examples on how to combine discountBenefit and discountSpecification to create different types of discounts. Occurrence: Always |
discountRules.discountSpecification.forEachAmount | Amount | The monetary amount that must be spent on discounted items before the discount is applied. Occurrence: Conditional |
discountRules.discountSpecification.forEachAmount.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
discountRules.discountSpecification.forEachAmount.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
discountRules.discountSpecification.forEachQuantity | integer | The number of items that must be purchased in order to qualify for the discount. Occurrence: Conditional |
discountRules.discountSpecification.minAmount | Amount | Known as the "threshold amount", the minimum dollar amount that needs to be spent on discounted items in order to qualify for the discount. Occurrence: Conditional |
discountRules.discountSpecification.minAmount.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
discountRules.discountSpecification.minAmount.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
discountRules.discountSpecification.minQuantity | integer | The minimum quantity of discounted items that needs to be bought in order to qualify for the discount. Occurrence: Conditional |
discountRules.discountSpecification.numberOfDiscountedItems | integer | Use this field to configure "Buy One Get One" (or BOGO) discounts. Occurrence: Conditional |
discountRules.maxDiscountAmount | Amount | The limit on how much a buyer can save using a Note: The Currency Code for 'maxDiscountAmount' must be the same as the Currency Code for 'budget'. Occurrence: Always |
discountRules.maxDiscountAmount.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
discountRules.maxDiscountAmount.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
discountRules.ruleOrder | integer | This field indicates the order in which the discountRules are presented. The value specified for this field must equal the associated minQuantity value. Occurrence: Conditional |
endDate | string | The date and time the discount ends in UTC format ( Occurrence: Always |
inventoryCriterion | InventoryCriterion | Returns either an array of listing IDs or the selection rules used to specify the items being discounted. Listing IDs can be either eBay listing IDs or an array of seller's inventory reference IDs (know as SKUs or custom labels). See the selectionRules container for the rule criteria you can use to select inventory. Occurrence: Always |
inventoryCriterion.inventoryCriterionType | InventoryCriterionEnum | Indicates how the items to be discounted are selected. You can include inventory by ID, using rules, or globally include all your inventory. Occurrence: Always |
inventoryCriterion.inventoryItems | array of InventoryItem | An array of containers for the seller's inventory reference IDs (also known as an "SKU" or "custom label") to be added to the discount. Note: The request can have either inventoryItems or listingIds, but not both. Maximum: 500 parent items Maximum SKU or custom label length: 50 characters Required if InventoryCriterionType is set to INVENTORY_BY_VALUE , you must specify either inventoryItems or listingIds. Occurrence: Conditional |
inventoryCriterion.inventoryItems.inventoryReferenceId | string | The unique identifier of a single-item listing or a multi-variation listing. Occurrence: Conditional |
inventoryCriterion.inventoryItems.inventoryReferenceType | InventoryReferenceTypeEnum | Indicates the type of the inventoryReferenceId, which can be either Occurrence: Conditional |
inventoryCriterion.listingIds | array of string | An array of eBay listing IDs to be discounted. Note: The request can have either inventoryItems or listingIds, but not both. Required: All listings being discounted must offer an electronic payment method. Maximum: 500 parent items Maximum SKU or custom label length: 50 characters Required if InventoryCriterionType is set to INVENTORY_BY_VALUE , you must specify either inventoryItems or listingIds. Occurrence: Conditional |
inventoryCriterion.ruleCriteria | RuleCriteria | This container defines a set of inventory selection rules for a discount. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.excludeInventoryItems | array of InventoryItem | A list of seller inventory reference IDs to exclude from the discount. Note: The request can have either excludeInventoryItems or excludeListingIds but not both. Maximum: 100 parent itemsMaximum SKU or custom label length: 50 characters Occurrence: Conditional |
inventoryCriterion.ruleCriteria.excludeInventoryItems.inventoryReferenceId | string | The unique identifier of a single-item listing or a multi-variation listing. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.excludeInventoryItems.inventoryReferenceType | InventoryReferenceTypeEnum | Indicates the type of the inventoryReferenceId, which can be either Occurrence: Conditional |
inventoryCriterion.ruleCriteria.excludeListingIds | array of string | A list of eBay listing IDs to exclude from the discount. Note: The request can have either excludeInventoryItems or excludeListingIds but not both. Maximum: 100 parent itemsMaximum SKU or custom label length: 50 characters Occurrence: Conditional |
inventoryCriterion.ruleCriteria.markupInventoryItems | array of InventoryItem | A list of SKUs to remove from a markdown discount. The listed SKUs are 'marked up' to their standard price after being part of the markdown discount. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.markupInventoryItems.inventoryReferenceId | string | The unique identifier of a single-item listing or a multi-variation listing. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.markupInventoryItems.inventoryReferenceType | InventoryReferenceTypeEnum | Indicates the type of the inventoryReferenceId, which can be either Occurrence: Conditional |
inventoryCriterion.ruleCriteria.markupListingIds | array of string | A list of listing IDs to remove from a markdown discount. The listed items are 'marked up' to their standard price after being part of the markdown discount. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules | array of SelectionRule | The container for the rules that select the items to be discounted. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules.brands | array of string | An array of product brands. For more details, see Using the selectionRules container. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules.categoryIds | array of string | This field contains an array of the associated category ID(s). Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules.categoryScope | CategoryScopeEnum | This enumerated value indicates if the category ID for the item is an identifier for eBay categories or for a seller's eBay store categories. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules.listingConditionIds | array of string | A comma-separated list of unique identifiers for the conditions of listings to be included Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules.maxPrice | Amount | This container sets the maximum price threshold. For more details, see Using the selectionRules container. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules.maxPrice.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules.maxPrice.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules.minPrice | Amount | This container sets the minimum price threshold. For more details, see Using the selectionRules container. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules.minPrice.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
inventoryCriterion.ruleCriteria.selectionRules.minPrice.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
marketplaceId | MarketplaceIdEnum | The eBay marketplace ID of the site where the threshold discount is hosted. Threshold discounts are currently supported on a limited number of eBay marketplaces. Valid values:
Occurrence: Always |
name | string | The seller-defined name or "title" of the discount that the seller can use to identify a discount. This label is not displayed in end-user flows. Occurrence: Always |
priority | PromotionPriorityEnum | Applicable for only ORDER_DISCOUNT discounts, this field indicates the precedence of the discount, which eBay uses to determine the position of a discount on the seller's All Offers page. If an item is associated with multiple discounts, the discount with the higher priority takes precedence. Occurrence: Conditional |
promotionId | string | A unique eBay-assigned ID for the discount that's generated when the discount is created. Occurrence: Always |
promotionImageUrl | string | Required for CODED_COUPON, MARKDOWN_SALE, and ORDER_DISCOUNT discounts, and not applicable for VOLUME_DISCOUNT discounts, this field is a URL that points to an image for the discount. This image is displayed on the seller's All Offers page. The URL must point to either JPEG or PNG image and it must be a minimum of 500x500 pixels in dimension and cannot exceed 12Mb in size. Occurrence: Conditional |
promotionStatus | PromotionStatusEnum | The current status of the discount. When creating a new discount, this value must be set to either Occurrence: Always |
promotionType | PromotionTypeEnum | Indicates the type of the discount, either Occurrence: Conditional |
startDate | string | The date and time the discount starts in UTC format ( 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 | Success |
400 | Bad Request |
404 | 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 |
---|---|---|---|
38201 | API_MARKETING | APPLICATION | Internal server error encountered. If this problem persists, contact the eBay Developers Program for support. |
38203 | API_MARKETING | REQUEST | Resource not found. Check the ID and try the call again. |
38204 | API_MARKETING | REQUEST | The seller is not eligible for promotions because they do not have an eBay Store or they have not accepted the terms and conditions for creating a promotion on this Marketplace, see the documentation for this call. |
345076 | API_MARKETING | REQUEST | You cannot get the details of a promotion that was not created through the API. |
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: Gets a specific discount
This sample returns the details for the specified discount.
Input
Specify the markdown discount you want to retrieve using the promotion ID concatenated with the marketplace ENUM as a URI query parameter. See the endpoint below for an example.
GEThttps://api.ebay.com/sell/marketing/v1/item_promotion/1********5@EBAY_US
Output
The output is the complete details of the item discount.