Skip to main content
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": []
}

Authorizations

User-Token
string
header
required
User-Secret-Key
string
header
required

Path Parameters

alias
string
required

Alias da loja

Body

application/json

Estrutura de dados para criação/atualização de Order Bump

name
string
required
Example:

"Oferta especial de camiseta"

active
boolean
required
Example:

true

resource_type
enum<string>
required

Tipo do item oferecido

Available options:
sku,
product
Example:

"product"

resource_id
integer
required

ID do produto ou SKU oferecido

Example:

42533439

price_sale
number<float>
required
Example:

50

params
object
required
accepted_payment
enum<string>
required

Método de pagamento aceito para exibir a oferta

Available options:
all,
deposit,
billet,
credit_card,
pix,
pix_in_installments,
wallet
Example:

"all"

display_rule
enum<string>
required

Regra de exibição da oferta

Available options:
always,
products_amount,
selected_products
Example:

"always"

displayed_quantity
integer
required

Quantidade de produtos exibidos no OrderBump

Required range: 1 <= x <= 5
Example:

1

is_ia
boolean

Define se o Order Bump é gerado por IA

Example:

false

pre_select_variation
boolean

Se a variação deve ser pré-selecionada

Example:

true

price_discount
number<float> | null
Example:

0

amount_rule
string | null
Example:

"greater_than"

amount_value
number<float> | null
Example:

100

display_product_ids
integer[] | null

Lista de produtos exibidos no OrderBump

Response

Order Bump criado com sucesso

Informações de um OrderBump individual

id
integer
Example:

255787

active
boolean
Example:

true

is_ia
boolean
Example:

false

pre_select_variation
boolean
Example:

true

name
string
Example:

"Oferta Especial"

displayed_quantity
integer
Example:

1

resource_id
integer
Example:

42533439

resource_type
string
Example:

"product"

price_sale
string
Example:

"50.00"

price_discount
string
Example:

"0.00"

params
object
accepted_payment
string
Example:

"all"

display_rule
string
Example:

"always"

amount_rule
string
Example:

"greater_than"

amount_value
string
Example:

"0.00"

updated_at
object
created_at
object
display_product_ids
integer[]
Example:
[]