RESTful API Reference
Contact us to help you with your project.
API Endpoint
All API URLs listed in this documentation are relative to https://tastyalerts.com/api/v1/. For example, the /auth API call is reachable at https://tastyalerts.com/api/v1/auth
RESTful
The Tasty Alerts API is a mostly RESTful API.
All API calls should be made with HTTP POST or GET.
You can consider any non-200 HTTP response code an error - the returned data will contain more detailed information.
All methods are accessed via: https://tastyalerts.com/api/v1/SOME-METHOD.
Passing Request Data
Request data is passed to the API by POSTing objects and values to the API endpoints with the appropriate parameters. In other words, you are sending HTTP parameters, just like submitting an HTML FORM. The documentation for each API call will contain more detail on the parameters accepted by the call.
Output Formats
We support various output formats. To use any of them, simply include a parameter named OUTPUT with the desired output type:
JSON (default)
XML
The response data for each call will the be encoded in the specified format. Regardless of the output format desired, inputs are only accepted as JSON objects or HTTP POST parameters.
Questions? Problems?
Have you run into difficulties or a method just doesn't seem to work right? Email our API Support team and we'll be happy to assist you.
Authentication via username/password. The AUTH call returns a valid temporary access token and/or extends current token's validity. All temporary tokens are only valid for 12 hours from last time it was validated. This token allows access to all API calls and apply only to an individual location.
Each location also has a Permanent API key token which does not expire. You may use the permanent API token key located in the Tasty Alerts restaurant dashboard under Settings. If you have trouble locating or need to request a permanent Token, please contact us at info@tastyalerts.com. If you use the Permanent API key token, you do not need to use the AUTH call.
Method: POST
Parameters:
userid (string)
Authentication login email
password (string)
Authentication password
token (string)
Token to be re-validated
output (string)
Return format: JSON (default) | XML
Return:
result (string)
0: Failed authentication | 1: Successful authentication
token (string)
Temporary token key to authenticate other API calls
compid (string)
Company ID (For Reference Purpose)
POST https://tastyalerts.com/api/v1/auth?userid=[userid]&password=[password]&output=[json|xml]
Access and update master products information. Products have to be added to this master list before they can be added to location product list.
Method: POST, GET
Parameters:
token (string)
Required valid API key token
action (string)
GET, NEW, UPDATE, DELETE
itemid (string)
Item ID. Required for action: DELETE
data (string)
JSON data string. Required for action: NEW, UPDATE
output (string)
Return format: JSON (default) | XML
ACTION = [blank] or GET
Returns product list. See Returned Object Definition below for details of returned fields.
GET https://tastyalerts.com/api/v1/menu?token=[token]
ACTION = NEW
Creates new items into the products table. Must submit via POST method and include the "data" parameter with a valid JSON string. Your JSON must contain the array under property "data".
Returns a JSON string with number of products created and failed.
POST https://tastyalerts.com/api/v1/menu?token=[token]&action=NEW&data=[json string]
Sample JSON data:
{"data":[ { "syncid":"1000001", "itmdesc":"Falafel", "bldesc":"TAHINI SAUCE WITH PITA CHIPS", "price":"3.95", "c_category":"MAIN MENU", "c_subcat":"APPETIZER", "c_imgloc":"http:\/\/www.crmboost.com\/files\/10010634\/FALAFEL_falafel.jpg", "forsale":"N", "taxrate":"0.07", "sort":"0" }, { "syncid":"1000002", "itmdesc":"FRIED BREAD AND BUTTER PICKLES", "bldesc":"FRIED GARLIC BUTTERMILD DIPPING SAUCE", "price":"6.00", "c_category":"MAIN MENU", "c_subcat":"PUB SNACKS", "c_imgloc":"http:\/\/www.crmboost.com\/files\/10010634\/FRIED BREAD AND BUTTER PICKLES_fried-pickles.jpg", "forsale":"Y", "taxrate":"0.00", "sort":"0" }]}
ACTION = UPDATE
Updates the products table. Must submit via POST method and include the "data" parameter with a valid JSON string. Your JSON must contain the array under property "data". Your JSON string must include values for ITEMID and/or SYNCID. You can omit ITEMID and update based on your SYNCID. ITEMID supersedes SYNCID, and if both are provided, the SYNCID value will be overwritten.
Returns a JSON string with number of products updated and failed.
POST https://tastyalerts.com/api/v1/menu?token=[token]&action=UPDATE&data=[json string]
Sample JSON data:
{"data":[ { "itemid":"3SQ0YF5CK", "syncid":"1000001", "itmdesc":"Falafel", "bldesc":"TAHINI SAUCE WITH PITA CHIPS", "price":"3.95", "c_category":"MAIN MENU", "c_subcat":"APPETIZER", "c_imgloc":"http:\/\/www.crmboost.com\/files\/10010634\/FALAFEL_falafel.jpg", "forsale":"N", "taxrate":"0.07", "sort":"0" }, { "itemid":"3SQ0YF5CL", "syncid":"1000002", "itmdesc":"FRIED BREAD AND BUTTER PICKLES", "bldesc":"FRIED GARLIC BUTTERMILD DIPPING SAUCE", "price":"6.00", "c_category":"MAIN MENU", "c_subcat":"PUB SNACKS", "c_imgloc":"http:\/\/www.crmboost.com\/files\/10010634\/FRIED BREAD AND BUTTER PICKLES_fried-pickles.jpg", "forsale":"Y", "taxrate":"0.00", "sort":"0" }]}
ACTION = DELETE
Deletes a product.
POST https://tastyalerts.com/api/v1/menu?token=[token]&itemid=[itemid]
Returns a JSON string with success and failed.
Returned Object definition:
Access and update products options information. Products have to be added to this master list before any options can be added.
Method: POST, GET
Parameters:
token (string)
Required valid API key token
action (string)
GET, POST, DELETE
itemid (string)
Item ID. Required only for action: DELETE
data (string)
JSON data string. Required for action: POST
output (string)
Return format: JSON (default) | XML
ACTION = [blank] or GET
Returns product list. See Returned Object Definition below for details of returned fields.
GET https://tastyalerts.com/api/v1/menu/options?token=[token]
ACTION = POST
Creates new options or modifiers for items, such as extras and choices, etc. Must submit via POST method and include the "data" parameter with a valid JSON string. Your JSON must contain the array under property "data".
Returns a JSON string with number of products created and failed.
POST https://tastyalerts.com/api/v1/menu/options?token=[token]&action=NEW&data=[json string]
Sample JSON data:
{"data":[ { "syncid":"_45V0XKD41", "optgroup":"Choose Sauce", "opttype":"R", "option":"Mild", "price":"1.80", "optsyncid":"10383", "sortid":"1" }, { "syncid":"_45V0XKD42", "optgroup":"Choose Sauce", "opttype":"R", "option":"Medium", "price":"1.80", "optsyncid":"100292", "sortid":"1" }, { "syncid":"_45V0XKD43", "optgroup":"Choose Sauce", "opttype":"R", "option":"Hot", "price":"1.80", "optsyncid":"100293", "sortid":"1" }, { "itemid":"3SQ0YF5CN", "optgroup":"How do you want your meat?", "opttype":"D", "option":"Well Done", "price":"1.80", "optsyncid":"1000003", "sortid":"2" }, { "itemid":"3SQ0YF5CB", "optgroup":"How do you want your meat?", "opttype":"D", "option":"Rare", "price":"1.80", "optsyncid":"1000002", "sortid":"2" }]}
ACTION = DELETE
Deletes a product's options.
POST https://tastyalerts.com/api/v1/menu/options?token=[token]&itemid=[itemid]
Returns a JSON string with success and failed.
Returned Object definition:
Returns orders header information. You may specify a date range for the query. If no date range is provided, the query will return only orders for current day. See returned object definition below for details of fields. To retrieve individual order detail, use /orders/detail call.
Method: GET
Parameters:
token (string)
Required valid API key token
fdate (string)
(OPTIONAL) Start date to filter by date range. Format: YYYY-MM-DDTHH:MM:SS
tdate (string)
(OPTIONAL) End date to filter by date range. Format: YYYY-MM-DDTHH:MM:SS
output (string)
Return format: JSON (default) | XML
GET https://tastyalerts.com/api/v1/orders?token=[token]&fdate=[from date/time]&tdate=[to date/time]
Returns a JSON string with data orders header summary.
Sample JSON data returned:
{ "count":2, "rows":[ { "orderid":"10002476", "status":"PROCESSING", "custno":"10000179", "customer":"Mario Suarez", "phone":"305-999-9999", "email":"suar999@gmail.com", "address1":"2084 sw 26th St", "address2":"Apt. 123", "address3":"Silver Lakes", "address4":"", "city":"Pembroke Pines", "state":"Florida", "zip":"33029", "shipvia":"DELIVERY", "pterms":"CREDIT CARD", "pstatus":"PAID ONLINE", "notes":"\rTransaction Approved: 055513 / Trans #691466715", "tax":"1.80", "ordamt":"36.57", "created":"2014-09-14T14:00:38", "required":"2014-09-14T14:00:38" }, { "orderid":"10002477", "status":"COMPLETED", "custno":"10001512", "customer":"Mary Smith", "phone":"954-777-7777", "email":"msmi0000@yahoo.com", "address1":"12234 SW 18st.", "address3":"Silver Lakes", "city":"Pembroke Pines", "state":"FL", "zip":"33029", "shipvia":"DELIVERY", "pterms":"CASH", "pstatus":"COLLECT", "tax":"1.20", "ordamt":"21.20", "created":"2014-09-14T16:04:27", "required":"2014-09-14T16:04:27" } ] }
Returned Object Definition:
Access order detail information.
Method: GET
Parameters:
token (string)
Required valid API key token
orderid (string)
Required order id
output (string)
Return format: JSON (default) | XML
GET https://tastyalerts.com/api/v1/orders/detail?token=[token]&orderid=[orderid]
Sample JSON data returned:
{ "count":1, "header":[ { "orderid":"10002476", "status":"PROCESSING", "custno":"10000179", "customer":"Manuel Suarez", "phone":"305-888-8888", "email":"suar12akskdkd@gmail.com", "address1":"286 nw 16th St", "address2":"Apt. 12", "address3":"Silver Lakes", "address4":"", "city":"Pembroke Pines", "state":"Florida", "zip":"33029", "shipvia":"delivery", "pterms":"CREDIT CARD", "pstatus":"PAID ONLINE", "notes":"\rTransaction Approved: 055513 / Trans #691466715", "tax":"1.80", "ordamt":"36.57", "created":"2014-09-14T14:00:38", "required":"2014-09-14T14:00:38" } ], "detail":[ { "count":4, "rows":[ { "itemid":"3XE1ALQX2", "descrip":"BUFFALO CHICKEN CHEESE PHILLY SUB", "notes":"Add Fries\rWhole wheat bread\rNO blue cheese", "qtyord":"2.00", "price":"8.00", "subtotal":"16.00", "taxrate":"0.06", "taxable":"Y", "tax":"0.96", "total":"16.96" }, { "itemid":"3XE1ALQV7", "descrip":"NY STYLE (MEDIUM)", "notes":"* WHOLE * Pepperoni, Sausage\r", "qtyord":"1.00", "price":"12.00", "subtotal":"12.00", "taxrate":"0.06", "taxable":"Y", "tax":"0.72", "total":"12.72" }, { "itemid":"**TIPS**", "descrip":"GRATUITY", "qtyord":"1.00", "price":"4.77", "subtotal":"4.77", "taxrate":"0.00", "taxable":"N", "tax":"0.00", "total":"4.77" }, { "itemid":"DELIVERY", "descrip":"DELIVERY", "qtyord":"1.00", "price":"2.00", "subtotal":"2.00", "taxrate":"0.06", "taxable":"Y", "tax":"0.12", "total":"2.12" } ] } ] }
Returned Object Definition:
Updates the status of an order and triggers notifications accordingly.
Method: POST
Parameters:
token (string)
Required valid API key token
orderid (string)
Required: Order ID
newstatus (string)
New order status: NEW ORDER | PROCESSING | READY | OUT | COMPLETED | CANCELLED
time (string)
Time it will take for order to be ready. Required only when changing status to PROCESSING. Valid values: 0 | 5 | 10 | 15 | 20 | 25 | 30 | 40 | 45 | 60
POST https://tastyalerts.com/api/v1/orders/status?token=[token]&orderid=[order id]&newstatus=[new status]&time=[processing time]
Access customer information.
Method: GET
Parameters:
token (string)
Required valid API key token
action (string)
GET
custno (string)
Customer ID. Required for action: GET, UPDATE, DELETE, EXTRA
output (string)
Return format: JSON (default) | XML
ACTION = [blank]
Returns a list of all customers./p>
GET https://tastyalerts.com/api/v1/customers?token=[token]
ACTION = GET
Returns details of a customer.
GET https://tastyalerts.com/api/v1/customers?token=[token]&action=GET&custno=[custno]
Returned Object Definition:
Access vendor information.
Method: GET
Parameters:
token (string)
Required valid API key token
action (string)
GET
vendno (string)
Vendor ID. Required for action: GET
output (string)
Return format: JSON (default) | XML
ACTION = [blank]
Returns a list of all vendors./p>
GET https://tastyalerts.com/api/v1/vendors?token=[token]
ACTION = GET
Returns details of a vendor.
GET https://tastyalerts.com/api/v1/vendors?token=[token]&action=GET&custno=[custno]
Returned Object Definition:
Send a push notification message to your iPhone and Android apps. This feature only applies to customers with a plan that includes your native iPhone and Android app.
Method: POST
Parameters:
token (string)
Required valid API key token
pushmsg (string)
Message to be pushed
POST https://tastyalerts.com/api/v1/pushnotify?token=[token]&pushmsg=[message]