curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/catalog/skus \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data @- <<EOF
{
"product_id": 123,
"sku": "<string>",
"price_cost": 123,
"price_sale": 123,
"weight": 123,
"height": 123,
"width": 123,
"length": 123,
"quantity_managed": true,
"availability": 123,
"availability_soldout": 123,
"blocked_sale": true,
"variations_values_ids": "['Amarelo', 'Azul', 'M', 'P']",
"id": 123,
"token": "<string>",
"erp_id": 123,
"barcode": "<string>",
"allow_sell_without_customization": true,
"price_discount": 123,
"order": 123,
"customizations_ids": "[1,2,3]",
"current_stock": [
{
"stock_id": 123,
"quantity": 123,
"min_quantity": 123,
"availability": 123,
"availability_soldout": 123
}
],
"images": [
{
"url": "https://www.site.com/image1.jpg"
}
]
}
EOFimport requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/skus"
payload = {
"product_id": 123,
"sku": "<string>",
"price_cost": 123,
"price_sale": 123,
"weight": 123,
"height": 123,
"width": 123,
"length": 123,
"quantity_managed": True,
"availability": 123,
"availability_soldout": 123,
"blocked_sale": True,
"variations_values_ids": "['Amarelo', 'Azul', 'M', 'P']",
"id": 123,
"token": "<string>",
"erp_id": 123,
"barcode": "<string>",
"allow_sell_without_customization": True,
"price_discount": 123,
"order": 123,
"customizations_ids": "[1,2,3]",
"current_stock": [
{
"stock_id": 123,
"quantity": 123,
"min_quantity": 123,
"availability": 123,
"availability_soldout": 123
}
],
"images": [{ "url": "https://www.site.com/image1.jpg" }]
}
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({
product_id: 123,
sku: '<string>',
price_cost: 123,
price_sale: 123,
weight: 123,
height: 123,
width: 123,
length: 123,
quantity_managed: true,
availability: 123,
availability_soldout: 123,
blocked_sale: true,
variations_values_ids: '[\'Amarelo\', \'Azul\', \'M\', \'P\']',
id: 123,
token: '<string>',
erp_id: 123,
barcode: '<string>',
allow_sell_without_customization: true,
price_discount: 123,
order: 123,
customizations_ids: '[1,2,3]',
current_stock: [
{
stock_id: 123,
quantity: 123,
min_quantity: 123,
availability: 123,
availability_soldout: 123
}
],
images: [{url: 'https://www.site.com/image1.jpg'}]
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/skus', 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/skus",
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([
'product_id' => 123,
'sku' => '<string>',
'price_cost' => 123,
'price_sale' => 123,
'weight' => 123,
'height' => 123,
'width' => 123,
'length' => 123,
'quantity_managed' => true,
'availability' => 123,
'availability_soldout' => 123,
'blocked_sale' => true,
'variations_values_ids' => '[\'Amarelo\', \'Azul\', \'M\', \'P\']',
'id' => 123,
'token' => '<string>',
'erp_id' => 123,
'barcode' => '<string>',
'allow_sell_without_customization' => true,
'price_discount' => 123,
'order' => 123,
'customizations_ids' => '[1,2,3]',
'current_stock' => [
[
'stock_id' => 123,
'quantity' => 123,
'min_quantity' => 123,
'availability' => 123,
'availability_soldout' => 123
]
],
'images' => [
[
'url' => 'https://www.site.com/image1.jpg'
]
]
]),
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/skus"
payload := strings.NewReader("{\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"quantity_managed\": true,\n \"availability\": 123,\n \"availability_soldout\": 123,\n \"blocked_sale\": true,\n \"variations_values_ids\": \"['Amarelo', 'Azul', 'M', 'P']\",\n \"id\": 123,\n \"token\": \"<string>\",\n \"erp_id\": 123,\n \"barcode\": \"<string>\",\n \"allow_sell_without_customization\": true,\n \"price_discount\": 123,\n \"order\": 123,\n \"customizations_ids\": \"[1,2,3]\",\n \"current_stock\": [\n {\n \"stock_id\": 123,\n \"quantity\": 123,\n \"min_quantity\": 123,\n \"availability\": 123,\n \"availability_soldout\": 123\n }\n ],\n \"images\": [\n {\n \"url\": \"https://www.site.com/image1.jpg\"\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/skus")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"quantity_managed\": true,\n \"availability\": 123,\n \"availability_soldout\": 123,\n \"blocked_sale\": true,\n \"variations_values_ids\": \"['Amarelo', 'Azul', 'M', 'P']\",\n \"id\": 123,\n \"token\": \"<string>\",\n \"erp_id\": 123,\n \"barcode\": \"<string>\",\n \"allow_sell_without_customization\": true,\n \"price_discount\": 123,\n \"order\": 123,\n \"customizations_ids\": \"[1,2,3]\",\n \"current_stock\": [\n {\n \"stock_id\": 123,\n \"quantity\": 123,\n \"min_quantity\": 123,\n \"availability\": 123,\n \"availability_soldout\": 123\n }\n ],\n \"images\": [\n {\n \"url\": \"https://www.site.com/image1.jpg\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/skus")
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 \"product_id\": 123,\n \"sku\": \"<string>\",\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"quantity_managed\": true,\n \"availability\": 123,\n \"availability_soldout\": 123,\n \"blocked_sale\": true,\n \"variations_values_ids\": \"['Amarelo', 'Azul', 'M', 'P']\",\n \"id\": 123,\n \"token\": \"<string>\",\n \"erp_id\": 123,\n \"barcode\": \"<string>\",\n \"allow_sell_without_customization\": true,\n \"price_discount\": 123,\n \"order\": 123,\n \"customizations_ids\": \"[1,2,3]\",\n \"current_stock\": [\n {\n \"stock_id\": 123,\n \"quantity\": 123,\n \"min_quantity\": 123,\n \"availability\": 123,\n \"availability_soldout\": 123\n }\n ],\n \"images\": [\n {\n \"url\": \"https://www.site.com/image1.jpg\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"product_id": 123,
"seller_id": 123,
"sku": "SKU-TEST-API",
"token": "<string>",
"erp_id": "01-753-Rose",
"blocked_sale": false,
"barcode": "barcode-test",
"title": "Produto X - Variação 030303 Amarelo",
"allow_sell_without_customization": true,
"price_cost": 123,
"price_sale": 123,
"price_discount": 123,
"combinations": [
"<string>"
],
"weight": 123,
"height": 123,
"width": 123,
"length": 123,
"quantity_managed": true,
"availability": 123,
"availability_soldout": 123,
"order": 123,
"variations": [
{
"name": "<string>",
"id": 123,
"value": "<string>",
"value_id": 123
}
],
"days_availability_formated": "<string>",
"total_in_stock": 123,
"total_orders": 123,
"image_reference_sku_id": 123,
"purchase_url": "<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"
},
"customizations": {
"data": [
{
"id": 123,
"name": "Primeira Letra",
"price": 123,
"description": "Descrição",
"type": "select",
"required": true,
"allowed_values": "<string>",
"max_chars": 1,
"products_ids": [
123
],
"values": "['A', 'B', 'C', 'D']"
}
]
}
}Criar SKU
Cria um novo SKU para um produto
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/catalog/skus \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data @- <<EOF
{
"product_id": 123,
"sku": "<string>",
"price_cost": 123,
"price_sale": 123,
"weight": 123,
"height": 123,
"width": 123,
"length": 123,
"quantity_managed": true,
"availability": 123,
"availability_soldout": 123,
"blocked_sale": true,
"variations_values_ids": "['Amarelo', 'Azul', 'M', 'P']",
"id": 123,
"token": "<string>",
"erp_id": 123,
"barcode": "<string>",
"allow_sell_without_customization": true,
"price_discount": 123,
"order": 123,
"customizations_ids": "[1,2,3]",
"current_stock": [
{
"stock_id": 123,
"quantity": 123,
"min_quantity": 123,
"availability": 123,
"availability_soldout": 123
}
],
"images": [
{
"url": "https://www.site.com/image1.jpg"
}
]
}
EOFimport requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/skus"
payload = {
"product_id": 123,
"sku": "<string>",
"price_cost": 123,
"price_sale": 123,
"weight": 123,
"height": 123,
"width": 123,
"length": 123,
"quantity_managed": True,
"availability": 123,
"availability_soldout": 123,
"blocked_sale": True,
"variations_values_ids": "['Amarelo', 'Azul', 'M', 'P']",
"id": 123,
"token": "<string>",
"erp_id": 123,
"barcode": "<string>",
"allow_sell_without_customization": True,
"price_discount": 123,
"order": 123,
"customizations_ids": "[1,2,3]",
"current_stock": [
{
"stock_id": 123,
"quantity": 123,
"min_quantity": 123,
"availability": 123,
"availability_soldout": 123
}
],
"images": [{ "url": "https://www.site.com/image1.jpg" }]
}
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({
product_id: 123,
sku: '<string>',
price_cost: 123,
price_sale: 123,
weight: 123,
height: 123,
width: 123,
length: 123,
quantity_managed: true,
availability: 123,
availability_soldout: 123,
blocked_sale: true,
variations_values_ids: '[\'Amarelo\', \'Azul\', \'M\', \'P\']',
id: 123,
token: '<string>',
erp_id: 123,
barcode: '<string>',
allow_sell_without_customization: true,
price_discount: 123,
order: 123,
customizations_ids: '[1,2,3]',
current_stock: [
{
stock_id: 123,
quantity: 123,
min_quantity: 123,
availability: 123,
availability_soldout: 123
}
],
images: [{url: 'https://www.site.com/image1.jpg'}]
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/skus', 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/skus",
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([
'product_id' => 123,
'sku' => '<string>',
'price_cost' => 123,
'price_sale' => 123,
'weight' => 123,
'height' => 123,
'width' => 123,
'length' => 123,
'quantity_managed' => true,
'availability' => 123,
'availability_soldout' => 123,
'blocked_sale' => true,
'variations_values_ids' => '[\'Amarelo\', \'Azul\', \'M\', \'P\']',
'id' => 123,
'token' => '<string>',
'erp_id' => 123,
'barcode' => '<string>',
'allow_sell_without_customization' => true,
'price_discount' => 123,
'order' => 123,
'customizations_ids' => '[1,2,3]',
'current_stock' => [
[
'stock_id' => 123,
'quantity' => 123,
'min_quantity' => 123,
'availability' => 123,
'availability_soldout' => 123
]
],
'images' => [
[
'url' => 'https://www.site.com/image1.jpg'
]
]
]),
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/skus"
payload := strings.NewReader("{\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"quantity_managed\": true,\n \"availability\": 123,\n \"availability_soldout\": 123,\n \"blocked_sale\": true,\n \"variations_values_ids\": \"['Amarelo', 'Azul', 'M', 'P']\",\n \"id\": 123,\n \"token\": \"<string>\",\n \"erp_id\": 123,\n \"barcode\": \"<string>\",\n \"allow_sell_without_customization\": true,\n \"price_discount\": 123,\n \"order\": 123,\n \"customizations_ids\": \"[1,2,3]\",\n \"current_stock\": [\n {\n \"stock_id\": 123,\n \"quantity\": 123,\n \"min_quantity\": 123,\n \"availability\": 123,\n \"availability_soldout\": 123\n }\n ],\n \"images\": [\n {\n \"url\": \"https://www.site.com/image1.jpg\"\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/skus")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"quantity_managed\": true,\n \"availability\": 123,\n \"availability_soldout\": 123,\n \"blocked_sale\": true,\n \"variations_values_ids\": \"['Amarelo', 'Azul', 'M', 'P']\",\n \"id\": 123,\n \"token\": \"<string>\",\n \"erp_id\": 123,\n \"barcode\": \"<string>\",\n \"allow_sell_without_customization\": true,\n \"price_discount\": 123,\n \"order\": 123,\n \"customizations_ids\": \"[1,2,3]\",\n \"current_stock\": [\n {\n \"stock_id\": 123,\n \"quantity\": 123,\n \"min_quantity\": 123,\n \"availability\": 123,\n \"availability_soldout\": 123\n }\n ],\n \"images\": [\n {\n \"url\": \"https://www.site.com/image1.jpg\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/skus")
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 \"product_id\": 123,\n \"sku\": \"<string>\",\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"quantity_managed\": true,\n \"availability\": 123,\n \"availability_soldout\": 123,\n \"blocked_sale\": true,\n \"variations_values_ids\": \"['Amarelo', 'Azul', 'M', 'P']\",\n \"id\": 123,\n \"token\": \"<string>\",\n \"erp_id\": 123,\n \"barcode\": \"<string>\",\n \"allow_sell_without_customization\": true,\n \"price_discount\": 123,\n \"order\": 123,\n \"customizations_ids\": \"[1,2,3]\",\n \"current_stock\": [\n {\n \"stock_id\": 123,\n \"quantity\": 123,\n \"min_quantity\": 123,\n \"availability\": 123,\n \"availability_soldout\": 123\n }\n ],\n \"images\": [\n {\n \"url\": \"https://www.site.com/image1.jpg\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"product_id": 123,
"seller_id": 123,
"sku": "SKU-TEST-API",
"token": "<string>",
"erp_id": "01-753-Rose",
"blocked_sale": false,
"barcode": "barcode-test",
"title": "Produto X - Variação 030303 Amarelo",
"allow_sell_without_customization": true,
"price_cost": 123,
"price_sale": 123,
"price_discount": 123,
"combinations": [
"<string>"
],
"weight": 123,
"height": 123,
"width": 123,
"length": 123,
"quantity_managed": true,
"availability": 123,
"availability_soldout": 123,
"order": 123,
"variations": [
{
"name": "<string>",
"id": 123,
"value": "<string>",
"value_id": 123
}
],
"days_availability_formated": "<string>",
"total_in_stock": 123,
"total_orders": 123,
"image_reference_sku_id": 123,
"purchase_url": "<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"
},
"customizations": {
"data": [
{
"id": 123,
"name": "Primeira Letra",
"price": 123,
"description": "Descrição",
"type": "select",
"required": true,
"allowed_values": "<string>",
"max_chars": 1,
"products_ids": [
123
],
"values": "['A', 'B', 'C', 'D']"
}
]
}
}Path Parameters
Alias da loja
Body
Representa os dados necessários para criar ou atualizar um SKU
40"['Amarelo', 'Azul', 'M', 'P']"
"[1,2,3]"
Informações de estoque do SKU. Pode ser enviado como um único objeto ou um array de objetos.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
SKU criado com sucesso
ID do SKU
ID do produto ao qual o SKU pertence
ID do vendedor
Código do SKU
"SKU-TEST-API"
Token único do SKU
ID do SKU no ERP
"01-753-Rose"
Vendas bloqueadas
false
Código de barras do SKU
"barcode-test"
Título completo do SKU
"Produto X - Variação 030303 Amarelo"
Permite vender sem personalização obrigatória
true
Preço de custo do SKU
Preço de venda do SKU
Preço com desconto aplicado
Combinações de variações associadas ao SKU
Peso do SKU em kg
Altura do SKU em cm
Largura do SKU em cm
Comprimento do SKU em cm
Indica se o controle de estoque está habilitado
true
Quantidade disponível em estoque
Quantidade disponível mesmo após esgotado
Ordem de exibição do SKU para a página de produtos
Lista de variações do produto
Show child attributes
Show child attributes
Disponibilidade formatada em dias
Quantidade total em estoque
Status do estoque
in_stock, out_of_stock, low_stock Número total de pedidos realizados
ID do SKU de referência da imagem
URL para a compra do produto
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Personalizações do produto
Show child attributes
Show child attributes
Was this page helpful?