Home
POST/ad_campaign/{campaign_id}/end
This method ends an active (RUNNING
) or paused campaign. Specify the campaign you want to end by supplying its campaign ID in a query parameter.
Call getCampaigns to retrieve the campaign_id and the campaign status (RUNNING
, PAUSED
, ENDED
, and so on) for all the seller's campaigns.
This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com
root URI with api.sandbox.ebay.com
Parameter | Type | Description |
---|---|---|
campaign_id | string | A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created. Note: You can retrieve the campaign IDs for a specified seller using the getCampaigns method. Occurrence: Required |
All requests made to eBay REST operations require you to provide the Authorization
HTTP header for authentication authorization.
In addition, this method requires you to include the Content-Type header and its value should be set to "application/json". See HTTP request headers- opens rest request components page for details.
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.
This call has no payload.
This call has no field definitions.
This call has no response headers.
This call has no payload.
This call has no field definitions.
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 |
409 | Business error |
500 | Internal Server error |
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
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. |
35035 | API_MARKETING | REQUEST | The campaign with campaign id {campaign_id} has ended. |
35045 | API_MARKETING | REQUEST | No campaign found for campaign id {campaign_id}. |
35056 | API_MARKETING | BUSINESS | The state of the campaign cannot be changed as requested. |
35061 | API_MARKETING | BUSINESS | The campaign with 'campaign_id' {campaign_id} is being synced to match the specifications of the campaign. Please wait a few minutes and try the call again. |
35063 | API_MARKETING | BUSINESS | The campaign with 'campaign_id' {campaign_id} is ending soon. No update operations are allowed on this campaign until it ends. |
35077 | API_MARKETING | BUSINESS | To use Promoted Listings, you need to improve your seller level to Top Rated or Above Standard and have enough recent sales activity. |
35078 | API_MARKETING | BUSINESS | To gain access to Promoted Listings, you must be in good standing with recent sales activity. |
35089 | API_MARKETING | BUSINESS | We are currently testing a premium ads product with a small invite-only group. We will share more information when we are ready to expand. |
This call has no warnings.
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.
This sample changes the state of a campaign from running to ended. Check the status of a campaign using the getCampaign call.
This call does not have a request payload. Specify the campaign to end using the campaign_id URI parameter.
POSThttps://api.ebay.com/sell/marketing/v1/ad_campaign/1********4/end
A successful call returns the HTTP status code 204 No content. This method has no response payload.