Pular para o conteúdo principal
PUT
/
coupon
Update a Coupon
curl --request PUT \
  --url https://api.cliquepay.app/coupon \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "0e02a425-32b4-493d-8db6-1a033457b5ee",
  "name": "Desconto de 15%",
  "discountType": "PERCENTAGE",
  "discount": 15,
  "currentQuantity": 50,
  "startDate": "2025-03-05T00:00:00Z",
  "endDate": "2025-04-10T23:59:59Z",
  "status": "INACTIVE"
}'
{
  "id": "0e02a425-32b4-493d-8db6-1a033457b5ee",
  "companyId": "f96a489c-8a4d-4c7b-a1f6-347acbd832df",
  "status": "ACTIVE",
  "name": "RISSO10",
  "discountType": "PERCENTAGE",
  "discount": 10,
  "quantityAvailable": 50,
  "currentQuantity": 50,
  "startDate": "2025-03-01T00:00:00Z",
  "endDate": "2025-04-01T23:59:59Z",
  "createdAt": "2025-02-03T10:00:00Z",
  "updatedAt": "2025-02-04T12:00:00Z"
}

Body

application/json
id
string
required

Coupon ID

Example:

"0e02a425-32b4-493d-8db6-1a033457b5ee"

name
string

Novo nome do cupom

Example:

"Desconto de 15%"

discountType
string

Novo tipo de desconto

Example:

"PERCENTAGE"

discount
number

Novo valor do desconto

Example:

15

currentQuantity
number

Nova quantidade atual

Example:

50

startDate
string<date-time>

Nova data de início

Example:

"2025-03-05T00:00:00Z"

endDate
string<date-time>

Nova data de expiração

Example:

"2025-04-10T23:59:59Z"

status
string

Novo status do cupom

Example:

"INACTIVE"

Response

200 - application/json

Coupon updated

id
string
required

Coupon ID

Example:

"0e02a425-32b4-493d-8db6-1a033457b5ee"

companyId
string
required

Company ID associada ao cupom

Example:

"f96a489c-8a4d-4c7b-a1f6-347acbd832df"

status
string
required

Coupon Status

Example:

"ACTIVE"

name
string
required

Coupon Name

Example:

"RISSO10"

discountType
string
required

Tipo de desconto

Example:

"PERCENTAGE"

discount
number
required

Valor do desconto

Example:

10

startDate
string<date-time>
required

Data de início do cupom

Example:

"2025-03-01T00:00:00Z"

endDate
string<date-time>
required

Data de expiração do cupom

Example:

"2025-04-01T23:59:59Z"

createdAt
string<date-time>
required

Data de criação

Example:

"2025-02-03T10:00:00Z"

updatedAt
string<date-time>
required

Última atualização

Example:

"2025-02-04T12:00:00Z"

quantityAvailable
number

Quantidade inicial disponível

Example:

50

currentQuantity
number

Quantidade atual

Example:

50

I