Skip to main content
GET
/
{alias}
/
pricing
/
promotions
Listar promoções
curl --request GET \
  --url https://api.dooki.com.br/v2/{alias}/pricing/promotions \
  --header 'Content-Type: application/json' \
  --header 'User-Secret-Key: <api-key>' \
  --header 'User-Token: <api-key>' \
  --data '
{
  "active": true,
  "all_products": true,
  "utm_only": true,
  "price_attribute": "price_discount",
  "name": "Black Friday 2025",
  "value": 123,
  "start_at": "2025-11-25 00:00:00",
  "end_at": "2025-11-30 23:59:59",
  "highlight_on_menu": true,
  "accumulate": true,
  "utm_source": "google",
  "utm_campaign": "black_friday",
  "collections_ids": [
    1,
    2
  ],
  "brands_ids": [
    1,
    2
  ],
  "categories_ids": [
    1,
    2
  ],
  "banners_ids": [
    1,
    2
  ]
}
'
import requests

url = "https://api.dooki.com.br/v2/{alias}/pricing/promotions"

payload = {
    "active": True,
    "all_products": True,
    "utm_only": True,
    "price_attribute": "price_discount",
    "name": "Black Friday 2025",
    "value": 123,
    "start_at": "2025-11-25 00:00:00",
    "end_at": "2025-11-30 23:59:59",
    "highlight_on_menu": True,
    "accumulate": True,
    "utm_source": "google",
    "utm_campaign": "black_friday",
    "collections_ids": [1, 2],
    "brands_ids": [1, 2],
    "categories_ids": [1, 2],
    "banners_ids": [1, 2]
}
headers = {
    "User-Token": "<api-key>",
    "User-Secret-Key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'GET',
  headers: {
    'User-Token': '<api-key>',
    'User-Secret-Key': '<api-key>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    active: true,
    all_products: true,
    utm_only: true,
    price_attribute: 'price_discount',
    name: 'Black Friday 2025',
    value: 123,
    start_at: '2025-11-25 00:00:00',
    end_at: '2025-11-30 23:59:59',
    highlight_on_menu: true,
    accumulate: true,
    utm_source: 'google',
    utm_campaign: 'black_friday',
    collections_ids: [1, 2],
    brands_ids: [1, 2],
    categories_ids: [1, 2],
    banners_ids: [1, 2]
  })
};

