curl --request PUT \
--url https://api.dooki.com.br/v2/{alias}/pricing/order-bumps/{id} \
--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/{id}"
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.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({
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/{id}', 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/{id}",
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([
'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/{id}"
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("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}/pricing/order-bumps/{id}")
.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/{id}")
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 \"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": []
}Atualizar Order Bump
Atualiza os detalhes de um Order Bump específico
curl --request PUT \
--url https://api.dooki.com.br/v2/{alias}/pricing/order-bumps/{id} \
--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/{id}"
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.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({
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/{id}', 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/{id}",
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([
'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/{id}"
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("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}/pricing/order-bumps/{id}")
.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/{id}")
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 \"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": []
}Body
Estrutura de dados para criação/atualização de Order Bump
"Oferta especial de camiseta"
true
Tipo do item oferecido
sku, product "product"
ID do produto ou SKU oferecido
42533439
50
Show child attributes
Show child attributes
Método de pagamento aceito para exibir a oferta
all, deposit, billet, credit_card, pix, pix_in_installments, wallet "all"
Regra de exibição da oferta
always, products_amount, selected_products "always"
Quantidade de produtos exibidos no OrderBump
1 <= x <= 51
Define se o Order Bump é gerado por IA
false
Se a variação deve ser pré-selecionada
true
0
"greater_than"
100
Lista de produtos exibidos no OrderBump
Response
Order Bump atualizado com sucesso
Informações de um OrderBump individual
255787
true
false
true
"Oferta Especial"
1
42533439
"product"
"50.00"
"0.00"
Show child attributes
Show child attributes
"all"
"always"
"greater_than"
"0.00"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
[]Was this page helpful?