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

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" } }

List Components

Request

List components

curl -i -X GET \
  https://t1.mediamath.com/component_creatives/v1.0/components

Responses

Bodyapplication/json
Response
application/json
{ "data": [ {}, {}, {}, {}, {}, {}, {}, {}, {} ], "meta": { "code": 200, "status": "success", "total_count": 9, "type": "component" } }

Create a Component

Request

Access is restricted to certain T1 user IDs stored in the database, disallowed users will receive a 401 eeror message.

The ID of the created component will be in the response.

Headers
adama_sessionstring

See below

Bodyapplication/json

{ "component_human_name": "Right Image", "component_name": "right_image", "value_type_name": "IMAGE" }

any
curl -i -X POST \
  https://t1.mediamath.com/component_creatives/v1.0/components \
  -H 'Content-Type: application/json' \
  -H 'adama_session: string'

Responses

Bodyapplication/json
Response
application/json
{ "data": { "char_limit": null, "component_human_name": "Right Image", "component_id": 11, "created_at": "2016-11-17T19:58:06.894Z", "is_enabled": true, "updated_at": "2016-11-17T19:58:06.894Z", "value_type_name": "IMAGE" }, "meta": { "code": 201, "status": "created", "type": "component" } }