DELETE/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 deletes the threshold discount specified by the promotion_id path parameter. Call getPromotions to retrieve the IDs of a seller's discounts.
You can delete any discount with the exception of those that are currently active (RUNNING). To end a running threshold discount, call updateItemPromotion and adjust the endDate field as appropriate.
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 delete 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
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
This call has no payload.
Response fields
This call has no field definitions.
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 |
---|---|
204 | No Content |
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, please contact 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. |
38216 | API_MARKETING | REQUEST | A promotion can only be deleted if it is paused or ended. |
345077 | API_MARKETING | REQUEST | You cannot update 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: Delete the specified item discount
This sample deletes the specified discount. Only paused or ended discounts can be deleted.
Input
Specify the markdown discount you want to delete using the promotion ID concatenated with the marketplace ENUM as a URI query parameter. See the endpoint below for an example.
DELETEhttps://api.ebay.com/sell/marketing/v1/item_promotion/1********5@EBAY_US
Output
A successful call returns the HTTP status code 204 No Content. This method has no response payload.