Notifiche
Nuovo ordine
Webhook attivato quando viene ricevuto un nuovo ordine
WEBHOOK
order.new
{
"event": "order.new",
"order": {
"uid": "<string>",
"token": "<string>",
"date": "<string>",
"date_iso": "2023-11-07T05:31:56Z",
"number": 123,
"order_number": "<string>",
"client": {
"uid": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com"
},
"details": [
{
"product": {
"uid": "<string>",
"name": "<string>",
"price": 123,
"category": "<string>",
"category_uid": "<string>",
"offline_uid": "<string>",
"ext_id": "<string>"
},
"options": [
{
"uid": "<string>",
"name": "<string>",
"values": [
{
"uid": "<string>",
"name": "<string>",
"price_operand": 123,
"quantity": 123,
"offline_uid": "<string>",
"ext_id": "<string>"
}
],
"ext_id": "<string>"
}
],
"price": 123,
"price_options": 123,
"quantity": 123,
"total": 123,
"free_quantity": 123,
"notes": "<string>"
}
],
"paid": true,
"total": 123,
"currency": "<string>",
"closed": true,
"subrestaurant_code": "<string>",
"subrestaurant_uid": "<string>",
"customfields": [
{
"uid": "<string>",
"name": "<string>",
"value": "<string>",
"display_value": "<string>"
}
],
"notes": "<string>"
}
}Autorizzazioni
Firma HMAC-SHA256 del payload, calcolata utilizzando il Webhook Secret del ristorante. Consulta la documentazione sulla Sicurezza Webhook per i dettagli sulla validazione.
Corpo
application/json
Risposta
200
Restituire uno stato 200 per indicare che il webhook è stato ricevuto correttamente
⌘I
{
"event": "order.new",
"order": {
"uid": "<string>",
"token": "<string>",
"date": "<string>",
"date_iso": "2023-11-07T05:31:56Z",
"number": 123,
"order_number": "<string>",
"client": {
"uid": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com"
},
"details": [
{
"product": {
"uid": "<string>",
"name": "<string>",
"price": 123,
"category": "<string>",
"category_uid": "<string>",
"offline_uid": "<string>",
"ext_id": "<string>"
},
"options": [
{
"uid": "<string>",
"name": "<string>",
"values": [
{
"uid": "<string>",
"name": "<string>",
"price_operand": 123,
"quantity": 123,
"offline_uid": "<string>",
"ext_id": "<string>"
}
],
"ext_id": "<string>"
}
],
"price": 123,
"price_options": 123,
"quantity": 123,
"total": 123,
"free_quantity": 123,
"notes": "<string>"
}
],
"paid": true,
"total": 123,
"currency": "<string>",
"closed": true,
"subrestaurant_code": "<string>",
"subrestaurant_uid": "<string>",
"customfields": [
{
"uid": "<string>",
"name": "<string>",
"value": "<string>",
"display_value": "<string>"
}
],
"notes": "<string>"
}
}