POST/ad_campaign/{campaign_id}/update_campaign_budget
Note: This method is only available for select partners who have been approved for the eBay priority strategy program. For information about how to request access to this program, refer to Priority Strategy Access Requests in the Promoted Listings Playbook. To determine if a seller qualifies for priority strategy, use the getAdvertisingEligibility method in Account API.
This method updates the daily budget for a priority strategy campaign that uses the Cost Per Click (CPC) funding model.
A click occurs when an eBay user finds and clicks on the seller’s listing (within the search results) after using a keyword that the seller has created for the campaign. For each ad in an ad group in the campaign, each click triggers a cost, which gets subtracted from the campaign’s daily budget. If the cost of the clicks exceeds the daily budget, the Promoted Listings campaign will be paused until the next day.
Specify the campaign_id as a path parameter. You can retrieve the campaign IDs for a seller by calling the getCampaigns method.
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 |
---|---|---|
campaign_id | string | This path parameter specifies the unique eBay-assigned identifier of the ad campaign for which the budget is being updated. Use the getCampaigns method to retrieve campaign IDs. Occurrence: Required |
HTTP request headers
All requests made to eBay REST operations require you to provide the Authorization
HTTP header for authentication authorization.
The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.
Header | Type | Description |
---|---|---|
Content-Type | string | This header indicates the format of the request body provided by the client. Its value should be set to application/json. For more information, refer to HTTP request headers. Occurrence: Required |
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
Copy complete valid JSON to clipboardRequest fields
Input container/field | Type | Description |
---|---|---|
daily | BudgetRequest | The daily budget limit for the Cost Per Click (CPC) Promoted Listings campaign. This will be a dollar value. All clicks using the keywords defined for the campaign will go towards expending the daily budget. Once the daily budget is exceeded for the campaign, all Promoted Listings under the campaign will be turned off until the next day.
Occurrence: Required |
daily.amount | Amount | The allocated budget amount for a CPC Promoted Listings campaign. Both the currency and value must be specified. Occurrence: Required |
daily.amount.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
daily.amount.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
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 |
409 | Business error |
500 | Internal Server error |
Error codes
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}. |
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. |
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. |
36100 | API_MARKETING | REQUEST | This functionality is not supported for CPS funding model. |
36101 | API_MARKETING | REQUEST | The daily budget value format is a maximum of two decimal points. |
36153 | API_MARKETING | BUSINESS | The daily budget currency {currency} is not supported for {fieldName}. The supported currency for the {marketplaceId} marketplace is {supportedCurrencyCode}. |
36154 | API_MARKETING | BUSINESS | The daily budget below minimum allowed {minAllowed}. |
36155 | API_MARKETING | BUSINESS | The daily budget above maximum allowed {maxAllowed}. |
36156 | API_MARKETING | BUSINESS | campaignBudget is not supported for CPS funding model. |
36157 | API_MARKETING | BUSINESS | The daily budget is required for campaigns with CPC funding model. |
36158 | API_MARKETING | BUSINESS | The daily budget value format {dailyBudgetValue} cannot have more than 2 decimal places. |
36408 | API_MARKETING | BUSINESS | The seller must accept the new pricing policy before the campaign can be updated. |
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: Update the Campaign Budget
This example updates the budget for an existing Promoted Listings ad campaign.
Input
The input for this sample is the campaign_id of the ad campaign for which the budget details shall be updated, as well as the updated budget details.
POSThttps://api.ebay.com/sell/marketing/v1/ad_campaign/1********4/update_campaign_budget
Output
A successful call returns the HTTP status code 204 No content. This method has no response payload.