fetch('https://api.dooki.com.br/v2/{alias}/pricing/promotions', 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/promotions",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => json_encode([
    'active' => true,
    'all_products' => true,
    'utm_only' => true,
    'price_attribute' => 'price_discount',
    'name' => 'Black Friday 2025',
    'value' => 123,
    'start_at' => '2025-11-25 00:00:00',
    'end_at' => '2025-11-30 23:59:59',
    'highlight_on_menu' => true,
    'accumulate' => true,
    'utm_source' => 'google',
    'utm_campaign' => 'black_friday',
    'collections_ids' => [
        1,
        2
    ],
    'brands_ids' => [
        1,
        2
    ],
    'categories_ids' => [
        1,
        2
    ],
    'banners_ids' => [
        1,
        2
    ]
  ]),
  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/promotions"

	payload := strings.NewReader("{\n  \"active\": true,\n  \"all_products\": true,\n  \"utm_only\": true,\n  \"price_attribute\": \"price_discount\",\n  \"name\": \"Black Friday 2025\",\n  \"value\": 123,\n  \"start_at\": \"2025-11-25 00:00:00\",\n  \"end_at\": \"2025-11-30 23:59:59\",\n  \"highlight_on_menu\": true,\n  \"accumulate\": true,\n  \"utm_source\": \"google\",\n  \"utm_campaign\": \"black_friday\",\n  \"collections_ids\": [\n    1,\n    2\n  ],\n  \"brands_ids\": [\n    1,\n    2\n  ],\n  \"categories_ids\": [\n    1,\n    2\n  ],\n  \"banners_ids\": [\n    1,\n    2\n  ]\n}")

	req, _ := http.NewRequest("GET", 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.get("https://api.dooki.com.br/v2/{alias}/pricing/promotions")
  .header("User-Token", "<api-key>")
  .header("User-Secret-Key", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"active\": true,\n  \"all_products\": true,\n  \"utm_only\": true,\n  \"price_attribute\": \"price_discount\",\n  \"name\": \"Black Friday 2025\",\n  \"value\": 123,\n  \"start_at\": \"2025-11-25 00:00:00\",\n  \"end_at\": \"2025-11-30 23:59:59\",\n  \"highlight_on_menu\": true,\n  \"accumulate\": true,\n  \"utm_source\": \"google\",\n  \"utm_campaign\": \"black_friday\",\n  \"collections_ids\": [\n    1,\n    2\n  ],\n  \"brands_ids\": [\n    1,\n    2\n  ],\n  \"categories_ids\": [\n    1,\n    2\n  ],\n  \"banners_ids\": [\n    1,\n    2\n  ]\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.dooki.com.br/v2/{alias}/pricing/promotions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"active\": true,\n  \"all_products\": true,\n  \"utm_only\": true,\n  \"price_attribute\": \"price_discount\",\n  \"name\": \"Black Friday 2025\",\n  \"value\": 123,\n  \"start_at\": \"2025-11-25 00:00:00\",\n  \"end_at\": \"2025-11-30 23:59:59\",\n  \"highlight_on_menu\": true,\n  \"accumulate\": true,\n  \"utm_source\": \"google\",\n  \"utm_campaign\": \"black_friday\",\n  \"collections_ids\": [\n    1,\n    2\n  ],\n  \"brands_ids\": [\n    1,\n    2\n  ],\n  \"categories_ids\": [\n    1,\n    2\n  ],\n  \"banners_ids\": [\n    1,\n    2\n  ]\n}"

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "id": 123,
      "active": true,
      "all_products": true,
      "utm_only": true,
      "highlight_on_menu": true,
      "accumulate": true,
      "price_attribute": "<string>",
      "name": "Promoção relâmpago",
      "expired": true,
      "url": "https://www.domain.com/promocoes/test",
      "slug": "<string>",
      "value": 123,
      "utm_source": "google",
      "utm_campaign": "adwords"
    }
  ],
  "meta": {
    "pagination": {
      "total": "10",
      "count": "30",
      "per_page": "10",
      "current_page": "1",
      "total_pages": "3",
      "links": {
        "previous": "",
        "next": ""
      }
    }
  }
}

Authorizations

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

Path Parameters

alias
string
required

Alias da loja

Body

application/json

Dados para criação ou atualização de uma promoção

active
boolean
required

Status da promoção

Example:

true

all_products
boolean
required

Aplicar em todos os produtos

Example:

true

utm_only
boolean
required

Exclusivo para UTM

Example:

true

price_attribute
enum<string>
required

Atributo de preço para aplicar desconto

Available options:
price_sale,
price_discount
Example:

"price_discount"

name
string
required

Nome da promoção

Example:

"Black Friday 2025"

value
number<float>
required

Valor do desconto

Example:

123

start_at
string<date-time>
required

Data e hora de início

Example:

"2025-11-25 00:00:00"

end_at
string<date-time>
required

Data e hora de término

Example:

"2025-11-30 23:59:59"

highlight_on_menu
boolean

Destacar no menu

Example:

true

accumulate
boolean

Permite acumular com outras promoções

Example:

true

utm_source
string

Origem UTM

Example:

"google"

utm_campaign
string

Campanha UTM

Example:

"black_friday"

collections_ids
integer[]

IDs das coleções

Example:
[1, 2]
brands_ids
integer[]

IDs das marcas

Example:
[1, 2]
categories_ids
integer[]

IDs das categorias

Example:
[1, 2]
banners_ids
integer[]

IDs dos banners

Example:
[1, 2]

Response

Lista de promoções

Representa uma paginação com meta

data
object[]
meta
object