Creative
Update a creative
기존 소재를 업데이트하고 업데이트된 소재 정보를 반환합니다.
엑세스 제어:
- 소재의 소유자만 업데이트할 수 있습니다.
PATCH
/
creatives
Update a creative
curl --request PATCH \
--url https://your_a2_service/creatives \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}
'import requests
url = "https://your_a2_service/creatives"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
owner_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
banner: {ext: {}, img: '', link: {ext: {}, url: ''}},
cid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
created_at: '2023-11-07T05:31:56Z',
description: '<string>',
height: 0,
native: {ext: {}, link: {ext: {}, url: ''}},
status: 'inactive',
updated_at: '2023-11-07T05:31:56Z',
video: {
adm: '',
ctype: 2,
dur: 0,
ext: {cdn: '', linear: 1, link: {ext: {}, url: ''}, url: ''},
mime: ''
},
width: 0
})
};
fetch('https://your_a2_service/creatives', 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://your_a2_service/creatives",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'owner_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'banner' => [
'ext' => [
],
'img' => '',
'link' => [
'ext' => [
],
'url' => ''
]
],
'cid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'height' => 0,
'native' => [
'ext' => [
],
'link' => [
'ext' => [
],
'url' => ''
]
],
'status' => 'inactive',
'updated_at' => '2023-11-07T05:31:56Z',
'video' => [
'adm' => '',
'ctype' => 2,
'dur' => 0,
'ext' => [
'cdn' => '',
'linear' => 1,
'link' => [
'ext' => [
],
'url' => ''
],
'url' => ''
],
'mime' => ''
],
'width' => 0
]),
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://your_a2_service/creatives"
payload := strings.NewReader("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://your_a2_service/creatives")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/creatives")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"no": 123,
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "banner",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}인증
The access token received from the authorization server in the OAuth 2.0 flow.
본문
application/json
소재 변경 스키마
소재 id
소재 이름
소재의 소유자 id
소재 유형
사용 가능한 옵션:
banner, video, native 배너 이미지 및 추가 옵션
Show child attributes
Show child attributes
소재가 사용될 캠페인의 id
소재의 생성시간
소재 설명
소재의 높이
네이티브 소재 및 추가 옵션
Show child attributes
Show child attributes
소재의 상태
사용 가능한 옵션:
active, inactive 소재의 수정시간
비디어 소재 정보 및 추가 옵션
Show child attributes
Show child attributes
소재의 너비
응답
Successful Response
소재 조회 스키마
소재 id
소재 이름
소재 번호
소재의 소유자 id
소재 유형
사용 가능한 옵션:
banner, video, native 배너 이미지 및 추가 옵션
Show child attributes
Show child attributes
소재가 사용될 캠페인의 id
소재의 생성시간
소재 설명
소재의 높이
네이티브 소재 및 추가 옵션
Show child attributes
Show child attributes
소재의 상태
사용 가능한 옵션:
active, inactive 소재의 수정시간
비디어 소재 정보 및 추가 옵션
Show child attributes
Show child attributes
소재의 너비
이 페이지가 도움이 되었나요?
⌘I
Update a creative
curl --request PATCH \
--url https://your_a2_service/creatives \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}
'import requests
url = "https://your_a2_service/creatives"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
owner_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
banner: {ext: {}, img: '', link: {ext: {}, url: ''}},
cid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
created_at: '2023-11-07T05:31:56Z',
description: '<string>',
height: 0,
native: {ext: {}, link: {ext: {}, url: ''}},
status: 'inactive',
updated_at: '2023-11-07T05:31:56Z',
video: {
adm: '',
ctype: 2,
dur: 0,
ext: {cdn: '', linear: 1, link: {ext: {}, url: ''}, url: ''},
mime: ''
},
width: 0
})
};
fetch('https://your_a2_service/creatives', 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://your_a2_service/creatives",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'owner_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'banner' => [
'ext' => [
],
'img' => '',
'link' => [
'ext' => [
],
'url' => ''
]
],
'cid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'height' => 0,
'native' => [
'ext' => [
],
'link' => [
'ext' => [
],
'url' => ''
]
],
'status' => 'inactive',
'updated_at' => '2023-11-07T05:31:56Z',
'video' => [
'adm' => '',
'ctype' => 2,
'dur' => 0,
'ext' => [
'cdn' => '',
'linear' => 1,
'link' => [
'ext' => [
],
'url' => ''
],
'url' => ''
],
'mime' => ''
],
'width' => 0
]),
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://your_a2_service/creatives"
payload := strings.NewReader("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://your_a2_service/creatives")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/creatives")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"no": 123,
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "banner",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}