Criar Order Bump
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/pricing/order-bumps \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"name": "Oferta especial de camiseta",
"active": true,
"resource_type": "product",
"resource_id": 42533439,
"price_sale": 50,
"params": {
"button_text": "+ Adicionar oferta",
"title": null,
"message": null
},
"accepted_payment": "all",
"display_rule": "always",
"displayed_quantity": 1,
"is_ia": false,
"pre_select_variation": true,
"price_discount": 0,
"amount_rule": "greater_than",
"amount_value": 100,
"display_product_ids": [
12345
]
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/pricing/order-bumps"
payload = {
"name": "Oferta especial de camiseta",
"active": True,
"resource_type": "product",
"resource_id": 42533439,
"price_sale": 50,
"params": {
"button_text": "+ Adicionar oferta",
"title": None,
"message": None
},
"accepted_payment": "all",
"display_rule": "always",
"displayed_quantity": 1,
"is_ia": False,
"pre_select_variation": True,
"price_discount": 0,
"amount_rule": "greater_than",
"amount_value": 100,
"display_product_ids": [12345]
}
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: 'Oferta especial de camiseta',
active: true,
resource_type: 'product',
resource_id: 42533439,
price_sale: 50,
params: {button_text: '+ Adicionar oferta', title: null, message: null},
accepted_payment: 'all',
display_rule: 'always',
displayed_quantity: 1,
is_ia: false,
pre_select_variation: true,
price_discount: 0,
amount_rule: 'greater_than',
amount_value: 100,
display_product_ids: [12345]
})
};
fetch('https://api.dooki.com.br/v2/{alias}/pricing/order-bumps', 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}/pricing/order-bumps",
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' => 'Oferta especial de camiseta',
'active' => true,
'resource_type' => 'product',
'resource_id' => 42533439,
'price_sale' => 50,
'params' => [
'button_text' => '+ Adicionar oferta',
'title' => null,
'message' => null
],
'accepted_payment' => 'all',
'display_rule' => 'always',
'displayed_quantity' => 1,
'is_ia' => false,
'pre_select_variation' => true,
'price_discount' => 0,
'amount_rule' => 'greater_than',
'amount_value' => 100,
'display_product_ids' => [
12345
]
]),
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}/pricing/order-bumps"
payload := strings.NewReader("{\n \"name\": \"Oferta especial de camiseta\",\n \"active\": true,\n \"resource_type\": \"product\",\n \"resource_id\": 42533439,\n \"price_sale\": 50,\n \"params\": {\n \"button_text\": \"+ Adicionar oferta\",\n \"title\": null,\n \"message\": null\n },\n \"accepted_payment\": \"all\",\n \"display_rule\": \"always\",\n \"displayed_quantity\": 1,\n \"is_ia\": false,\n \"pre_select_variation\": true,\n \"price_discount\": 0,\n \"amount_rule\": \"greater_than\",\n \"amount_value\": 100,\n \"display_product_ids\": [\n 12345\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}/pricing/order-bumps")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Oferta especial de camiseta\",\n \"active\": true,\n \"resource_type\": \"product\",\n \"resource_id\": 42533439,\n \"price_sale\": 50,\n \"params\": {\n \"button_text\": \"+ Adicionar oferta\",\n \"title\": null,\n \"message\": null\n },\n \"accepted_payment\": \"all\",\n \"display_rule\": \"always\",\n \"displayed_quantity\": 1,\n \"is_ia\": false,\n \"pre_select_variation\": true,\n \"price_discount\": 0,\n \"amount_rule\": \"greater_than\",\n \"amount_value\": 100,\n \"display_product_ids\": [\n 12345\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/pricing/order-bumps")
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\": \"Oferta especial de camiseta\",\n \"active\": true,\n \"resource_type\": \"product\",\n \"resource_id\": 42533439,\n \"price_sale\": 50,\n \"params\": {\n \"button_text\": \"+ Adicionar oferta\",\n \"title\": null,\n \"message\": null\n },\n \"accepted_payment\": \"all\",\n \"display_rule\": \"always\",\n \"displayed_quantity\": 1,\n \"is_ia\": false,\n \"pre_select_variation\": true,\n \"price_discount\": 0,\n \"amount_rule\": \"greater_than\",\n \"amount_value\": 100,\n \"display_product_ids\": [\n 12345\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 255787,
"active": true,
"is_ia": false,
"pre_select_variation": true,
"name": "Oferta Especial",
"displayed_quantity": 1,
"resource_id": 42533439,
"resource_type": "product",
"price_sale": "50.00",
"price_discount": "0.00",
"params": {
"button_text": "+ Adicionar oferta",
"title": null,
"message": null
},
"accepted_payment": "all",
"display_rule": "always",
"amount_rule": "greater_than",
"amount_value": "0.00",
"updated_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"display_product_ids": []
}Order Bump
Criar Order Bump
Cria um novo Order Bump
POST
/
{alias}
/
pricing
/
order-bumps
Criar Order Bump
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/pricing/order-bumps \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"name": "Oferta especial de camiseta",
"active": true,
"resource_type": "product",
"resource_id": 42533439,
"price_sale": 50,
"params": {
"button_text": "+ Adicionar oferta",
"title": null,
"message": null
},
"accepted_payment": "all",
"display_rule": "always",
"displayed_quantity": 1,
"is_ia": false,
"pre_select_variation": true,
"price_discount": 0,
"amount_rule": "greater_than",
"amount_value": 100,
"display_product_ids": [
12345
]
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/pricing/order-bumps"
payload = {
"name": "Oferta especial de camiseta",
"active": True,
"resource_type": "product",
"resource_id": 42533439,
"price_sale": 50,
"params": {
"button_text": "+ Adicionar oferta",
"title": None,
"message": None
},
"accepted_payment": "all",
"display_rule": "always",
"displayed_quantity": 1,
"is_ia": False,
"pre_select_variation": True,
"price_discount": 0,
"amount_rule": "greater_than",
"amount_value": 100,
"display_product_ids": [12345]
}
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: 'Oferta especial de camiseta',
active: true,
resource_type: 'product',
resource_id: 42533439,
price_sale: 50,
params: {button_text: '+ Adicionar oferta', title: null, message: null},
accepted_payment: 'all',
display_rule: 'always',
displayed_quantity: 1,
is_ia: false,
pre_select_variation: true,
price_discount: 0,
amount_rule: 'greater_than',
amount_value: 100,
display_product_ids: [12345]
})
};
fetch('https://api.dooki.com.br/v2/{alias}/pricing/order-bumps', 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}/pricing/order-bumps",
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' => 'Oferta especial de camiseta',
'active' => true,
'resource_type' => 'product',
'resource_id' => 42533439,
'price_sale' => 50,
'params' => [
'button_text' => '+ Adicionar oferta',
'title' => null,
'message' => null
],
'accepted_payment' => 'all',
'display_rule' => 'always',
'displayed_quantity' => 1,
'is_ia' => false,
'pre_select_variation' => true,
'price_discount' => 0,
'amount_rule' => 'greater_than',
'amount_value' => 100,
'display_product_ids' => [
12345
]
]),
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}/pricing/order-bumps"
payload := strings.NewReader("{\n \"name\": \"Oferta especial de camiseta\",\n \"active\": true,\n \"resource_type\": \"product\",\n \"resource_id\": 42533439,\n \"price_sale\": 50,\n \"params\": {\n \"button_text\": \"+ Adicionar oferta\",\n \"title\": null,\n \"message\": null\n },\n \"accepted_payment\": \"all\",\n \"display_rule\": \"always\",\n \"displayed_quantity\": 1,\n \"is_ia\": false,\n \"pre_select_variation\": true,\n \"price_discount\": 0,\n \"amount_rule\": \"greater_than\",\n \"amount_value\": 100,\n \"display_product_ids\": [\n 12345\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}/pricing/order-bumps")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Oferta especial de camiseta\",\n \"active\": true,\n \"resource_type\": \"product\",\n \"resource_id\": 42533439,\n \"price_sale\": 50,\n \"params\": {\n \"button_text\": \"+ Adicionar oferta\",\n \"title\": null,\n \"message\": null\n },\n \"accepted_payment\": \"all\",\n \"display_rule\": \"always\",\n \"displayed_quantity\": 1,\n \"is_ia\": false,\n \"pre_select_variation\": true,\n \"price_discount\": 0,\n \"amount_rule\": \"greater_than\",\n \"amount_value\": 100,\n \"display_product_ids\": [\n 12345\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/pricing/order-bumps")
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\": \"Oferta especial de camiseta\",\n \"active\": true,\n \"resource_type\": \"product\",\n \"resource_id\": 42533439,\n \"price_sale\": 50,\n \"params\": {\n \"button_text\": \"+ Adicionar oferta\",\n \"title\": null,\n \"message\": null\n },\n \"accepted_payment\": \"all\",\n \"display_rule\": \"always\",\n \"displayed_quantity\": 1,\n \"is_ia\": false,\n \"pre_select_variation\": true,\n \"price_discount\": 0,\n \"amount_rule\": \"greater_than\",\n \"amount_value\": 100,\n \"display_product_ids\": [\n 12345\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 255787,
"active": true,
"is_ia": false,
"pre_select_variation": true,
"name": "Oferta Especial",
"displayed_quantity": 1,
"resource_id": 42533439,
"resource_type": "product",
"price_sale": "50.00",
"price_discount": "0.00",
"params": {
"button_text": "+ Adicionar oferta",
"title": null,
"message": null
},
"accepted_payment": "all",
"display_rule": "always",
"amount_rule": "greater_than",
"amount_value": "0.00",
"updated_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"display_product_ids": []
}Path Parameters
Alias da loja
Body
application/json
Estrutura de dados para criação/atualização de Order Bump
Example:
"Oferta especial de camiseta"
Example:
true
Tipo do item oferecido
Available options:
sku, product Example:
"product"
ID do produto ou SKU oferecido
Example:
42533439
Example:
50
Show child attributes
Show child attributes
Método de pagamento aceito para exibir a oferta
Available options:
all, deposit, billet, credit_card, pix, pix_in_installments, wallet Example:
"all"
Regra de exibição da oferta
Available options:
always, products_amount, selected_products Example:
"always"
Quantidade de produtos exibidos no OrderBump
Required range:
1 <= x <= 5Example:
1
Define se o Order Bump é gerado por IA
Example:
false
Se a variação deve ser pré-selecionada
Example:
true
Example:
0
Example:
"greater_than"
Example:
100
Lista de produtos exibidos no OrderBump
Response
Order Bump criado com sucesso
Informações de um OrderBump individual
Example:
255787
Example:
true
Example:
false
Example:
true
Example:
"Oferta Especial"
Example:
1
Example:
42533439
Example:
"product"
Example:
"50.00"
Example:
"0.00"
Show child attributes
Show child attributes
Example:
"all"
Example:
"always"
Example:
"greater_than"
Example:
"0.00"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
[]Was this page helpful?
⌘I