Skip to main content
PUT
/
{alias}
/
pricing
/
promotions
/
{id}
Atualizar promoção
curl --request PUT \
  --url https://api.dooki.com.br/v2/{alias}/pricing/promotions/{id} \
  --header 'Content-Type: application/json' \
  --header 'User-Secret-Key: <api-key>' \
  --header 'User-Token: <api-key>' \
  --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",
  "url": "https://www.domain.com/promocoes/test",
  "slug": "<string>",
  "value": 123,
  "utm_source": "google",
  "utm_campaign": "adwords"
}'
{
  "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",
  "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]"
}

Authorizations

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

Path Parameters

alias
string
required

Alias da loja

id
integer
required

ID da promoção

Body

application/json
id
integer
active
boolean
all_products
boolean
utm_only
boolean
highlight_on_menu
boolean
accumulate
boolean
price_attribute
string
name
string
Example:

"Promoção relâmpago"

url
string<uri>
Example:

"https://www.domain.com/promocoes/test"

slug
string
value
number
utm_source
string
Example:

"google"

utm_campaign
string
Example:

"adwords"

Response

Detalhes da promoção

Representa as restrições de inclusão e exclusão para itens específicos

id
integer
active
boolean
all_products
boolean
utm_only
boolean
highlight_on_menu
boolean
accumulate
boolean
price_attribute
string
name
string
Example:

"Promoção relâmpago"

expired
boolean
url
string<uri>
Example:

"https://www.domain.com/promocoes/test"

slug
string
value
number
utm_source
string
Example:

"google"

utm_campaign
string
Example:

"adwords"

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]"

I