curl --request PUT \
--url https://api.hakumedia.ai/v2/creatives/image/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "",
"group": 87,
"name": "Demo Creative"
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '', group: 87, name: 'Demo Creative'})
};
fetch('https://api.hakumedia.ai/v2/creatives/image/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/creatives/image/{id}"
payload = {
"description": "",
"group": 87,
"name": "Demo Creative"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/creatives/image/{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([
'description' => '',
'group' => 87,
'name' => 'Demo Creative'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"description": "",
"group": 87,
"name": "Demo Creative",
"file_size": 329438,
"uploaded_time": "2019-04-21 13:22:59",
"height": 400,
"width": 650,
"object": "image_creative",
"id": 115260,
"self": "/v2/creatives/image/115260",
"file_name": "creative.png",
"mime_type": "image/png"
}Update an Image Creative
curl --request PUT \
--url https://api.hakumedia.ai/v2/creatives/image/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "",
"group": 87,
"name": "Demo Creative"
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '', group: 87, name: 'Demo Creative'})
};
fetch('https://api.hakumedia.ai/v2/creatives/image/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/creatives/image/{id}"
payload = {
"description": "",
"group": 87,
"name": "Demo Creative"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/creatives/image/{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([
'description' => '',
'group' => 87,
'name' => 'Demo Creative'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"description": "",
"group": 87,
"name": "Demo Creative",
"file_size": 329438,
"uploaded_time": "2019-04-21 13:22:59",
"height": 400,
"width": 650,
"object": "image_creative",
"id": 115260,
"self": "/v2/creatives/image/115260",
"file_name": "creative.png",
"mime_type": "image/png"
}Authorizations
API key en el header Authorization: Basic TU_API_KEY. La key va tal cual, sin codificar en base64. Las credenciales se entregan al comenzar la integración.
Path Parameters
Identifier of the creative you'd like to update.
Body
Response
successful operation
A short description of the creative.
""
The media group identifier (ID).
87
A descriptive name of the creative.
"Demo Creative"
The size of the uploaded image file.
329438
The date and time when the file was uploaded.
"2019-04-21 13:22:59"
The height of the creative.
400
The width of the creative.
650
A string denoting the current resource being requested or affected.
"image_creative"
The current resource identifier (ID).
115260
The relative URL of the current resource being requested or affected.
"/v2/creatives/image/115260"
The name of the uploaded file.
"creative.png"