NAV
javascript

HotSchedules IoT Platform for Developers

Restaurant operators need access to data that helps them work more productively and efficiently. Your job is to deliver it. The HotSchedules IoT Platform for Developers can help you deliver work more productively and efficiently through a set of software modules that collect data from virtually any source in real-time and then deliver select data that is relevant, timely and actionable.

Whether you work for a restaurant, a software company or for yourself - wherever you are, whatever you do - IoT Platform gives you the power to innovate faster and cheaper than ever before.

Getting Started

This documentation is intended for the developer wanting to integrate into the HotSchedules IoT (Internet of Things) Platform by:

The IoT Platform calls accounts namespace. A namespace is your secured storage location of HotSchedules’ cloud solution for your business. Your namespace is uniquely named based on your organization name. When you sign up through the HotSchedules IoT Platform Developer Portal, you will be able to create both a namespace and users to access that namespace.

The HotSchedules IoT Platform Developer Portal has an easy sign up process to quickly get started developing your application for the IoT Platform. In just a few short clicks, your IoT platform application development can begin.

IoT Platform APIServer

Overview

The HotSchedules IoT Platform APIServer is a set of secure REST APIs that are used to store your data.

The foundation for this document is the Mongo DB reference located at http://docs.mongodb.org/manual/reference/operator/.

Users may be unfamiliar with the REST query syntax. Those familiar with SQL should note that the same types of SQL query operations are possible using the REST API. Users wishing to understand the mapping between SQL queries (SELECT statements) and the Query syntax - should refer to the following document: http://docs.mongodb.org/manual/reference/sql-comparison/.

Getting Started

To access the HotSchedules IoT Platform Cloud API, you need to login with you user and password which is provided by HotSchedules. The API docs are available at this location: https://api.bodhi.space/apidocs/index.html.

If you enter your credentials (username and password) and click Explore, you will see a list of APIs which you can access for your namespace. The Bodhi Cloud APIs are REST APIs which returns JSON for all responses.

Each API has examples and an opportunity to Try it out!. You can add data using our provided types or create your own type. NOTE: Should you create your own type, the new type will show up in the API Documentation for your namespace.

Logging In to APIDocs

Exploring the APIDocs

Once logged into the APIDocs you can both explore the provided types and their respective restful verbs: GET, PUT, DELETE, PATCH. The APIDocs are much more than API Documentation, it is a powerful interactive tool that allows the developer and/or administrator to create, update, delete data as well as manage the schema for their organization.

Getting started with the HotSchedules IoT Platform REST API

The HotSchedules IoT Platform (Bodhi) REST API allows you to query meta-data about your stores, labor, sales, and HotSchedules Agents running in your stores. You can also do some fancy things like get social information, upload files, send push notifications and emails, and even make payments.

Base URL

All URLs referenced in the documentation have the following base:

https://api.bodhi.space/<organization_name>

The Bodhi REST API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.

Authenticating to the API

HTTP requests to the REST API are protected with HTTP Basic and HTTP Cookie authentication. In short, you will use your HotSchedules IoT Platform account credentials (username and password) for HTTP Basic authentication. If you do not have credentials, you can signup at bodhi.space or directly here https://bodhi.space/signup/

Syntax: curl -ik -u username:password -X GET https://api.bodhi.space/me

For example: curl -ik -u platform:user -X GET https://api.bodhi.space/me

Your results will look like this:
HTTP/1.1 200 OK
Server: nginx/1.8.0
Date: Sat, 21 May 2016 15:22:26 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 456
Connection: keep-alive
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers:
Access-Control-Allow-Methods: *
Access-Control-Allow-Origin: Access-Control-Expose-Headers: WWW-Authenticate, Server-Authorization, Location
Request-Time: 383
Set-Cookie: RUSK=“8a6f98bb1033055fc04d644c0006789335f96c2b-username=platform”; Path=/; Domain=.bodhi.space; Secure; HTTPOnly

{"lastName":"User","sys_created_at":"2016-05-21T15:22:11.157Z","authorizations":[{"namespace":"bodhi-social","read":true}],"profiles":["bodhi-social.user"],"usertype":"person","firstName":"Platform","sys_id":"57407d23b3b82c51e5cb3afb","password":"$2a$12$C/ZJYSZ4qkR5pU5yHQEkLuvcOVjP4rqLdOHlPq4zcDZt9dcYpBeMC","sys_version":1,"email":"customercare@hotschedules.com","username":"platform","sys_type_version":12}

Next, read the Set-Cookie header to get your cookie string:
RUSK="8a6f98bb1033055fc04d644c0006789335f96c2b-username=platform" in the example

Now use the cookie auth to authenticate to the API
curl -ik --cookie "RUSK=8a6f98bb1033055fc04d644c0006789335f96c2b-username=platform" -X GET https://api.bodhi.space/me

Cookie authorization does not expire and can be used to authenticate moving forward.

