Component Creatives API (1.0)

The terms creative components and native components may be used interchangeably. The front part of the endpoint is:

QA API Base: https://t1qa1.mediamath.com/component_creatives/v1.0/ (or whichever QA server is being used)

Prod API Base: https://t1.mediamath.com/component_creatives/v1.0

Component Creatives are uploaded in the "Creatives Tab" within the Creatives Module, and is where creatives for native campaigns are uploaded.

Languages
Servers
https://t1.mediamath.com/

Component Creatives

Operations

Get Atomic Creative with Preview Info

Request

Get an atomic creative with preview info.

".QUERY." should be replaced by a question mark for actual execution

Path
atomic_creative_idintegerrequired

See below

Headers
cookiestring

Cookie: adama_session={adama_session}

curl -i -X GET \
  'https://t1.mediamath.com/component_creatives/v1.0/creatives/{atomic_creative_id}.QUERY.include=previews' \
  -H 'cookie: string' \
  -b string

Responses

In the previews array, the types are not limited to just NATIVE_MOBILE_0 and NATIVE_MOBILE_1 and NATIVE_DESKTOP_0 and NATIVE_DESKTOP_1 (note: NATIVE_MOBILE_ and NATIVE_DESKTOP_ will only be followed by 0 or 1). Other options (with no underscore-number) include: MOBILE_BANNER AUDIENCE_NETWORK_OUTSTREAM_VIDEO MOBILE_INTERSTITIAL MOBILE_NATIVE INSTREAM_VIDEO_DESKTOP INSTREAM_VIDEO_MOBILE INSTANT_ARTICLE_STANDARD MESSENGER_MOBILE_INBOX_MEDIA DESKTOP_FEED_STANDARD MOBILE_FEED_STANDARD RIGHT_COLUMN_STANDARD SUGGESTED_VIDEO_DESKTOP SUGGESTED_VIDEO_MOBILE INSTAGRAM_STANDARD

GET /component_creatives/v1.0/creatives/{atomic_creative_id}/eligibility will list out all of these external id's, and should not vary when the atomic_creative_id changes.

Bodyapplication/json
Response
application/json
{ "data": { "advertiser_id": 123710, "advertiser_name": "Donkey Test Advertiser", "assets": [], "atomic_creative_id": 9534525, "concept_id": "123508", "concept_name": "NDAR - Native Creative", "created_at": "2019-06-19T17:56:55.431Z", "creative_id": 17941, "creative_name": "NDAR - Native Creative", "external_identifier": "NA", "last_modified": "2019-06-19T17:56:22", "last_published": "2019-06-19T17:57:29.300Z", "previews": {}, "status": "1", "unpublished": false, "updated_at": "2019-06-19T17:57:29.300Z" }, "meta": { "code": 200, "status": "success", "type": "creative" } }

Get a Text Asset

Request

Get a text asset

Headers

Cookie: adama_session={adama_session}

Path
asset_idintegerrequired

See below

curl -i -X GET \
  'https://t1.mediamath.com/component_creatives/v1.0/assets/{asset_id}'

Responses

Depending on the asset type, you'll either get an asset_value (text) or the 5 parameters that start with "image" (image). Everything else comes with either type. It may be associated with either an advertise_id or a creative_id.

Bodyapplication/json
Response
application/json
{ "data": { "advertiser_id": 100178, "asset_id": 1537, "asset_name": null, "component_human_name": "Image", "component_id": 2, "created_at": "2016-11-17T17:29:32.340Z", "image_file_size": null, "image_filename": "mediamathlogo.png", "image_height": 100, "image_url": "https://s3.amazonaws.com/mm-component-creative/1479403772247_227082bd4ced0f888aa0066f06ea1402_mediamathlogo.png", "image_width": 160, "updated_at": "2016-11-17T17:29:32.340Z" }, "meta": { "code": 200, "status": "success", "type": "asset" } }

Request Update Image Asset

Request

Request update image asset

Text asset is in the request sample below.

Image asset request sample: ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="asset_value"; filename="" Content-Type:

------WebKitFormBoundary7MA4YWxkTrZu0gW--

Path
asset_idstringrequired

asset_id

Headers
adama_sessionstring

See below

curl -i -X POST \
  'https://t1.mediamath.com/component_creatives/v1.0/assets/{asset_id}' \
  -H 'adama_session: string'

Responses

The data section will either have asset_value (text asset) or the 5 image parameters (image asset). It may be associated with either an advertise_id or a creative_id.

Request update image asset (multipart/form-data)

Headers

Cookie: adama_session={adama_session}

Body

------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="asset_value"; filename="" Content-Type:

------WebKitFormBoundary7MA4YWxkTrZu0gW--

------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="asset_value"; filename="" Content-Type:

------WebKitFormBoundary7MA4YWxkTrZu0gW--

Body
Response
{ "data": { "advertiser_id": 100178, "asset_id": 1537, "asset_name": null, "component_human_name": "Image", "component_id": 2, "created_at": "2016-11-17T17:29:32.340Z", "image_file_size": null, "image_filename": "mediamathlogo.png", "image_height": 100, "image_url": "https://s3.amazonaws.com/mm-component-creative/1479403772247_227082bd4ced0f888aa0066f06ea1402_mediamathlogo.png", "image_width": 160, "updated_at": "2016-11-17T17:29:32.340Z" }, "meta": { "code": 201, "status": "created", "type": "asset" } }