Weborder API
Weborder API
Menu resources
Product Categories
Products
Menu
Recent Orders
Product Upcharge
Product Sets
Modifiers
Attributes
Order Items
Locations
API Version
Pre-Validate
Check Gift
Shipping Options
Shipping Taxes
Cart Totals
Settings
Authentication
Cart resources
Validate
Calculate
Submit
Failed requests on the other hand generally have the following fields:
status - Always equal to “ERROR” upon failed request
errorMsg - Verbose error message, where exceptions are defined. Can be empty for
unexpected errors.
NOTE: API requests with a 403 and 404 response code will not follow the expected format, as they
are not processed by the Weborder API validators. Instead, they will return a HTML page with
the error description. See the Common error codes section for troubleshooting notes.
Menu resources
Our first group is called the “Menu resource” group, as most of the endpoints are dedicated to
fetching the location configuration and menu data. All of the resources in this group are part of the
/weborders/ namespace. Here is a list of endpoints part of this group:
Allowed
Name Endpoint Methods Required parameters
Product /weborders/product_categories
Categories / GET establishment
Products /weborders/products/ GET establishment
Menu /weborders/menu/ GET establishment
establishment,
Recent Orders /weborders/orders/recent/ GET customer
A category with no parent is a regular category. Sub-categories, consequently, are categories with a
parent category assigned to them. Products can only be assigned to sub-categories.
Generally, categories need to be added to the online menu before they are displayed as part of the
menu resources. This can be done by creating a Custom Menu of the “Online” type through the UI.
A Custom Menu should be created for each location that uses the weborder feature.
Product Categories
Notes
Most of this information is already part of the /weborders/menu/ endpoint.
Products
Notes
Most of this information is already part of the /weborders/menu/ endpoint, but this may be useful if only
products are mapped.
Menu
Notes
Extremely useful endpoint that combines the data of Product Categories, Products and Modifiers into
one nested resource.
Recent Orders
Notes
Very useful for loyalty integrations as it enables recent customer order lookup without expending any API
calls. Can be paired with data from Order Items if more granular data is needed.
Product Upcharge
Notes
Invaluable resource that should be checked when an item in the menu has “is_upsell” set to True.
Contains all the possible upsell choices to allow for easier mapping of combo products.
Product Sets
Endpoint Required parameters
product_sets/ product
Purpose
If the specified product is a combo, this will list all the combo selections.
Fields
Field Meaning
sort Numeral value representing the set display order in the UI.
name Combo set name displayed in the UI.
Array of product resource URIs representing the list of products
products that can be added to this set.
Amount of items to be selected from the available choices.
quantity Multiples of the same item are allowed.
id Set ID for internal reference.
Flag. If set to True, products selected in this set will be repriced to
is_combo_saving achieve the desired combo price.
Target URL https://example.revelup.com/weborders/product_sets/?product=39
Request body -
Request headers -
Example response
{
"status":"OK",
"data":[
{
"sort":1,
"name":"Drink",
"products":[...],
"quantity":2,
"id":3,
"is_combo_saving":false
},
{
"sort":2,
"name":"Meal",
"products":[...],
"quantity":1,
"id":4,
"is_combo_saving":true
}
]
}
Notes
Similar to the Product Upcharge resource, but applies to products with the "is_combo" flag set to True
instead.
Modifiers
Notes
This is already included in the Menu resource, but may be useful for a lightweight modifier price checking
tool.
Attributes
Notes
Very useful for finding all child products under a parent product.
Order Items
Notes
Invaluable resource for loading order data without using any API calls. Can be used to create a simple
re-order feature.
Locations
Notes
If error 403 is received when making requests to a particular location, this is a great resource for
checking whether the location has online ordering enabled.
API Version
Notes
-
Pre-Validate
Example response
{
"status":"OK",
"data":{
"final_total":333.3,
"items":[
{
"product":48,
"product_name_override":"Rare Steak",
"price":3.0,
"discounts":[
{
"taxed":true,
"sum":3.0,
"type":0,
"name":"Item Reward"
}
],
"is_combo":false,
"discount":{
"taxed":true,
"sum":3.0,
"type":0,
"name":"Item Reward"
}
},
{
"product":58,
"tax_amount":0.3,
"product_name_override":"Bugnet",
"price":0.0,
"discounts":[
{
"taxed":true,
"sum":5.0,
"type":0,
"name":"Item Reward"
}
],
"is_combo":false,
"tax_rate":10.0,
"discount":{
"taxed":true,
"sum":5.0,
"type":0,
"name":"Item Reward"
},
"modifieritems":[
{
"qty_type":0,
"product_id":58,
"modifier_cost":0,
"qty":1,
"modifier":9,
"modifier_price":8.0
}
]
},
{
"product":683,
"tax_amount":10.0,
"product_name_override":"Book of Combos - 1",
"price":100.0,
"discounts":[],
"is_combo":false,
"tax_rate":10.0
},
{
"product":243,
"tax_amount":20.0,
"product_name_override":"Survival Pack",
"price":200.0,
"discounts":[],
"is_combo":true,
"tax_rate":10.0,
"combo_items":[
{
"product_name_override":"Rare Fish",
"product":60,
"price":0.0,
"quantity":2
},
{
"product_name_override":"Potato Slices w/ Garlic Oil",
"product":82,
"price":48.0,
"quantity":3
}
]
}
],
"price_overrides":null,
"tax":30.30,
"discounts":8.0,
"discounts_list":[],
"subtotal":303.00,
"surcharge":0.0
}
}
Notes
Great replacement for /specialresources/cart/validate/, as it uses no API calls and serves the same
function.
Check Gift
Request headers -
Example response
{
"status":"OK"
}
Notes
Shipping Options
Example response
{
"status":"OK",
"data":[
{
"service_name":"FedEx Ground\u00ae",
"shipment_company":2,
"shipping_and_handling_charge":10.970999999999998,
"shipping_charge":9.54,
"service_code":"FEDEX_GROUND"
},
{
"service_name":"FedEx Express Saver\u00ae",
"shipment_company":2,
"shipping_and_handling_charge":21.804,
"shipping_charge":18.96,
"service_code":"FEDEX_EXPRESS_SAVER"
}
]
}
Notes
Can be used to check for possible shipping options when submitting shipping orders. Requires a UPS or
FedEx integration.
Shipping Taxes
Example response
{
"status":"OK",
"data":{
"items":[
{
"price":1,
"tax_amount":3.5,
"product":61,
"quantity":40
}
],
"tax":3.5
}
}
Notes
Requires an Avalara or TaxCloud integration.
Cart Totals
The ‘/weborders/cart_totals/’ endpoint functionality is identical to the Pre Validate resource. See that
section for definition.
Settings
This should be the first request that you issue to the Revel server. All settings are configurable in the
Revel backend application.
Endpoint Required parameters
system_settings/ establishment
Purpose
Lists the configuration for a specified location.
Fields
Field Meaning
recaptcha_site_key Key for reCaptcha integration
server_time Current server time in UNIX format
Flag. If set to True, customers will be asked to enter their details
enable_upfront before entering the online ordering page.
scales Scale configuration
Flag. If set to True, products that contain attributes will be
show_matrix_products displayed in the online ordering page.
First day of the week. Value ranges from 0-6 with Monday being
week_start 0 and Sunday being 6.
Estimated order preparation time in minutes. Arrival time
couldn’t be too close to store opening or closure time and it is
estimated_order_preparation_time validated taking in account this setting
Array containing a boolean value and two strings. First value
determines if the setting is used, the other two values display
editable_dining_options the current name of the two dining options that can be renamed.
brand_name Location brand.
day_start The beginning of the reporting day.
has_campaigns Flag. If set to True, the internal campaigns feature is active.
currency_name Currency alias
Flag. If set to True, items with the "is_cold" flag enabled will not
delivery_cold_untaxed be taxed on delivery orders.
about_access_to_location User defined instructions on how to find the location.
Flag. If set to True, special requests can be added to order
special_requests_online items.
min_items Minimum items per order
custom_menus List of CustomMenu resources where mode = 0.
auto_bag_charge Deprecated.
Flag. If set to True, items with inventory quantity less than or
cannot_order_with_empty_inventory equal to zero can not be sold.
estimated_delivery_time Estimated delivery time in minutes
JSON string allowing to configure additional input fields for the
other_dining_option_details Other dining option.
favicon_image Online ordering favicon image
Delivery area data in GeoJSON format. Empty means no
delivery_geojson restrictions.
Online customers may submit orders starting xx minutes after
online_order_start_time_offset the business opens
about_images Array of location images to be used in the online ordering page
about_description Location description to be used in the online ordering page
accept_online_orders_when_store_is_ Flag. If set to True, online orders can be placed while the store
closed is closed. Order pickup time must still be during open hours.
timetables Array containing location opening hours
allow_multiple_reward_redemptions_p Flag. If set to True, multiple discounts can be redeemed with a
er_order single rewards card.
delivery_for_online_orders Flag. If set to True, delivery orders can be placed online
Array of ZIP codes where delivery is allowed. Empty means no
delivery_post_code_lookup restrictions.
Business name. Will be displayed in the About section of the
about_title Revel Online Ordering page.
use_custom_menus Deprecated.
Flag. If set to True, orders can be sent under the Eat In dining
eat_in_for_online_orders option.
payment_processor Array of boolean values that lists valid methods of payment.
tax_country Tax calculation preset.
Flag. If set to True, product descriptions will not be shown in the
hide_products_description online ordering page
Flag. If set to True, product images will not be displayed in the
hide_images online ordering page
pre_tip_label Label for the pre-tip field for online orders
The About tab will display this Email contact to users of the
online applications. If this is left blank, no email contact will be
email displayed
api_version Weborder API version
prevailing_surcharge Automatic surcharge value (percentage).
Location service type. 0 - Restaurant, 1 - Quick Service, 2 -
type_of_service Retail.
distance_mearsure Unit of measure for delivery distance.
enable_split_modifiers_full_price_char Flag. If set to True, modifiers split in half will still charge full
ge price.
date_format Date format mask for the online ordering page.
layout_style Revel online ordering layout style. 0 - Standard, 1 - Retail.
Flag. If set to True, allows notes to be added to the order
order_notes_allow details.
brand Deprecated.
delivery_charges Array of service fees to be applied on delivery.
holidays Array of holidays when online ordering will not be available.
time_format Time format (12h/24h)
phone Location contact phone number.
online_orders Flag. If set to True, online orders are allowed.
default_country Default country code to be used delivery addresses.
logo_img Location logo to be used in the online ordering page.
address JSON object containing the location address.
business_name Location name
enable_marketing_opt_in_out Flag. If set to True, enables additional privacy features for users
Flag. If set to True, discount codes can be used to add
accept_discount_code discounts to the order
enable_split_modifiers Flag. If set to True, modifiers can be split into halves.
online_order_date_range Max date window for online ordering
Flag. If set to True, allows tips to be added to online order
accept_tips_online payments.
Flag. If set to True, ASAP can be used instead of a specific
enable_asap_due_time pickup time.
online_order_end_time_offset Online orders accepted until xx minutes before close
API key to be used for Google Maps authentication. Internal use
google_maps_api_key only.
suppress_student_identifier_popup Internal setting.
enable_reward_cards_collecting Flag. If set to True, allows the usage of reward cards.
online_order_time_slot Online order time slot interval
min_delivery_amount Minimum order total before delivery can be selected
time_zone Server timezone in pytz format
shipping Flag. If set to True, shipping orders can be placed online
color_scheme Revel online ordering page color scheme name.
fb_app_id Deprecated.
List of credit card provider icons to be displayed during
online_credit_card_types checkout.
currency_symbol Currency symbol.
promo_message Deprecated.
enable_quantity_modifiers Flag. If set to True, modifier quantities can be adjusted.
Flag. If set to True, modifier descriptions will be displayed in the
show_modifiers_description online ordering page.
Array of possible dining options. 0 - Takeout, 1 - Eat in, 2 -
dining_options Delivery, 3 - Catering, 4 - Drive Through, 6 - Other, 7 - Shipping.
time_zone_offset Time zone offset from UTC.
Example request
Target URL https://example.revelup.com/weborders/system_settings/?establ
ishment=1
Request body -
Request headers -
Example response
{
"status":"OK",
"data":{
"recaptcha_site_key":"",
"server_time":1568604511339,
"enable_upfront":false,
"scales":{...},
"show_matrix_products":false,
"week_start":"0",
"estimated_order_preparation_time":15,
"editable_dining_options":[...],
"brand_name":"LBMH",
"day_start":"05:00",
"has_campaigns":false,
"currency_name":"z",
"delivery_cold_untaxed":false,
"about_access_to_location":"",
"special_requests_online":true,
"min_items":0,
"custom_menus":[...],
"auto_bag_charge":0,
"cannot_order_with_empty_inventory":false,
"estimated_delivery_time":30,
"other_dining_option_details":null,
"favicon_image":"<REDACTED>",
"delivery_geojson":[...],
"online_order_start_time_offset":30,
"about_images":[...],
"about_description":"",
"accept_online_orders_when_store_is_closed":true,
"timetables":[...],
"allow_multiple_reward_redemptions_per_order":true,
"delivery_for_online_orders":true,
"delivery_post_code_lookup":[...],
"about_title":" ",
"use_custom_menus":true,
"eat_in_for_online_orders":true,
"payment_processor":{...},
"tax_country":"usa",
"hide_products_description":false,
"hide_images":false,
"pre_tip_label":"Online Tip",
"email":null,
"api_version":"2.17",
"prevailing_surcharge":0,
"type_of_service":2,
"distance_mearsure":"mi",
"enable_split_modifiers_full_price_charge":false,
"date_format":null,
"layout_style":0,
"order_notes_allow":true,
"brand":0,
"delivery_charges":[...],
"holidays":[...],
"time_format":"12 hour",
"phone":" ",
"online_orders":true,
"default_country":"LT",
"logo_img":"<REDACTED>",
"address":{...},
"max_delivery_distance":0,
"business_name":"Large Boar Meathouse",
"enable_marketing_opt_in_out":false,
"accept_discount_code":true,
"enable_split_modifiers":true,
"online_order_date_range":365,
"accept_tips_online":false,
"enable_asap_due_time":false,
"online_order_end_time_offset":30,
"google_maps_api_key":"<REDACTED>",
"suppress_student_identifier_popup":false,
"enable_reward_cards_collecting":true,
"online_order_time_slot":15,
"min_delivery_amount":0,
"time_zone":"Europe/Vilnius",
"shipping":true,
"color_scheme":"Blue & White",
"fb_app_id":"",
"online_credit_card_types":null,
"currency_symbol":"z",
"promo_message":null,
"enable_quantity_modifiers":null,
"show_modifiers_description":false,
"dining_options":[...],
"time_zone_offset":10800
}
}
Notes
Can be used to fetch opening hours, holidays and certain settings that impact the API ordering process.
Authentication
Before moving on to the next section, it is important to mention API authentication.
While endpoints in the /weborders/ namespace do not require any authentication methods, the
resources under the /specialresources/cart/ namespace do.
Unlike our regular API, the Weborder API does not allow authentication via URL parameters (i.e.
api_key & api_secret appended to the URL).
Instead, the API-AUTHENTICATION header is required. Here is how that looks like:
API-AUTHENTICATION: $API_KEY:$API_SECRET
When replacing the $API_KEY and $API_SECRET values with your own credentials, be mindful of
whitespace characters. Both “API-AUTHENTICATION” and “$API_KEY:$API_SECRET” are
uninterrupted strings with no whitespace characters.
Cart resources
Now, the other group of resources. This group is known as the “Cart resources” and it is focused
entirely on handling and submitting the cart you provide. Here is a list of endpoints part of this group:
Name Endpoint
Validate /specialresources/cart/validate/
Calculate /specialresources/cart/calculate/
Submit /specialresources/cart/submit/
NOTE: Both /validate/ and /calculate/ use near-identical functions and should be considered
functionally the same. There is no need to run the cart through both endpoints before
checkout.
Validate
Example response
{
"status":"OK",
"data":{
"final_total":333.3,
"items":[
{
"product":48,
"product_name_override":"Rare Steak",
"price":3.0,
"discounts":[
{
"taxed":true,
"sum":3.0,
"type":0,
"name":"Item Reward"
}
],
"is_combo":false,
"discount":{
"taxed":true,
"sum":3.0,
"type":0,
"name":"Item Reward"
}
},
{
"product":58,
"tax_amount":0.3,
"product_name_override":"Bugnet",
"price":0.0,
"discounts":[
{
"taxed":true,
"sum":5.0,
"type":0,
"name":"Item Reward"
}
],
"is_combo":false,
"tax_rate":10.0,
"discount":{
"taxed":true,
"sum":5.0,
"type":0,
"name":"Item Reward"
},
"modifieritems":[
{
"qty_type":0,
"product_id":58,
"modifier_cost":0,
"qty":1,
"modifier":9,
"modifier_price":8.0
}
]
},
{
"product":683,
"tax_amount":10.0,
"product_name_override":"Book of Combos - 1",
"price":100.0,
"discounts":[],
"is_combo":false,
"tax_rate":10.0
},
{
"product":243,
"tax_amount":20.0,
"product_name_override":"Survival Pack",
"price":200.0,
"discounts":[],
"is_combo":true,
"tax_rate":10.0,
"combo_items":[
{
"product_name_override":"Rare Fish",
"product":60,
"price":0.0,
"quantity":2
},
{
"product_name_override":"Potato Slices w/ Garlic Oil",
"product":82,
"price":48.0,
"quantity":3
}
]
}
],
"price_overrides":null,
"tax":30.30,
"discounts":8.0,
"discounts_list":[],
"subtotal":303.00,
"surcharge":0.0
}
}
Notes
This is essentially the same as /weborders/pre_validate/, though it requires authentication
Calculate
Submit
Example response
{
"status":"OK",
"orderId":45788,
"pickup_time":"11/11/2019 06:23",
"reward_points":0.0,
"balances":{ },
"customer":{
"phone":"4157441433",
"first_name":"Revel",
"last_name":"Test",
"email":"[email protected]"
},
"created_date":"11/11/2019 06:08",
"total":113.3,
"checkout":{
"notes":"Add utensils",
"dining_option":0,
"asap":true
}
}
Notes
-
Note that all fields that contain timestamps use the default server timezone.
To specify a custom timezone, the X-Use-TZ header should be used (e.g. X-Use-TZ: UTC).
Only valid timezones from the tz database are accepted.
403 (Forbidden) - Returned when accessing online ordering resources for a location that
does not have online ordering enabled.
404 (Not Found) - Returned when the specified URL could not be found. Typically involves a
malformed URL.
429 (Unknown Status Code) - Returned when the daily API request counter exceeds the
pre-set limit. All further API requests should be halted until the next day.
Below is a table of status codes thrown by the internal Weborder API validators, along with a verbose
description of what the error may be. Some codes will have additional notes added where the error
message may not be sufficient: