Error Codes and Responses

Yahoo Native API responses contain 2 parts: “errors” and “response”. For example, when a campaign is successfully updated:

PUT https://api.gemini.yahoo.com/v3/rest/campaign/

{
  "id": 333204023,
  "status": "ACTIVE"
}

The response will be:

{
  "errors": null,
  "timestamp": "2015-10-27 0:08:56",
  "response": {
      "createdDate": 1397664072139,
      "status": "ACTIVE",
      "budget": 10,
      "budgetType": "LIFETIME",
      "id": 333204023,
      "isPartnerNetwork": "TRUE",
      "advertiserId": 31,
      "lastUpdateDate": 1445904536252,
      "campaignName": "Test",
      "objective": "VISIT_WEB",
      "language": "en",
      "advancedGeoPos": "DEFAULT",
      "advancedGeoNeg": "DEFAULT",
      "channel": "NATIVE"
  }
}

When a batch call is made and a subset of the batch fails, in the response:

  • The “errors” part will contain an array with an entry for every item passed that had an error. This entry will include an error code indicating the error reason, as well as an error message and an optional description providing more information on the error. It will also include an index which will have the position of item in the original request array.

  • The “response” part will contain an array of all the objects that were passed in the order in which they were passed, including the ones that had errors. On POST calls, the ID of objects that had errors will be ‘null’.

For example, if you make a POST call passing in 4 keywords, where the first one has a duplicate keyword value, the third one has the wrong advertiser id, but the second and fourth keywords are valid:

POST https://api.gemini.yahoo.com/v3/rest/keyword/

[
  {
      "status": "ACTIVE",
      "bidSet": null,
      "landingUrl": null,
      "parentType": "ADGROUP",
      "parentId": 7718653454,
      "advertiserId": 976108,
      "exclude": "FALSE",
      "matchType": "BROAD",
      "adParamValues": null,
      "value": "advertise yahoo"
  },
  {
      "status": "ACTIVE",
      "bidSet": null,
      "landingUrl": null,
      "parentType": "ADGROUP",
      "parentId": 7718653454,
      "advertiserId": 976108,
      "exclude": "FALSE",
      "matchType": "BROAD",
      "adParamValues": null,
      "value": "new keyword 1"
  },
  {
      "status": "ACTIVE",
      "bidSet": null,
      "landingUrl": null,
      "parentType": "ADGROUP",
      "parentId": 7718653454,
      "advertiserId": 11610,
      "exclude": "FALSE",
      "matchType": "BROAD",
      "adParamValues": null,
      "value": "new keyword 2"
  },
      {
         "status": "ACTIVE",
     "bidSet": null,
     "landingUrl": null,
     "parentType": "ADGROUP",
     "parentId": 7718653454,
     "advertiserId": 976108,
     "exclude": "FALSE",
     "matchType": "BROAD",
     "adParamValues": null,
     "value": "new keyword 3"
      }
]

The response will be:

{
  "errors": [
      {
          "errIndex": 0,
          "code": "E40000_INVALID_INPUT",
          "message": "Duplicate attribute value",
          "description": ""
      },
      {
          "errIndex": 2,
          "code": "E40000_INVALID_INPUT",
          "message": "Invalid advertiser id",
          "description": ""
      }
  ],
  "timestamp": "2015-10-26 23:57:47",
  "response": [
      {
          "parentType": "ADGROUP",
          "parentId": 7718653454,
          "lastUpdateDate": null,
          "createdDate": null,
          "exclude": "FALSE",
          "status": "ACTIVE",
          "bidSet": null,
          "landingUrl": null,
          "advertiserId": 976108,
          "matchType": "BROAD",
          "adParamValues": null,
          "id": null,
          "value": "advertise yahoo"
      },
      {
          "parentType": "ADGROUP",
          "parentId": 7718653454,
          "lastUpdateDate": 1445903867106,
          "createdDate": 1445903867106,
          "exclude": "FALSE",
          "status": "ACTIVE",
          "bidSet": null,
          "landingUrl": null,
          "advertiserId": 976108,
          "matchType": "BROAD",
          "adParamValues": null,
          "id": 296770367975,
          "value": "new keyword 1"
      },
      {
          "parentType": "ADGROUP",
          "parentId": 7718653454,
          "lastUpdateDate": null,
          "createdDate": null,
          "exclude": "FALSE",
          "status": "ACTIVE",
          "bidSet": null,
          "landingUrl": null,
          "advertiserId": 11610,
          "matchType": "BROAD",
          "adParamValues": null,
          "id": null,
          "value": "new keyword 2"
      },
      {
          "parentType": "ADGROUP",
          "parentId": 7718653454,
          "lastUpdateDate": 1445903867106,
          "createdDate": 1445903867106,
          "exclude": "FALSE",
          "status": "ACTIVE",
          "bidSet": null,
          "landingUrl": null,
          "advertiserId": 976108,
          "matchType": "BROAD",
          "adParamValues": null,
          "id": 296770367976,
          "value": "new keyword 3"
      }
  ]
}

