Skip to main content
POST
/
{alias}
/
catalog
/
collections
Criar coleção
curl --request POST \
  --url https://api.dooki.com.br/v2/{alias}/catalog/collections \
  --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"

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.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,
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', 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",
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,
'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"

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("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}/catalog/collections")
.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")

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 \"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
}

Authorizations

User-Token
string
header
required
User-Secret-Key
string
header
required

Path Parameters

alias
string
required

Alias da loja

Body

application/json

Dados para criar a coleção

Representa os dados necessários para criar ou atualizar uma coleção de produtos

active
boolean
required
Example:

true

name
string
required
Example:

"Collection Test"

home
boolean
required
Example:

true

start_at
string<date-time>
required

Data e hora de início

Example:

"2025-06-01 00:00:00"

end_at
string<date-time>
required

Data e hora de término

Example:

"2025-08-10 00:00:00"

show_banners
boolean
Example:

true

Example:

true

visible_products
integer
Example:

4

slug
string
Example:

"collection-test"

description
string
Example:

"Test description"

seo_title
string
Example:

"Page Title for SEO"

seo_description
string
Example:

"Meta Tag Description"

seo_keywords
string
Example:

"seo, keywords"

stopwatch
string
Example:

"daily"

url
string<uri>
Example:

"https://www.domain.com/collection/l"

products_ids
integer[]
Example:
[1, 2, 3, 4]
banners_ids
integer[]
Example:
[1, 2, 3, 4]
restrictions
object
create_redirect
object

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.

Response

Coleção criada com sucesso

Representa uma coleção a qual um produto pertence

id
integer
parent_id
integer
active
boolean
show_banners
boolean
is_promotional
boolean
name
string
visible_products
integer
home
boolean
expired
boolean
slug
string
description
string
seo_title
string
seo_keywords
string
seo_description
string
path
string

Caminho relativo para o recurso.

expire_in
string

Tempo restante até a expiração, descrito em formato textual (ex.: 'dentro de 998 anos').

total_products
integer

Número total de produtos relacionados ao recurso.