Cadastrar um Kit
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/catalog/bundles \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"name": "<string>",
"image_url": "<string>",
"items": [
{
"sku_id": 123,
"price": 123,
"discount": 123,
"quantity": 123
}
],
"active": true,
"modifiable": true,
"custom_shipping": true,
"shipping_price": 123,
"shipping_days": 123
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/bundles"
payload = {
"name": "<string>",
"image_url": "<string>",
"items": [
{
"sku_id": 123,
"price": 123,
"discount": 123,
"quantity": 123
}
],
"active": True,
"modifiable": True,
"custom_shipping": True,
"shipping_price": 123,
"shipping_days": 123
}
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({
name: '<string>',
image_url: '<string>',
items: [{sku_id: 123, price: 123, discount: 123, quantity: 123}],
active: true,
modifiable: true,
custom_shipping: true,
shipping_price: 123,
shipping_days: 123
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/bundles', 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/bundles",
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([
'name' => '<string>',
'image_url' => '<string>',
'items' => [
[
'sku_id' => 123,
'price' => 123,
'discount' => 123,
'quantity' => 123
]
],
'active' => true,
'modifiable' => true,
'custom_shipping' => true,
'shipping_price' => 123,
'shipping_days' => 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/bundles"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"image_url\": \"<string>\",\n \"items\": [\n {\n \"sku_id\": 123,\n \"price\": 123,\n \"discount\": 123,\n \"quantity\": 123\n }\n ],\n \"active\": true,\n \"modifiable\": true,\n \"custom_shipping\": true,\n \"shipping_price\": 123,\n \"shipping_days\": 123\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/bundles")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"image_url\": \"<string>\",\n \"items\": [\n {\n \"sku_id\": 123,\n \"price\": 123,\n \"discount\": 123,\n \"quantity\": 123\n }\n ],\n \"active\": true,\n \"modifiable\": true,\n \"custom_shipping\": true,\n \"shipping_price\": 123,\n \"shipping_days\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/bundles")
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 \"name\": \"<string>\",\n \"image_url\": \"<string>\",\n \"items\": [\n {\n \"sku_id\": 123,\n \"price\": 123,\n \"discount\": 123,\n \"quantity\": 123\n }\n ],\n \"active\": true,\n \"modifiable\": true,\n \"custom_shipping\": true,\n \"shipping_price\": 123,\n \"shipping_days\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"active": true,
"modifiable": true,
"name": "<string>",
"purchase_url": "<string>",
"custom_shipping": true,
"shipping_type": "<string>",
"shipping_price": 123,
"shipping_days": 123,
"image_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"
},
"items": {
"data": [
{
"id": 123,
"bundle_id": 123,
"sku_id": 123,
"price_type": "<string>",
"price": 123,
"discount": 123,
"quantity": 123,
"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"
}
}
]
}
}Kits
Cadastrar um Kit
Cadastrar um Kit
POST
/
{alias}
/
catalog
/
bundles
Cadastrar um Kit
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/catalog/bundles \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"name": "<string>",
"image_url": "<string>",
"items": [
{
"sku_id": 123,
"price": 123,
"discount": 123,
"quantity": 123
}
],
"active": true,
"modifiable": true,
"custom_shipping": true,
"shipping_price": 123,
"shipping_days": 123
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/bundles"
payload = {
"name": "<string>",
"image_url": "<string>",
"items": [
{
"sku_id": 123,
"price": 123,
"discount": 123,
"quantity": 123
}
],
"active": True,
"modifiable": True,
"custom_shipping": True,
"shipping_price": 123,
"shipping_days": 123
}
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({
name: '<string>',
image_url: '<string>',
items: [{sku_id: 123, price: 123, discount: 123, quantity: 123}],
active: true,
modifiable: true,
custom_shipping: true,
shipping_price: 123,
shipping_days: 123
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/bundles', 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/bundles",
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([
'name' => '<string>',
'image_url' => '<string>',
'items' => [
[
'sku_id' => 123,
'price' => 123,
'discount' => 123,
'quantity' => 123
]
],
'active' => true,
'modifiable' => true,
'custom_shipping' => true,
'shipping_price' => 123,
'shipping_days' => 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/bundles"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"image_url\": \"<string>\",\n \"items\": [\n {\n \"sku_id\": 123,\n \"price\": 123,\n \"discount\": 123,\n \"quantity\": 123\n }\n ],\n \"active\": true,\n \"modifiable\": true,\n \"custom_shipping\": true,\n \"shipping_price\": 123,\n \"shipping_days\": 123\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/bundles")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"image_url\": \"<string>\",\n \"items\": [\n {\n \"sku_id\": 123,\n \"price\": 123,\n \"discount\": 123,\n \"quantity\": 123\n }\n ],\n \"active\": true,\n \"modifiable\": true,\n \"custom_shipping\": true,\n \"shipping_price\": 123,\n \"shipping_days\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/bundles")
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 \"name\": \"<string>\",\n \"image_url\": \"<string>\",\n \"items\": [\n {\n \"sku_id\": 123,\n \"price\": 123,\n \"discount\": 123,\n \"quantity\": 123\n }\n ],\n \"active\": true,\n \"modifiable\": true,\n \"custom_shipping\": true,\n \"shipping_price\": 123,\n \"shipping_days\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"active": true,
"modifiable": true,
"name": "<string>",
"purchase_url": "<string>",
"custom_shipping": true,
"shipping_type": "<string>",
"shipping_price": 123,
"shipping_days": 123,
"image_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"
},
"items": {
"data": [
{
"id": 123,
"bundle_id": 123,
"sku_id": 123,
"price_type": "<string>",
"price": 123,
"discount": 123,
"quantity": 123,
"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"
}
}
]
}
}Path Parameters
Alias da loja
Body
application/json
Response
Lista de Kits
Was this page helpful?
⌘I