The following table provides a list of the error codes returned by the Native API:

Error Code

HTTP Status Code

E10000_INTERNAL_SERVER_ERROR

500

E30001_UNSUPPORTED_FEATURE

406

E40000_INVALID_INPUT

400

E50000_AUTHORIZATION_ERROR

401

E50003_SERVICE_UNAVAILABLE

503

E40001_REQUEST_TIMEOUT

408

E40002_ACCOUNT_IN_SYNC_READ_ONLY

405

E40003_TOO_MANY_REQUESTS

429

E60000_UNKNOWN_REPORTING_ERROR

500

E40004_REQUEST_CONFLICT

409

E40005_NOT_FOUND

404

E40006_HUGE_REQUEST

413

E40007_REQUEST_URI_TOO_LONG

414

E40008_UNSUPPORTED_MEDIA_TYPE

415

Errors Returned If Calls Exceed Rate Limits

For all object APIs (i.e., campaign, ad group, ad, targeting attribute, and so on), the API quota is 100,000 calls per hour. Read operations (such as GETs) have a lower cost factor than write operations (POST/PUT/DELETE).

Important

Any call beyond these rate limits will result in exceeding your hourly quota, which means you’ll start receiving ``HTTP 429 `` error responses, i.e., Too Many Rquests.

The rate limits with API quota thresholds are shown in the table below.

Operation

1 object (minimum)

500 objects (maximum)

GET (cost factor 1)

100,000 calls per hour

200 calls per hour

PUT/DELETE (cost factor 2)

50,000 calls per hour

100 calls per hour

POST (cost factor 3)

33,000 calls per hour

66 calls per hour

Because the limit is specified as hourly, the Retry-After header will have the seconds to the next hour. For example:

Error JSON response

{
   "status": 429,
   "data": {
        "errors" : [
             {
                  "errIndex": -1,
                  "code": "E40003_TOO_MANY_REQUESTS",
                  "message": null,
                  "description": ""
             }
         ],
         "response": null,
         "timestamp": "2021-01-25 4:41:18"
    }
}

Error header

< HTTP/1.1 429 Too Many Requests
< Date: Mon, 25 Jan 2021 04:50:58 GMT
< Retry-After: 1000
< Content-Type: application/json; charset=utf-8

Error FAQs

In campaign settings, a channel appears with these values: NATIVE, SEARCH or SEARCH_AND_NATIVE. If the campaign setting objective contradicts the channel settings, will it return an error?

Yes, like this:

code: E40000_INVALID_INPUT, message: Mismatching campaign channel and objective, description:

If we create an ad group with bid channel settings not supported at the campaign level, what is the result?

The result will be this:

code: E10000_INTERNAL_SERVER_ERROR, message: Internal Server Error, description: mismatched bid channel.

Note that if you set campaigns to VISIT_WEB, you won’t get these errors, as you can flip the channels on and off for that objective. Non-serving ads, bids, keywords can be created. For native only objectives like PROMOTE_BRAND, you’ll get errors like those above for setting search components.

Are there any restrictions on the use of these fields in Keywords? For example, will setting channel Native for keyword result in error?

Yes.

code: E40000_INVALID_INPUT, message: Invalid bid metadata, description:

When will Native & Search return a E40006_HUGE_REQUEST error code?

E40006_HUGE_REQUEST will be triggered when an API partner makes a GET filter request that takes more than 2 minutes to complete due to large filters – for example, fetching for all ads under 500 specific parent ad groups in one call.