NAV
navbar

Summary

The Altametrics Cloudbridge provides functionality for vendors and third party integrators to export POS/BOH data for automatic uploading to Hubworks applications. This document describes the acceptable formats and file conventions for this purpose.

  • Hourly Summary
  • Day Part Sales Summary
  • Daily Summary
  • Metadata

Hourly Summary

Five specific data points (net sales, transaction count, guest count, labor cost and labor hours) broken down by hour. The Hourly Summary can be run every hour during the current business date, or processed at day’s closing.

Day Part Sales Summary

Sales and transactions broken down into 15 minute day parts. Attributes include guest count, transaction count, net sales and gross sales.

Daily Summary

A list of named values, or daily keys. Some keys are standard and required for proper reporting by Hubworks. The exporting system can also generate a number of custom keys. The Daily Summary is uploaded at the end of the business date

Metadata

A file defining report sections and associated daily keys. Metadata can be exported as needed

If adjustments need to be made to prior business dates (e.g. labor adjustments), the Hourly and Daily Summaries can be re-exported, as long as they are within 10 days of the current business date
Data can be provided as a set of four XML or CSV files. The exporting application must adhere to the strict file naming and format conventions which are described in this document.

Export Folder & File Formats

Five specific data points (net sales, transaction count, guest count, labor cost and labor hours) broken down by hour. The Hourly Summary can be run every hour during the current business date, or processed at day’s closing.

Windows Vista and above

c:\ProgramData\Altametrics\Cloudbridge\HubWorks

Windows XP

c:\Documents and Settings\All Users\Application Data\Altametrics\Cloudbridge\HubWorks

The Altametrics Cloudbridge will delete the export files after successful transmission. Any files in the export folder older than 30 days will be deleted automatically.

Hubworks provides two different file types for exporting data: XML and CSV. Although CSV is supported, CSV files will be converted to XML before transmission to Hubworks, so XML is the preferred format.

There are four different export files: the Hourly Summary, the Daily Summary, the Day Part Sales Summary and the Metadata. If metadata is written as a CSV file, an XML file will be generated from it, and the XML file will remain on disk until/unless the CSV file is updated.

Hourly Summary

The Hourly Summary includes a list of five specific data points. The Cloudbridge Service will look for an Hourly Summary file for the current business date once an hour throughout the day. Hourly Exports can also be generated for past business dates (up to 10 days past), but these will only be uploaded by the Cloudbridge Service once a day. The exporting application should regenerate Hourly Summaries for previous business dates only if the data has actually changed since the previous export.
The Hourly Summary should contain data only for a single business date. This means that if the business date closes at 2:00 AM, the entries for 1:00 to 2:00 AM represent data from the calendar date after the entries for 2:00 to 3:00 AM.
The Hourly Summary should contain data for each hour of the day where data is available. It is unnecessary to export entries for hours which contain no nonzero values.

  • Hourly Summary CSV Example
  • Hourly Summary XML Example

Hourly Summary CSV Example

The Hourly Summary can be exported as a CSV file. The file must be named “hourly_YYYYMMDD.csv”, (where YYYYMMDD is the business date) in order to be processed by the Altametrics Cloudbridge. A header row is optional (for readability) but will be discarded by the Cloudbridge.

The columns are as follows:

1. The hour (1-24), with 1 being the hour from midnight to 1:00 AM.
2. Net Sales
3. Transaction Count
4. Guest Count
5. Hourly Labor Cost
6. Hourly Labor Hours

Hour, NetSales, Transactions, Guests, LaborCost, LaborHours

9,16.45,2,2.69,0.25
10,260.44,17,35,32.96,3
11,711.80,56,107,43.67,4.33
12,611.58,61,119,57.20,6

Hourly Summary XML Example

Alternatively, The Hourly Summary may be exported in the form of an XML file. The file must be named “hour_YYYYMMDD.xml” (where YYYYMMDD is the business date) in order to be processed by the Altametrics Cloudbridge. A full XML Schema will be provided as an appendix to this document, but a sample fragment is supplied here:



  
    
    
    
    
  

Day Part Sales Summary

Sales information, including net and gross sales, guest and transaction counts can be summarized by 15-minute day parts. This gives a finer level of detail than the hourly summary, but tracks fewer data points. Even though there is some overlap of the data points from the Hourly Summary and the Day Part Sales Summary, both exports are independent and both should be populated by the exporting application.
Day Part Sales information should contain information for a single business date. If the business date changes after midnight, this means that the data will contain elements from two different calendar dates.

Each line has a start time, represented in HH:MM format, with the period from midnight to 12:15 AM being “00:00”, and the period from 12:45 PM to midnight being “23:45”.

The Day Part Summary file may be exported as “daypart_YYYYMMDD.csv” or “daypart_YYYYMMDD.xml”

  • Day Part Summary CSV Example
  • Day Part Summary XML Example

Day Part Summary CSV Example

StartTime,NetSales,GrossSales,Transactions,Guests

07:00,19.38,20.93,3,3
07:15,34.17,36.90,6,6
07:30,32.29,34.87,4,6
07:45,52.94,57.18,9,9

Day Part Summary XML Example

<?xml version="1.0" encoding="utf-8"?>
<HubWorks>
<DayPartSales>
<DayPart start="07:00" netSales="19.38" grossSales="20.93" transactions="3" guests="3"/>
<DayPart start="07:15" netSales="34.17" grossSales="36.90" transactions="6" guests="6"/>
<DayPart start="07:30" netSales="32.29" grossSales="34.87" transactions="4" guests="6"/>
<DayPart start="07:45" netSales="52.94" grossSales="57.18" transactions="9" guests="9"/>
</DayPartSales>
</HubWorks>

Forecast

Create Forecast

Post Data:


        {
        "eoSiteMain": 24,
        "busiDate": "10/31/2015",
        "fctConfNumb1": 1225.25,
        "fctConfNumb2": 300,
        "fcdDetailArray":
            [
                {
                "fctConfNumb1": 23.50,
                "fctConfNumb2": 6,
                "indexNum": 0    
                },
                {
                "fctConfNumb1": 10,
                "fctConfNumb2": 1,
                "indexNum": 2    
                },
                {
                "fctConfNumb1": 43.36,
                "fctConfNumb2": 12,
                "indexNum": 44     
                },
                {
                "fctConfNumb1": 55.63,
                "fctConfNumb2": 13,
                "indexNum": 45     
                }
            ]
        }
        

Sample Response:


        {
            "success": true
        }

To create the forecast data a request should be sent as mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoFcdMain/create

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameters Details

