curl --request PUT \
--url https://api.dooki.com.br/v2/{alias}/catalog/products/{id}/skus/batch-update-skus \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"product_id": 123,
"update_all": true,
"grid_options_filter": [
1,
2,
3,
4
],
"price_cost": 123,
"price_sale": 123,
"price_discount": 123,
"weight": 123,
"height": 123,
"width": 123,
"length": 123,
"blocked_sale": true,
"skus_id": [
123
]
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/products/{id}/skus/batch-update-skus"
payload = {
"product_id": 123,
"update_all": True,
"grid_options_filter": [1, 2, 3, 4],
"price_cost": 123,
"price_sale": 123,
"price_discount": 123,
"weight": 123,
"height": 123,
"width": 123,
"length": 123,
"blocked_sale": True,
"skus_id": [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({
product_id: 123,
update_all: true,
grid_options_filter: [1, 2, 3, 4],
price_cost: 123,
price_sale: 123,
price_discount: 123,
weight: 123,
height: 123,
width: 123,
length: 123,
blocked_sale: true,
skus_id: [123]
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/products/{id}/skus/batch-update-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/products/{id}/skus/batch-update-skus",
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([
'product_id' => 123,
'update_all' => true,
'grid_options_filter' => [
1,
2,
3,
4
],
'price_cost' => 123,
'price_sale' => 123,
'price_discount' => 123,
'weight' => 123,
'height' => 123,
'width' => 123,
'length' => 123,
'blocked_sale' => true,
'skus_id' => [
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/products/{id}/skus/batch-update-skus"
payload := strings.NewReader("{\n \"product_id\": 123,\n \"update_all\": true,\n \"grid_options_filter\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"price_discount\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"blocked_sale\": true,\n \"skus_id\": [\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/products/{id}/skus/batch-update-skus")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": 123,\n \"update_all\": true,\n \"grid_options_filter\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"price_discount\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"blocked_sale\": true,\n \"skus_id\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/products/{id}/skus/batch-update-skus")
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 \"product_id\": 123,\n \"update_all\": true,\n \"grid_options_filter\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"price_discount\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"blocked_sale\": true,\n \"skus_id\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "sync",
"updated": 123,
"status": "queued"
}
}Atualizar SKUs em massa
Atualiza múltiplos ou todos SKUs de um produto em uma única operação síncrona ou assincrona, dependendo da quantidade de SKUs a serem atualizados.
curl --request PUT \
--url https://api.dooki.com.br/v2/{alias}/catalog/products/{id}/skus/batch-update-skus \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"product_id": 123,
"update_all": true,
"grid_options_filter": [
1,
2,
3,
4
],
"price_cost": 123,
"price_sale": 123,
"price_discount": 123,
"weight": 123,
"height": 123,
"width": 123,
"length": 123,
"blocked_sale": true,
"skus_id": [
123
]
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/products/{id}/skus/batch-update-skus"
payload = {
"product_id": 123,
"update_all": True,
"grid_options_filter": [1, 2, 3, 4],
"price_cost": 123,
"price_sale": 123,
"price_discount": 123,
"weight": 123,
"height": 123,
"width": 123,
"length": 123,
"blocked_sale": True,
"skus_id": [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({
product_id: 123,
update_all: true,
grid_options_filter: [1, 2, 3, 4],
price_cost: 123,
price_sale: 123,
price_discount: 123,
weight: 123,
height: 123,
width: 123,
length: 123,
blocked_sale: true,
skus_id: [123]
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/products/{id}/skus/batch-update-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/products/{id}/skus/batch-update-skus",
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([
'product_id' => 123,
'update_all' => true,
'grid_options_filter' => [
1,
2,
3,
4
],
'price_cost' => 123,
'price_sale' => 123,
'price_discount' => 123,
'weight' => 123,
'height' => 123,
'width' => 123,
'length' => 123,
'blocked_sale' => true,
'skus_id' => [
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/products/{id}/skus/batch-update-skus"
payload := strings.NewReader("{\n \"product_id\": 123,\n \"update_all\": true,\n \"grid_options_filter\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"price_discount\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"blocked_sale\": true,\n \"skus_id\": [\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/products/{id}/skus/batch-update-skus")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": 123,\n \"update_all\": true,\n \"grid_options_filter\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"price_discount\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"blocked_sale\": true,\n \"skus_id\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/products/{id}/skus/batch-update-skus")
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 \"product_id\": 123,\n \"update_all\": true,\n \"grid_options_filter\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"price_cost\": 123,\n \"price_sale\": 123,\n \"price_discount\": 123,\n \"weight\": 123,\n \"height\": 123,\n \"width\": 123,\n \"length\": 123,\n \"blocked_sale\": true,\n \"skus_id\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "sync",
"updated": 123,
"status": "queued"
}
}Body
Representa os dados que são possíveis atualizar em lote para os SKUs de um produto específico.
ID do produto cujos SKUs serão atualizados. É preenchido a partir da rota.
Indica se a atualização deve ser aplicada a todos os SKUs do produto. Se definido como true, o campo skus_id não é necessário.
true
IDs de valores de variação. Restringe a atualização aos SKUs que tenham ao menos um desses valores.
[1, 2, 3, 4]
Novo preço de custo dos SKUs, usado internamente para cálculo de margem
Novo preço de tabela dos SKUs, sem descontos aplicados
Novo preço promocional dos SKUs. Quando maior que zero, substitui o preço de tabela na loja.
Novo peso dos SKUs em kg
Nova altura dos SKUs em cm
Nova largura dos SKUs em cm
Novo comprimento dos SKUs em cm
Bloqueia a venda dos SKUs atualizados
IDs dos SKUs a atualizar. Obrigatório quando update_all não é enviado como true.
Response
Atualização dos SKUs iniciada, com informação se foi sincrona ou assincronamente
Resultado da atualização em massa dos SKUs.
Show child attributes
Show child attributes
Was this page helpful?