Webhooks¶
Webhooks allow you to get real-time, programmatic notifications about changes to your data as they happen. Instead of pulling information through our API, webhooks will send information to your endpoint.
The data that will be in the data
attribute will respect the same contract that can be obtained in the route of obtaining the question/answer by ID (https://services.magalu.com/v0/questions/{id}
).
Response:
{
"data": {
"id": "630e3bbc950b052e8724491a",
"status": "NEW",
"subject": {
"id": "id-001",
"type": "offer",
"extra": {
"name": "Camiseta",
"description": "Camiseta gola v na cor verde",
"url_img": "https://www.magazineluiza.com/camiseta-gola-v_imagem.jpg",
"url": "https://www.magazineluiza.com/camiseta-gola-v"
},
"custom_fields": [
{
"name": "Cor",
"value": "Verde"
}
],
"identifiers": [
{
"name": "openapi",
"value": "a11d50a5-31c1-4e9d-bbe3-27a59f944508",
"reference": "https://api-internal.magalu.com/v0/portfolios/skus/a11d50a5-31c1-4e9d-bbe3-27a59f944508"
}
]
},
"question": {
"message": "Quais as outras cores?",
"when_at": "2023-06-27T18:56:28.445Z",
"owner": {
"name": "Fluano da Silva (cliente)",
"external_id": "cli-001"
}
},
"answer": {
"message": "Temos em três cores azul, amarelo e vermelho.",
"external_id": "resposta-01",
"owner": {
"name": "Joseph Climber",
"external_id": "j.climber"
},
"moderation": {
"status": "NOT_MODERATED",
"when_at": "2023-06-27T18:56:28.445Z",
"block_rules": []
}
}
}
}