Creative¶
To view already existing creatives assigned to a certain Buyer, GET
the following endpoint:
/api/dsp/<dsp_id>/creative/
The <dsp_id> is the unique identifier of a Buyer, for example 123
.
You can also GET
specific creatives with the following endpoint:
/api/creative/<id>/
The <id> is the unique numeric identifier of a creative.
Creating A Creative¶
To create a creative, POST
the details to the following endpoint:
/api/creative/
{
"name": "string",
"width": 760,
"height": 120,
"image_url": "example.com",
"click_url": "click.example.com",
"html": "string",
"dsp_id": 0
}
Warning
At this moment, only banner and HTML creative types are supported. When creating a banner, omit the html field. When creating a HTML creative, omit image_url and click_url fields.
If the request is handled successfully, the system returns the 201
response code, otherwise the 400
response code is returned together with the response body.
Updating A Creative¶
To update a creative, PATCH
the following endpoint:
/api/creative/<id>/
The <id> is the unique numeric identifier of a creative. The PATCH
request contains only the fields that require an update.
{
"height": 90,
"image_url": "example-url.com",
"click_url": "click.com"
}
If the request is handled successfully, the system returns the 200
response code, otherwise the 400
response code is returned together with the response body.
Deleting A Creative¶
To delete a creative, use the DELETE
method with the following endpoint:
/api/creative/<id>/
Make sure you use the correct numeric ID of the creative you want to delete.
If the request is handled successfully, the system responds with 204
.
API Fields¶
Creatives are represented with the following API fields:
Field |
Type |
Description |
---|---|---|
name |
string |
The name of the creative |
id |
integer |
(Read-only) The unique numeric ID of the creative |
width |
integer |
The width of the creative in pixels |
height |
integer |
The height of the creative in pixels |
image_url* |
string |
(Banner creatives only) Creative image URL. Not used for HTML creatives |
click_url* |
string |
(Banner creatives only) Creative click URL. Not used for HTML creatives |
html* |
string |
(HTML creatives only) The HTML markup of the creative. Not used for banner creatives |
dsp_id |
integer |
The unique numeric ID of the Buyer to which the creative is assigned |