Parameter Description Data Type
eoSiteMain Site’s Primary Key. Long
busiDate The date for which the forecast will be fed in.It needs to be in MM/DD/YYYY and in double quotes. String
fctConfNumb1 Total number of forecasted sales for the above mentioned busiDate. Double
fctConfNumb2 Total number of forecasted Transactions for the above mentioned busiDate. Integer
fcdDetailArray Contains list of sales and transactions per index. Array
indexNum Index of the day.An IndexNum indicates 15 minutes. Integer

Get Forecast

Post Data:


        {
        “eoSiteMain”: 24,
        “startDate”: “11/21/2015”,
        “endDate”:”11/21/2015”
        }

Sample Response:


            {
                "data": [
                {
                    "isMgrAdjusted": false,
                    "busiDate": "11/21/2015",
                    
                    "fctConfNumb2": 25,
                    "fctConfNumb1": 78.56,
                    "mgrFctConfNumb1": 80.60,
                    "mgrFctConfNumb2": 26,
                    "isClosedDay": false,
                    "fcdDetailArray": [
                    {
                    "fctConfNumb2": 10,
                    "fctConfNumb1": 20.56,
                    "mgrFctConfNumb1": 0,
                    "indexNum": 0,
                    "forcastedStaff": 0,
                    "primaryKey": 62334
                    },
                    {
                    "fctConfNumb2": 11,
                    "fctConfNumb1": 16.56,
                    "mgrFctConfNumb1": 0,
                    "indexNum": 1,
                    "forcastedStaff": 0,
                    "primaryKey": 62335
                    },
                    {
                    "fctConfNumb2": 6,
                    "fctConfNumb1": 23.56,
                    "mgrFctConfNumb1": 0,
                    "indexNum": 30,
                    "forcastedStaff": 0,
                    "primaryKey": 62336
                    },
                    {
                    "fctConfNumb2": 6,
                    "fctConfNumb1": 30.56,
                    "mgrFctConfNumb1": 0,
                    "indexNum": 31,
                    "forcastedStaff": 0,
                    "primaryKey": 62337
                    }				
                …
            …
            ],
            "primaryKey": 651
            }
            ],
            "success": true
            }

The fetch Forecasted data from the HubWorks application, the request should be in the below mentioned format:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoFcdMain/list

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Detail

Parameter Description Data Type
eoSiteMain Site’s Primary Key. Long
startDate Start Date of start date range which we need forecast for. This value needs to be in double quotes and in MM/DD/YYYY format. String
endDate End Date is end date range in which we need forecast. This value needs to be in double quotes and in MM/DD/YYYY format. String
Parameter Description Data Type
fctConfNumb2 Total number of Transactions for the above mentioned business date. Integer
fctConfNumb1 Sales for the above mentioned business date. Double
IndexNum Index of the day. An index indicates 15 minutes i.e. if the index is 0 then the time is from 12:00a to 12:15a or if the index is 1 then the time is 12:15a to 12:30a. There are total 96 indices in a day i.e. from 0 to 95. The 95th index indicates 11:45p to 12:00a. Integer
mgrFctConfNumb1 Manager adjusted forecasted sales. Double
mgrFctConfNumb2 Manager adjusted forecasted transaction. Integer
Primary Key Unique Identifier for the object. Long
fcdDetailArray This array will contain the forecasted data based on 15 minute indexes.  Array
busiDate The date for which the data is fetched. It needs to be in MM/DD/YYYY format and in double quotes. String
isClosedDay Whether the day is closed or not. Boolean
isMgrAdjusted If the forecasted data is adjusted by manager or not. Boolean
Parameter Description Data Type
fctConfNumb2 Forecasted Transactions. Integer
fctConfNumb1 Forecasted Sales. Double
IndexNum Index of the day. An index indicates 15 minutes i.e. if the index is 0 then the time is from 12:00a to 12:15a or if the index is 1 then the time is 12:15a to 12:30a. There are total 96 indices in a day i.e. from 0 to 95. The 95th index indicates 11:45p to 12:00a. Integer
mgrFctConfNumb2 Manager adjusted forecasted transaction. Integer
mgrFctConfNumb1 Manager adjusted forecasted sales. Double
forecastedStaff Forecasted Staff. Integer
primaryKey Unique identifier for the detail. Long

Employees

This section lists all the APIs that are related to Employee Management. Employee Management is not different for Zip Schedules and Zip Clock.
Note: Hubworks applications share the same employee records. Any change made to the employee record from either UI or any of the Hubworks web/mobile application will reflect everywhere.

Create New Employee

Post Data:


        {
            "eoSiteMain": 2,
            "firstName": "Mark",
            "lastName": "Johnson",
            "isMaxHrsPerWk": false,
            "payRate": 800,
            "maxHrsPerWk": 0,
            "eoEmpPositionArray":
            [
                {
                "skillLevel":5,
                "eoLkJobPosition":51
                },
                {
                "skillLevel":3,
                "eoLkJobPosition":53
                }
                ],
                "eoEmpCertificationArray":
                [
                {
                "expiryDate":"10/29/2015",
                "eoLkCertification":50
                },
                {
                "expiryDate":"10/29/2015",
                "eoLkCertification":52
                }
            ],
            
            "emailID": "mjohnson@hubworks.com",
            "samlUserID" : "anm123",
            "eoCustJobCode": "altaJobCode_3",
            "employeeId": 7899,
            "cellNumber": 8976879879,
            "isMinor": false
        }

Sample Response:


		{
		"data": 
		{
		"payRate": 800,
		"lastName":"Johnson",
		"isMinor": false,
		"primaryKey": 1415,
		"cellNumber": 2096144085,
		"maxHrsPerWk": 0,
		"eoEmpPositionArray":
		[
			{
			"skillLevel":5,
			"eoLkJobPosition":51
			},
			{
			"skillLevel":3,
			"eoLkJobPosition":53
			}
			],
			"eoEmpCertificationArray":
			[
			{
			"expiryDate":"10/29/2015",
			"eoLkCertification":51
			},
			{
			"expiryDate":"10/29/2015",
			"eoLkCertification":52
			}
		]

		"emailID": "mjohnson@hubworks.com",
		"isMaxHrsPerWk": false,
		"firstName": "Mark",
		"employeeId": "78997",
		"samlUserID" : "anm123",
		"eoCustJobCode": "altaJobCode_3"
		},
		"success": true
		}



To add a new employee in the application, a request should be sent as mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpMain/create

Header Data: “apiKey”: "9427880e727347038af8f9e250a449c8f9fe"

Parameters Details

