curl --request PUT \
--url https://api.dooki.com.br/v2/{alias}/catalog/collections/{id} \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"active": true,
"name": "Collection Test",
"home": true,
"start_at": "2025-06-01 00:00:00",
"end_at": "2025-08-10 00:00:00",
"show_banners": true,
"featured": true,
"visible_products": 4,
"slug": "collection-test",
"description": "Test description",
"seo_title": "Page Title for SEO",
"seo_description": "Meta Tag Description",
"seo_keywords": "seo, keywords",
"stopwatch": "daily",
"url": "https://www.domain.com/collection/l",
"products_ids": [
1,
2,
3,
4
],
"banners_ids": [
1,
2,
3,
4
],
"restrictions": {
"include": {
"brands_ids": [
1,
2,
3,
4
],
"categories_ids": [
143
]
},
"exclude": {
"categories_ids": [
141
]
}
}
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/collections/{id}"
payload = {
"active": True,
"name": "Collection Test",
"home": True,
"start_at": "2025-06-01 00:00:00",
"end_at": "2025-08-10 00:00:00",
"show_banners": True,
"featured": True,
"visible_products": 4,
"slug": "collection-test",
"description": "Test description",
"seo_title": "Page Title for SEO",
"seo_description": "Meta Tag Description",
"seo_keywords": "seo, keywords",
"stopwatch": "daily",
"url": "https://www.domain.com/collection/l",
"products_ids": [1, 2, 3, 4],
"banners_ids": [1, 2, 3, 4],
"restrictions": {
"include": {
"brands_ids": [1, 2, 3, 4],
"categories_ids": [143]
},
"exclude": { "categories_ids": [141] }
}
}
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'User-Token': '<api-key>',
'User-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
active: true,
name: 'Collection Test',
home: true,
start_at: '2025-06-01 00:00:00',
end_at: '2025-08-10 00:00:00',
show_banners: true,
featured: true,
visible_products: 4,
slug: 'collection-test',
description: 'Test description',
seo_title: 'Page Title for SEO',
seo_description: 'Meta Tag Description',
seo_keywords: 'seo, keywords',
stopwatch: 'daily',
url: 'https://www.domain.com/collection/l',
products_ids: [1, 2, 3, 4],
banners_ids: [1, 2, 3, 4],
restrictions: {
include: {brands_ids: [1, 2, 3, 4], categories_ids: [143]},
exclude: {categories_ids: [141]}
}
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/collections/{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.dooki.com.br/v2/{alias}/catalog/collections/{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([
'active' => true,
'name' => 'Collection Test',
'home' => true,
'start_at' => '2025-06-01 00:00:00',
'end_at' => '2025-08-10 00:00:00',
'show_banners' => true,
'featured' => true,
'visible_products' => 4,
'slug' => 'collection-test',
'description' => 'Test description',
'seo_title' => 'Page Title for SEO',
'seo_description' => 'Meta Tag Description',
'seo_keywords' => 'seo, keywords',
'stopwatch' => 'daily',
'url' => 'https://www.domain.com/collection/l',
'products_ids' => [
1,
2,
3,
4
],
'banners_ids' => [
1,
2,
3,
4
],
'restrictions' => [
'include' => [
'brands_ids' => [
1,
2,
3,
4
],
'categories_ids' => [
143
]
],
'exclude' => [
'categories_ids' => [
141
]
]
]
]),
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}/catalog/collections/{id}"
payload := strings.NewReader("{\n \"active\": true,\n \"name\": \"Collection Test\",\n \"home\": true,\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"show_banners\": true,\n \"featured\": true,\n \"visible_products\": 4,\n \"slug\": \"collection-test\",\n \"description\": \"Test description\",\n \"seo_title\": \"Page Title for SEO\",\n \"seo_description\": \"Meta Tag Description\",\n \"seo_keywords\": \"seo, keywords\",\n \"stopwatch\": \"daily\",\n \"url\": \"https://www.domain.com/collection/l\",\n \"products_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"banners_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"restrictions\": {\n \"include\": {\n \"brands_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"categories_ids\": [\n 143\n ]\n },\n \"exclude\": {\n \"categories_ids\": [\n 141\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.dooki.com.br/v2/{alias}/catalog/collections/{id}")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"name\": \"Collection Test\",\n \"home\": true,\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"show_banners\": true,\n \"featured\": true,\n \"visible_products\": 4,\n \"slug\": \"collection-test\",\n \"description\": \"Test description\",\n \"seo_title\": \"Page Title for SEO\",\n \"seo_description\": \"Meta Tag Description\",\n \"seo_keywords\": \"seo, keywords\",\n \"stopwatch\": \"daily\",\n \"url\": \"https://www.domain.com/collection/l\",\n \"products_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"banners_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"restrictions\": {\n \"include\": {\n \"brands_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"categories_ids\": [\n 143\n ]\n },\n \"exclude\": {\n \"categories_ids\": [\n 141\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/collections/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": true,\n \"name\": \"Collection Test\",\n \"home\": true,\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"show_banners\": true,\n \"featured\": true,\n \"visible_products\": 4,\n \"slug\": \"collection-test\",\n \"description\": \"Test description\",\n \"seo_title\": \"Page Title for SEO\",\n \"seo_description\": \"Meta Tag Description\",\n \"seo_keywords\": \"seo, keywords\",\n \"stopwatch\": \"daily\",\n \"url\": \"https://www.domain.com/collection/l\",\n \"products_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"banners_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"restrictions\": {\n \"include\": {\n \"brands_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"categories_ids\": [\n 143\n ]\n },\n \"exclude\": {\n \"categories_ids\": [\n 141\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"parent_id": 123,
"active": true,
"show_banners": true,
"featured": true,
"is_promotional": true,
"name": "<string>",
"visible_products": 123,
"home": true,
"expired": true,
"slug": "<string>",
"description": "<string>",
"seo_title": "<string>",
"seo_keywords": "<string>",
"seo_description": "<string>",
"path": "<string>",
"expire_in": "<string>",
"total_products": 123
}Atualizar coleção
Atualiza os detalhes de uma coleção específica
curl --request PUT \
--url https://api.dooki.com.br/v2/{alias}/catalog/collections/{id} \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"active": true,
"name": "Collection Test",
"home": true,
"start_at": "2025-06-01 00:00:00",
"end_at": "2025-08-10 00:00:00",
"show_banners": true,
"featured": true,
"visible_products": 4,
"slug": "collection-test",
"description": "Test description",
"seo_title": "Page Title for SEO",
"seo_description": "Meta Tag Description",
"seo_keywords": "seo, keywords",
"stopwatch": "daily",
"url": "https://www.domain.com/collection/l",
"products_ids": [
1,
2,
3,
4
],
"banners_ids": [
1,
2,
3,
4
],
"restrictions": {
"include": {
"brands_ids": [
1,
2,
3,
4
],
"categories_ids": [
143
]
},
"exclude": {
"categories_ids": [
141
]
}
}
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/collections/{id}"
payload = {
"active": True,
"name": "Collection Test",
"home": True,
"start_at": "2025-06-01 00:00:00",
"end_at": "2025-08-10 00:00:00",
"show_banners": True,
"featured": True,
"visible_products": 4,
"slug": "collection-test",
"description": "Test description",
"seo_title": "Page Title for SEO",
"seo_description": "Meta Tag Description",
"seo_keywords": "seo, keywords",
"stopwatch": "daily",
"url": "https://www.domain.com/collection/l",
"products_ids": [1, 2, 3, 4],
"banners_ids": [1, 2, 3, 4],
"restrictions": {
"include": {
"brands_ids": [1, 2, 3, 4],
"categories_ids": [143]
},
"exclude": { "categories_ids": [141] }
}
}
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'User-Token': '<api-key>',
'User-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
active: true,
name: 'Collection Test',
home: true,
start_at: '2025-06-01 00:00:00',
end_at: '2025-08-10 00:00:00',
show_banners: true,
featured: true,
visible_products: 4,
slug: 'collection-test',
description: 'Test description',
seo_title: 'Page Title for SEO',
seo_description: 'Meta Tag Description',
seo_keywords: 'seo, keywords',
stopwatch: 'daily',
url: 'https://www.domain.com/collection/l',
products_ids: [1, 2, 3, 4],
banners_ids: [1, 2, 3, 4],
restrictions: {
include: {brands_ids: [1, 2, 3, 4], categories_ids: [143]},
exclude: {categories_ids: [141]}
}
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/collections/{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.dooki.com.br/v2/{alias}/catalog/collections/{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([
'active' => true,
'name' => 'Collection Test',
'home' => true,
'start_at' => '2025-06-01 00:00:00',
'end_at' => '2025-08-10 00:00:00',
'show_banners' => true,
'featured' => true,
'visible_products' => 4,
'slug' => 'collection-test',
'description' => 'Test description',
'seo_title' => 'Page Title for SEO',
'seo_description' => 'Meta Tag Description',
'seo_keywords' => 'seo, keywords',
'stopwatch' => 'daily',
'url' => 'https://www.domain.com/collection/l',
'products_ids' => [
1,
2,
3,
4
],
'banners_ids' => [
1,
2,
3,
4
],
'restrictions' => [
'include' => [
'brands_ids' => [
1,
2,
3,
4
],
'categories_ids' => [
143
]
],
'exclude' => [
'categories_ids' => [
141
]
]
]
]),
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}/catalog/collections/{id}"
payload := strings.NewReader("{\n \"active\": true,\n \"name\": \"Collection Test\",\n \"home\": true,\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"show_banners\": true,\n \"featured\": true,\n \"visible_products\": 4,\n \"slug\": \"collection-test\",\n \"description\": \"Test description\",\n \"seo_title\": \"Page Title for SEO\",\n \"seo_description\": \"Meta Tag Description\",\n \"seo_keywords\": \"seo, keywords\",\n \"stopwatch\": \"daily\",\n \"url\": \"https://www.domain.com/collection/l\",\n \"products_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"banners_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"restrictions\": {\n \"include\": {\n \"brands_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"categories_ids\": [\n 143\n ]\n },\n \"exclude\": {\n \"categories_ids\": [\n 141\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.dooki.com.br/v2/{alias}/catalog/collections/{id}")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"name\": \"Collection Test\",\n \"home\": true,\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"show_banners\": true,\n \"featured\": true,\n \"visible_products\": 4,\n \"slug\": \"collection-test\",\n \"description\": \"Test description\",\n \"seo_title\": \"Page Title for SEO\",\n \"seo_description\": \"Meta Tag Description\",\n \"seo_keywords\": \"seo, keywords\",\n \"stopwatch\": \"daily\",\n \"url\": \"https://www.domain.com/collection/l\",\n \"products_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"banners_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"restrictions\": {\n \"include\": {\n \"brands_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"categories_ids\": [\n 143\n ]\n },\n \"exclude\": {\n \"categories_ids\": [\n 141\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/collections/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": true,\n \"name\": \"Collection Test\",\n \"home\": true,\n \"start_at\": \"2025-06-01 00:00:00\",\n \"end_at\": \"2025-08-10 00:00:00\",\n \"show_banners\": true,\n \"featured\": true,\n \"visible_products\": 4,\n \"slug\": \"collection-test\",\n \"description\": \"Test description\",\n \"seo_title\": \"Page Title for SEO\",\n \"seo_description\": \"Meta Tag Description\",\n \"seo_keywords\": \"seo, keywords\",\n \"stopwatch\": \"daily\",\n \"url\": \"https://www.domain.com/collection/l\",\n \"products_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"banners_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"restrictions\": {\n \"include\": {\n \"brands_ids\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"categories_ids\": [\n 143\n ]\n },\n \"exclude\": {\n \"categories_ids\": [\n 141\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"parent_id": 123,
"active": true,
"show_banners": true,
"featured": true,
"is_promotional": true,
"name": "<string>",
"visible_products": 123,
"home": true,
"expired": true,
"slug": "<string>",
"description": "<string>",
"seo_title": "<string>",
"seo_keywords": "<string>",
"seo_description": "<string>",
"path": "<string>",
"expire_in": "<string>",
"total_products": 123
}Body
Dados para atualização da coleção
Representa os dados necessários para criar ou atualizar uma coleção de produtos
true
"Collection Test"
true
Data e hora de início
"2025-06-01 00:00:00"
Data e hora de término
"2025-08-10 00:00:00"
true
true
4
"collection-test"
"Test description"
"Page Title for SEO"
"Meta Tag Description"
"seo, keywords"
"daily"
"https://www.domain.com/collection/l"
[1, 2, 3, 4][1, 2, 3, 4]Show child attributes
Show child attributes
Se presente na requisição, cria um redirect junto com a atualização. A presença do nó é o que sinaliza a intenção — o conteúdo descreve o redirect.
Show child attributes
Show child attributes
Response
Coleção atualizada com sucesso
Representa uma coleção a qual um produto pertence
Caminho relativo para o recurso.
Tempo restante até a expiração, descrito em formato textual (ex.: 'dentro de 998 anos').
Número total de produtos relacionados ao recurso.
Was this page helpful?