v1

latestOpenAPI 3.1.02026-08-04650218.3 KB

Webhook Resgate de Bônus

Webhook disparado no momento que o cliente vai até a loja e utiliza o bônus

post/:webhook

Headers

Content-Typestring
Authorizationstring

Token de autenticação

Request body

bonus_idinteger

ID do Bônus

user_idinteger

ID do cliente (consumidor final)

user_phonestring

Número de telefone do cliente (consumidor) no formato +55 (DDD) 9XXXX-XXXX

user_document_numberstring

CPF do cliente (consumidor)

user_namestring

Nome do cliente (consumidor)

status'withdraw' | 'cancelled' | 'refunded'

Status do webhook. Cancelled = cancelado, refund = estorno, withdraw = resgate de bônus

Response

200

OR
OR

Example response

{
  "bonus_id": 12345678,
  "user_id": 12345678,
  "user_phone": "55 (99) 99999-9999",
  "user_document_number": "12312312312",
  "user_name": "João da Silva",
  "status": "withdraw",
  "withdraw": {
    "withdraw_date": "2020-01-01 00:00:00",
    "order_total": 100,
    "bonus_total": 10,
    "total_used_bonus": 10,
    "customer_id": 12345678,
    "customer_cnpj": "12345678901234",
    "customer_name": "Loja 1A"
  }
}