Parameter Description Data Type
eoSiteMain Primary key of the Site. Long
firstName First name of the employee .It needs to be in double quotes. String
lastName Last name of the employee. It needs to be in double quotes. String
payRate Pay Rate of the employee will be sent in multiples of 100. As per this sample the pay rate is $8.00. Integer
maxHrsPerWk Value of maximum hour per week. Integer
isMaxHrsPerWk If ACA practice applies to the employee or not. Boolean
emailID Email id of the employee. It needs to be in double quotes. String
eoCustJobCode The employee’s role (Manager, Supervisor, Crew). It needs to be in double quotes. String
isMinor If the employee is minor or not. Boolean
employeeId Employee ID of the employee. This needs to be unique for every employee. Integer
eoEmpPositionArray Array of position assigned to employee. Integer
skillLevel Skill level of position. Integer
eoLkJobPosition Position assigned to the shift. Integer
eoEmpCertificationArray Array of certification assigned to employee. Integer
eoLkCertification Certification assigned to the shift Integer
expiryDate Expiry date of certification. It needs to be in MM/DD/YYYY format in double quotes. String
cellNumber Phone number of the employee Long
samlUserID SAML user id is used for SSO authentication purpose. It needs to be in double quotes. String

Get Employee List

Post Data:


        { 
            "eoSiteMain": 37
        }


Sample Response:


        {
            "data": [
                {
                "employeeId": "21",
                "payRate": 800,
                "lastName": "John",
                "emailID": "john@hubworks.com",
                "isMinor": false,
                "eoEmpPositionArray":[
                {
                "skillLevel": 0,
                "eoLkJobPosition": 190,
                "primaryKey": 5496
                }
                ],
                "primaryKey": 1506,
                "cellNumber": 8976567123,
                "maxHrsPerWk": 0,
                "eoEmpCertificationArray": [
                {
                "eoLkCertification": 30,
                "expiryDate": "11/11/2015",
                "primaryKey": 49
                }
            ],
                "isMaxHrsPerWk": false,
                "firstName": "Mark",
                "samlUserID" : "anm123",
                "eoCustJobCode": "altaJobCode_5"
                },
                {
                "employeeId": "22",
                "payRate": 800,
                "lastName": "Kim",
                "emailID": "kim@hubworks.com",
                "isMinor": false,
                "eoEmpPositionArray": [
                {
                "skillLevel": 0,
                "eoLkJobPosition": 190,
                "primaryKey": 5496
                }
                ],
                "primaryKey": 1506,
                "cellNumber": 0,
                "maxHrsPerWk": 0,
                "eoEmpCertificationArray": [
                {
                "eoLkCertification": 30,
                "expiryDate": "11/11/2015",
                "primaryKey": 49
                }
                ],
                "isMaxHrsPerWk": false,
                "firstName": "Watson",
                "samlUserID" : "asd789",
                "eoCustJobCode": "altaJobCode_3"
                }
            ],
            "success": true
        }

To fetch Employee’s data from Hubworks application a request should be sent in the below mentioned format:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpMain/list

Header Data: “apiKey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameters Details

Parameter Description Data Type
eoSiteMain Site’s Primary Key Long
Parameter Description Data Type
primaryKey Primary key of the employee. Long
firstName First name of the employee. It needs to be in double quotes. String
lastName Last name of the employee. It needs to be in double quotes. String
payRate Pay Rate of the employee will be sent in multiples of 100. As per this sample the pay rate is $8.00. Integer
maxHrsPerWk Value of maximum hour per week. Integer
isMaxHrsPerWk If ACA practice applies to the employee or not. Boolean
emailID Email id of the employee. It needs to be in double quotes. String
eoCustJobCode The employee’s role (Manager, Supervisor, Crew). It needs to be in double quotes. String
isMinor If the employee is minor or not. Boolean
employeeID Employee ID of the employee. Integer
eoEmpPositionArray Array of position assigned to employee. Integer
eoLkJobPosition Position assigned to the shift. Integer
skillLevel Skill level of position. Integer
primaryKey Primary key of position. Integer
eoEmpCertificationArray Array of certification assigned to employee. Array
primary Key Primary key of certification. Integer
eoLkCertification Certification assigned to the shift. Integer
expiryDate Expiry date of certification. It needs to be in MM/DD/YYYY format and in double quotes. String
Phone number of the employee. Long
samlUserID SAML user id is used for SSO authentication purpose. It needs to be in double quotes. String

Update Employee

Post Data:


            {
            "primaryKey": 1,
            "firstName": "Mark",
            "lastName": "Johnson",
            "isMaxHrsPerWk": false,
            "payRate": 800,
            "maxHrsPerWk": 0,
            "eoEmpPositionArray":
            [
                {
                "primaryKey":101,
                "skillLevel":5,
                "eoLkJobPosition":51
                },
                {
                "primaryKey":102,
                "skillLevel":5,
                "eoLkJobPosition":53
                }
                ],
                "eoEmpCertificationArray":
                [
                {
                "primaryKey":222,
                "expiryDate":"10/31/2015",
                "eoLkCertification":50
                },
                {
                "primaryKey":223,
                "expiryDate":"10/31/2015",
                "eoLkCertification":52
                }
            ],
            "emailID": "mjohnson@hubworks.com",
            "samlUserID" : "anm123",
            "eoCustJobCode": "altaJobCode_3",
            "employeeId": 78997,
            "cellNumber": 8976879879,
            "isMinor": false
            }   
        

