Criar customização
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/catalog/customizations \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"name": "<string>",
"price": 123,
"type": "<string>",
"required": true,
"max_chars": 123,
"description": "<string>",
"values": [
"<string>"
]
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/customizations"
payload = {
"name": "<string>",
"price": 123,
"type": "<string>",
"required": True,
"max_chars": 123,
"description": "<string>",
"values": ["<string>"]
}
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>',
price: 123,
type: '<string>',
required: true,
max_chars: 123,
description: '<string>',
values: ['<string>']
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/customizations', 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/customizations",
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>',
'price' => 123,
'type' => '<string>',
'required' => true,
'max_chars' => 123,
'description' => '<string>',
'values' => [
'<string>'
]
]),
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/customizations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"type\": \"<string>\",\n \"required\": true,\n \"max_chars\": 123,\n \"description\": \"<string>\",\n \"values\": [\n \"<string>\"\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/customizations")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"type\": \"<string>\",\n \"required\": true,\n \"max_chars\": 123,\n \"description\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/customizations")
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 \"price\": 123,\n \"type\": \"<string>\",\n \"required\": true,\n \"max_chars\": 123,\n \"description\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"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']"
}Customizações
Criar customização
Cria uma nova customização
POST
/
{alias}
/
catalog
/
customizations
Criar customização
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/catalog/customizations \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"name": "<string>",
"price": 123,
"type": "<string>",
"required": true,
"max_chars": 123,
"description": "<string>",
"values": [
"<string>"
]
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/catalog/customizations"
payload = {
"name": "<string>",
"price": 123,
"type": "<string>",
"required": True,
"max_chars": 123,
"description": "<string>",
"values": ["<string>"]
}
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>',
price: 123,
type: '<string>',
required: true,
max_chars: 123,
description: '<string>',
values: ['<string>']
})
};
fetch('https://api.dooki.com.br/v2/{alias}/catalog/customizations', 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/customizations",
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>',
'price' => 123,
'type' => '<string>',
'required' => true,
'max_chars' => 123,
'description' => '<string>',
'values' => [
'<string>'
]
]),
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/customizations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"type\": \"<string>\",\n \"required\": true,\n \"max_chars\": 123,\n \"description\": \"<string>\",\n \"values\": [\n \"<string>\"\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/customizations")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"type\": \"<string>\",\n \"required\": true,\n \"max_chars\": 123,\n \"description\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/catalog/customizations")
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 \"price\": 123,\n \"type\": \"<string>\",\n \"required\": true,\n \"max_chars\": 123,\n \"description\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"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
application/json
Dados da customização
Representa os dados necessários para criar ou atualizar um customização de produto
Nome da customização
Preço da customização
Tipo da customização
Se a customização é obrigatória
Número máximo de caracteres
Descrição da customização
Valor disponível para a customização
Response
Customização criada com sucesso
ID do produto customizado
Example:
"Primeira Letra"
Preço do produto customizado
Example:
"Descrição"
Example:
"select"
Indica se é obrigatório ou não
Example:
true
Valores permitidos para o campo
Há uma limitação de caracteres na customização. Exemplo: o número da camisa deve ter apenas 2 caracteres.
Example:
1
IDs dos produtos que possuem essa customização
Example:
"['A', 'B', 'C', 'D']"
Was this page helpful?
⌘I