Error Codes and Responses

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

PUT https://api.admanager.yahoo.com/v1/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.admanager.yahoo.com/v1/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 Gemini 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 403
E60000_UNKNOWN_REPORTING_ERROR 500
E40004_REQUEST_CONFLICT 409
E40005_NOT_FOUND 404