POST/ad_campaign/suggest_max_cpc
Note: This method is only supported for smart targeting priority strategy campaigns. Sellers can use the getAdvertisingEligibility method of the Account API v1 to determine if they are eligible for a priority strategy campaign.
This method allows sellers to retrieve the suggested maximum cost-per-click value for a smart targeting campaign. This value is required when creating a smart targeting campaign and indicates the maximum amount for which the eBay suggested bid can be adjusted.
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
This method has no URI parameters.
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 |
---|---|---|
listingIds | array of string | A comma delimited array of listing Ids the seller plans to associate with the smart targeting campaign for which the maxCpc will be suggested. Occurrence: Required |
marketplaceId | MarketplaceIdEnum | The unique identifier of the marketplace where the listings are hosted. See MarketplaceIdEnum for supported values. Occurrence: Required |
Output
HTTP response headers
This call has no response headers.
Response payload
Response fields
Output container/field | Type | Description |
---|---|---|
amount | Amount | The suggested maxCpc amount for the smart targeting campaign. Occurrence: Always |
amount.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
amount.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
marketplaceId | MarketplaceIdEnum | The unique identifier of the marketplace where the listings are hosted. 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 |
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. |
35041 | API_MARKETING | REQUEST | The 'marketplaceId' is required. |
35051 | API_MARKETING | BUSINESS | 'marketplaceId' {marketplaceId} is not supported. Promoted Listings is supported only on these marketplaces: {supportedMarketplaces}. |
35057 | API_MARKETING | BUSINESS | The listing Id {listingId} does not belong to the seller making this call |
35068 | API_MARKETING | BUSINESS | You have exceeded the maximum number of listing Ids. Only {maxSupportedNumber} listings are supported per call. |
35135 | API_MARKETING | REQUEST | Please supply one or more values in the ‘listingIds’ field in the request. |
35136 | API_MARKETING | REQUEST | The following values you supplied in the ‘listingIds’ field are invalid: {listingIds} |
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: Retrieve suggested MaxCpc for a smart targeting campaign
This sample retrieves the suggested MaxCpc for a smart targeting campaign.
Input
The inputs for this sample are listingIds, which specifies the listings associated with the campaign, and marketplaceId, which specifies the marketplace associated with the listings.No query parameters are required for this method.
POSThttps://api.ebay.com/sell/marketing/v1/ad_campaign/suggest_max_cpc
Output
If the call is successful, the suggested maxCpc for the smart targeting campaign is returned in the amount container, along with the associated marketplaceId where the listings are hosted.In this sample, the suggested maxCpc for the campaign is 0.57 USD.