GET
/
{alias}
/
pricing
/
promocodes
/
{id}
Visualizar cupom
curl --request GET \
  --url https://api.dooki.com.br/v2/{alias}/pricing/promocodes/{id} \
  --header 'User-Secret-Key: <api-key>' \
  --header 'User-Token: <api-key>'
{
  "id": 123,
  "code": "TEST",
  "description": "",
  "customer_id": 123,
  "active": true,
  "expired": true,
  "discount_type": "p",
  "for_the_price_of": true,
  "cart_default": true,
  "type_increment_value": "",
  "value": 10,
  "price_products": 123,
  "percent_products": 123,
  "quantity": "100000",
  "total_customers_used": "22",
  "product_quantity": 123,
  "product_max_quantity": 123,
  "used": 22,
  "items_count": 123,
  "min_value": 99.99,
  "use_percent": 0.02,
  "shipment_percent": 123,
  "accumulate": true,
  "once_per_customer": true,
  "abandoned_cart": true,
  "newsletter": true,
  "payments_ids": "<any>",
  "free_shipment": true,
  "ignore_promotion_products": true,
  "start_at": {
    "date": "2000-08-17 10:24:24",
    "timezone_type": 3,
    "timezone": "America/Sao_Paulo"
  },
  "end_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"
  },
  "updated_at": {
    "date": "2000-08-17 10:24:24",
    "timezone_type": 3,
    "timezone": "America/Sao_Paulo"
  },
  "include": {
    "products_ids": "[987, 654, 456, 321, 123]",
    "brands_ids": "[]",
    "collections_ids": "[]",
    "categories_ids": "[]"
  },
  "exclude": {
    "products_ids": "[123, 321]",
    "brands_ids": "[]",
    "collections_ids": "[]",
    "categories_ids": "[]"
  },
  "include_ids": "[987, 654, 456, 321, 123]",
  "exclude_ids": "[123, 321]"
}
Esta API possui limites de requisições (rate limits) para garantir estabilidade. Cada endpoint tem um limite específico de chamadas por minuto. Este endpoint em específico tem um limite de requisições por minuto.

Authorizations

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

Path Parameters

alias
string
required

Alias da loja

id
integer
required

ID do cupom

Response

Detalhes do cupom

Representa um código promocional Representa as restrições de inclusão e exclusão para itens específicos

id
integer
code
string
Example:

"TEST"

description
string
Example:

""

customer_id
integer
active
boolean
expired
boolean
discount_type
enum<string>
Available options:
p,
v
for_the_price_of
boolean
cart_default
boolean
type_increment_value
string
Example:

""

value
number
Example:

10

price_products
number
percent_products
number
quantity
integer
Example:

"100000"

total_customers_used
integer
Example:

"22"

product_quantity
integer
product_max_quantity
integer
used
integer
Example:

22

items_count
integer
min_value
number
Example:

99.99

use_percent
number
Example:

0.02

shipment_percent
number
accumulate
boolean
once_per_customer
boolean
abandoned_cart
boolean
newsletter
boolean
payments_ids
any
free_shipment
boolean
ignore_promotion_products
boolean
start_at
object
end_at
object
created_at
object
updated_at
object
include
object

Itens a serem incluídos

exclude
object

Itens a serem excluídos

include_ids
integer[]

Lista de IDs para inclusão

Example:

"[987, 654, 456, 321, 123]"

exclude_ids
integer[]

Lista de IDs para exclusão

Example:

"[123, 321]"