Once your Organization is setup in the platform (you can signup for free at https://developer.bodhi.space) you can access your data at https://api.bodhi.space/ .

So for example, if your organization name is my-deli, your URL would be https://api.bodhi.space/my-deli

Now that you’ve authenticated to the API, it’s time to look at some data.

Making a call

The HotSchedules REST API supports all the standard REST verbs
GET
POST
PUT
PATCH
DELETE

You can access these verbs for each of the types in the HotSchedules system. When an organization is created in the HotSchedules Platform, the organization automatically gets 32 ‘types’ that will store standard information and data about your organization. Those 'types’ can be viewed and reviewed at https://api.bodhi.space/apidocs/index.html

GET

As an example, let’s do a GET on a store via CURL curl -ik --cookie "RUSK=8a6f98bb1033055fc04d644c0006789335f96c2b-username=platform" -X GET https://api.bodhi.space/bodhi-social/resources/Store

This call will return the information about a store that’s been created for the bodhi-social organization

[{"sys_version":1,"image_url":"https://upload.wikimedia.org/wikipedia/commons/5/54/Golden_Gate_Bridge_0002.jpg","sys_type_version":12,"address":{"street_address":"555 Mission","extended_address":"","locality":"San Francisco","region":"CA","postal_code":"94111","country":"US"},"store_hours":[{"days":[7,1],"start":"0500","end":"0000"},{"days":[1,2],"start":"1200","end":"0200"},{"days":[2,3],"start":"1200","end":"0200"},{"days":[3,4],"start":"1200","end":"0200"},{"days":[4,5],"start":"1200","end":"0200"},{"days":[5,6],"start":"1200","end":"0200"},{"days":[6,7],"start":"0500","end":"0000"}],"sys_created_by":"admin__bodhi-social","sys_created_at":"2016-05-21T15:37:15.560Z","name":"platformstore","store_number":"1","display_name":"Platform Store","sys_id":"574080abb9a19e2dadee775b"}]

You can also get the JSON payload by navigating directly to this URL https://api.bodhi.space/bodhi-social/resources/Store

You can create your own store for your organization either by executing a POST command (see below) to https://api.bodhi.space/<organization_name>/resources/Store or using our free store manager tool at https://bodhi.space/store-manager . Either way, a store is a critical anchor for information in the Platform.

Next let’s look up a sale for our store in bodhi-social

curl -ik --cookie "RUSK=8a6f98bb1033055fc04d644c0006789335f96c2b-username=platform" -X GET https://api.bodhi.space/bodhi-social/resources/SalesTransaction

RESULT:

[{"order_number":10184,"item_count":1,"store_id":"574080abb9a19e2dadee775b","employee":{"id":"5151","name":"Ted Morrison"},"business_day":"2016-05-20","revenue_center":{"id":"2","name":"Restaraunt"},"type":{"id":"4","name":"1"},"timestamp":"2016-05-21T03:34:00.000Z","transaction_id":"557605fc4c32e071180a46042016-05-2010184","net_total":{"value":325,"code":"USD","scale":2},"discount_total":{"value":0,"code":"USD","scale":2},"tax_total":{"value":23,"code":"USD","scale":2},"gross_total":{"value":348,"code":"USD","scale":2},"tender_total":{"value":348,"code":"USD","scale":2},"order_opened_at":"2016-05-21T03:33:00.000Z","order_closed_at":"2016-05-21T03:34:00.000Z","guest_count":1,"sys_version":1,"sys_created_at":"2016-05-21T16:02:30.800Z","sys_created_by":"admin__bodhi-social","sys_type_version":12,"sys_id":"574086965eacd06aa3db036b"}]

We can also look up our Store using query parameters in our URL

curl --cookie "RUSK=8a6f98bb1033055fc04d644c0006789335f96c2b-username=platform" 'https://api.bodhi.space.io/bodhi-social/resources/SalesTransaction?where=%7Bbusiness_day:"2016-05-20"%7D&fields=business_day'

OR alternatively:

curl -g --cookie "RUSK=8a6f98bb1033055fc04d644c0006789335f96c2b-username=platform" 'https://api.bodhi.space/bodhi-social/resources/SalesTransaction?where={business_day:"2016-05-20"}&fields=business_day'

RESULT:
[{"order_number":10184,"item_count":1,"store_id":"574080abb9a19e2dadee775b","employee":{"id":"5151","name":"Ted Morrison"},"business_day":"2016-05-20","revenue_center":{"id":"2","name":"Restaraunt"},"type":{"id":"4","name":"1"},"timestamp":"2016-05-21T03:34:00.000Z","transaction_id":"557605fc4c32e071180a46042016-05-2010184","net_total":{"value":325,"code":"USD","scale":2},"discount_total":{"value":0,"code":"USD","scale":2},"tax_total":{"value":23,"code":"USD","scale":2},"gross_total":{"value":348,"code":"USD","scale":2},"tender_total":{"value":348,"code":"USD","scale":2},"order_opened_at":"2016-05-21T03:33:00.000Z","order_closed_at":"2016-05-21T03:34:00.000Z","guest_count":1,"sys_version":1,"sys_created_at":"2016-05-21T16:02:30.800Z","sys_created_by":"admin__bodhi-social","sys_type_version":12,"sys_id":"574086965eacd06aa3db036b"}]

So https://api.bodhi.space/bodhi-social/resources/SalesTransaction?where={%27business_day%27:%272016-05-20%27} would return all SalesTransaction’s for the business day of 2016-05-20. The URL https://api.bodhi.space/bodhi-social/resources/SalesTransaction?where={%27store_id%27:%27574080abb9a19e2dadee775b%27} would return all SalesTransaction’s for the store 574080abb9a19e2dadee775b (our Platform test store).

All Types can be queried by any parameter within the type using a ?where={} clause. It’s EXTREMELY important for efficiency and performance to query using indexes on your types. You can review the Types for your organization as well as the Indexes and Parameters by using our free Type Tool located at https://tools.bodhi.space/types or by inspecting https://api.bodhi.space/<organization_name>/resources/BodhiType

POST

To POST to a type you need to add the the header: 'Content-Type: application/json’ to your cURL Command

curl -ik -H 'Content-Type: application/json' --cookie "RUSK=8a6f98bb1033055fc04d644c0006789335f96c2b-username=foo" -X POST -d '{ "store_id": "l8zeL", "business_day": "2016-05-13", "timestamp": "2016-05-12T05:58:31.296Z", "transaction_id": "FGHG012", "tender_total": { "code": "USD", "scale": 2, "value": 620 } }' https://api.bodhi.space/<organization_name>/resources/SalesTransaction

That command will post the json object to the SalesTransaction type. You can now GET on this type either using cURL or the free query tools available at https://tools.bodhi.space/query

Bulk Post

All bulk operations are accessible through https://api.bodhi.space
The size limitation for the body is 17MB

Syntax:

POST /<organization_name>/bulk with json body
{ "config": { "op": "insert" or "update" or "upsert" or "invite", * see below "report": true, <- optional, need a report? (default false) "target": "target_name” <- the name of the type (not for invite) }, "payload": [{ "the_field": "my first thing to insert or upsert or invite", "other_field": "the_other_field" }, { "the_field": "my second thing to insert or upsert", "other_field": "the_other_field2" }] }

The payload varies depending on the type of operation and Returns 202 with header bulk_id:<the bulk id>

The result of a report, if requested, is accessible as soon as the processing is done on:

GET /<organization_name>/bulk/<bulk_id>

RESPONSE:
returns 200 with a json array body where the order of the cells matches the order of the payload. The report can be accessed only once.
returns 204 if the report is not ready yet
returns 404 if no report was found with that id

Example:

{ "config": { "op": "insert", "report": true, "target": "BulkTest" }, "payload": [{ "name": "leo", "other_field": "mauris non" }, { "name": "orci", "other_field": "sit amet justo" }, { "name": "nulla", "other_field": "pulvinar sed nisl nunc rhoncus" }, { "name": "nulla", "other_field": "diam cras" }, { "name": "est", "other_field": "dui nec nisi volutpat" }, { "name": "lorem", "other_field": "cursus id" }, { "name": "molestie", "other_field": "potenti nullam porttitor lacus at" }, { "name": "sapien", "other_field": "ultrices aliquet maecenas leo" }, { "name": "nibh", "other_field": "consectetuer eget rutrum at" }, { "name": "luctus", "other_field": "nisl nunc" }] }

PUT

The HTTP verb PUT can be used on any type as long as there’s a unique index on the field or fields. You can always PUT on sys_id

As an example, in the above SalesTransaction example, the sys_id is 574086965eacd06aa3db036b, a PUT to the SalesTransaction based on sys_id would be as follows:

curl -ik -H 'Content-Type: application/json' --cookie "RUSK=8a6f98bb1033055fc04d644c0006789335f96c2b-username=foo" -X PUT -d '{ "store_id": "l8zeL", "business_day": "2016-05-13", "timestamp": "2016-05-12T05:58:31.296Z", "transaction_id": "FGHG012", "tender_total": { "code": "USD", "scale": 2, "value": 620 } }' https://api.bodhi.space/tutorial/resources/SalesTransaction/574086965eacd06aa3db036b

PUT Upsert

Upsert is a safe way to replace an existing record, or POST a record if the entry does not currently exist.

You can upsert by appending your URL with ?upsert=true

As an example, the above PUT example can be changed to a replace by appending the ?upsert=true to the cURL command:

curl -ik -H 'Content-Type: application/json' --cookie "RUSK=8a6f98bb1033055fc04d644c0006789335f96c2b-username=foo" -X PUT -d '{ "store_id": "l8zeL", "business_day": "2016-05-13", "timestamp": "2016-05-12T05:58:31.296Z", "transaction_id": "FGHG012", "tender_total": { "code": "USD", "scale": 2, "value": 620 } }' https://api.bodhi.space/tutorial/resources/SalesTransaction/574086965eacd06aa3db036b?upsert=true

PATCH

the HTTP verb PATCH will allow you to alter single parameters or fields within a record in your type. Patch commands follow the following sytax: [ { “op”: “replace”, “path”: “/baz”, “value”: “boo” }, { “op”: “add”, “path”: “/hello”, “value”: [“world”] }, { “op”: “remove”, “path”: “/foo”} ]

The HTTP verb PATCH can be used on any type as long as there’s a unique index on the field or fields. You can always PATCH on sys_id

DELETE

the HTTP verb DELETE will allow you to remove a record in your type. DELETE commands follow the following sytax:

To delete multiple records, include a ?where={} in your URL to narrow or expand then number of records removed.

File Upload

The Platform BodhiFileUpload endpoints are special types that allow a user to upload and download any file (like a dbf file from your store’s POS).

Metadata of your file is posted to type BodhiFileUpload on successful upload

BodhiFileUpload example record:
{ "namespace": "bodhi", "original_name": "profile_pic5.jpg", "sys_version": 1, "location": "bodhi/profile_pic5.jpg", "uploaded_at": "2015-09-10T19:42:48+0000", "sys_created_by": "admin__bodhi", "sys_created_at": "2015-09-10T19:42:49+0000", "name": "profile_pic5.jpg", "media_type": "image/jpeg", "sys_id": "55f1dd39b9b5904f64c8212f" }

Examples:
The following are curl examples of how to specify file location in your upload/download/delete commands. Everything after “upload/” or “download/” in the url is used as the destination. Note that filename is always specified in the url.

curl -X POST -u <username>:<password> https://api.bodhi.space/<organization_name>/controllers/vertx/upload/recipes/food/BurritoRecipe.txt -F "upload1=@THE_FILE"

curl -X PUT -u <username>:<password> https://api.bodhi.space/<organization_name>/controllers/vertx/upload/recipes/food/BurritoRecipe.txt -F "upload1=@THE_FILE"

Download by path:
curl -X GET -u <username>:<password> https://api.bodhi.space/<organization_name>/controllers/vertx/download/recipes/food/BurritoRecipe.txt

Download by sys_id:
curl -X GET -u <username>:<password> https://api.bodhi.space/<organization_name>/controllers/vertx/download/56f9c2b4fa92ec27934a76ae

Delete a file:
curl -X DELETE -u <username>:<password> https://api.bodhi.space/<organization_name>/controllers/vertx/upload/recipes/food/BurritoRecipe.txt

Working with Labor data

Storing and accessing labor data is a critical function of the HotSchedule IoT Platform. To access your labor data, you will use the following types:

Steps to create new data:

  1. Create a Store
  2. Create a StoreJob
  3. Create a Employee
  4. Create EmployeePosition using the Employee, Store, and StoreJob data
    • Patch Store.employee_ids with the new employee’s sys_id
    • Patch Employee.positions with the new EmployeePosition
  5. Create Timecard using EmployeePosition data

How does the data map together?

EmployeePosition is a reference table for looking up stores, employees, jobs, and pay rates. Ideally, this should be the first place you look for information when querying labor data.

A Store has many employees (Array of sys_ids) – Store.employee_ids maps to each Employee.sys_id

– Example Query: Return all stores that the specified employee is associated with
https://api.bodhi.space/<organization_name>/Store?where={'employee_ids':'<EMPLOYEE_ID>'}

A Store has many jobs – Store.sys_id maps to StoreJob.store_id

– Example Query: Return all jobs at a specified store
https://api.bodhi.space/<organization_name>/StoreJob?where={'store_id':'<STORE_ID>'}

An Employee has many positions (Array of EmployeePosition)

Example Queries:

Return all positions for a specified employee across all stores
https://api.bodhi.space/<organization_name>/EmployeePosition?where={'employee_id':'<EMPLOYEE_ID>'}

https://api.bodhi.space/<organization_name>/EmployeePosition?where={'employee_reference.name':'<EMPLOYEE_NAME>'}

https://api.bodhi.space/<organization_name>/EmployeePosition?where={'employee_reference.id':'<EMPLOYEE_EXTERNAL_ID>'}

Return all positions at a specified store across all employees and jobs.
(NOTE: May include duplicates if employees have multiple positions at the same store)
https://api.bodhi.space/<organization_name>/EmployeePosition?where={'store_id':'<STORE_ID>'}

https://api.bodhi.space/<organization_name>/EmployeePosition?where={'store_reference.name':'<STORE_NAME>'}

https://api.bodhi.space/<organization_name>/EmployeePosition?where={'store_reference.id':'<STORE_NUMBER>'}

Return all employees with a specified job across all stores https://api.bodhi.space/<organization_name>/EmployeePosition?where={'job_id':'<JOB_ID>'}

https://api.bodhi.space/<organization_name>/EmployeePosition?where={'job_reference.name':'<JOB_NAME>'}

https://api.bodhi.space/<organization_name>/EmployeePosition?where={'job_reference.id':'<JOB_EXTERNAL_ID>'}

An Employee has many Stores through EmployeePosition

– Example Query: Return an array of Store.sys_id that the employee works at https://api.bodhi.space/<organization_name>/EmployeePosition?where={'employee_id':'<EMPLOYEE_ID>'}&fields=store_id

An Employee has many StoreJobs through EmployeePosition

– Example Query: Return an array of StoreJob.sys_id for the specified employee
https://api.bodhi.space/<organization_name>/EmployeePosition?where={'employee_id':'<EMPLOYEE_ID>'}&fields=job_id

(Same as the two previous examples)

An Employee has many Timecards * Employee.sys_id maps to Timecard.employee_id * Employee.external_ids maps to Timecard.employee_reference.id * Employee.name.family_name maps to Timecard.employee_reference.name

– Example Query: Return all timecards for a specified employee
https://api.bodhi.space/<organization_name>/Timecard?where={'employee_id': '<EMPLOYEE_ID>'}

A Store has many Timecards

– Example Query:Return all timecards for all employees at a specified store
https://api.bodhi.space/<organization_name>/Timecard?where={'store_id': '<STORE_ID>'}

A StoreJob has many Timecards

– Example Query:Return all timecards for all employees with the specified job across all stores
https://api.bodhi.space/<organization_name>/Timecard?where={'job_id': '<JOB_ID>'}

– Example Query:Return all timecards for all employees with the specified job at a specified store
https://api.bodhi.space/<organization_name>/Timecard?where={'job_id': '<JOB_ID>', 'store_id': '<STORE_ID>'}

Employee payment rates: Base payment rates for a position are defined in the StoreJob type. When an EmployeePosition is created, the regular, overtime, and double time rates are copied from the StoreJob and adjusted for that employee. This allows for multiple employees to have the same job, but different payment rates.

Working with Sales data

Storing and accessing Sales data is a critical function of the HotSchedule IoT Platform. To access your sales data, you will use the following types:

Steps to create new data:

  1. Create a Store
  2. Create a SalesTransaction
  3. Create a SalesItem

How does the data map together?

SalesTransaction is a reference table for looking up items sold and the meta data about those items as they refer to a specific order on a specific business day. Ideally, this should be the first place you look for information when querying Sales data.

A Store has many SalesTransactions
– SalesTransaction.store_id maps to Store.sys_id

– Example Query: Return all SalesTransactions for a store
https://api.bodhi.space/<organization_name>/SalesTransaction?where={'store_id':'<store.sys_id>'}

– Example Query: Return all the sums of all SalesTransactions for per store for a day https://api.bodhi.space/<organization_name>/resources/SalesTransaction/aggregate?pipeline=[ { $match:{'business_day':'2016-06-24'} }, { $group: { _id: '$store_id', total: { $sum: '$net_total.value' } } } ]

A Store has many SalesItem
– SalesItem.store_id maps to Store.sys_id

– Example Query: Return all SalesItem for a store
https://api.bodhi.space/<organization_name>/SalesItem?where={'store_id':'<store.sys_id>'}

A Store has many entries in SalesCategory
– SalesCategory.store_id maps to Store.sys_id

– Example Query: Return all SalesCategories for a store
https://api.bodhi.space/<organization_name>/SalesCategory?where={'store_id':'<store.sys_id>'}

A Store has many RevenueCenters
– RevenueCenter.store_id maps to Store.sys_id

– Example Query: Return all RevenueCenters for a store
https://api.bodhi.space/<organization_name>/RevenueCenter?where={'store_id':'<store.sys_id>'}

A SalesTransaction has many SalesItems
– SalesTransaction.transaction_id maps to SalesItem.transaction_id

– Example Query: Return all SalesItems for a SalesTransaction
https://api.bodhi.space/<organization_name>/SalesTransaction?where={'transaction_id':'<SalesTransaction.transaction_id>'}

A SalesTransaction has a RevenueCenter
– SalesTransaction.revenue_center.id maps to RevenueCenter.instore_id
– SalesTransaction.revenue_center.name maps to RevenueCenter.display_name

– Example Query: Return all SalesTransactions for a RevenueCenter https://api.bodhi.space/<organization_name>/SalesTransaction?where={'revenue_center.id':'<RevenueCenter.instore_id>'}

A SalesTransaction has an Employee
– SalesTransaction.employee.id maps to Employee.external_ids.key
– SalesTransaction.employee.name maps to Employee.name.formatted_name

– Example Query: Return all SalesTransaction for an Employee https://api.bodhi.space/<organization_name>/SalesItems?where={'employee.id':'<Employee.external_ids.key>'}

A SalesTransaction AND SalesItem have a day of business
– Example Query: Return all SalesTransactions for business day 05/21/2016 https://api.bodhi.space/<organization_name>/SalesTransaction?where={'business_day':'2016-05-21'}

– Example Query: Return all SalesItems for business day 05/21/2016 https://api.bodhi.space/<organization_name>/SalesItems?where={'business_day':'2016-05-21'}

A SalesItem has a SalesCategory
– SalesItem.sales_category.id maps to SalesCategory.instore_id
– SalesItem.sales_category.name maps to SalesCategory.display_name

– Example Query: Return all SalesItems for a SalesCategory https://api.bodhi.space/<organization_name>/SalesItems?where={'sales_category.id':'<SalesCategory.instore_id>'}

Working with HotSchedules data

The HotSchedules REST API provides a user-friendly way to obtain HS Data.

Please ensure that API access has been enabled for your HotSchedules account. Contact customer service 1-866-753-3853 for access or questions.

The url path can look like any of the following, depending on which type is being queried:
../hotschedules/<concept_id>/<store_id>/<type_method>?
../hotschedules/<concept_id>/<type_method>?
../hotschedules/<type_method>?

Note: Results are currently cached with a TTL of 60 minutes.

getConcepts

This method returns a list of concepts for a company.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/getConcepts"

Sample JSON response:

  [
    {
      name: "HotSchedules",
      extId: 13
    }
  ]
Key Type Description
name String Concept Name
extId Number Concept external ID

getDriversByInterval

This method will take a concept ID, store number, start and end dates, volume type, and data type and return a list of total driver amount for each interval in the date range requested for that concept, store and labor type.

Intervals are configured during initial setup for the customer and are typically 30 minutes or 15 minutes.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept
startDate hsSimpleDate Start date for the range of data requested
endDate hsSimpleDate End date for the range of data requested
volumeType driverClass Classification of driver requested. Allowed types would be all of the classifications supported from API, HSC, or FTP integration. “Guests”, “Tables”, “Entrees”, “Deliveries”, “Transactions” and “Products”
dataType driverType Type of driver requested. Allowed types are “ACTUAL”, “ADJ_FORECASTED”, and “PRE_ADJ_FORECASTED”

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getDriversByInterval?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016&volume_type=TABLE&data_type=ACTUAL"

Sample JSON response:

  [
    {
      driverAmount: 0,
      driverClass: "TABLE",
      intervalStartTime: {
        hours: 0,
        seconds: 0,
        militaryTime: true,
        minutes: 0
      },
      intervalEndDate: {
        month: 4,
        year: 2016,
        day: 30
      },
      intervalEndTime: {
        hours: 0,
        seconds: 0,
        militaryTime: true,
        minutes: 15
      },
      conceptExtRef: 1,
      storeExtRef: 3,
      companyExtRef: 234542,
      driverType: "ACTUAL",
      intervalStartDate: {
        month: 4,
        year: 2016,
        day: 30
      }
    }
  ]
Key Type Description
driverAmount Number Quantity of driver for interval expressed in the record
driverClass String Description of driver type supplied for the interval expressed in the record
intervalStartTime Object The hour, minutes, and seconds corresponding to the start of the interval expressed in the record. Interval times are local to the store’s time zone
intervalEndTime Object The hour, minutes, and seconds corresponding to the end of the interval expressed in the record. Interval times are local to the store’s time zone
intervalStartDate Object The date corresponding to the start of the interval expressed in the record
intervalEndDate Object The date corresponding to the end of the interval expressed in the record
conceptExtRef Number The concept ID configured by HotSchedules for the concept of the store owning the data of the record., contact HotSchedules if Concept IDs need to be defined or configured
storeExtRef Number The store ID configured within HotSchedules for the store owning the data of the record., contact HotSchedules if Store IDs need to be defined or configured
companyExtRef Number The company ID defined by HotSchedules for the store owning the data of the record., contact HotSchedules if the Company ID needs to be defined. This ID cannot be customized or configured
driverType String Type of driver requested. Allowed types are: “ACTUAL” - Corresponds to the actual values produced by the store. “ADJ_FORECASTED”- Corresponds to the final forecasted driver amount that the schedules were based off from for the driver. “PRE_ADJ_FORECASTED”- Corresponds to the original forecasted driver amount previous to any forecast adjustments

getEmpAvailability

This method takes in a concept ID and a store ID and returns an array of wsEmpAvailability objects. It is meant to get a list of all employee availability for that store.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept
active_only Boolean Boolean that defines whether or not to include terminated employees in response

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getEmpAvailability?active_only=true"

Sample JSON response:

[
  {
    empNum: 2013,
    availabilities: [
      {
        parHoursMax: -1,
        parShiftsMax: -1,
        shiftId: 781691610,
        shiftName: "PM",
        parHoursMin: -1,
        parShiftsMin: -1,
        dayName: "Friday",
        partialBeforeAfter: "",
        statusName: "Not Available",
        dayNum: 6,
        partialTime: "",
        statusNum: 3
      }
    ],
    empHrId: -1
  }
]
Key Type Description
empNum Number Employee POS ID
availabilities Array Returns an array of availability for an employee
empHrId Number Employee HR ID

getEmpInfo

This method takes in a concept ID and a store ID and returns an array of wsEmpInfo objects. It is meant to get a list of all employees for that store.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
active_only Boolean Boolean that defines whether or not to include terminated employees in response.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getEmpInfo?active_only=true"

Sample JSON response:

  [
    {
      lastUpdated: "2015-07-10T17:32:55.753-05:00",
      accountCreated: "2012-12-28T13:31:25.913-06:00",
      permissionSetName: "Employee",
      empNum: 2001,
      assignedSchedules: [
        {
          hsId: 781691496,
          name: "Bartender",
          extId: 0
        },
        {
          hsId: 781691492,
          name: "Server",
          extId: 0
        }
      ],
      empHrId: -1
    }
  ]
Key Type Description
lastUpdated String Last time the employee record was updated
accountCreated String Date/time the account was created
permissionSetName String Permission set name assigned to the employee
empNum Number Employee POS ID
assignedSchedules Array The schedule in which the employee is assigned. Array contains extId, hsId and name
empHrId Number Employees HR ID

getEmpJobs

This method takes in a concept ID and a store ID and returns an array of wsEmpJob objects. It is meant to get a list of all jobs assigned to all employees for that store.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>getEmpJobs?active_only=true"

Sample JSON response:

[ 
  {
    hsJobId: 11878523,
    clientId: 14935376,
    regWage: 1,
    posEmpId: 2069,
    hsEmpId: 4177214,
    storeNum: 3,
    ovtWage: 1.5,
    posJobId: 18,
    primary: true
  }
]
Key Type Description
hsJobId Number HotSchedules internal job code ID
clientId Number Unique identifier for client provided via HotSchedules
regWage Number Regular hourly wage rate for employee
posEmpId Number POS numeric ID for employee
hsEmpId Number HotSchedules internal employee account ID
storeNum Number Unique numeric store ID within HotSchedules, generally set up to mirror the client internal store IDs
ovtWage Number Overtime hourly wage rate for employee
posJobId Number POS numeric ID for the job code
primary Boolean Boolean flag to designate if the job code is the primary job for the employee

getGroups

This method takes in a concept ID and returns group information for the concept.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/getGroups"

Sample JSON response:

  [
    {
      name: "HotSchedules",
      extId: 0,
      conceptExtId: 1
    }
  ]
Key Type Description
name String Group name
extId Number Group external ID
conceptExtId Number Concept external ID

getGuestCounts

This method will take a concept ID, store number, start and end dates and return a list of guest counts for the date range requested.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
start dateTime Start date for the range of data requested. This is a basic dateTime object.
end dateTime End date for the range of data requested. This is a basic dateTime object.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getGuestCounts?start_date=2016-04-30T00:00:00&end_date=2016-05-03T00:00:00"

Sample JSON response:

  [
    {
      dateTime: "2016-04-30T11:00:00-05:00",
      businessDate: "2016-04-30T00:00:00-05:00",
      rvcExtId: 1,
      guestCount: 2
    }
  ]
Key Type Description
dateTime String Date time of the transaction
businessDate String Business date of transaction
rvcExtId Number Represents the numeric revenue center ID associated with the guest
guestCount Number Number of guests for the transaction

getLaborByBusDay

This method will take a concept ID, store number, start and end dates and a labor type and return a list of total labor by job code for each interval in the date range requested for that concept, store and labor type.

Intervals are configured during initial setup for the customer and are typically 30 minutes.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept
start hsSimpleDate Start date for the range of data requested
end hsSimpleDate End date for the range of data requested
laborType laborType Type of labor requested. Allowed types are “optimal”, “forecasted” and “scheduled”.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getLaborByBusDay?start_day=30&start_month=1&start_year=2016&end_day=5&end_month=5&end_year=2016&labor_type=optimal"

Sample JSON response:

[
  {
    "interval": {
      "intervalDate": {
        "day": "1",
        "month": "2",
        "year": "2016"
      },
      "intervalTime": {
        "hours": "0",
        "militaryTime": "true",
        "minutes": "0",
        "seconds": "0"
      },
      "laborType": "forecasted",
      "volume": "0.0"
    }
  }
]  
Key Type Description
intervalDate Object Date expressed in the record
intervalTime Object The hour, minutes, and seconds expressed in record
laborType String Type of labor requested. Allowed types are “optimal”, “forecasted” and “scheduled”.
volume String Number of employees based on demand at that interval

getLaborByJobAndInterval

This method will take a concept ID, store number, start and end dates and a labor type and return a list of total labor by job code for each interval in the date range requested for that concept, store and labor type.

Intervals are configured during initial setup for the customer and are typically 30 minutes.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
start hsSimpleDate Start date for the range of data requested
end hsSimpleDate End date for the range of data requested
laborType laborType Type of labor requested. Allowed types are “optimal”, “forecasted” and “scheduled”.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getLaborByJobAndInterval?start_day=30&start_month=1&start_year=2016&end_day=5&end_month=5&end_year=2016&labor_type=optimal"

Sample JSON response:

[
  {
    "interval": {
      "intervalDate": {
        "day": "1",
        "month": "2",
        "year": "2016"
      },
      "intervalTime": {
        "hours": "12",
        "militaryTime": "true",
        "minutes": "0",
        "seconds": "0"
      },
      "laborType": "scheduled",
      "volume": "0.0"
    }
  }
]
Key Type Description
intervalDate Object Date expressed in the record
intervalTime Object The hour, minutes, and seconds expressed in record
laborType String Type of labor requested. Allowed types are “optimal”, “forecasted” and “scheduled”.
volume String Number of employees based on demand at that interval

getProjectedSalesV3

This method will take a concept ID, store number, start and end dates. This method uses hsSimpleDate objects for dates and hsSimpleTime objects for times.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
start hsSimpleDate First day of projected sales requested. This is an hsSimpleDate object.
end hsSimpleDate Last day of projected sales requested. This is an hsSimpleDate object.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getProjectedSalesV3?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016"

Sample JSON response:

  [
    {
      businessDate: {
        month: 4,
        year: 2016,
        day: 30
      },
      dayPartTotals: [
        {
          summaryItemTotals: {
            summaryItemTotal: 5246.26,
            summaryItemName: "Take out Drive through"
          },
          dayPartEndTime: {
            hours: 4,
            seconds: 0,
            amPm: "",
            militaryTime: true,
            minutes: 0
          },
          dayPartName: "Evening",
          dayPartTotal: 5246.26,
          dayPartStartTime: {
            hours: 18,
            seconds: 0,
            amPm: "",
            militaryTime: true,
            minutes: 0
          }
        }
      ],
      dateTotal: 9934.779
    }
  ]
Key Type Description
businessDate Object Business Date information, Day, Months and Year
dayPartTotals Array Array of the day part total. Start Time and End Time
dateTotal Number Total projected sales for the day part

getRCVs

Revenue center information defined for a group.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getRCVs"

Sample JSON response:

  [
    {
      revenueCenterName: "Take Out",
      extId: 0,
      groupLevel: true
    },
    {
      revenueCenterName: "Drive Thru",
      extId: 1,
      groupLevel: true
    },
    {
      revenueCenterName: "Beverage",
      extId: 2,
      groupLevel: true
    }
  ]
Key Type Description
revenueCenterName String Revenue center name
extId Number Revenue center ID
groupLevel Boolean Indicates if the revenue center was created at a group level

getSalesCats

This method takes in a concept ID and a store ID and returns an array of sales categories for that store. Sales categories will typically establish what kind of item was sold: Food, Beverage, Alcohol, Merchandise.Sales categories can be local to a particular store, or defined in HotSchedules as belonging to an entire group (called group-level sales categories).

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getSalesCats"

Sample JSON response:

  [
    {
      salesCategoryName: "Beverages",
      extId: 1,
      groupLevel: true
    }
  ]
Key Type Description
salesCategoryName String Name of the sales category
extId Number External ID associated with the category
groupLevel Boolean Indicates if the revenue center was created at a group level

getScheduleV3

This method takes in a concept ID, store ID, start and end dates. It returns an array of WSScheduleItem3 objects, which represent one scheduled shift each, for import into the POS. This method returns the same data as getSchedule, plus extended scheduled shift data, including location ID, regular pay rate, OT pay rate, scheduled regular minutes, scheduled OT minutes (if any), scheduled special pay (if any) and the unique schedule ID, internal to HS.This method uses hsSimpleDate objects for dates.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
start hsSimpleDate First day of scheduled shifts you are requesting. This method uses hsSimpleDate objects for dates.
end hsSimpleDate Last day of scheduled shifts you are requesting. This method uses hsSimpleDate objects for dates.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getScheduleV3?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016"

Sample JSON response:

  [
    {
    "outDate": {  
      "month": 5,  
      "year": 2016,  
      "day": 2  
    },  
    "jobHsId": 1111111,  
    "payRate": 1,  
    "inDate": {  
      "month": 5,  
      "year": 2016,  
      "day": 2  
    },  
    "specialPay": 0,  
    "empHSId": 222222,  
    "ovtMinutes": 0,  
    "inTime": {  
      "hours": 9,  
      "seconds": 0,  
      "militaryTime": true,  
      "minutes": 0  
    }  
  ]
Key Type Description
outDate Object Schedules out date
jobHsId Number HotSchedules internal job code ID
payRate Number Regular hourly pay rate for employee
inDate Object Scheduled in date
specialPay Number Special Pay amounts
empHsId Number HotSchedules internal employee account ID
ovtMinutes Number Total Overtime Minutes for employee
inTime Object Scheduled in time

getShiftsV3

This method takes in a concept ID, store ID, start and end dates and three flags (isHouse, isScheduled and isPosted). It returns an array of WSScheduleItem3 objects, which represent one scheduled shift each. What shifts are returned depends on the flags set:

isHouse - includes scheduled or posted shifts that are not assigned to an employee (called ‘house shifts’ in HotSchedules). isScheduled - includes shifts that are in schedules that have been saved in HotSchedules, but might not have been posted isPosted - includes shifts that are in schedules that have been set to the 'posted’ status within HotSchedules.

This method returns extended scheduled shift data, including location ID, regular pay rate, OT pay rate, scheduled regular minutes, scheduled OT minutes (if any), scheduled special pay (if any) and the unique schedule ID, internal to HS.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
Day Number Day formatted dd
Month Number Month formatted mm
Year Number Year formated yyyy
isHouse Boolean Include house shifts? These are shifts which were never assigned to someone on a schedule, or were once assigned but removed from an employee when their status, job, etc. changed.
isScheduled Boolean Include scheduled shifts? These are shifts which are on a schedule that has been saved in HotSchedules, but might not have been posted
isPosted Boolean These are shifts that are in schedules that have been set to the 'posted’ status within HotSchedules.
jobCodes IntArray Integer array of job codes to be included in this method’s return. if this parameter is null or empty, all jobs will be included.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi-dev.io/chewy/controllers/vertx/hotschedules/<concept>/<storeNum>/getShiftsV3?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016&is_house=true&is_scheduled=true&is_posted=true"

Sample JSON response:

  [
    {
      hsJobId: 11878523,
      clientId: 14935376,
      regWage: 1,
      posEmpId: 2069,
      hsEmpId: 4177214,
      storeNum: 3,
      ovtWage: 1.5,
      posJobId: 18,
      primary: true
    }
  ]
Key Type Description
hsJobId Number HotSchedules internal job code ID
clientId Number Unique identifier for client provided via HotSchedules.
regWage Number Regular hourly wage rate for employee
posEmpId Number POS numeric ID for employee
hsEmpId Number HotSchedules internal employee account ID
storeNum Number Unique numeric store ID within HotSchedules. Generally set up to mirror the client internal store IDs.
ovtWage Number Overtime hourly wage rate for employee
posJobId Number POS numeric ID for the job code
primary Boolean Boolean flag to designate if the job code is the primary job for the employee

getStoreEmployees

This method takes in a concept ID, store ID, a flag to determine if only active employees are returned, and returns an array of WSEmployee objects.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
active_only Boolean Boolean that defines whether or not to include terminated employees in response.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getStoreEmployees?active_only=true"

Sample JSON response:

[
    {
      zipCode: 12345,
      hireDate: "2016-11-03T10:16:38.533-05:00",
      address: "111 Addy Way",
      clientId: 87654321,
      LName: "Lockman",
      address2: "Unit 3",
      city: "Austin",
      mobile: "(222) 222-2222",
      NName: "Jay",
      altId: -1,
      FName: "Harrison",
      empNum: -1,
      phone: "(333) 333-3333",
      hsId: 987654321,
      dob: "1981-09-16T00:00:00-05:00",
      state: "TX",
      storeNum: 3,
      email: "harrison.lockman@email.com",
      status: 1
    }
]
Key Type Description
zipCode Number Zip Code
hireDate String Employee Hire Date
address String Employee Address line 1
clientId Number Unique identifier for client provided via HotSchedules
LName String Employee Last Name
address2 String Employee Address line 2
city String City field for Address
mobile String Employees Mobile Phone
NName String Employee Nickname
altId Number Employee HR ID. This must be a unique value across the company. It is used for HotSchedules Shared Employees.
FName String Employee First Name
empNum Number Employee POS ID
phone String Phone Number
hsId Number Optional HotSchedule Unique employee account ID
dob String Date of birth
state String State
storeNum Number Unique numeric store ID within HotSchedules. Generally set up to mirror the client internal store IDs.
email String Employee’s email address
status Number Active = 1, Inactive = 0, Terminated = 1

getStoreJobs

This method takes in a concept ID and a store ID, and returns an array of all jobs currently defined in HotSchedules for the given concept/store.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getStoreJobs"

Sample JSON response:

  [
    {
      jobName: "Manager",
      posId: 11,
      clientId: 14935376,
      hsId: 786323133,
      defRate: 0,
      storeNum: 3
    }
  ]
Key Type Description
jobName String Name for Job Code
posId Number Numeric POS ID for Job Code
clientId Number Unique identifier for client provided via HotSchedules
hsId Number Optional HotSchedule Unique employee account ID
defRate Number Default Pay Rate for a Job Code

getStoresV2

Returns information about the stores within a group.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
group_id Number Group in which the store is assigned

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/getStoresV2?group_id=0"

Sample JSON response:

  [
    {
      groupName: "HS Grill",
      active: true,
      groupExtId: 1,
      storeName: "Sales Demo - Bug Test",
      storeNum: -1,
      city: "Fremont",
      postalCode: "94555",
      stateProvince: "CA",
      streetAddress1: "1 st. address",
      streetAddress2: "Unit 3",
      timeZone: "US/Central"
    }
  ]
Key Type Description
groupName String Name of the group
active Boolean Indicates if the store is active
groupExtId Number The external ID for the store
storeName String The name of the store
storeNum Number Unique numeric store ID within HotSchedules. Generally set up to mirror the client internal store IDs.
city String City
postalCode Number Zip code / postal code
stateProvince String State province
streetAddress1 String Main street adress
streetAddress2 String Apartment number, Suite, Unit, etc..
timeZone String Store timezone

getTimeCards

This method takes in a concept ID, store ID, start and end dates. It returns an array of wsTimeCard3 objects, which represent one employee time card each. Each time card has information for one employee punch record, including business date, regular and OT minutes and wages, clock in and clock out times. If this store is using HotSchedules’ web-based timeclock for employee clock-in, any open punches in the date range are also included in the response.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
Day Number Day formatted dd
Month Number Month formatted mm
Year Number Year formated yyyy

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getTimeCards?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016"

Sample JSON response

[
    {
      jobName: "Bartender",
      ovtTtl: 0,
      ovtHrs: 0,
      clockOut: "2016-05-01T23:48:00-05:00",
      regWage: 0,
      clockIn: "2016-05-01T16:36:00-05:00",
      ovtWage: 7.5,
      breakMinutes: 0,
      jobExtId: 18,
      jobId: -1,
      businessDate: {
        month: 5,
        year: 2016,
        day: 1
      },
      regHrs: 7.2,
      spcTtl: 7.25,
      hsId: 929931332168,
      spcHrs: 0,
      ovtMins: 0,
      extId: -2005922,
      storeNum: 3,
      empPosId: 2068,
      regTtl: 0
    }
]
Key Type Description
jobName String POS job code name
ovtTtl Number Optional-Overtime total pay amount
ovtHrs Number Optional-Overtime hours in shift
clockOut String Clock out timestamp for the shift
regWage Number Regular hourly pay rate
clockIn String Clock in timestamp for the shift
ovtWage Number Optional-Overtime hourly pay rate
breakMinutes Number Number of non-paid break minutes in shift
JobId Number POS numeric identifier for the job
jobExtId Number POS numeric Job Code ID
businessDate Array Business Date information, Day, Months and Year
regHours Number Regular hours represented in shift
spcTtl Number Optional-Special Pay total pay amount
hsId Number Optional-Internal HotSchedules employee Account ID. Not required, will be set by the service.
spcHrs Number Optional-Special Pay Hours
ovtMins Number Optional-Overtime minutes in shift
storeNum Number Unique numeric store identifier. Generally set up to mirror the client internal store ID.
empPosId Number POS numeric Employee ID
regTtl Number Regular total pay amount
extId Number Optional-Unique transaction ID for the time card record

getVolumeCounts

This method will take a concept ID, store number, start and end dates and a volume type and return a list of volume counts for the date range requested. Supported Volume Types are: “TABLES”, “ENTRÉE”, “GUESTS”, “DELIVERIES”, “PRODUCTS”, and “TRANSACTIONS”.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
volumeType volumeType Classification of driver requested. Allowed types would be all of the classifications supported from API, HSC, or FTP integration. “Guests”, “Tables”, “Entrees”, “Deliveries”, “Transactions” and “Products”.
start hsSimpleDate Start date for the range of data requested
end hsSimpleDate End date for the range of data requested

curl -X GET -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/getVolumeCounts?start_date=2015-04-30T00:00:00&end_date=2016-05-03T00:00:00&volume_type=TABLE"

Sample JSON response:

  [
    {
      dateTime: "2016-05-03T23:30:00-05:00",
      volumeAmount: 5,
      businessDate: "2016-05-03T00:00:00-05:00",
      volumeType: "Guests",
      rvcExtId: 0
    }
  ]
Key Type Description
dateTime String Date of business
volumeAmount Number Value of the volume count for the transaction
businessDate String Business Date information, Day, Months and Year
volumeType String Classification of driver requested. Allowed types would be all of the classifications supported from API, HSC, or FTP integration. “Guests”, “Tables”, “Entrees”, “Deliveries”, “Transactions” and “Products”.
rvcExtId Number Represents the numeric revenue center ID associated with the volume count

setTimeCardsV3

Extends dataTimeCard (includes business date and clock in and clockout date/times).

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
Day Number Day formatted dd
Month Number Month formatted mm
Year Number Year formated yyyy

curl -X PUT -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/1/1/setTimeCardsV3?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016" -d "[{ \"jobName\": \"Cook\", \"ovtTtl\": 0, \"ovtHrs\": 0, \"clockOut\": \"2016-07-31T22:05:00-05:00\", \"regWage\": 9, \"clockIn\": \"2016-07-30T15:56:00-05:00\", \"ovtWage\": 13.5, \"breakMinutes\": 0, \"jobId\": 16921407, \"businessDate\": { \"month\": 7, \"year\": 2016, \"day\": 31 }, \"regHrs\": 6.15, \"spcTtl\": 0, \"hsId\": 929931334634, \"spcHrs\": 0, \"ovtMins\": 0, \"storeNum\": 1, \"empPosId\": 1052, \"regTtl\": 55.35 }]"

Sample JSON object

  [
    {
      jobName: "Cook",
      ovtTtl: 0,
      ovtHrs: 0,
      clockOut: "2016-07-31T22:05:00-05:00",
      regWage: 9,
      clockIn: "2016-07-30T15:56:00-05:00",
      ovtWage: 13.5,
      breakMinutes: 0,
      JobId: 16921407,
      businessDate: {
        month: 7,
        year: 2016,
        day: 31,
      },
      regHours: 6.15,
      spcTtl: 0,
      hsId: 929931334634,
      spcHrs: 0,
      ovtMins: 0,
      storeNum: 1,
      empPosId: 1052,
      regTtl: 55.35
    }
  ]
Key Type Description
jobName String POS job code name
ovtTtl Number Optional-Overtime total pay amount
ovtHrs Number Optional-Overtime hours in shift
clockOut String Clock out timestamp for the shift
regWage Number Regular hourly pay rate
clockIn String Clock in timestamp for the shift
ovtWage Number Optional-Overtime hourly pay rate
breakMinutes Number Number of non-paid break minutes in shift
JobId Number POS numeric identifier for the job
jobExtId Number POS numeric Job Code ID
businessDate Array Business Date information, Day, Months and Year
regHours Number Regular hours represented in shift
spcTtl Number Optional-Special Pay total pay amount
hsId Number Optional-Internal HotSchedules employee Account ID. Not required, will be set by the service.
spcHrs Number Optional-Special Pay Hours
ovtMins Number Optional-Overtime minutes in shift
storeNum Number Unique numeric store identifier. Generally set up to mirror the client internal store ID.
empPosId Number POS numeric Employee ID
regTtl Number Regular total pay amount
extId Number Optional-Unique transaction ID for the time card record

setEmpJobs

This method takes in a concept ID, store ID, and an array of WSEmpJob objects to assign jobs to individual employees. This method returns a WSReturn object.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
Day Number Day formatted dd
Month Number Month formatted mm
Year Number Year formated yyyy

curl -X PUT -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/setEmpJobs?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016" -d "[{json_object_1}, {json_object_2}, {json_object_3}...]"

Sample JSON object

  [
    {
      hsJobId: 11878523,
      clientId: 14935376,
      regWage: 1,
      posEmpId: 2069,
      hsEmpId: 4177214,
      storeNum: 3,
      ovtWage: 1.5,
      posJobId: 18,
      primary: true
    }
  ]
Key Type Description
hsJobId Number HotSchedules internal job code ID
clientId Number Unique identifier for client provided via HotSchedules
regWage Number Regular hourly wage rate for employee
posEmpId Number POS numeric ID for employee
hsEmpId Number HotSchedules internal employee account ID
storeNum Number Unique numeric store ID within HotSchedules. Generally set up to mirror the client internal store IDs.
ovtWage Number Overtime hourly wage rate for employee
posJobId Number POS numeric ID for the job code
primary Boolean Boolean flag to designate if the job code is the primary job for the employee

setEmps

This method takes in a concept ID, store ID and an array of WSEmployee objects. Using the authentication from the username token and the conecpt and store IDs, the server will resolve which HotSchedules client this sync is for. The array of employees will be parsed on the server side to employees who need to be inserted or updated in the HS database. This method returns a WSReturn object.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
emps wsEmployeeArray Array of WSEmployee objects. Each object represents an employee at this store.
Day Number Day formatted dd
Month Number Month formatted mm
Year Number Year formated yyyy

curl -X PUT -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/setEmps?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016" -d "[{json_object_1}, {json_object_2}, {json_object_3}...]"

Sample JSON object

  [
    {
      zipCode: 12345,
      hireDate: "2016-11-03T10:16:38.533-05:00",
      address: "111 Addy Way",
      clientId: 87654321,
      LName: "Lockman",
      address2: "Unit 3",
      city: "Austin",
      mobile: "(222) 222-2222",
      NName: "Jay",
      altId: -1,
      FName: "Harrison",
      empNum: -1,
      phone: "(333) 333-3333",
      hsId: 987654321,
      dob: "1981-09-16T00:00:00-05:00",
      state: "TX",
      storeNum: 3,
      email: "harrison.lockman@email.com",
      status: 1
    }
  ]
Key Type Description
zipCode Number Zip Code
hireDate String Employee Hire Date
address String Employee Address line 1
clientId Number Unique identifier for client provided via HotSchedules
LName String Employee Last Name
address2 String Employee Address line 2
city String City field for Address
mobile String Employees Mobile Phone
NName String Employee Nickname
altId Number Employee HR ID. This must be a unique value across the company. It is used for HotSchedules Shared Employees.
FName String Employee First Name
empNum Number Employee POS ID
phone String Phone Number
hsId Number Optional HotSchedule Unique employee account ID
dob String Date of birth
state String State
storeNum Number Unique numeric store ID within HotSchedules. Generally set up to mirror the client internal store IDs.
email String Employee’s email address
status Number Active = 1, Inactive = 0, Terminated = 1

setForecastDriversV2

This method takes in a concept ID, store ID, workweek, startdate, enddate, starttime, endtime, volume amount, volume type, and a revenue center for the purpose of submitting forecasted volume drivers to HotSchedules from a third party system or point of sale. Using the authentication from the username token and the concept and store IDs, the server will resolve which HotSchedules client this sync is for. The array contains volume driver counts for a range of dates, corresponding to the start and end dates. The server side logic can handle overlapping data (i.e. if you sync 7 days worth of time cards, every day, 6 days of it will be “overlapping” data) and will insert and update data as needed. If the guest are already in the HS database and do not need to be updated, then nothing will change.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
Day Number Day formatted dd
Month Number Month formatted mm
Year Number Year formated yyyy

curl -X PUT -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/setForecastDriversV2?start_day=30&start_month=4&start_year=2016" -d "[{json_object_1}, {json_object_2}, {json_object_3}...]"

Sample JSON object

  [
    {
      "concept": "1",
      "storeNum": "1",
      "workweekStartDate": {
        "day": "11",
        "month": "10",
        "year": "2016"
      },
      "driverAmount": "10",
      "intervalStartTime" : {
        "day": "1",
        "month": "5",
        "year": "2016"
      }
      "intervalEndDate": {
        "day": "11",
        "month": "10",
        "year": "2016"
      },
      intervalStartTime: {
        hours: 0,
        seconds: 0,
        militaryTime: true,
        minutes: 0
      },
      intervalEndTime: {
        hours: 0,
        seconds: 0,
        militaryTime: true,
        minutes: 15
      },
      "rvcId": "1",
      "volumeType": "Guests"
    }
  ]
Key Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
workweekStartDate Object Start date of the work week
driverAmount Number Quantity of driver for interval expressed in the record
intervalStartTime Object The hour, minutes, and seconds corresponding to the start of the interval expressed in the record. Interval times are local to the store’s time zone.
intervalEndTime Object The hour, minutes, and seconds corresponding to the end of the interval expressed in the record. Interval times are local to the store’s time zone.
intervalStartDate Object The date corresponding to the start of the interval expressed in the record
intervalEndDate Object The date corresponding to the end of the interval expressed in the record
rvcId Number Numeric ID for the revenue center associated with the location within the restaurant
volumeType String Classification of driver requested. Allowed types would be all of the classifications supported from API, HSC, or FTP integration. “Guests”, “Tables”, “Entrees”, “Deliveries”, “Transactions” and “Products”.

setGuestCounts

This method takes in a concept ID, store ID, business date, date time, guest count and a revenue center for the purpose of submitting actual guest count drivers to HotSchedules from a third party system or point of sale. Using the authentication from the username token and the concept and store IDs, the server will resolve which HotSchedules client this sync is for. The array contains guest counts for a range of dates, corresponding to the start and end dates. The server-side logic can handle overlapping data (i.e. if you sync 7 days worth of time cards, every day, 6 days of it will be “overlapping” data) and will insert and update data as needed. If the guest are already in the HS database and do not need to be updated, then nothing will change. This method returns a WSReturn object.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
Day Number Day formatted dd
Month Number Month formatted mm
Year Number Year formated yyyy

curl -X PUT -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/setGuestCounts?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016" -d "[{json_object_1}, {json_object_2}, {json_object_3}...]"

Sample JSON object

  [
    {
      dateTime: "2016-05-03T23:30:00-05:00",
      businessDate: "2016-05-03T00:00:00-05:00",
      guestCount: 113,
      rvcExtID: 123
    }
  ]
Key Type Description
businessDate String Business date of transaction
dateTime String Date Time of the transaction
guestCount Number Number of guests for the transaction
rvcExtID Number Numeric ID for the revenue center associated with the transaction

setRVC

This method takes in a concept ID and a store ID and returns an array of revenue centers for that store.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept
group Number Numeric ID group in which the store is assigned
rvcId Number Numeric ID for the revenue center associated with the location within the restaurant
rvcName String Name for the revenue center associated with the location within the restaurant.
i.e. Bar, Togo etc…
isGroupLevel Boolean Indicates if the revenue center is assigned at the group level.
i.e. Bar used across all locations

curl -X PUT -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/setRVC?group=1&rvcId=1&rvcName=1&isGroupLevel=true" -d "[{json_object_1}, {json_object_2}, {json_object_3}...]"

Sample JSON object

[
    {
      "concept": "1",
      "group": "1",
      "isGroupLevel": "true",
      "store": "13",
      "rvcId": "11",
      "rvcName": "Bar"
    }
]
Key Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
group Number Numeric ID group in which the store is assigned
rvcId Number Numeric ID for the revenue center associated with the location within the restaurant
rvcName String Name for the revenue center associated with the location within the restaurant.
i.e. Bar, Togo etc…
isGroupLevel Boolean Indicates if the revenue center is assigned at the group level.
i.e. Bar used across all locations

setSalesCat

This method allows you to add the sales category associated with menu items. Sales categories will typically establish what kind of item was sold: Food, Beverage, Alcohol, Merchandise. Sales categories can be local to a particular store.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
group Number Numeric ID group in which the store is assigned
salesCatId Number Numeric ID for the sales category associated with the location within the restaurant
salesCatName String Name for the sales category associated with the item sold within the restaurant.
i.e. Liquor, Beer, etc..
isGroupLevel Boolean Indicates if the sales category is assigned at the group level.
i.e. Liquor ID 2 used across all locations

curl -X PUT -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/setSalesCat?group=1&salesCatId=1&salesCatName=1&isGroupLevel=true" -d "[{json_object_1}, {json_object_2}, {json_object_3}...]"

Sample JSON object

[
  {
    "concept": "1",
    "group": "1",
    "isGroupLevel": "true",
    "store": "13",
    "salesCatId": "9",
    "salesCatName": "Liquor"
  }
]

Key Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
group Number Numeric ID group in which the store is assigned
salesCatId Number Numeric ID for the sales category associated with the location within the restaurant
salesCatName String Name for the sales category associated with the item sold within the restaurant.
i.e. Liquor, Beer, etc..
isGroupLevel Boolean Indicates if the sales category is assigned at the group level.
i.e. Liquor ID 2 used across all locations

setSalesItemsV4

This method takes in a concept ID, store ID, a start and end date and an array of WSSalesItem objects. Using the authentication from the username token and the concept and store IDs, the server will resolve which HotSchedules client this sync is for. The array contains sales items for a range of dates, corresponding to the start and end dates. The server-side logic can handle overlapping data (i.e. if you sync 7 days worth of sales, every day, 6 days of it will be “overlapping” data) and will insert and update data as needed. If the sales items are already in the HS database and do not need to be updated, then nothing will change. The method returns a WSReturn object. This method uses hsSimpleDate objects for dates.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
Day Number Day formatted dd
Month Number Month formatted mm
Year Number Year formated yyyy

curl -X PUT -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/setSalesItemsV4?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016" -d "[{json_object_1}, {json_object_2}, {json_object_3}...]"

Sample JSON object (COMING SOON)

  [
    "concept": "1",
    "storeNum": "1",
    "sales": {
    "item": {
      "catName": "Beer",
      "clientId": "3",
      "empId": "123",
        "extId": "333",
        "rvc": "Revenue",
        "rvcName": "Bar",
        "salesCat": "Beer",
        "storeNum": "3",
        "ttl": "0",
        "businessDate": {
          "day": "1",
          "month": "7",
          "year": "2016"
        },
        "transDate": {
          "day": "1",
          "month": "7",
          "year": "2015"
        },
        "transTime": {
          "amPm": "am",
          "hours": "1",
          "militaryTime": "true",
          "minutes": "15",
          "seconds": "0"
        }
      }
    },
      "start": {
        "day": "1",
        "month": "7",
        "year": "2016"
      },
      "end": {
        "day": "1",
        "month": "8",
        "year": "2016"
      }
  ]
Key Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept
catName String Category name
clientId Number Unique identifier for client provided via HotSchedules
empId Number Employee ID
extId Number External ID
rvc String Revenue Center
rvcName String Name for the revenue center associated with the location within the restaurant
salesCat String Sales category
ttl String Total sales for the sales category
businessDate Object Business Date information, Day, Months and Year
transDate Object Transaction date
transTime Object Transaction time
start Object Start date for the range of data requested
end Object End date for the range of data requested

setTimeCardsDeclaredTips

This method takes in a concept ID, store ID, a start and end date and an array of WSTimeCardsDeclaredTips objects. Using the authentication from the username token and the concept and store IDs, the server will resolve which HotSchedules client this sync is for. The array contains time cards for a range of dates, corresponding to the start and end dates. The server-side logic can handle overlapping data (i.e. if you sync 7 days worth of time cards, every day, 6 days of it will be “overlapping” data) and will insert and update data as needed. If the time cards are already in the HS database and do not need to be updated, then nothing will change. This method returns a WSReturn object.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.
Day Number Day formatted dd
Month Number Month formatted mm
Year Number Year formated yyyy

curl -X PUT -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/setTimeCardsDeclaredTips?start_day=30&start_month=4&start_year=2016&end_day=5&end_month=5&end_year=2016" -d "[{json_object_1}, {json_object_2}, {json_object_3}...]"

Sample JSON object

  [
    {
      jobName: "Bartender",
      ovtTtl: 0,
      ovtHrs: 0,
      clockOut: "2016-05-01T23:48:00-05:00",
      regWage: 0,
      clockIn: "2016-05-01T16:36:00-05:00",
      ovtWage: 7.5,
      breakMinutes: 0,
      jobExtId: 18,
      jobId: -1,
      businessDate: {
        month: 5,
        year: 2016,
        day: 1
      },
      regHrs: 7.2,
      spcTtl: 7.25,
      hsId: 929931332168,
      spcHrs: 0,
      ovtMins: 0,
      extId: -2005922,
        storeNum: 3,
      empPosId: 2068,
      regTtl: 0
    }
  ]
Key Type Description
jobName String POS job code name
ovtTtl Number Optional-Overtime total pay amount
ovtHrs Number Optional-Overtime hours in shift
clockOut String Clock out timestamp for the shift
regWage Number Regular hourly pay rate
clockIn String Clock in timestamp for the shift
ovtWage Number Optional-Overtime hourly pay rate
breakMinutes Number Number of non-paid break minutes in shift
JobId Number POS numeric identifier for the job
jobExtId Number POS numeric Job Code ID
businessDate Array Business Date information, Day, Months and Year
regHours Number Regular hours represented in shift
spcTtl Number Optional-Special Pay total pay amount
hsId Number Optional-Internal HotSchedules employee Account ID. Not required, will be set by the service.
spcHrs Number Optional-Special Pay Hours
ovtMins Number Optional-Overtime minutes in shift
storeNum Number Unique numeric store identifier. Generally set up to mirror the client internal store ID.
empPosId Number POS numeric Employee ID
regTtl Number Regular total pay amount
extId Number Optional-Unique transaction ID for the time card record

setVolumeCountsV2

This method takes in a concept ID, store ID, business date, date time, volume amount, volume type, and a revenue center for the purpose of submitting actual volume drivers to HotSchedules from a third party system or point of sale. Using the authentication from the username token and the concept and store IDs, the server will resolve which HotSchedules client this sync is for. The array contains volume driver counts for a range of dates, corresponding to the start and end dates. The server-side logic can handle overlapping data (i.e. if you sync 7 days worth of time cards, every day, 6 days of it will be “overlapping” data) and will insert and update data as needed. If the guest are already in the HS database and do not need to be updated, then nothing will change. This method returns a WSReturn object.

Query parameter Type Description
concept Number The identifier for the location’s concept. Must be unique within the company, contact HotSchedules if you’re not sure about this value.
storeNum Number Numeric (integer) identifier for the store. Must be unique within the concept.

curl -X PUT -H "Content-Type:application/json" -u <username>:<password> "https://api.bodhi.space/<namespace>/controllers/vertx/hotschedules/<concept>/<storeNum>/setVolumeCountsV2" -d "[{json_object_1}, {json_object_2}, {json_object_3}...]"

Sample JSON object

  [
    {
      "businessDate": "2014-10-05T00:00:00",
      "dateTime": "2014-10-05T06:41:00-05:00",
      "rvcExtId": "4",
      "volumeAmount": "1",
      "volumeType": "GUESTS"
    }
  ]
Key Type Description
businessDate String Business date of transaction
dateTime String Date time of transaction
rvcExtId Number Represents the numeric revenue center ID associated with the guest
volumeAmount Number Value of the volume count for the transaction
volumeType String Classification of driver requested. Allowed types would be all of the classifications supported from API, HSC, or FTP integration. “Guests”, “Tables”, “Entrees”, “Deliveries”, “Transactions” and “Products”.

Working with Macromatix Data

MX RDS API

The mxrds api provides a RESTful way to access data stored in Macromatix RDS database

Access Control

A Bearer Token is required to make calls to the service, ask the team to generate one for you

Store endpoints

Returns store information as well as store roster

Get all stores

GET https://api.mxrds.io/<namespace>/stores ie. curl -H 'Authorization:Bearer <admin-token>' https://api.mxrds.io/<namespace>/stores

Get store by store id

GET https://api.mxrds.io/<namespace>/stores/<store-id> ie. curl -H 'Authorization:Bearer <admin-token>' https://api.mxrds.io/<namespace>/stores/<store-id>

Get store roster

GET https://api.mxrds.io/<namespace>/stores/<store-id>/roster ie. curl -H 'Authorization:Bearer <admin-token>' https://api.mxrds.io/<namespace>/stores/<store-id>/roster

Employee endpoints

Returns employee information

Get all employees

GET https://api.mxrds.io/<namespace>/employees ie. curl -H 'Authorization:Bearer <admin-token>' https://api.mxrds.io/<namespace>/employees

Get employee by employee id

GET https://api.mxrds.io/<namespace>/employees/<employee-id> ie. curl -H 'Authorization:Bearer <admin-token>' https://api.mxrds.io/<namespace>/employees

Calendar endpoints

Returns the fiscal calendar

Get fiscal calendar by year

GET https://api.mxrds.io/<namespace>/calendar/<year> ie. curl -H 'Authorization:Bearer <admin-token>' https://api.mxrds.io/<namespace>/calendar/<year>

Resources endpoints

Returns resources filtered by store id and date of business

Get resource by store id and date of business

Store is required, DOB will use the current day if not specified

GET https://api.mxrds.io/<namespace>/resources/<resource>?store=<store-id>&dob=<yyyy-mm-dd>

List of resources

/inventorywaste
/inventorytransfer
/inventorycount
/forecast
/salesitemforecast
/inventoryforecast
/roster
/salestransaction
/salesitem
/salestransactiondiscount
/transactiontender
/salesitemvoid
/depletion
/schedule
/timecards
/paidinpaidout
/settlement
/storesettlementdetails
/inventorypurchasereturnline
/inventorypurchasereturn
/transactioncontrolinformation
/Inventorypurchaseorder
/inventorypurchaseorderline

Admin endpoints

These endpoints can only be accessed by the mxrds api admin, they are meant to add or update customer configurations

New user config

POST https://api.mxrds.io/<namespace>/settings ie. curl -X POST -H 'Content-Type:application/json' -H 'Authorization:Bearer <admin-token>' https://api.mxrds.io/<namespace>/settings -d '{"token":"<bearer-token>","host":"<rds-host>","port":<rds-port>,"database":"<database>"}'

#response

Code 201

Update existing config

PUT https://api.mxrds.io/<namespace>/settings ie. curl -X PUT -H 'Content-Type:application/json' -H 'Authorization:Bearer <admin-token>' https://api.mxrds.io/<namespace>/settings -d '{"token":"<bearer-token>","host":"<rds-host>","port":<rds-port>,"database":"<database>"}'

#response

Code 204

Get existing config

GET https://api.mxrds.io/<namespace>/settings ie. curl -H 'Authorization:Bearer <admin-token>' https://api.mxrds.io/<namespace>/settings

#response

Code 200 { token: <token>, host: <host>, port: <port>, database: <database> }

Public endpoints

The following endpoints are the only ones that do not require bearer token authorization

Healthcheck

GET https://api.mxrds.io/ ie. curl https://api.mxrds.io/

#response

Code 200 Response { ping: true }

App Info

Returns the name and version of the app GET https://api.mxrds.io/info ie. curl https://api.mxrds.io/info

#response

Code 200 Response { "name":"<app-name>", "version":"<version>" }

Facts

Returns the system and environment information GET https://api.mxrds.io/facts ie. curl https://api.mxrds.io/facts

#response

Code 200 Response ie. { "os": "Linux", "isWindows": false, "isMac": false, "isLinux": true, "isBSD": false, "isSolaris": false, "platform": "linux/4.4.8-20.46.amzn1.x86_64", "title": "rds-api", "pid": 16849, "hostname": "ip-172-31-10-180", "arch": "x64", "cpu": "Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz", "speed": 1795, "cores": 1, "ram": 605.948, "cwd": "/var/app/current", "main": "/var/app/current/index.js", "paths": ["/var/app/current/node_modules", "/var/app/node_modules", "/var/node_modules", "/node_modules"], "process": "node/v4.4.3", "node_env": "not-set", "startedAt": "2016-06-14T23:02:19.021Z" }

getSalesItem

Request

curl -H '<bearer_toke>' https://api.mxrds.io/walmart/resources/salesitem?store=1&dob=2016-06-24

Response

[{ "storeid": "1", "businessday": "2016-06-24T00:00:00.000Z", "itemcode": "Undefined", "description": "All undefined sales items", "postransactionid": "1221", "registernumber": 4, "clerkkey": "3141414", "clerkname": "Brandon", "clerkid": null, "amount": "0.0000", "quantity": 1, "tax": "0.0000", "salescost": "0.0000" }, { "storeid": "1", "businessday": "2016-06-24T00:00:00.000Z", "itemcode": "52791", "description": "Green Bns Sm", "postransactionid": "01011991", "registernumber": 4, "clerkkey": "28928", "clerkname": "Brandon", "clerkid": null, "amount": "0.0000", "quantity": 1, "tax": "0.0000", "salescost": "0.1129" }]

getSalesItemForecast

Request

curl -H 'Authorization:Bearer eyJhbGciOiJIUzI1NiJ9.cmRzLWFwaS1rZmNsdmw.AMtNZJfooodidisise6QbpxyBHytmU7RQqhZQD4nVO_Y' "https://api.mxrds.io/walmart/resources/salesitemforecast?store=1&dob=2016-06-24"

Response

[{ "description": "All undefined sales items", "itemcode": "Undefined", "intervalstart": "2016-06-24T10:30:00.000Z", "storeid": "23232", "businessday": "2016-06-24T00:00:00.000Z", "raw_forecast": 2, "system_forecast": 2, "user_forecast": 2 }, { "description": "Or foo", "itemcode": "232323", "intervalstart": "2016-06-24T10:30:00.000Z", "storeid": "23233", "businessday": "2016-06-24T00:00:00.000Z", "raw_forecast": 0.6, "system_forecast": 1, "user_forecast": 1 }, { "description": "Or stuff", "itemcode": "12121", "intervalstart": "2016-06-24T10:30:00.000Z", "storeid": "179", "businessday": "2016-06-24T00:00:00.000Z", "raw_forecast": 0.6, "system_forecast": 1, "user_forecast": 1 }]

Working with Social data

The HotSchedules REST API provides a user-friendly way to obtain Social data from GooglePlaces,Yelp, and WUnderground.

If “refresh=true” query option is specified - cache will be invalidated and refreshed.

If “proxy=true” query option is specified - no cache will be used at all and requests will be forwarded directly to the endpoint.

API endpoint

https://api.bodhi.space/bodhi-social/controllers/vertx/cacheserver?where=<query_json>

Yelp Data

Yelp query format

By term and location:
{ "term":<search term, for instance KFC, McDonalds etc> - mandatory field "location":<location, for instance Emeryville> - mandatory field "limit":<number of results to return (default:10) - optional field "radius":<search radius in meters> (default:100) - optional field }

By phone:
{ "phone":<phone number in full format> (for example +15555555555) }

Yelp query example:

By term and location:
https://api.bodhi.space/bodhi-social/controllers/vertx/cacheserver/yelp?where={"term":"KFC","location":"Emeryville","limit":3}

By phone:
https://api.bodhi.space/bodhi-social/controllers/vertx/cacheserver/yelp?where={"phone":"+15555555555"}

Wunderground Data

Wunderground query format:

{"query":<query_in_wunderground format>}

More details about WU queries could be found here: http://www.wunderground.com/weather/api/d/docs?d=data/index

Wunderground query example:

https://api.bodhi.space/bodhi-social/controllers/vertx/cacheserver/wu?where={"query":"conditions/q/CA/San_Francisco.json"}

GooglePlaces data

Google Places query example

https://api.bodhi.space/bodhi-social/controllers/vertx/cacheserver/googleplaces?where={"query":"Empire state building"}

Agent

Overview

The Agent provides a single integration point that enables in-store and near-store data collection.

The Platform provides real time bi-directional connections between the cloud and POS via existing Macromatix Livelink and HotSchedules Connect integrations, as well as an an in-store appliance and software agent.

The IoT Platform is built on open standards and integrates with:

Getting Started

HotSchedule IoT Platform Agent provides a single integration point that enables in-store and near-store data collection. HotSchedules IoT Platform Agent is allowed you to integrate with in store data above store data and near store data.

alt text
figure 2

Environment Setup

Installation

The agent cli is installed via a platform specific installer or via node package manager (NPM). The cli prefers to be installed globally.

$> npm install -g agent-cli

General Usage

The general structure of the a command is as follows:

$> npm install agent-cli [options] <action> [arguments]

Options

Options are prefixed with - or -- to separate them from arguments. Each action defines the options it uses, but the options are consistent in naming and usage across the commands.

Common Options

long short arg description
–help none none print help about the command
–verbose -v none print more detailed output
–quiet -q none print essential output
–config -f path specifies the agent’s configuration file
–home -h path specifies the agent’s working directory
–force -F none directive to override safety logic

Arguments

The cli interprets the first argument (non-option) as the action. All subseuqent arguements are command specific.

Each action is described below

Informational Commands

help

The command line provides built in helper functions.

For a descriptive list of the commands

$> npm install agent-cli --help

Action Specific Help

Action specific help can be requested using the following structure.

$> npm install agent-cli <action> --help

version

Print version information.

$> agent-cli --version 
$> agent-cli -V

The output is a simple version identifier following the semantic versioning rules of major, minor, and build.

vM.m.b

info

CLI splash screen for the agent.

$> agent-cli info

Lifecycle Commands

Lifecycle commands allow an administrator to change and check the run state of an agent.

start

Attempts to start an agent.

$> agent-cli start [options] 

Options

long short arg deacription
–verbose -v none print more detailed output
–quiet -q none print essential output
–config -f path specifies the agent’s configuration file
–home -h path specifies the agent’s working directory

status

Provides status about a running agent.

$> agent-cli status [options] 

Options

long short arg deacription
–verbose -v none print more detailed output
–quiet -q none print essential output
–config -f path specifies the agent’s configuration file

stop

Gracefully shutdown the agent.

$> agent-cli stop [options] 

Options

long short arg deacription
–verbose -v none print more detailed output
–quiet -q none print essential output
–config -f path specifies the agent’s configuration file

Diagnostic Commands

Diagnostic commands are used by an admin to troubleshoot an agent having trouble entering a running state or to test environmental specific details uniformly across platforms.

check-core

Used to check the version of agent-core being used and where that file is located on the file system.

$> agent-cli check-core [options]

Options

long short arg deacription
–config -f path specifies the agent’s configuration file

check-config

Used to check for configuration problems in the agent. The agent will load and process all configuration files, but will not enter into a ready state. This command is safe to run even if there is a currently running agent.

$> agent-cli check-cofig [options]

Options

long short arg deacription
–config -f path specifies the agent’s configuration file

check-connection

Used to check for configuration problems in the agent.

$> agent-cli check-connection [options]

Options

long short arg deacription
–config -f path specifies the agent’s configuration file

The provided URL will go through the following checks:

  1. Check the URL format
  2. Check the DNS resolution from the agent’s host
  3. Check the TCP port is reachable by opening up a connection on host:port
  4. Issue a HTTP GET against the ping endpoint of the system

check-route

Used to check for network problems (firewalls & proxy rules) from the perspective of the agent runtime.

$> agent-cli check-route <scheme://host:port/path>

The provided URL will go through the following checks:

  1. Parse
  2. DNS resolve of host/IP
  3. TCP port reachable by opening up a connection on host:port
  4. If scheme is http of https then issue a HTTP GET against the specified URL

How To

Installing Bodhi Agent

Agent Installer and Registration User Guide

Welcome to the User Guide for Installing and registering the Bodhi agent

System Requirements for computer OS: Windows XP SP3, Windows 7, Windows 8.1
Memory: 2GB or more
Disk Space: 10 GB

System requirements for Mobile iOS 7.x, 8.x
Android 4.x
Windows Phone

Step 1: Download Bodhi Installer and the Bodhi Mobile Application

Go developer.bodhi.space to get the correct installer for your system

alt text

NOTE: if the system you are using to download the installer is not a Windows system you will get the Not Supported.

Just select the Windows system that matches the system you will be installer the Bodhi Agent on.

For the mobile applications here is where you can download them to your device.

Bodhi Mobile - iOS Apple Apps Store
Bodhi Mobile - Android Google Play Store

Step 2: Run the installer

alt text

Step 3: Select the Next button to move to the next Button

alt text

Step 4: License agreement screen

alt text

NOTE: the Next Button will be greyed out, until the, I accept the agreement radio button is selected.

Step 5: Select the I accept the agreement Radio Button

alt text

Step 6: Select the Next Button

alt text

Step 7: Selecting the Destination location for the Agent

alt text

NOTE: If this destination location is OK, then select the Next Button.

alt text

Go to Step 8

Step 7a: If you wish to change the location of the destination location
7a. Select the Browse Button

alt text

7b. Select the folder you wish to install the Bodhi Agent into or you can open a different folder.

alt text

7c. After you have selected the folder

alt text

7d. Select the OK Button

alt text

The New destination location should be displayed

alt text

7e. Select the Next Button to continue

alt text

Step 8: Review of Destination location.

alt text

Step 9: Select the Install Button

alt text

9a. A Progress bar will be displayed

alt text

Step 10: Installing Nodejs page

alt text

Step 11: Selecting the Next Button

alt text

Step 12: License agreement screen

alt text

NOTE: the Next Button will be greyed out, until the, I accept the agreement checkbox is selected.

Step 13: Select the I accept the agreement Radio Button

alt text

Step 14: Select the Next Button

alt text

Step 15: Selecting the Destination location for Nodejs

alt text

NOTE: If this destination location is OK, then select the Next Button.

alt text

Go to Step 16

Step 15a: If you wish to change the location of the destination location, Select the change Button

alt text

Step 15b. Select the folder you wish to install nodejs into or you can open a different folder

alt text

Step 15c. After you have selected the new folder

alt text

Step 15d. After you have selected the folder in the new selected folder

alt text

Step 15e. Select the OK Button

alt text

Step 15f. Review the Destination location

alt text

Step 16: Review of the Custom Setup.

alt text

Step 17: Select the Install Button

alt text

15h. A Progress bar will be displayed

alt text

alt text

alt text
figure 19

10b. Command Line Interface is opened

alt text
figure 20

10c. The command line window should close and you will be at the Desktop.

alt text
figure 21

Step 1: Register the Agent with a Mobile Device

Note: If your agent is not registered, it will be unable to send any data to the cloud

alt text
figure 22

Note: If the registration dialog is dismissed before registration * Select the Registration Code Menu item on the left to redisplay it

alt text
figure 23

Step 2: Start the Bodhi Mobile App

alt text
figure 24

Step 3: Enter the a Mobile Device

alt text
figure 25

Step 4: Select the POS Manager

alt text
figure 26

Step 5: Select the the Plus Sign to add a POS to the Manager

alt text
figure 27

Step 6: Select a store to associate the POS with.

Flowers figure 28

Step 7: Enter the Activation code that is displayed in the Browser.

alt text
figure 29

Step 8: Select the Request Button.

alt text
figure 30

Step 9: Verify that POS agent with the selected store and is displayed

alt text
figure 31

Step 20: The Browser will display the console dashboard

alt text
figure 32

Console Dashboard Legend

  1. This is the status of the agent (e.g. Online, Offline)
  2. This changes the Left Menu from Icon Only to Icons and Text

Congratulations on your successful installation of Bodhi Agent

Publishing Applications

Overview

To publish application for the IoT Platform, you need to follow a few simple steps to describe your application.

Publishing Your Application

To publish your application you add the following directory structure for your application:

    /<app-name>/
            /public/

To publish an app into the IoT Platform you have to zip up the following: {code} index.html (could be empty) LICENSE package.json

folder= app_icon.png NewType1.json file (optional) NewType2.json file (optional) NewType3.josn file (optional) …

Example package.json for Mobile Applications

By Clicking on HS Template you get a package.zip file that is downloaded to your desktop that contains the following:

package.json that gets includes with HS Template's zip file:

{
    "name": "HSappTemplate",
    "version": "0.0.0",
    "title": "HSappTemplate",
    "description": "New application Hello, World!",
    "profile": {
        "name": "HSappTemplate",
        "dml": {
            "BodhiApplication": {
                "select": {}
            }
        }
    },
    "settings": {
        "publisher": "",
        "categories": [""],
        "offline": false,
        "navigationBar": "auto",
        "location": "S3",
        "storage": "s3",
        "type":"mobile"
    },
    "dependencies": {
        "bodhi-mobile":"*" 
        },
    "autoUpdateVersion": true
}

See Descriptions of package.json contents below to see what each packge.json entry is for:

{

“name”: “HSappTemplate”,

“version”: “0.0.0”,

“title”: “HSappTemplate”,

“description”: “New application Hello, World!”,

“profile”: {

“name”: “HSappTemplate”,

“dml”: {

“BodhiApplication”: {

“select”: {}

}

}

},

“settings”: {

“publisher”: “”,

“categories”: [“”],

“offline”: false,

“navigationBar”: “auto”,

“location”: “S3”,

“storage”: “s3”,

“type”:“mobile”

},

“dependencies”: {

“bodhi-mobile”:“*”

},

“autoUpdateVersion”: true

}

Example of Package.json for agent or job Applications

Example of package.json for agent or job applications:
#!javascript

{
  "name": "app-package-name",
  "version": "0.0.1",
  "title": "Application Title",
  "description": "Short Application Description.",
  "profile": {
    "name": "app-package-name",
    "dml": {
      “BodhiApplication": {
       "select": {},
       "update":{},
       "delete":{},
       "insert":{}
      },
      "NewType1": {
        "select": {}
      },
      "NewType2": {
        "select": {}
      }
    }
  },
  "settings": {
    "categories": [
      "Aloha",
      "POS"
    ],
    "publisher": "your company",
    "npm_package_name": "app-package-name",


if you have any related apps you want to install together::
"related-apps": [
      "bodhi.aloha-app-transactions",
      "bodhi.aloha-app-store"
    ],
    "public_path": "public",
    "global_store_icon": "public/icon.png",
   "location": "S3",
   "storage": "s3",
   "type": "agent",    
(type can be “job”, “agent”, “mobile”, “web” )   
 "new_type_required": true,
  "install": {
"new": {
"model": [
{
"type": "enumeration",
"name": "TypeName",
"object": "Enumerations/TypeName.json"
},
{
"type": "embedded_type",
"name": "InventoryPurchaseOrder",
"object": "Types/InventoryPurchaseOrder.json"
},
{ "type": "custom_type",
"name": "TypeName2",
"object": "Types/TypeName2.json"
}
],
"post-type-install": [
{"action": "POST",
"object": "Data/DataFile.json",
"path": "/resources/DataFile"
}
]
if you have any parameters required to be used with the app we add this section:: 
 "agent_parameters": {
      "interval": {
        "description": "How often to execute a grind",
        "required": true,
        "type": "string",
        "default": "every 15 minutes",
        "position": 1
      }
    }
  },
  "autoUpdateVersion": false
}

Description of package.json contents

name=“HSappTemplate” required

The name of your application must match the name of the profile

“version”: “0.0.1” required

Ideally this is the version of your application that gets posted as versions show for Agent Application in the Agent Event Logs so keeping this version the same as your Agent Application that is published is highly recommended.

“title”: “Application Title” required

This is the title that will show on the HotSchedules Store once you publish your application to the HotSchedules Store.

“description”: “Short Application Description.” required

The description is the application description that will be displayed with the title for your application when displayed in the HotSchedules Store. Description will be part of “Learn More” button.

“profile”: {} required

The profile section contains the following required sections:

“settings”:{} required

The settings is the main section of package.json contains the following sections:

agent_parameters/job_parameters

Depending on your application needs, you may want to have parameters setup for your applications. Both Agent and Job applications can take parameters. The agent/job_parameters contain information about any parameters that the agent or job requires to run. They contain data_dir formatted information containing description, a required flag, type string and an optional position which is set will position the parameter in the order set 0, 1, 2, etc if not set then the parameter will be displayed in the order it’s defined. Application parameters will be saved under settings so the application should use parameters from settings.

NOTE: The hidden parameter option will not be visible to the user in the installation process but will be written under the application settings.

The following are examples of parameters that can be set for agent or the job applications respectively:

Agent Parameters example:

Example of agent parameters that can be defined for an agent application:

    "agent_parameters": {
      "config_file_path": {
        "description": "Config file location",
        "required": true,
        "type": "string",
        "default": "",
        "setting": "config_file_path"
      },
      "data_dir": {
        "description": "Folder location to save database files for the agent app",
        "required": true,
        "type": "string",
        "default": "C:/bodhiAgent/node_modules/merit-agent-labor/_xmloutput/",
        "setting": "data_dir"
      },
      "number_of_days_to_query": {
        "description": "Limit query to this number of days",
        "required": true,
        "type": "integer",
        "default": 60,
        "setting": "number_of_days_to_query"
      },
      "interval": {
        "description": "How often to execute a grind",
        "required": true,
        "type": "string",
        "default": "every 12 hours",
        "setting": "interval"
      },
      "local_storage_ignore_flag": {
        "description": "Ignore local storage and write all data",
        "required": true,
        "type": "boolean",
        "default": false,
        "setting": "local_storage_ignore_flag"
      }
    }
Job Parameters example:
    "job_parameters": {
      "timing_expression": {
        "description": "How often to execute a job",
        "repeat": true,
        "type": "string",
        "default": "60 minutes"
      },
      "brink_location": {
        "description": "The alpha numeric string provided by the Brink POS API to identify the store location, e.g. tSm8y1TMSk7J4ZMyQBpeTg==",
        "type": "string",
        "required": true,
        "setting": "brink_location"
      },
      "accessToken": {
        "description": "The alpha numeric string provided by the Brink POS API to authenticate the user",
        "type": "string",
        "required": true,
        "setting": "accessToken"
      },
      "uri": {
        "description": "The url for the Brink POS API service e.g. https://api2.brinkpos.net/",
        "type": "string",
        "required": true,
        "setting": "uri"
      }
    }

offline=true/false

Offline controls whether the container will cache application information for offline use. If offline=true and the user launches the application, any data that was previously loaded will be available when the device is offline. This will also enable queuing of data to write to the IoT Platform if the application has write permissions.

single_container_app=true/false

single_container_app tells the container know whether the app should be displayed with a menu (a collection of apps) or as a standalone single app. Bodhi Mobile has single_container_app = false. Bodhi Reveal has single_container_app = true

hide_from_global_store=true/false

hide_from_global_store controls whether the app is available to the general public to see in the global app store. Apps like Settings which cannot be removed should have hide_from_global_store=true

new_type_required=true/false

new_type_required tells the installer of the app in the global app store if the app will run 'out of the box’ or if new custom types need to be installed on the namespace. NOTE:: if new_type_required=true, troubleshooting_url should be required

screenshots{}

The screenshots array contains relative paths to screenshots which the Global App Store will use for display purposes. These files should be included in the app folder that is published and the path should be relative to the public_path.

data_dir:{}

The data_dir formatted information contains a description, a required flag, type string and an optional position which is set will position the parameter in the order set 0, 1, 2, etc if not set then the parameter will be displayed in the order it’s defined.

“autoUpdateVersion”: “false”

This flag prevents autoUpdate version of the app each time you publish. If you mark this false, you need to manually bump the version of the app each time you update it.

Example Type Definition

This is an example of an enumeration, embedded_type and custom_type.

NOTE: All enumerations must be declared first, embedded_type must be after enumerations and custom_types have to be defined after enumerations and embedded_types: This example shows the objects as folders under the application’s root directory. This is where you define your json for each type. There is a one to one correspondence of the type declared in package.json to the json defining that type in the folder under the application.

Defining your custom schema/types example:
"install": {
"new": {
"model": [
{
"type": "enumeration",
"name": "TypeName",
"object": "Enumerations/TypeName.json"
},
{
"type": "embedded_type",
"name": "InventoryPurchaseOrder",
"object": "Types/InventoryPurchaseOrder.json"
},
{ "type": "custom_type",
"name": "TypeName2",
"object": "Types/TypeName2.json"
}
],
"post-type-install": [
{"action": "POST",
"object": "Data/DataFile.json",
"path": "/resources/DataFile"
}
]

Adding Scripts and Versioning: “versions”: [..]

To make an application script available set the following in the settings section of your package.json:

Template for adding scripts/versions to package.json
versions:[
{
    "version": "<script_version>",
    "bundle": "<jar_name>",
    "pre-type-install": {
      "main": "<main_class_name>"
    },
    "post-type-install": {
      "main": "<main_class_name>"
    }
]
Example of versions/scripts using seed-data:
    "versions": [
      {
        "bundle": "installer.jar", 
        "post-type-install": {}, 
        "pre-type-install": {}, 
        "seed-data": [
          {
            "action": "POST", 
            "object": "Data/measurements.json", 
            "path": "/resources/InventoryUnitOfMeasure"
          }, 
          {
            "action": "POST", 
            "object": "Data/conversions.json", 
            "path": "/resources/InventoryUomConversion"
          }
        ], 
        "version": "new"
      }, 
      {
        "bundle": "upgrade-3.0.0.jar", 
        "post-type-install": {
          "main": "com.bodhi.vertx.appinstaller.script.DeveloperScript"
        }, 
        "version": "2.7.19"
      }
    ]

HotSchedules IoT Platform Mobile API

Overview

The HotSchedules IoT Platform Mobile API provides application developers access to native device features for use in web applications. These features are typically unavailable in the HTML5 specification, not uniformly supported across all mobile browsers or improve on the orginal HTML5 spec. In some cases new features have been added that combine several device characteristics into one, for example bar code scanning uses camera storage and image recognition.

There is only one API required to deliver applications on Android IOS mobile devices.

The Bodhi Mobile API provides interface to the native features of a mobile device across iOS and Android.

See descriptions and info below:: (For full implementation details, see our detailed docs on

Bodhi Mobile API

Getting Started

HotSchedules Passbook is a mobile application than allows users to access their data on any mobile device.

With HotSchedules Passbook for IOS and Android you can access and publish applications accessing sales, labor and metrics data. HotSchedules Passbook allows hybrid applications to be deployed and immediately live in HotSchedules Passbook.

Building Your Mobile Application

With HotSchedules Passbook you can build Native, HTML5 or Hybrid applications.

The easiest way to get your app out to customers