It doesn’t look too complicated. They have 2 methods:
-
Push : they push data to your own HTTPS server/website which would handle the orders. SambaPOS would then need to “talk” to your website to process the orders in some manner. Perhaps simply reading your website’s Database. This option appears to require a more complex setup, since your site would be a middle-man
-
Poll : SambaPOS polls periodically (docs say every minute) to request new Order data, and Gloria responds with JSON or XML formatted order data. We then deconstruct the data and “insert” the Order(s) into SambaPOS. In this case, we don’t need a website (HTTPS server) so it is less complex. It would be helpful to have SambaPOS API helpers for Ticket and Order creation so we can script the Ticket/Order directly in JScript… but even without API helpers, we do have Actions that can accomplish the task (Create Ticket, Add Order, Tag Order, etc).
I think the second option (Poll) would work best at this time since it does not require having a website middle-man. I do not think it will require any “new features” be added to SambaPOS just yet… I believe we already have the tools at our disposal. Need data…
Found sample payload in JSON format … https://github.com/GloriaFood/pos_docs/blob/master/version%202/payload/orders.json
{
"count": 1,
"orders": [
{
"coupons": [],
"id": 776113,
"restaurant_id": 4172,
"client_id": 188995,
"type": "delivery",
"sub_total_price": 47.88,
"tax_value": 4.13,
"total_price": 62.41,
"client_first_name": "Donald",
"client_last_name": "Draper",
"client_email": "don.draper@gloriafood.com",
"client_phone": "+15551234567",
"restaurant_name": "John's Excellent Pizza",
"instructions": null,
"currency": "USD",
"latitude": "37.79448725889753",
"longitude": "-122.395311680426",
"tax_type": "NET",
"tax_name": "Sales Tax",
"fulfill_at": "2016-02-03T17:19:32.000Z",
"pos_system_id": 1,
"restaurant_key": "8yCPCvb3dDo1k",
"api_version": 2,
"payment": "ONLINE",
"client_address": "21 Market Street, San Francisco",
"items": [
{
"id": 1678316,
"name": "DELIVERY_FEE",
"total_item_price": 5,
"price": 5,
"quantity": 1,
"instructions": null,
"type_id": null,
"type": "delivery_fee",
"tax_rate": 0.1,
"tax_value": 0.5,
"parent_id": null,
"cart_discount_rate": 0,
"cart_discount": 0,
"tax_type": "NET",
"item_discount": 0,
"options": []
},
{
"id": 1678317,
"name": "TIP",
"total_item_price": 5.67,
"price": 5.67,
"quantity": 1,
"instructions": null,
"type_id": null,
"type": "tip",
"tax_rate": 0.05,
"tax_value": 0.2702,
"parent_id": null,
"cart_discount_rate": 0,
"cart_discount": 0,
"tax_type": "GROSS",
"item_discount": 0,
"options": []
},
{
"id": 1678322,
"name": "Pizza Margherita",
"total_item_price": 8.2,
"price": 7,
"quantity": 1,
"instructions": "",
"type_id": 58424,
"type": "item",
"tax_rate": 0.07,
"tax_value": 0,
"parent_id": 1678332,
"cart_discount_rate": 0,
"cart_discount": 0,
"tax_type": "NET",
"item_discount": 8.2,
"options": [
{
"id": 1771325,
"name": "Small",
"price": 0,
"group_name": "Size",
"quantity": 1,
"type": "size"
},
{
"id": 1771326,
"name": "Crispy",
"price": 0,
"group_name": "Crust",
"quantity": 1,
"type": "option"
},
{
"id": 1771327,
"name": "Extra mozzarella",
"price": 1.2,
"group_name": "Extra Toppings (Small)",
"quantity": 1,
"type": "option"
}
]
},
{
"id": 1678324,
"name": "Pizza Prosciutto",
"total_item_price": 11.7,
"price": 8,
"quantity": 1,
"instructions": "",
"type_id": 58425,
"type": "item",
"tax_rate": 0.07,
"tax_value": 0.819,
"parent_id": 1678332,
"cart_discount_rate": 0,
"cart_discount": 0,
"tax_type": "NET",
"item_discount": 0,
"options": [
{
"id": 1771331,
"name": "Large",
"price": 2,
"group_name": "Size",
"quantity": 1,
"type": "size"
},
{
"id": 1771332,
"name": "Crispy",
"price": 0,
"group_name": "Crust",
"quantity": 1,
"type": "option"
},
{
"id": 1771333,
"name": "Extra mozzarella",
"price": 1.7,
"group_name": "Extra Toppings (Large)",
"quantity": 1,
"type": "option"
}
]
},
{
"id": 1678331,
"name": "Pizza Prosciutto",
"total_item_price": 8.7,
"price": 8,
"quantity": 1,
"instructions": "",
"type_id": 58425,
"type": "item",
"tax_rate": 0.07,
"tax_value": 0.609,
"parent_id": 1678332,
"cart_discount_rate": 0,
"cart_discount": 0,
"tax_type": "NET",
"item_discount": 0,
"options": [
{
"id": 1771343,
"name": "Small",
"price": 0,
"group_name": "Size",
"quantity": 1,
"type": "size"
},
{
"id": 1771344,
"name": "Fluffy",
"price": 0,
"group_name": "Crust",
"quantity": 1,
"type": "option"
},
{
"id": 1771345,
"name": "Corn",
"price": 0.7,
"group_name": "Extra Toppings (Small)",
"quantity": 1,
"type": "option"
}
]
},
{
"id": 1678332,
"name": "2 + 1 Pizza Special",
"total_item_price": 28.6,
"price": 0,
"quantity": 1,
"instructions": null,
"type_id": 251,
"type": "promo_item",
"tax_rate": 0.07,
"tax_value": 1.3566,
"parent_id": null,
"cart_discount_rate": 0.05,
"cart_discount": 1.02,
"tax_type": "NET",
"item_discount": 8.2,
"options": []
},
{
"id": 1678334,
"name": "Spaghetti Bolognese",
"total_item_price": 18,
"price": 9,
"quantity": 2,
"instructions": "",
"type_id": 58426,
"type": "item",
"tax_rate": 0.07,
"tax_value": 1.197,
"parent_id": null,
"cart_discount_rate": 0.05,
"cart_discount": 0.9,
"tax_type": "NET",
"item_discount": 0,
"options": []
},
{
"id": 1678335,
"name": "Spaghetti Frutti di Mare",
"total_item_price": 12,
"price": 12,
"quantity": 1,
"instructions": "",
"type_id": 58427,
"type": "item",
"tax_rate": 0.07,
"tax_value": 0.798,
"parent_id": null,
"cart_discount_rate": 0.05,
"cart_discount": 0.6,
"tax_type": "NET",
"item_discount": 0,
"options": []
},
{
"id": 1678336,
"name": "5% off total larger than 40$",
"total_item_price": 0,
"price": 0,
"quantity": 1,
"instructions": null,
"type_id": 250,
"type": "promo_cart",
"tax_rate": 0.07,
"tax_value": 0,
"parent_id": null,
"cart_discount_rate": 0.05,
"cart_discount": -2.52,
"tax_type": "NET",
"item_discount": 2.52,
"options": []
}
]
}
]
}
@JTRTech, get to work 