Criar banner
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/marketing/banners \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"active": true,
"home": true,
"name": "<string>",
"link": "<string>",
"image_url": "<string>",
"start_at": "2025-06-01 00:00:00",
"end_at": "2025-08-10 00:00:00",
"categories_ids": "[1,2,3]",
"collections_ids": "[1,2,3]",
"promotions_ids": "[1,2,3]"
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/marketing/banners"
payload = {
"active": True,
"home": True,
"name": "<string>",
"link": "<string>",
"image_url": "<string>",
"start_at": "2025-06-01 00:00:00",
"end_at": "2025-08-10 00:00:00",
"categories_ids": "[1,2,3]",
"collections_ids": "[1,2,3]",
"promotions_ids": "[1,2,3]"
}
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'User-Token': '<api-key>',
'User-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
active: true,
home: true,
name: '<string>',
link: '<string>',
image_url: '<string>',
start_at: '2025-06-01 00:00:00',
end_at: '2025-08-10 00:00:00',
categories_ids: '[1,2,3]',
collections_ids: '[1,2,3]',
promotions_ids: '[1,2,3]'
})
};
fetch('https://api.dooki.com.br/v2/{alias}/marketing/banners', 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.dooki.com.br/v2/{alias}/marketing/banners",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'active' => true,
'home' => true,
'name' => '<string>',
'link' => '<string>',
'image_url' => '<string>',
'start_at' => '2025-06-01 00:00:00',
'end_at' => '2025-08-10 00:00:00',
'categories_ids' => '[1,2,3]',
'collections_ids' => '[1,2,3]',
'promotions_ids' => '[1,2,3]'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"User-Secret-Key: <api-key>",
"User-Token: <api-key>"
],
]);
$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.dooki.com.br/v2/{alias}/marketing/banners"
payload := strings.NewReader("{\n \"active\": true,\n \"home\": true,\n \"name\": \"<string>\",\n \"link\": \"<string>\",\n \"image_url\": \"<string>\",\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"categories_ids\": \"[1,2,3]\",\n \"collections_ids\": \"[1,2,3]\",\n \"promotions_ids\": \"[1,2,3]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("User-Token", "<api-key>")
req.Header.Add("User-Secret-Key", "<api-key>")
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.post("https://api.dooki.com.br/v2/{alias}/marketing/banners")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"home\": true,\n \"name\": \"<string>\",\n \"link\": \"<string>\",\n \"image_url\": \"<string>\",\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"categories_ids\": \"[1,2,3]\",\n \"collections_ids\": \"[1,2,3]\",\n \"promotions_ids\": \"[1,2,3]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/marketing/banners")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": true,\n \"home\": true,\n \"name\": \"<string>\",\n \"link\": \"<string>\",\n \"image_url\": \"<string>\",\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"categories_ids\": \"[1,2,3]\",\n \"collections_ids\": \"[1,2,3]\",\n \"promotions_ids\": \"[1,2,3]\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"product_id": 123,
"active": true,
"type": "<string>",
"name": "<string>",
"slug": "<string>",
"link": "<string>",
"expired": true,
"image_url": "<string>",
"mobile_image_url": "<string>",
"home": true,
"stopwatch": "<string>",
"stopwatch_expires_in": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"start_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"end_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"updated_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
}
}Banners
Criar banner
Cria um novo banner
POST
/
{alias}
/
marketing
/
banners
Criar banner
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/marketing/banners \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"active": true,
"home": true,
"name": "<string>",
"link": "<string>",
"image_url": "<string>",
"start_at": "2025-06-01 00:00:00",
"end_at": "2025-08-10 00:00:00",
"categories_ids": "[1,2,3]",
"collections_ids": "[1,2,3]",
"promotions_ids": "[1,2,3]"
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/marketing/banners"
payload = {
"active": True,
"home": True,
"name": "<string>",
"link": "<string>",
"image_url": "<string>",
"start_at": "2025-06-01 00:00:00",
"end_at": "2025-08-10 00:00:00",
"categories_ids": "[1,2,3]",
"collections_ids": "[1,2,3]",
"promotions_ids": "[1,2,3]"
}
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'User-Token': '<api-key>',
'User-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
active: true,
home: true,
name: '<string>',
link: '<string>',
image_url: '<string>',
start_at: '2025-06-01 00:00:00',
end_at: '2025-08-10 00:00:00',
categories_ids: '[1,2,3]',
collections_ids: '[1,2,3]',
promotions_ids: '[1,2,3]'
})
};
fetch('https://api.dooki.com.br/v2/{alias}/marketing/banners', 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.dooki.com.br/v2/{alias}/marketing/banners",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'active' => true,
'home' => true,
'name' => '<string>',
'link' => '<string>',
'image_url' => '<string>',
'start_at' => '2025-06-01 00:00:00',
'end_at' => '2025-08-10 00:00:00',
'categories_ids' => '[1,2,3]',
'collections_ids' => '[1,2,3]',
'promotions_ids' => '[1,2,3]'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"User-Secret-Key: <api-key>",
"User-Token: <api-key>"
],
]);
$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.dooki.com.br/v2/{alias}/marketing/banners"
payload := strings.NewReader("{\n \"active\": true,\n \"home\": true,\n \"name\": \"<string>\",\n \"link\": \"<string>\",\n \"image_url\": \"<string>\",\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"categories_ids\": \"[1,2,3]\",\n \"collections_ids\": \"[1,2,3]\",\n \"promotions_ids\": \"[1,2,3]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("User-Token", "<api-key>")
req.Header.Add("User-Secret-Key", "<api-key>")
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.post("https://api.dooki.com.br/v2/{alias}/marketing/banners")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"home\": true,\n \"name\": \"<string>\",\n \"link\": \"<string>\",\n \"image_url\": \"<string>\",\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"categories_ids\": \"[1,2,3]\",\n \"collections_ids\": \"[1,2,3]\",\n \"promotions_ids\": \"[1,2,3]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/marketing/banners")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": true,\n \"home\": true,\n \"name\": \"<string>\",\n \"link\": \"<string>\",\n \"image_url\": \"<string>\",\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"categories_ids\": \"[1,2,3]\",\n \"collections_ids\": \"[1,2,3]\",\n \"promotions_ids\": \"[1,2,3]\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"product_id": 123,
"active": true,
"type": "<string>",
"name": "<string>",
"slug": "<string>",
"link": "<string>",
"expired": true,
"image_url": "<string>",
"mobile_image_url": "<string>",
"home": true,
"stopwatch": "<string>",
"stopwatch_expires_in": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"start_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"end_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"updated_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
}
}Path Parameters
Alias da loja
Body
application/json
Parâmetros para criar um banner
Representa os dados necessários para criar ou atualizar um banner
Indica se o banner está ativo
Indica se o banner aparece na home
Nome do banner. O valor é sanitizado e normalizado automaticamente.
Link do banner
URL da imagem do banner
Data e hora de início
Example:
"2025-06-01 00:00:00"
Data e hora de término
Example:
"2025-08-10 00:00:00"
IDs das categorias
Example:
"[1,2,3]"
IDs das coleções
Example:
"[1,2,3]"
IDs das promoções
Example:
"[1,2,3]"
Response
Banner criado com sucesso
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I