curl --request PUT \
--url https://api.dooki.com.br/v2/{alias}/catalog/categories/{id} \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"active": true,
"name": "Categoria",
"parent_id": 123,
"home": true,
"featured": false,
"price_factor": 1,
"slug": "categoria",
"seo_title": "Título SEO para categoria",
"seo_keywords": "palavras, chave, SEO",
"seo_description": "Descrição SEO",
"external_url": "https://www.link.com",
"canonical_url": "https://www.link.com",
"order": 1,
"sort_by": "relevance",
"banners_ids": [
123
]
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/categories/{id}"
payload = {
"active": True,
"name": "Categoria",
"parent_id": 123,
"home": True,
"featured": False,
"price_factor": 1,
"slug": "categoria",
"seo_title": "Título SEO para categoria",
"seo_keywords": "palavras, chave, SEO",
"seo_description": "Descrição SEO",
"external_url": "https://www.link.com",
"canonical_url": "https://www.link.com",
"order": 1,
"sort_by": "relevance",
"banners_ids": [123]
}
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: 'Categoria',
parent_id: 123,
home: true,
featured: false,
price_factor: 1,
slug: 'categoria',
seo_title: 'Título SEO para categoria',
seo_keywords: 'palavras, chave, SEO',
seo_description: 'Descrição SEO',
external_url: 'https://www.link.com',
canonical_url: 'https://www.link.com',
order: 1,
sort_by: 'relevance',
banners_ids: [123]
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/categories/{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/categories/{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' => 'Categoria',
'parent_id' => 123,
'home' => true,
'featured' => false,
'price_factor' => 1,
'slug' => 'categoria',
'seo_title' => 'Título SEO para categoria',
'seo_keywords' => 'palavras, chave, SEO',
'seo_description' => 'Descrição SEO',
'external_url' => 'https://www.link.com',
'canonical_url' => 'https://www.link.com',
'order' => 1,
'sort_by' => 'relevance',
'banners_ids' => [
123
]
]),
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/categories/{id}"
payload := strings.NewReader("{\n \"active\": true,\n \"name\": \"Categoria\",\n \"parent_id\": 123,\n \"home\": true,\n \"featured\": false,\n \"price_factor\": 1,\n \"slug\": \"categoria\",\n \"seo_title\": \"Título SEO para categoria\",\n \"seo_keywords\": \"palavras, chave, SEO\",\n \"seo_description\": \"Descrição SEO\",\n \"external_url\": \"https://www.link.com\",\n \"canonical_url\": \"https://www.link.com\",\n \"order\": 1,\n \"sort_by\": \"relevance\",\n \"banners_ids\": [\n 123\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/categories/{id}")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"name\": \"Categoria\",\n \"parent_id\": 123,\n \"home\": true,\n \"featured\": false,\n \"price_factor\": 1,\n \"slug\": \"categoria\",\n \"seo_title\": \"Título SEO para categoria\",\n \"seo_keywords\": \"palavras, chave, SEO\",\n \"seo_description\": \"Descrição SEO\",\n \"external_url\": \"https://www.link.com\",\n \"canonical_url\": \"https://www.link.com\",\n \"order\": 1,\n \"sort_by\": \"relevance\",\n \"banners_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/categories/{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\": \"Categoria\",\n \"parent_id\": 123,\n \"home\": true,\n \"featured\": false,\n \"price_factor\": 1,\n \"slug\": \"categoria\",\n \"seo_title\": \"Título SEO para categoria\",\n \"seo_keywords\": \"palavras, chave, SEO\",\n \"seo_description\": \"Descrição SEO\",\n \"external_url\": \"https://www.link.com\",\n \"canonical_url\": \"https://www.link.com\",\n \"order\": 1,\n \"sort_by\": \"relevance\",\n \"banners_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"merchant_id": 123,
"parent_id": 123,
"active": true,
"featured": true,
"price_factor": 123,
"total_banners": 0,
"sort_by": "<string>",
"name": "<string>",
"slug": "<string>",
"url": "<string>",
"description": "<string>",
"external_url": "<string>",
"canonical_url": "<string>",
"order": 123,
"is_parent": true,
"url_path": "<string>",
"slug_path": "<string>",
"filters_values_ids": [
123
],
"category_cover": "<string>",
"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"
}
}Atualizar categoria
Atualiza os detalhes de uma categoria específica
curl --request PUT \
--url https://api.dooki.com.br/v2/{alias}/catalog/categories/{id} \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"active": true,
"name": "Categoria",
"parent_id": 123,
"home": true,
"featured": false,
"price_factor": 1,
"slug": "categoria",
"seo_title": "Título SEO para categoria",
"seo_keywords": "palavras, chave, SEO",
"seo_description": "Descrição SEO",
"external_url": "https://www.link.com",
"canonical_url": "https://www.link.com",
"order": 1,
"sort_by": "relevance",
"banners_ids": [
123
]
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/categories/{id}"
payload = {
"active": True,
"name": "Categoria",
"parent_id": 123,
"home": True,
"featured": False,
"price_factor": 1,
"slug": "categoria",
"seo_title": "Título SEO para categoria",
"seo_keywords": "palavras, chave, SEO",
"seo_description": "Descrição SEO",
"external_url": "https://www.link.com",
"canonical_url": "https://www.link.com",
"order": 1,
"sort_by": "relevance",
"banners_ids": [123]
}
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: 'Categoria',
parent_id: 123,
home: true,
featured: false,
price_factor: 1,
slug: 'categoria',
seo_title: 'Título SEO para categoria',
seo_keywords: 'palavras, chave, SEO',
seo_description: 'Descrição SEO',
external_url: 'https://www.link.com',
canonical_url: 'https://www.link.com',
order: 1,
sort_by: 'relevance',
banners_ids: [123]
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/categories/{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/categories/{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' => 'Categoria',
'parent_id' => 123,
'home' => true,
'featured' => false,
'price_factor' => 1,
'slug' => 'categoria',
'seo_title' => 'Título SEO para categoria',
'seo_keywords' => 'palavras, chave, SEO',
'seo_description' => 'Descrição SEO',
'external_url' => 'https://www.link.com',
'canonical_url' => 'https://www.link.com',
'order' => 1,
'sort_by' => 'relevance',
'banners_ids' => [
123
]
]),
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/categories/{id}"
payload := strings.NewReader("{\n \"active\": true,\n \"name\": \"Categoria\",\n \"parent_id\": 123,\n \"home\": true,\n \"featured\": false,\n \"price_factor\": 1,\n \"slug\": \"categoria\",\n \"seo_title\": \"Título SEO para categoria\",\n \"seo_keywords\": \"palavras, chave, SEO\",\n \"seo_description\": \"Descrição SEO\",\n \"external_url\": \"https://www.link.com\",\n \"canonical_url\": \"https://www.link.com\",\n \"order\": 1,\n \"sort_by\": \"relevance\",\n \"banners_ids\": [\n 123\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/categories/{id}")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"name\": \"Categoria\",\n \"parent_id\": 123,\n \"home\": true,\n \"featured\": false,\n \"price_factor\": 1,\n \"slug\": \"categoria\",\n \"seo_title\": \"Título SEO para categoria\",\n \"seo_keywords\": \"palavras, chave, SEO\",\n \"seo_description\": \"Descrição SEO\",\n \"external_url\": \"https://www.link.com\",\n \"canonical_url\": \"https://www.link.com\",\n \"order\": 1,\n \"sort_by\": \"relevance\",\n \"banners_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/categories/{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\": \"Categoria\",\n \"parent_id\": 123,\n \"home\": true,\n \"featured\": false,\n \"price_factor\": 1,\n \"slug\": \"categoria\",\n \"seo_title\": \"Título SEO para categoria\",\n \"seo_keywords\": \"palavras, chave, SEO\",\n \"seo_description\": \"Descrição SEO\",\n \"external_url\": \"https://www.link.com\",\n \"canonical_url\": \"https://www.link.com\",\n \"order\": 1,\n \"sort_by\": \"relevance\",\n \"banners_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"merchant_id": 123,
"parent_id": 123,
"active": true,
"featured": true,
"price_factor": 123,
"total_banners": 0,
"sort_by": "<string>",
"name": "<string>",
"slug": "<string>",
"url": "<string>",
"description": "<string>",
"external_url": "<string>",
"canonical_url": "<string>",
"order": 123,
"is_parent": true,
"url_path": "<string>",
"slug_path": "<string>",
"filters_values_ids": [
123
],
"category_cover": "<string>",
"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"
}
}Body
Representa uma requisição para criar categorias
true
"Categoria"
false
1
"categoria"
O valor é sanitizado e normalizado automaticamente.
"Título SEO para categoria"
"palavras, chave, SEO"
O valor é sanitizado e normalizado automaticamente.
"Descrição SEO"
"https://www.link.com"
"https://www.link.com"
1
"relevance"
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
Categoria atualizada com sucesso
0
Indica se a categoria é principal.
Caminho relativo para a URL da categoria.
Slug completo da categoria, incluindo hierarquia.
Lista de IDs de filtros associados à categoria.
URL da imagem de capa da categoria.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?