Sample Response:


        {
            "data":
            {
            {
            
            "primaryKey": 1,
            "firstName": "Mark",
            "lastName": "Johnson",
            "isMaxHrsPerWk": false,
            "payRate": 800,
            "maxHrsPerWk": 0,
            "eoEmpPositionArray":
            [
                {
                "primaryKey":101,
                "skillLevel":5,
                "eoLkJobPosition":51
                },
                {
                "primaryKey":102,
                "skillLevel":5,
                "eoLkJobPosition":53
                }
                ],
                "eoEmpCertificationArray":
                [
                {
                "primaryKey":222,
                "expiryDate":"10/31/2015",
                "eoLkCertification":50
                },
        
                {
                "primaryKey":223,
                "expiryDate":"10/31/2015",
                "eoLkCertification":52
                }
            ],
                "emailID": "mjohnson@hubworks.com",
                "samlUserID" : "anm123",
                "eoCustJobCode": "altaJobCode_3",
                "employeeId": "78997",
                "cellNumber": 8976879879,
                "isMinor": false
            },
            "success": true,
        
            }

To update Employee’s record in Hubworks application the request should be sent in the below mentioned format:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpMain/update
Header Data: "apiKey": "9427880e727347038af8f9e250a449c8f9fe"

Parameters Details

Parameter Description Data Type
Primary key Primary key of the employee Long
firstName First name of the employee. It needs to be in double quotes. String
lastName Last name of the employee. It needs to be in double quotes. String
payRate Pay Rate of the employee will be sent in multiples of 100. As per this sample the pay rate is $8.00. Integer
maxHrsPerWk Value of maximum hour per week. Integer
isMaxHrsPerWk If ACA practice applies to the employee or not. Boolean
emailID Email id of the employee. It needs to be in double quotes. String
eoCustJobCode The employee’s role (Manager, Supervisor, Crew). It needs to be in double quotes. String
isMinor If the employee is minor or not. Boolean
employeeId Employee ID of the employee. Integer
primaryKey Primary key of position. Integer
eoEmpPositionArray Array of position assigned to employee. Integer
skillLevel Skill level of position. Integer
eoLkJobPosition Position assigned to the shift. Integer
primaryKey Primary key of certification. Integer
eoEmpCertificationArray Array of certification assigned to employee. Integer
eoLkCertification Certification assigned to the shift. Integer
expiryDate Expiry date of certification. It needs to be in MM/DD/YYYY format and in double quotes. String
cellNumber Phone number of the employee. Long
samlUserID SAML user id is used for SSO authentication purpose. It needs to be in double quotes. String
Parameter Description Data Type
Primary key Primary key of the employee Long
firstName First name of the employee. It needs to be in double quotes. String
lastName Last name of the employee. It needs to be in double quotes. String
payRate Pay Rate of the employee will be sent in multiples of 100. As per this sample the pay rate is $8.00. Integer
maxHrsPerWk Value of maximum hour per week. Integer
isMaxHrsPerWk If ACA practice applies to the employee or not. Boolean
emailID Email id of the employee. It needs to be in double quotes. String
eoCustJobCode The employee’s role (Manager, Supervisor, Crew). It needs to be in double quotes. String
isMinor If the employee is minor or not. Boolean
employeeId Employee ID of the employee. Integer
primaryKey Primary key of position. Integer
eoEmpPositionArray Array of position assigned to employee. Integer
skillLevel Skill level of position. Integer
eoLkJobPosition Position assigned to the shift. Integer
primaryKey Primary key of certification. Integer
eoEmpCertificationArray Array of certification assigned to employee. Integer
eoLkCertification Certification assigned to the shift. Integer
expiryDate Expiry date of certification. It needs to be in MM/DD/YYYY format and in double quotes. String
cellNumber Phone number of the employee. Long
samlUserID SAML user id is used for SSO authentication purpose.It needs to be in double quotes. String

Delete Employee

Post Data:


        {
        "primaryKey": 1
        }

Sample Response:


        {
        "Success": true
        }

To delete an employee from the application, following is the request mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpMain/delete
Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe"

Parameters Details

Parameter Description Data Type
primaryKey Primary Key of the employee. Long

Terminate Employee

Post Data:


        {
        "eoSiteMain":123,
        "primaryKey":34
        }

Sample Response:


        {
            "success": true
        }

To terminate an employee from a store, following is the request mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpMain/terminate

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe"

Parameter Detail

Parameter Description Data Type
eoSiteMain Primary key of the Site. Long
Primary key Primary Key of the employee. Long

Employee Sharing

Post Data:


        {
        "siteArray":[11,22],
        "primaryKey":34
        }
        
        

Sample Response:


        {
        "Success": true
        }

Sharing a Partner is a process in which partner is shared in multiple sites through API. In Partner sharing API we provide the desired site’s primary key and share the partner to that site. In sharing a partner we provide partner primary key and sites primary key in the site array. We can provide multiple numbers of sites while sharing partner.

Following is API for sharing a partner into multiple stores.

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpMain/share
Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe"

Parameters Details

Parameter Description Data Type
siteArray Array of Sites. Long
eoEmpMain Primary Key of the partner. Long

Reactivate Employee

Post Data:


        {
        "primaryKey": 1
        }

Sample Response:


        {
        "Success": true
        }

To reactivate a terminated employee from the application or from a site, following is the request mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpMain/activate
Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe"

Parameters Details

Parameter Description Data Type
primaryKey Primary Key of the employee. Long

Shifts

Create Shift

Post Data:


        {
        "eoSiteMain": 24,
        "startIndex": 32,
        "endIndex": 63,
        "busiDate": "12/22/2015",
        "eoLkJobPosition": 6,
        "isPosted": false,
        "breakMnts": 30,
        "eoEmpMain": 241,
        "payRate": 800
        }

Sample Response:


        {
        "data": {
        "breakMnts": 30,
        "startIndex": 32,
        "endIndex": 63,
        "busiDate": "09/11/2015",
        "payRate": 800,
        "eoEmpMain": 241,
        "eoLkJobPosition": 6,
        "primaryKey": 627,
        "isPosted": false
        },
        "success": true
        }

To create a shift in the application, following is the request mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpShift/create

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Detail

Parameter Description Data Type
eoSiteMain Site’s Primary Key. Long
startIndex Shift Start Index. Integer
endIndex Shift End Index. Integer
busiDate The date for which the shift is being created. It needs to be in MM/DD/YYYY format and in double quotes. String
eoLkJobPosition Position assigned to the shift. Integer
isPosted If the shift is published or not. Boolean
breakMnts Total break minutes. Integer
eoEmpMain Employee’s primary key. Long
payRate Pay Rate of the employee multiplied by 100. As per this sample the pay rate is $8.00. Integer
Parameter Description Data Type
eoSiteMain Site’s Primary Key. Long
startIndex Shift Start Index. Integer
endIndex Shift End Index. Integer
busiDate The date for which the shift is being created. It needs to be in MM/DD/YYYY format and in double quotes. String
eoLkJobPosition Position assigned to the shift. Integer
isPosted If the shift is published or not. Boolean
breakMnts Total break minutes. Integer
eoEmpMain Employee’s primary key. Long
payRate Pay Rate of the employee multiplied by 100. As per this sample the pay rate is $8.00. Integer

Get Shift List

Post Data:


        {
        “eoSiteMain”  : 24,
        “startDate”: “09/11/2015”,
        “endDate”:”09/14/2015”
        }

Sample Response:


        {
        "data": [
        {
        "payRate": 800,
        "breakMnts": 30,
        "startIndex": 32,
        "eoEmpMain": 244,
        "eoLkJobPosition": 6,
        "primaryKey": 628,
        "busiDate": "09/11/2015",
        "endIndex": 63,
        "isPosted": true
        },
        {
        "payRate": 0,
        "breakMnts": 0,
        "startIndex": 44,
        "eoEmpMain": 241,
        "eoLkJobPosition": 40,
        "primaryKey": 630,
        "busiDate": "09/13/2015",
        "endIndex": 71,
        "isPosted": true
        },
    
        {
        "payRate": 0,
        "breakMnts": 15,
        "startIndex": 32,
        "eoEmpMain": 241,
        "eoLkJobPosition": 39,
        "primaryKey": 626,
        "busiDate": "09/11/2015",
        "endIndex": 63,
        "isPosted": false
        }
        ],
        "success": true
        }
    

The data can be fetched only for 3 weeks in one go for a particular site.
The fetch Shift’s data from the Hubworks application the request should be in the below mentioned format:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpShift/list

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Details

Parameter Description Data Type
eoSiteMain Site’s Primary Key. Long
startDate Start Date is the date from which the data is required. we need the data. It needs to be in MM/DD/YYYY format in double quotes. String
endDate End Date is the date till we need the data. It needs to be in MM/DD/YYYY format and in double quotes. String
Parameter Description Data Type
eoSiteMain Site’s Primary Key. Long
startDate Start Date is the date from which the data is required. we need the data. It needs to be in MM/DD/YYYY format in double quotes. String
endDate End Date is the date till we need the data. It needs to be in MM/DD/YYYY format and in double quotes. String

shift based on Employee

Post Data:


        {
        "eoEmpMain"  : 500,
        "startDate": "10/20/2015",
        "endDate": "10/24/2015"
        }

Sample Response:


        {
        "data":
        {
        "title": "Ashley Jones",
        "empData":
        [
        {
        "shiftArray":
        [
        {
        "payRate": 800,
        "breakMnts": 30,
        "startIndex": 32,
        "eoEmpMain": 281,
        "primaryKey": 978,
        "busiDate": "10/21/2015",
        "endIndex": 63,
        "isPosted": true
        },
        {
        "payRate": 0,
        "breakMnts": 0,
        "startIndex": 32,
        "eoEmpMain": 281,
        "primaryKey": 979,
        "busiDate": "10/22/2015",
        "endIndex": 63,
        "isPosted": true
        },
        {
        "payRate": 0,
        "breakMnts": 0,
        "startIndex": 32,
        "eoEmpMain": 281,
        "primaryKey": 980,
        "busiDate": "10/23/2015",
        "endIndex": 63,
        "isPosted": true
        }
        ],
        "eoSiteMain": 27,
        "siteName": "Site 1"
        },
        {
        "shiftArray":
        [
        {
        "payRate": 0,
        "breakMnts": 0,
        "startIndex": 32,
        "eoEmpMain": 281,
        "primaryKey": 981,
        "busiDate": "10/24/2015",
        "endIndex": 63,
        "isPosted": true
        },
        {
        "payRate": 0,
        "breakMnts": 0,
        "startIndex": 32,
        "eoEmpMain": 281,
        "primaryKey": 982,
        "busiDate": "10/25/2015",
        "endIndex": 63,
        "isPosted": true
        }
        ],
        "eoSiteMain": 30,
        "siteName": "Site 2"
        }
        ],
        "emailID": "ajones@test.com"
        },
        "success": true
        }

To retrieve data of an employee from the application, following is the request mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpMain/schedule

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe"

Parameter Detail

Parameter Description Data Type
eoEmpMain Employee’s Primary Key  Long
startDate Start Date is the the date from which the data is required..It needs to be in MM/DD/YYYY format and in double quotes. String
endDate End Date is the date till we need the data. It needs to be in MM/DD/YYYY format and in double quotes. String
Parameter Description Data Type
Title Name of the employee. String
payRate Pay Rate of the employee will be sent in multiples of 100. As per this sample the pay rate is $8.00. Integer
breakMnts Shift break minutes. Long Integer
startIndex Shift Start Index. Integer
eoEmpMain Primary key of the employee. Long
primaryKey Primary key of the shift. Integer
busiDate Date in which the shift is created. It will be in quotes and in MM/DD/YYYY format. String
endIndex Shift End Index. Integer
isPosted If the shift is published or not. Boolean
eoSiteMain Site’s Primary Key. Long
Sitename Name of the site. String
emailID Email id of the employee. String

Update Shift

Post Data:


        {
        "primaryKey": 6,
        "startIndex": 32,
        "endIndex": 63,
        "eoLkJobPosition": 6,
        "busiDate": "12/22/2015",
        "isPosted": false,
        "breakMnts": 30,
        "eoEmpMain": 16,
        "payRate": 800
        }

Sample Response:


        {
        "data": {
        "payRate": 800,
        "breakMnts": 30
        "startIndex": 32,
        "eoEmpMain": 16,
        "eoLkJobPosition": 38,
        "primaryKey": 6,
        "busiDate": "12/22/2015",
        "endIndex": 63,
        "isPosted": false
        },
        "success": true
    
        }

To update the shift from the application, Following is the request mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpShift/update

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe"

Parameter Detail

Parameter Description Data Type
primaryKey Shift’s Primary Key. Long
startIndex Shift Start Index. Integer
endIndex Shift end Index. Integer
eoLkJobPosition Position assigned to the shift. Integer
busiDate The date for which the shift belongs to. It needs to be in MM/DD/YYYY format and in double quotes. String
isPosted If the shift is published or not. Boolean
breakMnts Total break minutes. Integer
eoEmpMain Employee’s Primary key. Long
payRate Pay Rate of the employee multiplied by 100. As per this sample the pay rate is $8.00. Integer
Parameter Description Data Type
primaryKey Shift’s Primary Key. Long
startIndex Shift Start Index. Integer
endIndex Shift end Index. Integer
eoLkJobPosition Position assigned to the shift. Integer
busiDate The date for which the shift belongs to. It needs to be in MM/DD/YYYY format and in double quotes. String
isPosted If the shift is published or not. Boolean
breakMnts Total break minutes. Integer
eoEmpMain Employee’s Primary key. Long
payRate Pay Rate of the employee multiplied by 100. As per this sample the pay rate is $8.00. Integer

Delete Shift

Post Data:


    {
    "primaryKey": 6,
    }

Sample Response:


    {
    "success": true
    }

To delete the shift from the application, following is the request mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpShift/delete

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Detail

Parameter Description Data Type
primaryKey Shift’s Primary Key Long

Publish Shift

Post Data:


        {
        "shiftIdArray": [1,12,34]
        }

Sample Response:


        {
        "success": true
        }

To publish the shift in the application, following is the request mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpShift/publish

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Detail

Parameter Description Data Type
shiftIdArray Array of shift’s Primary Key Long

Punches

Get Punch List

Post Data:


        {
        "eoSiteMain"  : 37,
        "startDate": "12/22/2015",
        "endDate": "12/22/2015"
        }

Sample Response:


        {
        "data": [
        {
        "lastModifiedAt": "12/22/2015 09:45",
        "punchStatus": "CLOCKED_IN",
        "eoLkPosition": 33,
        "isWkFinalized": false,
        "busiDate": "12/22/2015",
        "schStatus": "NOT_ELIGIBLE",
        "statusIID": "MODIFIED",
        "eoEmpMain": 185,
        "startTime": 306,
        "isApproved": true,
        "eoTdyEmpBrkDetailArray": [
        {
        "busiDate": "12/22/2015",
        "startTime": 459,
        "endTime": 534,
        "primaryKey": 10
        }
        ],
        "primaryKey": 41
        },
        {
        "lastModifiedAt": "12/22/2015 09:47",
        "punchStatus": "CLOCKED_IN",
        "eoLkPosition": 33,
        "isWkFinalized": false,
        "busiDate": "12/22/2015",
        "schStatus": "NOT_ELIGIBLE",
        "statusIID": "MODIFIED",
        "eoEmpMain": 276,
        "startTime": 166,
        "isApproved": true,
        "eoTdyEmpBrkDetailArray": [
        {
        "busiDate": "12/22/2015",
        "startTime": 207,
        "endTime": 220,
        "primaryKey": 11
        }
        ],
        "primaryKey": 42
        },
        {
        "punchStatus": "CLOCKED_IN",
        "eoLkPosition": 34,
        "isWkFinalized": false,
        "busiDate": "12/22/2015",
        "schStatus": "NOT_ELIGIBLE",
        "eoEmpMain": 178,
        "startTime": 411,
        "isApproved": true,
        "eoTdyEmpBrkDetailArray": [],
        "primaryKey": 37
        }
        ],
        "success": true
        }

To fetch punches data from the application following is the format of the request that needs to be sent:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoTdyEmpPunchDetail/list

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Detail

Parameter Description Data Type
eoSiteMain Primary Key of the Site. Long
startDate Start Date of punch.It will be in double quotes. It needs to be in MM/DD/YYYY format and in double quotes. String
endDate End Date of punch. It will be in double quotes. It needs to be in MM/DD/YYYY format and in double quotes. String
Parameter Description Data Type
Primarykey Primary key of the punch. This field will not be required by Starbucks. Long
busiDate Start Date of a Punch. It needs to be in MM/DD/YYYY format and in double quotes. String
startTime Start time or Clock In time of the punch. It needs to be in minutes. String
endTime End time or Clock Out time of punch. It needs to be in minutes. String
eoEmpMain Employee’s Primary key. Long
lastModifiedAt Time at which the latest change was made to the punch. The format is MM/DD/YYYY HH:MM and in double quotes. String
isApproved Depicts whether the punch is approved or not. This field is important when crew manually updates the punch or performs any action outside the restricted geo location area. Boolean
statusIID It is the status of the punch being modified or not. If the punch is not modified the statusIID field will not be present. It needs to be in double quotes. String
schStatus It is the status which depicts, whether the employee is on schedule or violated his schedule or he is scheduled but clocked in.It needs to be in double quotes. String
eoTdyEmpBreakDetailArray This section contains the list of breaks taken in the corresponding punch. Array of breaks
startTime Break start time and it needs to be in minutes. String
endTime Break end time and it needs to be in minutes. String
isWkFinalized Whether the week is finalized or not. Boolean
primary key Primary key of Break Long
punchStatus It is the current status of the punch, whether the employee is clocked in or on break.If the punch is closed then punch status field will not be present. It needs to be in double quotes. String
eoLkJobPosition Primary key of position to which employee punched in for the corresponding schedule Long

Get Punches based on Employee

Post Data:


        {
        "eoEmpMain"  : 500,
        "startDate": "10/20/2015",
        "endDate": "10/24/2015"
        }

Sample Response:


        {
        "data":
        {
        "title": "Austin Jones",
        "empData":
        [
        {
        "punchArray":
        [
        {
        "StartTime": 300,
        "schStatus": "NOT_ELIGIBLE",
        "eoLkPosition": 34,
        "primaryKey": 964,
        "busiDate": "10/22/2015",
        "isApproved":true,
        "isWkFinalized":false,
        "endTime":420,
        “lastModifiedAt”:”10/23/2015 7:00”
        "eoTdyEmpBrkDetailArray":[]
        },
        {
        "StartTime": 720,
        "schStatus": "NOT_ELIGIBLE",
        "eoLkPosition": 34,
        "primaryKey": 962,
        "busiDate": "10/22/2015",
        "isApproved":true,
        "isWkFinalized":false,
        “statusIID”: Modified,
        "endTime":1080,
        “lastModifiedAt”:”10/23/2015 18:00”
        "eoTdyEmpBrkDetailArray":[]
        },
        {
        "StartTime": 860,
        "schStatus":"NOT_ELIGIBLE",
        "eoLkPosition": 34,
        "primaryKey": 969,
        "busiDate": "10/23/2015",
        "isWkFinalized":false,
        "isApproved":true,
        "endTime":990,
        “lastModifiedAt”:”10/23/2015 16:30”
        "eoTdyEmpBrkDetailArray":
        [
        {
        "startTime": 963,
        "endTime": 971,
        "busiDate":"10/23/2015"
        "primaryKey":67
        }
        ]
        }
        ],
        "eoSiteMain": 150,
        "siteName": "Santa Ana"
        },
        {
        "punchArray":
        [
        {
        "StartTime": 180,
        "schStatus": "NOT_ELIGIBLE",
        "primaryKey": 972,
        "busiDate": "10/22/2015",
        "isApproved":true,
        "isWkFinalized":false,
        "endTime":240,
        “lastModifiedAt”:”10/23/2015 4:10”
        "eoTdyEmpBrkDetailArray":[
        {
        "startTime": 196,
        "endTime": 205,
        "busiDate":"10/22/2015"
        "primaryKey":76
        }
        ]
        },
        {
        "StartTime": 1383,
        "schStatus":"NOT_ELIGIBLE",
        "eoLkPosition": 34,
        "primaryKey": 974,
        "busiDate": "10/22/2015",
        "isApproved":true,
        "isWkFinalized":false,
        ”punchStatus”: CLOCKED_IN,
        “lastModifiedAt”:”10/23/2015 8:10”
        "eoTdyEmpBrkDetailArray":[]
        }
        ],
        "eoSiteMain": 159,
        "siteName": "Costamesa"
        }
        ],
        "emailID": "austin@test.com"
        },
        "success": true
        }
    

To retrieve data of an employee from the application, following is the request mentioned below:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpMain/punches

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe"

Parameter Detail

Parameter Description Data Type
eoEmpMain Employee’s Primary Key  Long
startDate Start Date of punch. It will be in double quotes. It needs to be in MM/DD/YYYY format and in double quotes. String
endDate Start Date of punch. It will be in double quotes. It needs to be in MM/DD/YYYY format and in double quotes. String
Parameter Description Data Type
title Employee’s Name. It needs to be in double quotes String
Primarykey Primary key of the punch. This field will not be required by Starbucks. Long
busiDate Start Date of a Punch. It needs to be in MM/DD/YYYY format and in double quotes. String
startTime Start time or Clock In time of the punch and it needs to be in minutes. String
endTime End time or Clock out time of punch and it needs to be in minutes. String
lastModifiedAt Time at which the latest change was made to the punch. The format is MM/DD/YYYY HH:MM and in double quotes. String
isApproved Depicts whether the punch is approved or not. This field is important when crew manually updates the punch or performs any action outside the restricted geo location area. Boolean
schStatus It is the current status of the schedule, whether the employee on schedule or employee has violated his schedule or employee was not scheduled but clocked in. It needs to be in double quotes. String
eoTdyEmpBreakDetailArray This section contains the list of breaks taken in the corresponding punch. Array of breaks
startTime Break start time and it needs to be in minutes. String
endTime Break end time and it needs to be in minutes. String
busiDate Start Date of a Break. It needs to be in MM/DD/YYYY format and in double quotes. String
eoSiteMain Site’s Primary Key Long
siteName Site’s Name. It needs to be in double quotes String
emailID Employee’s EmailID. It needs to be in double quotes. String
isWkFinalized Whether the week is finalized Boolean
primary key Primary key of Break Long
statusIID It is the status of the punch being modified or not. If the punch is not modified the statusIID field will not be present. It needs to be in double quotes. String
punchStatus It is the current status of the punch, whether the employee is clocked in or on break. If the punch is closed then punch status field will not be present. It needs to be in double quotes. String
eoLkJobPosition Primary key of position to which employee punched in for the corresponding schedule Long

System Punch In

Post Data:


        {
        "eoEmpMain": 12,
        "eoSiteMain": 2
        }

Sample Response:


        {
        "data":{
        "startTime": 730,
        "primaryKey": 92
        },
        "success": true
        }

To punch in from system or sign in from system we will follow following API:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoTdyEmpPunchDetail/punchIn

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Detail

Parameter Description Data Type
eoEmpMain Employee Primary Key Long
eoSiteMain Site Primary Key Long

System Punch Out

Post Data:


        {
        "primaryKey":92
        }

Sample Response:


        {
        "success": true
        }

To punch out from system or sign out from system we will follow following API:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoTdyEmpPunchDetail/punchOut

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Detail

Parameter Description Data Type
PrimaryKey Punch Primary Key Long

Start Break

Post Data:


        {
        "primaryKey":92
        }

Sample Response:


        {
        "success": true
        }

To start break from system for a punch, we will use following API:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoTdyEmpPunchDetail/startBreak

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Detail

Parameter Description Data Type
PrimaryKey Punch Primary Key Long

End Break

Post Data:


        {
        "primaryKey":92
        }

Sample Response:


        {
        "success": true
        }
    

To end break from system for a punch, following API will be used:

Sample Request

URL: https://api.hubworks.com/hw/api/eoTdyEmpPunchDetail/endBreak

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Detail

Parameter Description Data Type
PrimaryKey Punch Primary Key Long

Create Actual in Batch

Post Data:


        [
        {
        "eoSiteMain": 24,
        "busiDate": "10/31/2015",
        "actConfNumb1": 1225.25,
        "actConfNumb2": 300,
        "acdDetailArray":
        [
        {
        "actConfNumb1": 23.50,
        "actConfNumb2": 6,
        "index": 0
        },
        {
        "actConfNumb1": 10,
        "actConfNumb2": 1,
        "index": 2
        },
        {
        "actConfNumb1": 43.36,
        "actConfNumb2": 12,
        "index": 44
        },
        {
        "actConfNumb1": 55.63,
        "actConfNumb2": 13,
        "index": 45
        }
        ]
        },
        {
        "eoSiteMain": 24,
        "busiDate": "11/01/2015",
        "actConfNumb1": 2245.25,
        "actConfNumb2": 456,
        "acdDetailArray":
        [
        {
        "actConfNumb1": 15.50,
        "actConfNumb2": 4,
        "index": 0
        },
        {
        "actConfNumb1": 17.25,
        "actConfNumb2": 6,
        "index": 2
        },
        {
        "actConfNumb1": 36.36,
        "actConfNumb2": 25,
        "index": 44
        },
        {
        "actConfNumb1": 64.63,
        "actConfNumb2": 17,
        "index": 45
        }
        ]
        }
        ]

Sample Response:


        {
        "data":
        [
        {
        "success":true
        },
        {
        "errorCode":"HW008",
        "success":false
        }
        ],
        "success":true
        }

HubWorks support batch processing to create actuals in applications. This section explains the same.
Request Format

[ 1
{
2
[ 3
{
4
},
{
4
}
]
},
{
2
[ 3
{
4
},
{
4
}
]
}
]

1 – This is the start of the array of actual data.
2 – This is the hash of each store which contains data for a busiDate. There can be multiple hashes with combination of eoSiteMain and busiDate. Each hash should end by a comma except the last one, as illustrated in the example.
3 – This is array of index level data for sales and transaction.
4 – This hash contains index level data. There can be multiple indexes data. Each index hash should end with a comma except the last one.

Below is the sample of the request that needs to be sent to add the actuals data in a batch:

Sample Request

URL: https://app.hubworks.com/hwot/api/eoAcdMain/createInBatch

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe"

Parameter Detail

Parameter Description Data Type
eoSiteMain Site’s Primary Key. This is unique identifier/reference to the site. Long
busiDate The date for which actuals need to added. It will be in double quotes and in MM/DD/YYYY format. String
actConfNumb1 Total Sales for the provided busiDate. Double
actConfNumb2 Total number of Transactions for the provided busiDate. Integer
acdDetailArray This array will contain the actual data based on each 15 minute indexes. Integer
Index Index of the day. An Index indicates 15 minutes i.e. if the index is 0 then the time is from 12:00a to 12:15a or if the index is 1 then the time is 12:15a to 12:30a. There are total 96 indices in a day i.e. from 0 to 95. The 95th index indicates 11:45p to 12:00a. Integer

Add Employees in Batch

Post Data:


        [
        {
        "eoSiteMain": 52,
        "firstName": "Mark",
        "lastName": "Johnson",
        "isMaxHrsPerWk": false,
        "payRate": 800,
        "maxHrsPerWk": 0,
        "eoEmpPositionArray":
        [
        {
        "skillLevel": 5,
        "eoLkJobPosition": 51
        },
        {
        "skillLevel": 3,
        "eoLkJobPosition": 53
        }
        ],
        "eoEmpCertificationArray":
        [
        {
        "expiryDate": "10/29/2015",
        "eoLkCertification": 50
        },
        {
        "expiryDate": "10/29/2015",
        "eoLkCertification": 52
        }
        ],
        "emailID": "mjohnson@hubworks.com",
        "eoCustJobCode": 2,
        "employeeId": 7899,
        "cellNumber": 8976879879,
        "isMinor": false
        },
        {
        "eoSiteMain": 52,
        "firstName": "Alicia",
        "lastName": "Johnson",
        "isMaxHrsPerWk": false,
        "payRate": 800,
        "maxHrsPerWk": 0,
        "eoEmpPositionArray":
        [
        {
        "skillLevel": 5,
        "eoLkJobPosition": 51
        },
        {
        "skillLevel": 3,
        "eoLkJobPosition": 53
        }
        ],
        "eoEmpCertificationArray":
        [
        {
        "expiryDate": "10/29/2015",
        "eoLkCertification": 50
        },
        {
        "expiryDate": "10/29/2015",
        "eoLkCertification": 52
        }
        ],
        "emailID": "alicia@hubworks.com",
        "eoCustJobCode": 2,
        "employeeId": 8881,
        "cellNumber": 8976879879,
        "isMinor": false
        }
        ]
    

Sample Response:


    {
    "data":
    [
    {
    "success": true
    },
    {
    "success": true
    }
    ],
    "success": true
    }

To add new employees in a batch, the request should be sent keeping the below points in consideration:

Format of the request


[
1
{
2
},
{
2
}
]

1 – This is the start of the array of employees.
2 – This is the hash of each employee. There can be multiple hashes of employees. Each employee’s hash should end by a comma except the last one, as illustrated in the example.

Below is the sample of the request that needs to be sent to add employees in a batch.

Sample Request

URL: https://app.hubworks.com/hwot/api/eoEmpMain/createInBatch

Header Data: “apiKey”: "9427880e727347038af8f9e250a449c8f9fe"

Parameter Detail

Parameter Description Data Type
eoSiteMain Primary key of the Site. Long
firstName First name of the employee .It needs to be in double quotes. String
lastName Last name of the employee. It needs to be in double quotes. String
payRate Pay Rate of the employee will be sent in multiples of 100. As per this sample the pay rate is $8.00. Integer
maxHrsPerWk Value of maximum hour per week. Integer
isMaxHrsPerWk If ACA practice applies to the employee or not. Boolean
emailID Email id of the employee. It needs to be in double quotes. String
eoCustJobCode The employee’s role (Manager, Supervisor, Crew). Long
isMinor If the employee is minor or not. Boolean
employeeId Employee ID of the employee. This needs to be unique for every employee. Integer
eoEmpPositionArray Array of position assigned to employee. Integer
skillLevel Skill level of position. Integer
eoLkJobPosition Position assigned to the shift. Integer
eoEmpCertificationArray Array of certification assigned to employee. Integer
eoLkCertification Certification assigned to the shift Integer
expiryDate Expiry date of certification. It needs to be in MM/DD/YYYY format in double quotes. String
cellNumber Phone number of the employee Long
Parameter Description Data Type
Primary key Primary key of the employee. Long
firstName First name of the employee. It needs to be in double quotes. String
lastName Last name of the employee. It needs to be in double quotes. String
payRate Pay Rate of the employee will be sent in multiples of 100. As per this sample the payrate is $8.00. Integer
maxHrsPerWk Value of maximum hour per week. Integer
isMaxHrsPerWk If ACA practice applies to the employee or not. Boolean
emailID Email id of the employee.It needs to be in double quotes. String
eoCustJobCode The employee’s role (Manager, Supervisor, Crew). Long
isMinor If the employee is minor or not. Boolean
employeeId Employee ID of the employee. Integer
eoEmpPositionArray Array of position assigned to employee Integer
skillLevel Skill level of position. Integer
eoLkJobPosition Position assigned to the shift Integer
eoEmpCertificationArray Array of certification assigned to employee Integer
eoLkCertification Certification assigned to the shift Integer
expiryDate Expiry date of certification. It needs to be in MM/DD/YYYY format and in double quotes. String
cellNumber Phone number of the employee. Long

Generic API Request

Post Data:


        [
        {
        "identifierKey": "qw233",
        "apiID": "eoEmpShift/create",
        "data": {
        "eoSiteMain": 3,
        "startIndex": 32,
        "endIndex": 63,
        "busiDate": "12/09/2015",
        "isPosted": false,
        "breakMnts": 30,
        "eoEmpMain": 536,
        "payRate": 800
        }
        },
        {
        "identifierKey": "qw234",
        "apiID": "eoEmpMain/terminate",
        "data": {
        "primaryKey": 532
        }
        },
        {
        "identifierKey": "qw235",
        "apiID": "eoEmpMain/create",
        "data": {
        "eoSiteMain": 3,
        "firstName": "vaseem",
        "lastName": "akhtar",
        "isMaxHrsPerWk": false,
        "payRate": 800,
        "maxHrsPerWk": 0,
        "emailID": "vak@test.com",
        "samlUserID": "vak156",
        "eoCustJobCode": "altaJobCode_5",
        "employeeId": 965,
        "cellNumber": 8976879879,
        "isMinor": false
        }
        },
        {
        "identifierKey": "qw236",
        "apiID": "eoAcdMain/create",
        "data": {
        "eoSiteMain": 3,
        "busiDate": "12/08/2015",
        "actConfNumb1": 1225.25,
        "actConfNumb2": 300,
        "acdDetailArray": [
        {
        "actConfNumb1": 23.5,
        "actConfNumb2": 6,
        "index": 0
        },
        {
        "actConfNumb1": 10,
        "actConfNumb2": 1,
        "index": 2
        },
        {
        "actConfNumb1": 43.36,
        "actConfNumb2": 12,
        "index": 44
        },
        {
        "actConfNumb1": 55.63,
        "actConfNumb2": 13,
        "index": 45
        }
        ]
        }
        }
        ]

Sample Response:


        {
        "data":
        [
        {
        "success": true
        },
        {
        "success": true
        },
        {
        "success": true
        },
        {
        "success": true
        }
    
        ],
        "success": true
        }


In generic API, multiple API calls can be sent in one request format. By using this API request we can perform multiple API calls in one go. Following is the generic API request:

SAMPLE REQUEST

URL: https://app.hubworks.com/hwot/api/generic

Header Data: “apikey”: "9427880e727347038af8f9e250a449c8f9fe…"

Parameter Detail

Paramete Description Data Type
identifierKey API calls Identification Key for every request. String
apiID It is the ID of API request which we need to process. Basically in api id we will provide the last part URL of any API call. String
Data In data section we will provide proper keys for every request.