CRUD Operations for Creatives
Endpoints
Method | Endpoint | Description |
POST | /v3/creatives | Create a new creative. |
GET | /v3/creatives/[id] | Get details for a creative. |
PUT | /v3/creatives/[id] | Update a creative. |
DELETE | /v3/creatives/[id] | Delete a creative. This is a soft-delete. |
Get Creative
Method: GET
Endpoint: /v3/creatives/[id]
Example
Response
{ "data": { "ad_type": "native_display", "advertiser_id": 1, "contents": [ { "body_raw": "", "date_created": "2021-03-31T14:16:33.937000", "date_updated": "2021-03-31T14:16:33.937000", "id": 5, "name": "Untitled", "status": "active" } ], "cta_url": "https://www.nativo.com", "headlines": [ { "date_created": "2021-03-31T14:16:33.937000", "date_updated": "2021-03-31T14:16:33.937000", "id": 2, "name": "new headline", "status": "active" } ], "id": 3, "images": [ { "date_created": "2021-03-31T14:12:05.613000", "id": 4, "name": "image_name.png", "resize_mode": "smart_crop", "status": "active", "url": "//devntvassets-a.akamaihd.net/97522D03D80F44B18FE118ECA8426D0A.png" } ], "is_deleted": false, "name": "the creative name", "preview_text": "the preview text" } }
Create Creative
Method: POST
Endpoint: /v3/creatives
Parameters
Parameter | Nested Parameter | Type | Description |
|
| string | Name of the Creative |
|
| integer | ID of the advertiser to link the creative to. |
|
| object [] | List of content objects for the creative. This field is currently only supported for |
|
| string | Name of the content. |
|
| string | Status of content. Options include |
|
| string | Raw html of the content. Any images found within the html will be downloaded and thereafter served from a Nativo domain. |
|
| string | Call to action url for creative. Must be in url format. |
|
| string | Currently only supports |
|
| string | Preview text for the creative. Default: "" |
|
| object [] | List of headlines for the creative. |
|
| string | Headline text. |
|
| string | Headline status. Default: Options include |
|
| object [] | List of images for the creative. |
|
| string | Name of the image. |
|
| string | Status of the image. Default: Options include: |
|
| string | Image crop type. Default: Options include: |
|
| string | Url of the image. Can be an external URL as well as S3 Bucket urls. Providing an external url will cause the application to download the image, store it internally and return the internal url where the image has been stored. Must be in URL format. |
Example
Payload
{ "ad_type": "native_display", "advertiser_id": 1, "cta_url": "https://www.nativo.com", "headlines": [ { "name": "headline 1", "status": "active" }, { "name": "headline 2" } ], "images": [ { "name": "image 1.jpg", "resize_mode": "smart_crop", "status": "active", // Notice the external image url used here and how it is saved as an internal url "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Google_Photos_icon_%282020%29.svg/1200px-Google_Photos_icon_%282020%29.svg.png" }, { "name": "image 2.png", "url": "//devntvassets-a.akamaihd.net/97522D03D80F44B18FE118ECA8426D0A.png" } ], "name": "creative name", "preview_text": "preview text" }
Response
{ "data": { "ad_type": "clickout", "advertiser_id": 1, "cta_url": "https://www.nativo.com", "headlines": [ { "date_created": "2021-04-01T14:37:08.623000", "date_updated": "2021-04-01T14:37:08.623000", "id": 2, "name": "headline 2", "status": "inactive" }, { "date_created": "2021-04-01T14:37:08.580000", "date_updated": "2021-04-01T14:37:08.580000", "id": 3, "name": "headline 1", "status": "active" } ], "id": 4, "images": [ { "date_created": "2021-04-01T14:37:08.777000", "id": 5, "name": "image 2.png", "resize_mode": "smart_crop", "status": "inactive", "url": "//devntvassets-a.akamaihd.net/97522D03D80F44B18FE118ECA8426D0A.png" }, { "date_created": "2021-04-01T14:37:08.730000", "id": 6, "name": "image 1.jpg", "resize_mode": "smart_crop", "status": "active", // newly saved internal url "url": "//devntvassets-a.akamaihd.net/8723437725EA40C2B2466223A0CD68AA.png" } ], "is_deleted": false, "name": "creative name", "preview_text": "preview text" } }
Update Creative
Method: PUT
Endpoint: /v3/creatives/[id]
Example
Payload
{ "cta_url": "https://www.nativo.com/updated_url", "headlines": [ { // Existing headlines that do not want to be deleted must be included in the payload when editing the headlines list. "id": 2, "name": "headline 2", "status": "inactive" }, // New headline insertion { "name": "NEW HEADLINE", "status": "active" } ], "images": [ // New image insertion { "name": "NEW IMAGE.png", "url": "//devntvassets-a.akamaihd.net/97522D03D80F44B18FE118ECA8426D0A.png" }, { // Existing images that do not want to be deleted must be included in the payload when editing the images list. "id": 4, "name": "image 1.jpg", "resize_mode": "smart_crop", "status": "active", "url": "//devntvassets-a.akamaihd.net/8723437725EA40C2B2466223A0CD68AA.png" } ], "name": "UPDATED creative name", "preview_text": "UPDATED preview text" }
Response
{ "data": { "ad_type": "clickout", "advertiser_id": 1, "cta_url": "https://www.nativo.com/updated_url", "headlines": [ { "date_created": "2021-04-01T15:37:35.067000", "date_updated": "2021-04-01T15:37:35.067000", "id": 238167, "name": "NEW HEADLINE", "status": "active" }, { "date_created": "2021-04-01T14:37:08.623000", "date_updated": "2021-04-01T15:37:34.990000", "id": 2, "name": "headline 2", "status": "inactive" } ], "id": 3, "images": [ { "date_created": "2021-04-01T15:37:34.890000", "id": 182536, "name": "NEW IMAGE.png", "resize_mode": "smart_crop", "status": "inactive", "url": "//devntvassets-a.akamaihd.net/97522D03D80F44B18FE118ECA8426D0A.png" }, { "date_created": "2021-04-01T14:37:08.730000", "id": 4, "name": "image 1.jpg", "resize_mode": "smart_crop", "status": "active", "url": "//devntvassets-a.akamaihd.net/8723437725EA40C2B2466223A0CD68AA.png" } ], "is_deleted": false, "name": "UPDATED creative name", "preview_text": "UPDATED preview text" } }
β
If there is no need to update the list fields and you would rather not have to provide them you can leave them out of the payload and they will be left unedited.
Example
Rename
{ "cta_url": "https://www.nativo.com/updated_AGAIN_url", "name": "UPDATED AGAIN creative name", "preview_text": "UPDATED AGAIN preview text" }
Response
{ "data": { "ad_type": "clickout", "advertiser_id": 1, "cta_url": "https://www.nativo.com/updated_AGAIN_url", "headlines": [ { "date_created": "2021-04-01T15:37:35.067000", "date_updated": "2021-04-01T15:37:35.067000", "id": 238167, "name": "NEW HEADLINE", "status": "active" }, { "date_created": "2021-04-01T14:37:08.623000", "date_updated": "2021-04-01T15:37:34.990000", "id": 2, "name": "headline 2", "status": "inactive" } ], "id": 3, "images": [ { "date_created": "2021-04-01T15:37:34.890000", "id": 182536, "name": "NEW IMAGE.png", "resize_mode": "smart_crop", "status": "inactive", "url": "//devntvassets-a.akamaihd.net/97522D03D80F44B18FE118ECA8426D0A.png" }, { "date_created": "2021-04-01T14:37:08.730000", "id": 4, "name": "image 1.jpg", "resize_mode": "smart_crop", "status": "active", "url": "//devntvassets-a.akamaihd.net/8723437725EA40C2B2466223A0CD68AA.png" } ], "is_deleted": false, "name": "UPDATED AGAIN creative name", "preview_text": "UPDATED AGAIN preview text" } }
Delete Creative
Method: DELETE
Endpoint: /v3/creatives/[id]
Example
Since these are soft deletes the creative is still accessible through the GET endpoint. You can distinguish deleted creatives because their is_deleted
field is set to true.
Reponse
{"success": true}