latestSwagger 2.02026-08-101215.5 KB

d3016d22ef4e

Order Events

АПІ для виклику кешування рахунків(ordersCache)

post//api.shaketopay.com.ua/callback/webhook

Headers

restoIdstring required

Restaurant ID

Request body

webhookTypestring required
eventTimestring date-time required

Timestamp in UTC

Example request

{
  "webhookType": "ORDERS_CACHE",
  "eventTime": "2024-09-30T13:47:57Z",
  "actualOrders": [
    {
      "orderId": "079D89A0-5BEF-4BCC-A279-2566D5FBAEAA",
      "revision": 2
    }
  ],
  "changedOrders": [
    {
      "orderInfo": {
        "billId": "A9D1D59E-DBE5-423F-82C8-95C14FEA97BD",
        "orderNumber": "11.3",
        "totalSum": 77.4,
        "rawSum": 86,
        "discountSum": 8.6,
        "waiter": "TEST",
        "waiterId": "1000004",
        "tables": [
          11
        ],
        "discounts": {
          "list": [
            {
              "id": "1002291",
              "name": "Скидка 10% на чек",
              "sum": 8.6,
              "code": 6
            }
          ]
        },
        "guests": [
          {
            "name": "Гість 1",
            "id": "8436f6ff-6665-44de-a863-8be3352cb7d2",
            "additionalInfo": {
              "system": "syrve",
              "comment": "some guest comment"
            },
            "dishes": [
              {
                "positionId": "4",
                "name": "Combo salatov",
                "count": 1,
                "positionCount": 1,
                "categoryId": -1,
                "category": "Блюдо без категории",
                "orderNumber": "11.3",
                "type": "dish or combo or modifier",
                "dishId": "1002281",
                "price": 86,
                "positionRawSum": 30,
                "linkedTo": "4",
                "additionalInfo": {
                  "system": "syrve",
                  "comment": "string",
                  "status": "added",
                  "productGroupExternalId": "for modifiers only"
                }
              }
            ]
          }
        ],
        "state": "NEW or BILL or CLOSED or DELETED",
        "splitAvailable": true,
        "version": 2,
        "payments": [
          {
            "paymentTypeName": "string",
            "paymentTypeKind": "Card",
            "additionalInfo": {
              "system": "syrve",
              "isPrepay": true,
              "isExternal": true,
              "status": "new",
              "externalId": "string",
              "typeId": "string"
            }
          }
        ],
        "orderType": "Common-в закладі,DeliveryByClient-самовивоз,DeliveryByCourier-доставка",
        "additionalInfo": {
          "system": "posName",
          "tablesDetails": [
            {
              "externalId": "string",
              "name": "string",
              "fullName": "string",
              "number": 21,
              "description": "string",
              "isActive": true
            }
          ],
          "waiterDetails": {
            "externalId": "string",
            "name": "string",
            "phone": "string",
            "pinCode": "string"
          }
        },
        "tableId": "1000051",
        "created": "2024.09.30 13:47:57",
        "billAmountForTips": 123.35
      }
    }
  ]
}

Response

Request received and processed successfully