/preview/creatives/{id}
curl --request PUT \
--url https://api.criteo.com/preview/creatives/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"id": "<string>",
"type": "<string>"
}
}
'import requests
url = "https://api.criteo.com/preview/creatives/{id}"
payload = { "data": {
"id": "<string>",
"type": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {id: '<string>', type: '<string>'}})
};
fetch('https://api.criteo.com/preview/creatives/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.criteo.com/preview/creatives/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'id' => '<string>',
'type' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.criteo.com/preview/creatives/{id}"
payload := strings.NewReader("{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.criteo.com/preview/creatives/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.criteo.com/preview/creatives/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": {
"advertiserId": "<string>",
"author": "<string>",
"name": "<string>",
"status": "<string>",
"adaptiveAttributes": {
"callsToAction": [
"<string>"
],
"colors": {
"backgroundColor": "<string>",
"ctaBackgroundColor": "<string>",
"ctaTextColor": "<string>",
"logoAreaAndTitleColor": "<string>",
"text1Color": "<string>",
"text2Color": "<string>"
},
"descriptionFont": "<string>",
"descriptionText": "<string>",
"headlineFont": "<string>",
"headlineText": "<string>",
"landingPageUrl": "<string>",
"layouts": [
"Editorial"
],
"logos": [
{
"shape": "Horizontal",
"url": "<string>"
}
],
"imageDisplay": "ShowFullImage",
"imageSets": [
{
"images": [
{
"shape": "Horizontal",
"url": "<string>"
}
],
"headlineText": "<string>"
}
],
"videos": [
{
"duration": 123,
"shape": "Horizontal",
"url": "<string>"
}
]
},
"datasetId": "<string>",
"description": "<string>",
"dynamicAttributes": {
"bodyTextColor": "<string>",
"callsToAction": [
"<string>"
],
"creativeBackgroundColor": "<string>",
"logos": [
{
"shape": "Horizontal",
"url": "<string>"
}
],
"pricesColor": "<string>",
"primaryFont": "<string>",
"productImageDisplay": "ShowFullImage"
},
"format": "<string>",
"htmlTagAttributes": {
"tags": [
{
"htmlTag": "<string>",
"size": {
"height": 123,
"width": 123
}
}
]
},
"id": "<string>",
"imageAttributes": {
"landingPageUrl": "<string>",
"urls": [
"<string>"
]
},
"showcaseAttributes": {
"androidDeeplinkUrl": "<string>",
"appLinkUrl": "<string>",
"brandingImageClickUrl": "<string>",
"brandingImages": [
{
"shape": "<string>",
"url": "<string>"
}
],
"callsToAction": [
"<string>"
],
"colors": {
"bodyTextColor": "<string>",
"creativeBackgroundColor": "<string>",
"pricesColor": "<string>"
},
"iosDeeplinkUrl": "<string>",
"landingPageUrl": "<string>",
"layouts": [
"<string>"
],
"logos": [
{
"shape": "<string>",
"url": "<string>"
}
],
"metaSetting": {
"callToAction": "<string>",
"headline": "<string>"
},
"priceSettings": {
"hideDecimals": true,
"priceFormat": "<string>",
"priceFormatBody": "<string>",
"priceTextAfter": "<string>",
"priceTextBefore": "<string>"
},
"primaryFont": "<string>",
"productImageDisplay": "<string>",
"secondaryFont": "<string>",
"universalLinkUrl": "<string>"
},
"socialSettings": {
"meta": {
"callToAction": "<string>",
"headline": "<string>"
},
"tiktok": {
"callToAction": "<string>",
"headline": "<string>"
}
},
"vastTagAttributes": {
"hasVpaid": true,
"isSkippable": true,
"mimeTypes": [
"<string>"
],
"vastTagUrl": "<string>",
"vastVersion": "<string>",
"videoDurationMs": 123
}
},
"id": "<string>",
"type": "<string>"
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"source": {},
"stackTrace": "<string>",
"title": "<string>",
"traceId": "<string>",
"traceIdentifier": "<string>",
"type": "unknown"
}
],
"warnings": [
{
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"source": {},
"stackTrace": "<string>",
"title": "<string>",
"traceId": "<string>",
"traceIdentifier": "<string>",
"type": "unknown"
}
]
}/preview/creatives/{id}
Replaces the attributes of one creative: any attribute left out is cleared, so read the creative first and send it back with your changes applied. The format must be the creative’s existing format and the dataset must stay the one it already belongs to; neither can be changed here. A creative that is being deployed, archived or deleted cannot be edited.
PUT
/
preview
/
creatives
/
{id}
/preview/creatives/{id}
curl --request PUT \
--url https://api.criteo.com/preview/creatives/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"id": "<string>",
"type": "<string>"
}
}
'import requests
url = "https://api.criteo.com/preview/creatives/{id}"
payload = { "data": {
"id": "<string>",
"type": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {id: '<string>', type: '<string>'}})
};
fetch('https://api.criteo.com/preview/creatives/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.criteo.com/preview/creatives/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'id' => '<string>',
'type' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.criteo.com/preview/creatives/{id}"
payload := strings.NewReader("{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.criteo.com/preview/creatives/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.criteo.com/preview/creatives/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": {
"advertiserId": "<string>",
"author": "<string>",
"name": "<string>",
"status": "<string>",
"adaptiveAttributes": {
"callsToAction": [
"<string>"
],
"colors": {
"backgroundColor": "<string>",
"ctaBackgroundColor": "<string>",
"ctaTextColor": "<string>",
"logoAreaAndTitleColor": "<string>",
"text1Color": "<string>",
"text2Color": "<string>"
},
"descriptionFont": "<string>",
"descriptionText": "<string>",
"headlineFont": "<string>",
"headlineText": "<string>",
"landingPageUrl": "<string>",
"layouts": [
"Editorial"
],
"logos": [
{
"shape": "Horizontal",
"url": "<string>"
}
],
"imageDisplay": "ShowFullImage",
"imageSets": [
{
"images": [
{
"shape": "Horizontal",
"url": "<string>"
}
],
"headlineText": "<string>"
}
],
"videos": [
{
"duration": 123,
"shape": "Horizontal",
"url": "<string>"
}
]
},
"datasetId": "<string>",
"description": "<string>",
"dynamicAttributes": {
"bodyTextColor": "<string>",
"callsToAction": [
"<string>"
],
"creativeBackgroundColor": "<string>",
"logos": [
{
"shape": "Horizontal",
"url": "<string>"
}
],
"pricesColor": "<string>",
"primaryFont": "<string>",
"productImageDisplay": "ShowFullImage"
},
"format": "<string>",
"htmlTagAttributes": {
"tags": [
{
"htmlTag": "<string>",
"size": {
"height": 123,
"width": 123
}
}
]
},
"id": "<string>",
"imageAttributes": {
"landingPageUrl": "<string>",
"urls": [
"<string>"
]
},
"showcaseAttributes": {
"androidDeeplinkUrl": "<string>",
"appLinkUrl": "<string>",
"brandingImageClickUrl": "<string>",
"brandingImages": [
{
"shape": "<string>",
"url": "<string>"
}
],
"callsToAction": [
"<string>"
],
"colors": {
"bodyTextColor": "<string>",
"creativeBackgroundColor": "<string>",
"pricesColor": "<string>"
},
"iosDeeplinkUrl": "<string>",
"landingPageUrl": "<string>",
"layouts": [
"<string>"
],
"logos": [
{
"shape": "<string>",
"url": "<string>"
}
],
"metaSetting": {
"callToAction": "<string>",
"headline": "<string>"
},
"priceSettings": {
"hideDecimals": true,
"priceFormat": "<string>",
"priceFormatBody": "<string>",
"priceTextAfter": "<string>",
"priceTextBefore": "<string>"
},
"primaryFont": "<string>",
"productImageDisplay": "<string>",
"secondaryFont": "<string>",
"universalLinkUrl": "<string>"
},
"socialSettings": {
"meta": {
"callToAction": "<string>",
"headline": "<string>"
},
"tiktok": {
"callToAction": "<string>",
"headline": "<string>"
}
},
"vastTagAttributes": {
"hasVpaid": true,
"isSkippable": true,
"mimeTypes": [
"<string>"
],
"vastTagUrl": "<string>",
"vastVersion": "<string>",
"videoDurationMs": 123
}
},
"id": "<string>",
"type": "<string>"
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"source": {},
"stackTrace": "<string>",
"title": "<string>",
"traceId": "<string>",
"traceIdentifier": "<string>",
"type": "unknown"
}
],
"warnings": [
{
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"source": {},
"stackTrace": "<string>",
"title": "<string>",
"traceId": "<string>",
"traceIdentifier": "<string>",
"type": "unknown"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
FlowAuthorization Code
- Authorization URL
- https://api.criteo.com/oauth2
- Token URL
- https://api.criteo.com/oauth2/token
FlowClient Credentials
- Token URL
- https://api.criteo.com/oauth2/token
Scopes1
MarketingSolutions_Creative_Manage
Grants Manage access to the capabilities from the Creative domain, for MarketingSolutions applications
Path Parameters
The creative identifier to edit.
Body
application/json
The complete new attributes of the creative.
A top-level object that encapsulates a Criteo API request for a single entity.
A class that represents a domain entity exposed by an API.
Show child attributes
Show child attributes
Response
200 - application/json
The edited creative is returned.
Was this page helpful?