Download OpenAPI specification:Download
Webhook API транспорта MG Node
Тело запроса вебхука
| type required | string Тип события вебхука |
required | object (WebhookRequestMeta) Метаданные запроса вебхука |
required | object (WebhookMessageSentData) Данные события вебхука для отправленного сообщения |
Пустой ответ для событий webhook, не требующих ответа
{- "type": "message_sent",
- "meta": {
- "timestamp": 0
}, - "data": {
- "external_user_id": "user123",
- "external_chat_id": "chat456",
- "channel_id": 789,
- "id": 123456789,
- "type": "text",
- "content": "Hello, world!",
- "quote_external_id": "quote123",
- "quote_content": "This is a quoted message.",
- "in_app_id": 12345,
- "user": {
- "id": 101,
- "first_name": "John",
- "last_name": "Doe",
}, - "customer": {
- "first_name": "Jane",
- "last_name": "Smith",
}, - "product": {
- "id": 56,
- "article": "324-DFT-495",
- "cost": {
- "currency": "str",
- "value": 256
}, - "name": "demo product",
- "unit": "string",
}, - "order": {
- "external_id": 56,
- "cost": {
- "currency": "str",
- "value": 256
}, - "date": "2021-12-29T14:18:37.051393Z",
- "delivery": {
- "address": "2641 Webster St Berkeley, California(CA), 94705",
- "comment": "demo delivery comment",
- "name": "dhl",
- "price": {
- "currency": "str",
- "value": 256
}
}, - "discount": {
- "currency": "str",
- "value": 256
}, - "items": [
- {
- "external_id": 45,
- "name": "demo order item",
- "price": {
- "currency": "str",
- "value": 256
}, - "quantity": {
- "unit": "pcs",
- "value": 5
},
}
], - "number": "23546",
- "payments": [
- {
- "amount": {
- "currency": "str",
- "value": 256
}, - "name": "paid",
- "status": {
- "name": "demo-payment-status",
- "payed": true
}
}
], - "status": {
- "code": "approval",
- "name": "approval"
},
}, - "items": [
- {
- "id": "c425d178-eb6f-11ec-8ea0-0242ac120002",
- "caption": "demo caption",
- "size": 34534,
- "height": 1080,
- "width": 1920
}
], - "template": {
- "code": "template123",
- "category": "authentication",
- "args": [
- "string"
], - "variables": {
- "header": {
- "type": "text",
- "args": [
- "string"
], - "attachments": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "caption": "string"
}
]
}, - "body": {
- "args": [
- "string"
]
}, - "buttons": [
- {
- "type": "plain",
- "title": "Click Me",
- "args": [
- "string"
]
}
]
}
}, - "attachments": {
}
}
}null