Product Redemption
The main purpose of this webhook is to provide a real-time notification when a user redeems a product from the gamification shop.
Event Details
Section titled “Event Details”| Parameter | Type | Description |
|---|---|---|
name | string | Name of the event: “Resgate do Produto” |
slug | string | Unique identifier: shop.product.redemption |
send_at | string | Date and time of the event (format: “yyyy-MM-dd HH:mm:ss”) |
Payload Structure
Section titled “Payload Structure”User Object
Section titled “User Object”| Parameter | Type | Description |
|---|---|---|
id | string | Numerical identifier of the user. |
name | string | Name of the user. |
email | string | Email address of the user. |
address | object | Address information for the user. |
address.cep | string | ZIP code. |
address.uf | string | State. |
address.cidade | string | City. |
address.bairro | string | Neighborhood. |
address.logradouro | string | Street address. |
address.numero | string | Address number. |
address.complemento | string | Address complement. |
address.referencia | string | Reference point for the address. |
Redemption Object
Section titled “Redemption Object”| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the redemption. |
exchange_date | string | Date and time of the redemption (format: “yyyy-MM-dd HH:mm:ss”). |
quantity | string | Quantity of the product redeemed. |
total_payment | string | Total payment amount. |
institution | object | Institution related to the redemption. |
institution.id | string | Institution identifier. |
institution.name | string | Institution name. |
school | object | School related to the redemption. |
school.id | string | School identifier. |
school.name | string | School name. |
product | object | Redeemed product details. |
product.id | string | Product identifier. |
product.name | string | Product name. |
product.type | string | Product type. |
product.price | string | Product price. |
product.stock_left | string | Remaining quantity in stock. |
Trigger Action
Section titled “Trigger Action”The event will be triggered when a user redeems a product from the gamification shop.
Payload Example
Section titled “Payload Example”{ "event": { "name": "Resgate do Produto", "slug": "shop.product.redemption", "send_at": "2023-06-20 14:53:00" }, "data": { "user": { "id": "123", "name": "Student", "email": "student@toolzz.me", "address": { "cep": "12345-123", "uf": "SP", "cidade": "City Name", "bairro": "Neighborhood Name", "logradouro": "Address", "numero": "01", "complemento": "Next to house X", "referencia": "Ref" } }, "exchange": { "id": "321", "exchange_date": "2023-06-20 14:52:59", "quantity": "1", "total_payment": "39", "institution": { "id": "123456", "name": "Institution Name" }, "school": { "id": "654", "name": "School Name" }, "product": { "id": "213", "name": "Product Name", "type": "price", "price": "39", "stock_left": "49" } } }}Security
Section titled “Security”Ensure that the destination URL is correct before you start sending payloads. Verify that the parameters sent are correct and complete. Make sure that the webhook recipients are correct and valid. Log and monitor all webhook calls for auditing and troubleshooting purposes.