Validations/Error Handling

In some cases Creative Management API v4 returns warnings and errors. If the issue can be resolved, the creative is created with warnings; otherwise, errors are thrown and the creative is not created.

CauseResponseType
Advertiser ID not found in networkWarningHTTP 200

json "creative": { "id": 123456 },< "warnings": [ { "code":"ADVERTISER_NOT_FOUND", "message": "Advertiser %d not found in the network, skipped." } ] }
Rating not recognizedWarningHTTP 200

json "creative": { "id": 123456 }, "warnings": [ { "code": "INVALID_RATING", "message": "Rating %s not recognized. Creative rating set as UNRATED." } ] }
base_ad_unit not foundWarningHTTP 200

json "creative": { "id": 123456 }, "warnings": [ { "code": "INVALID_BASE_AD_UNIT", "message": "Base ad unit %s not recognized. Creative base ad unit will be auto-detected." } ] }
Invalid value for duration:

  • rendition@width

  • rendition@height

  • rendition<@bitrate

  • rendition@fps

  • rendition@device_pixel_ratio
WarningHTTP 200

json "creative": { "id": 123456 }, "warnings": [ { "code": "INVALID_%s" % (DURATION, WIDTH, HEIGHT, BITRATE, FPS, DPR), "message": "Invalid %(field)s %(value)f. Creative %(field)s will be auto detected." % {"field": "<the invalid field>", "value": "<the input value>"} } ] }
duration_type not valid/quality not validWarningHTTP 200

json "creative": { "id": 123456 }, "warnings": [ { "code": "INVALID_DURATION_TYPE" / "INVALID_QUALITY",</p> "message": "Invalid duration type %s. Creative duration type set to GUARANTEED." / "Invalid quality %s. Creative quality not set." } ] }
Missing name for parameterWarningHTTP 200

json "creative": { "id": 123456 }, "warnings": [ { "code": "INVALID_PARAMETER", "message": "Parameter must have a name. Skipped adding this parameter for creative." } ] }
Missing uri or content for renditionErrorHTTP 400

json "errors": [ { "code": "INVALID_RENDITION_DATA", "message": "Invalid rendition data. Creative not created." } ] }
content_type / api_interface not foundWarningHTTP 200

json "creative": { "id": 123456 }, "warnings": [ { "code": "CONTENT_TYPE_NOT_FOUND / INVALID_API_INTERFACE", "message": "Content type %s not found. Will use auto-detected content type." / "Invalid API interface %s. Will use auto-detected API interface." } ] }
Transcode profile id not foundErrorHTTP 400

json "errors": [ { "code": "INVALID_TRANSCODE_PROFILE_ID", "message": "Invalid transcoding profile id %d. Creative not created." } ] }
Transcode not applicable to the type of media (for example, an html / javascript, or image)HTTP 400

`json
"errors": [

{
"code": "TRANSCODE_FAILED",
"message": "Invalid media type for transcoding. Creative not created."
}
]
}
`
Unsupported combination of media typesErrorHTTP 400

json "errors": [ { "code": "UNSUPPORTED_MEDIA_COMBINATION", "message": "Unsupported media combination (e.g. image and video). Creative not created." } ] }
Cannot override width / height when format is providedWarningTBD
Creative name is missingErrorTBD
LINEAR_ADDRESSABLE_CREATIVE_OPERATOR_ASSIGNMENT not enabled. Provide operator_network_id in request.4xx error, network function must be enabled

Not Found Error for GET/UPDATE/DELETE Creatives and GET Renditions

CauseResponse
Get/Update/Delete creative with an ID that does not existHTTP 404

json "errors": [ { "code": 4020, "field": "creative", "message": "Creative with ID 1234567 does not exist." } ] }
Get/Update/Delete creative rendition with an ID that does not existHTTP 404

json "errors": [ { "code": 4020, "field": "creative rendition", "message": "Rendition with ID 1234567 does not exist." } ] }

Errors from Append Rendition Method

CauseTypePOST Request BodyResponse
creative_rendition_id` not providedError```json
{
"rendition": {
"uri": "http://url.to.my.aweso.me/creative.mp4"
}
}
HTTP 422

json { "errors": [ { "code": 4000,</p> "field": "updatemgmt", "message": "creative rendition id missing"</p> }</p> ]</p> }
Rendition not providedErrorjson { "creative_id": 1234 } HTTP 422

json { "errors": [ { "code": 4000, "field": "updatemgmt", "message": "creative rendition missing" } ] }
Creative specified does not exist or belongs to a different networkErrorjson { "creative_id": 1235, "rendition": { "uri": "http://url.to.my.aweso.me/creative.mp4" } } HTTP 404

json { "errors": [ { "code": 4000,</p> "field": "updatemgmt", "message": "Error retrieving creative info" } ] }
Rendition has a different base_ad_unit than the creative

(in this case, an image rendition appended to a video creative)
Errorjson { "creative_id": 1234, "rendition": { "uri": "http://url.to.my.aweso.me/creative.jpg" } } HTTP 422

json { "errors": [ { "code": 4000, "field": "management creative validate", "message": "Update rendition's base ad unit does not match original base ad unit" } ] }
Rendition has no URI or contentErrorjson { "creative_id": 1234, "rendition": { "width": 1920 } } HTTP 422

json { "errors": [ { "code": 4000, "field": "management creative validate", "message": "One of uri or content must be set for each rendition" } ] }

Error from Update Managment Renditions Method

CauseTypePOST Request BodyResponse
Rendition has a different transcode_profile_id than the creativeErrorjson { "creative_id": 1234, "rendition": {</p> "uri": "http://url.to.my.aweso.me/creative.mp4", "transcode_profile_ids": [ 1, 2 ] } } json { "errors": { "code": 4000, "field": "management creative validate", "message": "Update rendition's transcode profile ids do not match original transcode profile ids" } ] }