Skip to main content
PUT
/
{alias}
/
pricing
/
cashbacks
/
{id}
Atualizar cashback
curl --request PUT \
  --url https://api.dooki.com.br/v2/{alias}/pricing/cashbacks/{id} \
  --header 'Content-Type: application/json' \
  --header 'User-Secret-Key: <api-key>' \
  --header 'User-Token: <api-key>' \
  --data '{
  "active": true,
  "name": "Nome do cashback. Esse valor deve ser único.",
  "min_amount": 123,
  "max_amount": 123,
  "valid_for": 123,
  "percent_amount": 123,
  "has_expiration": true,
  "start_at": "2023-11-07T05:31:56Z",
  "end_at": "2023-11-07T05:31:56Z"
}'
{
  "id": 123,
  "store_id": 123,
  "token": "<string>",
  "active": true,
  "name": "Exemplo de cashback",
  "min_amount": 123,
  "max_amount": 123,
  "valid_for": 123,
  "percent_amount": 123,
  "has_expiration": true,
  "starts_at": {
    "date": "2000-08-17 10:24:24",
    "timezone_type": 3,
    "timezone": "America/Sao_Paulo"
  },
  "expires_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"
  }
}
Envie somente os campos alterados, para reduzir validações desnecessárias. Caso não envie um campo, o mesmo será mantido com o valor atual.

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 cashback

Body

application/json
active
boolean
required
Example:

true

name
string
required
Example:

"Nome do cashback. Esse valor deve ser único."

min_amount
integer
required
max_amount
integer
required
valid_for
integer
required
percent_amount
integer
required
has_expiration
boolean
required
Example:

true

start_at
string<date-time>

Data de início

end_at
string<date-time>

Data de término

Response

Cashback atualizado com sucesso

Representa um cashback

id
integer
store_id
integer
token
string
active
boolean
name
string
Example:

"Exemplo de cashback"

min_amount
number
max_amount
number
valid_for
integer

Dias de validade

percent_amount
number

Percentual de cashback

has_expiration
boolean
starts_at
object
expires_at
object
created_at
object
updated_at
object
I