API Error Codes

Your application should check for error code responses from our API - do not assume that a query was successful. Error codes could be produced by using incorrect username and password details, leaving out required extra parameters, providing incorrectly formatted values or an internal API error.

Below we have provided a list of all possible error codes, what they mean and their solutions.

Note: The error message can vary between API functions, while error codes stay consistant.


2XX - Internal Error

Error Code 200 - Internal Error

<errors> 
<error code"200" error="Internal error"/> 
</errors>

Meaning: Indicates an internal error. This could be caused by our servers being overloaded or scheduled maintenance.

Solution: Try again in a few minutes. If you continue to receive this error, please contact us.



3XX - Authentication Error

Error Code 300 - Username or password invalid

<errors> 
<error code"300" error="Username or password invalid"/> 
</errors>

Meaning: You have not included your username and/or password or the username and password provided are incorrect.

Solution: Make sure you have included your username and password in the query and that the values are correctly URL encoded (particularly if your username is an e-mail address).


Error Code 301 - API Key Invalid

<errors> 
<error code"301" error="API key invalid"/> 
</errors>

Meaning: Username and password provided are correct, but the API key provided was invalid.

Solution: Make sure you are including your API key in your query. If you do not have an API key, contact us to obtain one.


4XX - Invalid Input

Error Code 400 - Invalid mode parameter

<errors> 
<error code"400" error="Valid modes are: list_verticals, find_categories, find_verticals, 
add_vertical,update_vertical, add_keyword, update_keyword, list_account_keywords, report"
/> </errors>

Meaning: You have not included a valid mode value. Valid modes are: list_verticals, find_categories, find_verticals, add_vertical, update_vertical, add_keyword, update_keyword, list_account_keywords, report.

Solution: If you have included the mode attribute, check the spelling of the value. You may have added an 's' to the end or something may be incorrectly spelt.


41X - Missing Parameter

Error Code 411 - Campaign required

<errors> 
<error code"411" error="Campaign required"/> 
</errors>

Meaning: You have not included the campaign parameter, which is required for the selected mode.

Solution: Include the campaign parameter in your query. If you have included it, check the spelling of the "campaign".


Error Code 412 - Keyword required

<errors> 
<error code"412" error="Keyword required"/> 
</errors>

Meaning: You have not included the keyword parameter, which is required for the selected mode.

Solution:Include the keyword parameter in your query. If you have included it, check the spelling of "keyword".


Error Code 413 - At least one optional parameter required

<errors> 
<error code"413" error="At least one optional parameter required"/> 
</errors>

Meaning: You have not included an optional parameter, where at least one is required by the selected mode.

Solution: Include at least one of the optional parameters. Check the manual page of the chosen function to see which parameters are required and optional.


42X - Invalid Parameter

Error Code 420 - Keyword or Campaign Not Found

<errors> 
<error code"420" error="Requested campaign not found: XXXXX"/> 
</errors>

Meaning: The requested keyword or campaign folder was not found in the database (Where XXXXX is the requested keyword or campaign folder).

Solution: Check the spelling of the keyword or campaign folder. You can get a list of all Keywords and Campaign folders using the List Account Keywords function.


Error Code 421 - Keyword invalid

<errors> 
<error code"421" error="Keyword invalid"/> 
</errors>

Meaning: The keyword value was invalid. Keywords may only contain letters, numbers and spaces.

Solution: Check your specified keyword does not contain characters other than letters, numbers or spaces. Also be sure your keyword is correctly URL encoded.


Error Code 422 - Negative Keyword(s) Invalid

<errors> 
<error code"422" error="Negative keyword list invalid"/> 
</errors>

Meaning: The negative keyword list format was invalid. Keywords may only contain letters, numbers and spaces, and keywords in the list must be separated by commas.

Solution: Check your specified negative keywords do not contain characters other than letters, numbers or spaces. Also be sure your negative keywords are correctly URL encoded and separated by commas.


Error Code 423 - Maximum Bid Invalid

<errors> 
<error code"423" error="Maximum bid invalid"/> 
</errors>

Meaning: The maximum bid specified was invalid. Acceptable formats are "10", "2.34", "3.2".

Solution: Make sure your maximum bid value containsnumbers and periods (full-stops) only. Strip any spaces or commas fromthe value and do not use a dollar sign.


Error Code 424 - Daily Limit Invalid

<errors> 
<error code"424" error="Daily limit invalid"/> 
</errors>

Meaning: The daily limit specified was invalid. Acceptable formats are "100", "200.34", "300.2".

Solution: Make sure your daily limit value contains numbers and periods (full-stops) only. Strip any spaces or commas from the value and do not use a dollar sign.


Error Code 425 - Target URL Invalid

<errors> 
<error code"425" error="Target url invalid"/> 
</errors>

Meaning: The target URL specified was invalid. Target url must be URL encoded, and must be a valid URL beginning with http://

Solution: Make sure your target URL starts with http:// and is correctly URL encoded. When correctly URL encoded your URL should look similar to this: http%3A%2F%2Fwww.trellian.com%2F


Error Code 426 - Campaign cannot be deleted with keywords inside

<errors> 
<error code"426" error="Campaign cannot be deleted with keywords inside"/> 
</errors>

Meaning: The campaign folder you are attempting to delete still has keywords inside, and cannot be deleted.

Solution: Delete the keywords inside this campaign folder before deleting the campaign folder.


Error Code 428 - Campaign already exists

<errors> 
<error code"428" error="Campaign already exists."/> 
</errors>

Meaning: The campaign parameter supplied to add_campaign specifies a campaign folder which already exists in the system.

Solution: Check the spelling of the specified value.


Error Code 429 - Geo Target invalid

<errors> 
<error code"429" error="Geo Target is invalid."/> 
</errors>

Meaning: The geo_target parameter accepts the values US or All.

Solution: Check the spelling of the specified value or omit the parameter to use the default value (today).


43X - Report parameter error

Error Code 431 - Group By (groupby value) Invalid

<errors> 
<error code"431" error="Reports may be grouped by keyword or date"/> 
</errors>

Meaning: The groupby parameter value is not valid. Accepted values are "keyword" or "date".

Solution: Check the spelling of the specified value or omit the parameter to use the default value (keyword).


Error Code 432 - Period (period, from_date or to_date value) Invalid

<errors> 
<error code"432" error="Report time period is invalid."/> 
</errors>

Meaning: The period, from_date or to_date parameter value is not valid. Dates must be in the format YYYY-MM-DD. Accepted values for period parameter are "today", "yesterday", or a specified number of days or months such as "7 days" or "3 months".

Note: Valid combinations are from_date and to_date parameters together, or period only.

Solution: Check the spelling of the specified value or omit the parameter to use the default value (today). Also make sure to correctly URL encode values.