Introduction

This Timekeeping API document contains details about how the data will be posted to Any Connector from various Time Clock applications or POS systems through the REST interface. From the Any Connector interface the data will be sent to Hubworks.

Authentication Process

There are two ways a site will be authorized. Either using the Hubworks Site ID or using Partner Site ID.

Hubworks Site ID – The unique id of the site which is generated by Hubworks.

Partner Site ID –The unique id of the site which is generated by the Partner.

Data authentication through Hubworks Site ID

In this mode, the URL will contain Hubworks Organization ID and Site ID and data will be posted to defined Sites. This can be done as mentioned below:

URL: baseurl/partner/{partnerID}/{bucketID}/v1/{orgID}/{siteID}/{busiDate}

Header Data: orgApiKey, siteApiKey, vendorApiKey

Sample URL:https://api.anyconnector.com/Receiver/partner/abcPOS/timeKeeping/v1/xyz@org.com/1401WFulltron/20190516

Required Parameters

Parameter(s) Description Is Required Type Example Data
patnerID ID of the partner provided by Altametrics Yes String Micros, Aloha
bucketID ID of the module whose data is being sent Yes String Timekeeping
orgID Hubworks Organization ID for which data is getting posted Yes String xyz@org.com
siteID Hubworks Site ID where data needs to be posted Yes String 1401WFulltron
busiDate Date for which the data is being posted Yes String(YYYYMMDD) 20190516
orgApiKey Organization API key for authentication No String 319d37011ef64ea99a238e480cecfa58
siteApiKey Site API key for authentication No String e364d88f4afb4d32ab9f87358e3825ca
vendorApiKey Vendor API key for authentication. This will be provided by Altametrics for each vendor Yes String e364d88f4afb4d32ab9f87358e3898ka

Data authentication through partner Site ID

In this mode, data will be posted using Partner Site ID that is a Unique ID for each Site at partner’s end. URL format in this case would be:

URL: baseUrl/partner/{bucketID}/v1/{partnerCustID}/{partnerSiteID}/{busiDate}

Header Data: vendorApiKey

Sample URL: https://api.anyconnector.com/Receiver/partner/timeKeeping/v1/burgerKing/1401WFulltron/20190516

Required Parameters

Parameter(s) Description Is Required Type Example
bucketID ID of the module from which the data needs to be sent Yes String Timekeeping
partnerSiteID Partner site ID configured at the connections on AnyConnector Yes String 1401WFulltron
busiDate Date for which the data is being posted. Yes String(YYYYMMDD) 20190516
partnerCustID Unique ID of customer on AnyConnector Yes String burgerKing
vendorApiKey Vendor API key for authentication Yes String e364d88f4afb4d32ab9f87358e3898ka

Configuration and Transaction files

There will be two json files that will be posted to AnyConnector for each day. The first JSON file will be having data of Employees and Job Codes Lookups and the second JSON file will be containing Punch records.

Implementation of Configuration API

Following table has the example data for Configuration files which is then implemented in our API format below the table:

Sample JSON for Job Codes:

Case Description Packet Data
Configuration example for Job Codes. Sample Data 1:-

Job Code ID : 1

Job Code Name: Supervisor

Normal Pay Code: SNP

Over Time Pay Code: SOTP

Double Time Pay Code: SDTP

 

Sample Data 2:-

Job Code ID : 2

Job Code Name: Cashier

Normal Pay Code: SNP

Over Time Pay Code: SOTP

Double Time Pay Code: SDTP
Parameter(s) Description Is Required Type Example Data
jobs Array of Jobs in Configuration file. If there is no Job Code, a blank array should be sent.   Array  
id Job Code ID. Yes String 1
name Job code name. Yes String Supervisor
norPayCode Normal Pay code ID. No String SNP
OTPayCode Over Time pay code ID. No String SOTP
DTPayCode Double Time pay code ID. No String SDTP

Sample JSON for Employees:

Case Description Packet Data

Configuration example for employees

Sample data for an employee with Manager role and multiple Job Codes:

Employee ID : 103

First Name: Rick

Last Name: Thomas

Employee Wage: 200

Employee Job Code ID: 1,2

Employee Job Code: Supervisor,Cashier

Job Code Wage: 250, 250

 

Sample data for an employee with Supervisor role and single job code:

Employee ID : 101

First Name: John

Last Name: Doe

Employee Wage: 200

Employee Job Code ID: 1

Employee Job Code: Supervisor

Job Code Wage: 250

 

Sample data for an employee with Crew role without any job code:

 

Employee ID: 102

First Name: Mark

Last Name: Doe

Employee Wage: 200

Parameter(s) Description Is Required Type Example Data
employees Array of Employees in Configuration files. If there are no Employees, a blank array should be sent.   Array  
id Employee ID Yes String 101
firstName First Name of Employee Yes String John
lastName Last Name of Employee No String Doe
wage Pay rate of Employee. Value will be in cents No Integer 200
empJobs Array of Employee Jobs in Configuration files.   Array  
id Employee Job Code ID Yes String 1
description Name of Job Code No String Supervisor
wage Pay rate of Job Code. Value will be in cents No Integer 250
Sample Configuration JSON packet for Job Codes
    
  {
    "jobs": [
      {
        "id": "1",
        "name": "Supervisor",
        "normalPayCode": "SNP",
        "OTPayCode": "SOP",
        "DTPayCode": "SDP"
      },
      {
        "id": "2",
        "name": "Cashier",
        "normalPayCode": "CNP",
        "OTPayCode": "COP",
        "DTPayCode": "CDP"
      },
      {
        "id": "3",
        "name": "Manager",
        "normalPayCode": "MNP",
        "OTPayCode": "MOP",
        "DTPayCode": "MDP"
      },
      {
        "id": "4",
        "name": "Training",
        "normalPayCode": "TNP",
        "OTPayCode": "TOP",
        "DTPayCode": "TDP"
      },
      {
        "id": "5",
        "name": "BOH",
        "norPayCode": "UNP",
        "OTPayCode": "UOP",
        "DTPayCode": "UDP"
      },
      {
        "id": "6",
        "name": "Bartender",
        "norPayCode": "YNP",
        "OTPayCode": "YOP",
        "DTPayCode": "YDP"
      },
      {
        "id": "7",
        "name": "Delivery",
        "norPayCode": "XNP",
        "OTPayCode": "XOP",
        "DTPayCode": "XDP"
      },
      {
        "id": "8",
        "name": "Barista",
        "norPayCode": "ZNP",
        "OTPayCode": "ZOP",
        "DTPayCode": "ZDP"
      }
  
    ]
  }
  
    
    
Sample Configuration JSON packet

{
  "employees": [
    {
      "id": "101",
      "firstName": "John",
      "lastName": "Doe",
      "wage": 200,
      "empJobs": [
        {
          "id": "1",
          "description": "Supervisor",
          "wage": 250
        }
      ]
    },
    {
        "id":  "102",
        "firstName":  "Mark",
        "lastName":  "Doe",
        "wage":  200,
        "empJobs": [
          {
            "id":  "2",
            "description":  "Cashier",
            "wage":  250
          }
        ]
      },
      {
        "id":  "103",
        "firstName":  "Rick",
        "lastName":  "Thomas",
        "wage":  200 ,
        "empJobs": [
          {
            "id":  "3",
            "description":  "Manager",
            "wage":  250
          }   
      },
      {
        "id":  "104",
        "firstName":  "John",
        "lastName":  "Thomas",
        "wage":  200 ,
        "empJobs": [
          {
            "id":  "4",
            "description":  "Training",
            "wage":  0
          }   
      },
      {
        "id":  "105",
        "firstName":  "Adam",
        "lastName":  "Thomas",
        "wage":  200 ,
        "empJobs": [
          {
            "id":  "5",
            "description":  "BOH",
            "wage":  100
          }   
      },
      {
        "id":  "106",
        "firstName":  "Alex",
        "lastName":  "Thomas",
        "wage":  200 ,
        "empJobs": [
          {
            "id":  "6",
            "description":  "Bartender",
            "wage":  0
          }   
      },
      {
        "id":  "107",
        "firstName":  "Miley",
        "lastName":  "Smith",
        "wage":  200 ,
        "empJobs": [
          {
            "id":  "7",
            "description":  "Delivery",
            "wage":  0
          }   
      },
      {
        "id":  "108",
        "firstName":  "Jhon",
        "lastName":  "Martin",
        "empJobs": [
          {
            "id":  "3",
            "description":  "BOH",
            "wage":  5
          }   
      }
  ]
}
  

Implementation of Punch and Break API

The request packet will be having the data according to the example table and user can post their punches in any of the two ways mentioned below:

  • Including breaks in punch array
  • Separate arrays for Punches and Breaks

Including Breaks in Punch array

Following table has the data with example:

Case Description Packet Data
Request body has closed punch record for an employee.

Packet Data:-

First Name: John

Last Name: Doe

Employee ID : 101

Job Code ID: 1

Job Code Name: Supervisor

Punch Start Time: 8:00am

Punch End Time: 5:00pm

Rest/Paid Break

Break Start Time: 10:15am

Break End Time: 10:45am

Meal/Unpaid Break

Break Start Time: 03:15pm

Break End Time: 03:45pm

Parameter(s) Description Is Required Type Example Data
origBucketID Module ID from where the packets are getting sent. Yes String Timekeeping
Version Version of the API. Yes String V1
punchesArray Contain details of Punches. Yes array  
firstName Employee first name Yes String John
lastName Employee last name No String Doe
startTime Punch start time. Yes Integer (dayOfMinute) 480
endTime Punch end time. In case punch end time lies on next day then:

endTime= endTime+ 1440
No Integer (dayOfMinute) 1020
empID Unique employee ID in Punch details. Yes String 101
jobCodeID Job code ID for which employee’s punch exists. No String 1
jobCodeName Name of the Job code along with the punch array. No String Supervisor
payRate Pay rate of employee. Value will be in Cents. No Integer 800
cashTips Tip amount in cash. Value will be in Cents. No Integer 23
cashSales Total sales in cash by employee during Punch. Value will be in Cents. No Integer 45
ccTips Tip amount with credit card. Value will be in Cents. No Integer 30
ccSales Total sales by Credit card swipe during punch. Value will be in Cents. No Integer 25
uniquePunchID Client’s Unique Punch ID. No Integer 1001
breaksArray Contains details of a break inside Punch array. No Array  
startTime Break start time. In case Break start time lies on next day then:

startTime= startTime + 1440
No Integer (dayOfMinute) 615
endTime Break end time. In case Break end time lies on next day then:

endTime= endTime + 1440
No Integer (dayOfMinute) 645
brkType Type of break that is Meal Break or Rest Break,

If Meal Break then value will be 0,

If Rest Break then value will be 1
Yes Boolean 1
brkUniqueID Client’s Unique break ID. No Integer 1201
Sample Response
          
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "endTime": 1020,
        "empID": "101", 
        "jobCodeID": "1023",
        "jobCodeName": "Supervisor",
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001,
        "breaksArray": [
          {
            "startTime": 615,
            "endTime": 645,
            "brkType": 1,
            "brkUniqueID": 1201
          },
          {
              "startTime":915,
              "endTime": 945,
              "brkType": 0,
              "brkUniqueID":1202
          }
        ]
      }
    ]
  }
          
          
        

Separate arrays for Punches and Breaks

When implementing this approach, Break details and Punch details will be sent separately. Following table has the data with example:

Case Description Packet Data
Request body has Punch Record for Two employees.Both punches are closed.

Packet Data:-

First Name: John

Last Name: Doe

Employee ID : 101

Job Code ID: 1

Job Code Name: Supervisor

Punch Start Time: 8:00am

Punch End Time: 5:00pm

Rest/Paid Break

Break Start Time: 10:15am

Break End Time: 10:45am

Meal/Unpaid Break

Break Start Time: 03:15pm

Break End Time: 03:45pm

Parameter(s) Description Is Required Type Example Data
origBucketID Module ID from where the packets are getting sent. Yes String Timekeeping
Version Version of the API. Yes String V1
punchesArray Containing details of Punches. Yes array  
fisrtName First Name of the employee Yes String John
lastName Last Name of the employee No String Doe
startTime Punch start time. Yes Integer (dayOfMinute) 480
endTime Punch end time. In case punch end time lies on next day then:

endTime= endTime + 1440
No Integer (dayOfMinute) 1020
empID Unique employee ID in Punch details Yes String 101
jobCodeID Job code ID for which employee’s punch exists. No String 1
jobCodeName Name of the Job code along with the punch array. No String Supervisor
payRate Pay rate of employee. Value will be in cents No Integer 200
cashTips Tip amount in cash. Value will be in Cents. No Integer 23
cashSales Total sales in cash by employee during Punch. Value will be in Cents. No Integer 45
ccTips Tip amount with credit card. Value will be in Cents. No Integer 30
ccSales Total sales by Credit card swipe during punch. Value will be in Cents. No Integer 25
uniquePunchID Client’s Unique Punch ID. No Integer 1001
breaksArray Contains details of a break inside Punch array. No Array  
startTime Break start time. In case Break start time lies on next day then:

startTime= startTime + 1440
No Integer (dayOfMinute) 615
endTime Break end time. In case Break end time lies on next day then:

endTime= endTime + 1440
No Integer (dayOfMinute) 645
brkType Type of break that is Meal Break or Rest Break,

If Meal Break then value will be 0,

If Rest Break then value will be 1
Yes Boolean 1
brkUniqueID Client’s Unique break ID. No Integer 1201
empID Unique employee ID in Break array. Yes String 101
Sample Response
    
{
"origBucketID": "MicrosTimekeeping",
"version": "v1", 
"data": {
"punchesArray": [
  {
    "firstName": "John",
    "lastName": "Doe",
    "startTime": 480, 
    "endTime": 1020,
    "empID": "101", 
    "jobCodeID": "1",
    "jobCodeName": "Supervisor",
    "payRate": 200,
    "cashTips": 23,
    "cashSales": 45,
    "ccTips": 30,
    "ccSales": 25,
    "uniquePunchID": 1001        
  }
],
"breaksArray": [
    {
      "startTime": 615,
      "endTime": 645,
      "brkUniqueID": 1201,
      "empID": "2015720"
    },
    {
        "startTime": 915,
        "endTime": 945,
        "brkType": 0,
        "brkUniqueID":1202,
        "empID":"2015720"
    }
  ]
}
}
        
    
    

Sample Request Packets for different test cases

Request Body for various cases that needs to be handled is mentioned below in the table:

Sample JSON body when posting Closed Punches

Case Description Example
Request body has Punch Record for Two employees. Both punches are closed.

Packet Data 1 -

First Name: John

Last Name: Doe

Employee ID : 101

Punch Start Time: 8:00am

Punch End Time: 5:00pm

Rest/Paid Break

Break Start Time: 10:15am

Break End Time: 10:45am

Meal/Unpaid Break

Break Start Time: 03:15pm

Break End Time: 03:45pm

 

Packet Data 2 -

First Name: Mark

Last Name: Doe

Employee ID : 102

Punch Start Time: 8:00am

Punch End Time: 5:00pm

Rest/Paid Break

Break Start Time: 10:15am

Break End Time: 10:45am

Meal/Unpaid Break

Break Start Time: 03:15pm

Break End Time: 03:45pm

Request Body Including Breaks in Punches array:
            
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "endTime": 1020,
        "empID": "101", 
        "payRate": 200,
        "cashSales": 45,
        "ccTips":30,
        "ccSales": 25,
        "uniquePunchID": 1001,
        "breaksArray": [
          {
            "startTime": 615,
            "endTime": 645,
            "brkType": 1,
            "brkUniqueID": 1201
          },
          {
              "startTime": 915,
              "endTime": 945,
              "brkType": 0,
              "brkUniqueID": 1204
          }
        ]
      },
      {
        "firstName": "Mark",
        "lastName": "Doe",
        "startTime": 540,
        "endTime": 1020, 
        "empID": "102",
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002,
        "breaksArray": [
          {
            "startTime": 615,
            "endTime": 645,
            "brkType": 1,
            "brkUniqueID": 1203
          },
          {
              "startTime": 915,
              "endTime": 945,
              "brkType": 0,
              "brkUniqueID": 1205
          }
        ]
      }
    ]
  }
}
        
      
Request body with Separate arrays for Punches and Breaks:
       
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "endTime": 1020,
        "empID": "101", 
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001
        
      },
      {
        "firstName": "Mark",
        "lastName": "Doe",
        "startTime": 540,
        "endTime": 1020, 
        "empID": "102", 
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002
        
      }
    ],
      "breaksArray": [
        {
          "startTime": 615,
          "endTime": 645,
          "brkType": 1,
          "brkUniqueID": 1201,
          "empID": "102"
        },
        {
            "startTime": 915,
            "endTime": 945,
            "brkType": 0,
            "brkUniqueID": 1204,
            "empID":"102"
        },
        {
          "startTime": 615,
          "endTime": 645,
          "brkType": 1,
          "brkUniqueID": 1203,
          "empID": "102"
        },
        {
            "startTime": 915,
            "endTime": 945,
            "brkType": 0,
            "brkUniqueID": 1205,
            "empID":"102"
        }
      ]
  }
}
        
      

Sample JSON body while posting data for an employee having multiple punches on a single day

Case Description Example
Request body has multiple Punch Records for an employee.

Packet Data 1 -

First Name: John

Last Name: Doe

Employee ID : 101

Punch Start Time: 8:00am

Punch End Time: 12:00pm

Rest/Paid Break

Break Start Time: 10:15am

Break End Time: 10:45am

 

Packet Data 2 -

First Name: John

Last Name: Doe

Employee ID : 101

Punch Start Time : 06:00pm

Punch End Time : 11:00pm

Meal/Unpaid Break

Break Start Time : 08:00pm

Break End Time : 08:30pm

Request Body Including Breaks in Punches array:

{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "endTime": 720,
        "empID": "101", 
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001,
        "breaksArray": [
          {
            "startTime": 560,
            "endTime": 600,
            "brkType": 1,
            "brkUniqueID": 1201
          }
        ]
      },
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 1080,
        "endTime": 1380, 
        "empID": "101", 
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002,
        "breaksArray": [
          {
            "startTime": 1200,
            "endTime": 1230,
            "brkType": 0,
            "brkUniqueID": 1203
          }
          
        ]
      }

    ]
  }
}
        
      
Request body with Separate arrays for Punches and Breaks:
    
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "endTime": 720,
        "empID": "101", 
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001       
      },
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 1080,
        "endTime": 1380, 
        "empID": "101", 
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002 
      }

    ],
    "breaksArray": [
        {
          "startTime": 560,
          "endTime": 600,
          "brkType": 1,
          "brkUniqueID": 1201,
          "empID": "101"
        },
        {
            "startTime": 1200,
            "endTime": 1230,
            "brkType": 0,
            "brkUniqueID": 1203,
            "empID": "101"
          }
      ]
  }
}
        
      

Sample JSON body while posting Open Punch data to Hubworks

Case Description Example
Request body has open punches for two employees. Packet Data 1 -

First Name: John

Last Name: Doe

Employee ID : 101

Punch Start Time: 8:00am

Punch End Time: NA

Rest/Paid Break

Break Start Time: 10:15am

Break End Time: 10:45am

Meal/Unpaid Break

Break Start Time: 03:15pm

Break End Time: 03:45pm

 

Packet Data 2 -

First Name: Mark

Last Name: Doe

Employee ID : 102

Punch Start Time: 8:00am

Punch End Time: NA

Rest/Paid Break

Break Start Time: 10:15am

Break End Time: 10:45am

Meal/Unpaid Break

Break Start Time: 03:15pm

Break End Time: 03:45pm

Sample Response
    
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "empID": "101", 
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001,
        "breaksArray": [
          {
              "startTime": 615,
              "endTime": 645,
              "brkType": 1,
              "brkUniqueID": 1201
            },
            {
                "startTime": 915,
                "endTime": 945,
                "brkType": 0,
                "brkUniqueID": 1202
            }
        ]
      },
      {
        "firstName": "Mark",
        "lastName": "Doe",
        "startTime": 540,
        "empID": "102", 
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002,
        "breaksArray": [
          {
              "startTime": 615,
              "endTime": 645,
              "brkType": 1,
              "brkUniqueID": 1203
            },
            {
                "startTime": 915,
                "endTime": 945,
                "brkType": 0,
                "brkUniqueID": 1204
            }
        ]
      }
    ]
  }
}
        
      
Request body with Separate arrays for Punches and Breaks:
            
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "empID": "101", 
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001       
      },
      {
        "firstName": "Mark",
        "lastName": "Doe",
        "startTime": 540,
        "empID": "102", 
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002       
      }
    ],
    "breaksArray": [
        {
            "startTime": 615,
            "endTime":645 ,
            "brkType": 1,
            "brkUniqueID": 1201,
            "empID": "101"
          },
          {
            "startTime":915,
            "endTime": 945,
            "brkType": 0,
            "brkUniqueID": 1202,
            "empID":"101"
          },
          {
            "startTime": 615,
            "endTime": 645,
            "brkType": 1,
            "brkUniqueID": 1203,
            "empID": "102"
          },
          {
              "startTime": 915,
              "endTime": 945,
              "brkType": 0,
              "brkUniqueID": 1204,
              "empID":"102"
          }
    ]
  }
}
        
      

Sample JSON body while posting Open Punch and Open Break data to Hubworks

Case Description Example
Request body has Open Punches and Open breaks.In first data set, Meal break end time is null and in second one Rest break end time is null. Packet Data 1 -

First Name: John

Last Name: Doe

Employee ID : 101

Punch Start Time: 8:00am

Punch End Time: NA

Rest/Paid Break

Break Start Time: 10:15am

Break End Time: 10:45am

Meal/Unpaid Break

Break Start Time: 03:15pm

Break End Time: NA

 

Packet Data 2 -

First Name: James

Last Name: Smith

Employee ID : 102

Punch Start Time: 8:00am

Punch End Time: 5:00pm

Rest/Paid Break

Break Start Time: 10:15am

Break End Time: NA

Request Body Including Breaks in Punches array:
    
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "empID": "101", 
        "payRate":200 ,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001,
        "breaksArray": [
          {
            "startTime": 615,
            "endTime": 645,
            "brkType": 1,
            "brkUniqueID": 1201
          },
          {
              "startTime": 915,
              "brkType": 0,
              "brkUniqueID":1202
          }
        ]
      },
      {
        "firstName": "James",
        "lastName": "Smith",
        "startTime": 480,
        "empID": "102", 
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002,
        "breaksArray": [
          {
            "startTime": 615,
            "brkType": 1,
            "brkUniqueID": 1203
          }
        ]
      }
    ]
  }
}
        
      
Request body with Separate arrays for Punches and Breaks:
      
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "empID": "101", 
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001       
      },
      {
        "firstName": "Mark",
        "lastName": "Doe",
        "startTime": 480,
        "empID": "102", 
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002        
      }
    ],
    "breaksArray": [
        {
          "startTime": 615,
          "endTime": 645,
          "brkType": 1,
          "brkUniqueID": 1201,
          "empID": "101"
        },
        {
            "startTime": 915,
            "brkType": 0,
            "brkUniqueID":1202,
            "empID":"102"
        },
        {
            "startTime": 615,
            "brkType": 1,
            "brkUniqueID": 1203,
            "empID": "102"
          }
      ]
  }
}
        
      

Sample JSON body while posting Punch record having Job Code details

Case Description Example
Request body has Job Code along with Punch details. Packet Data 1 -

First Name: John

Last Name: Doe

Employee ID : 101

Job Code ID : 1

Job Code Name: Supervisor

Punch Start Time: 8:00am

Punch End Time: 5:00pm

Rest Break

Break Start Time: 10:15am

Break End Time: 10:45am

Meal Break

Break Start Time: 03:15pm

Break End Time: 03:45pm

 

 

Packet Data 2 -

First Name: Mark

Last Name: Doe

Employee ID : 102

Job Code ID : 2

Job Code Name: Cashier

Punch Start Time: 8:00am

Punch End Time: 5:00pm

Rest/Paid Break

Break Start Time: 10:15am

Break End Time: 10:45am

Meal/Unpaid Break

Break Start Time: 03:15pm

Break End Time: 03:45pm

Request Body Including Breaks in Punches array:
    
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "endTime": 1020,
        "empID": "101", 
        "jobCodeID": "1",
        "jobCodeName": "Supervisor",
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001,
        "breaksArray": [
          {
            "startTime": 615,
            "endTime": 645,
            "brkType": 1,
            "brkUniqueID": 1201
          },
          {
              "startTime": 915,
              "endTime": 945,
              "brkType": 0,
              "brkUniqueID":1202
          }
        ]
      },
      {
        "firstName": "Mark",
        "lastName": "Doe",
        "startTime": 480,
        "endTime": 1020, 
        "empID": "102", 
        "jobCodeID": "2",
        "jobCodeName": "Cashier",
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002,
        "breaksArray": [
          {
            "startTime": 615,
            "endTime": 645,
            "brkType": 1,
            "brkUniqueID": 1203
          },
          {
              "startTime": 915,
              "endTime": 945,
              "brkType": 0,
              "brkUniqueID": 1204
          }
        ]
      }
    ]
  }
}
        
      
Request body with Separate arrays for Punches and Breaks:
    
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "endTime": 1020,
        "empID": "101", 
        "jobCodeID": "1",
        "jobCodeName": "Supervisor",
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001        
      },
      {
        "firstName": "Mark",
        "lastName": "Doe",
        "startTime": 480,
        "endTime": 1020, 
        "empID": "102", 
        "jobCodeID": "2",
        "jobCodeName": "Cashier",
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002        
      }

    ],
    "breaksArray": [
        {
          "startTime": 615,
          "endTime": 645,
          "brkType": 1,
          "brkUniqueID": 1201,
          "empID": "101"
        },
        {
            "startTime": 915,
            "endTime": 945,
            "brkType": 0,
            "brkUniqueID":1202,
            "empID":"101"
        },
        {
            "startTime": 615,
            "endTime": 645,
            "brkType": 1,
            "brkUniqueID": 1203,
            "empID": "102"
          },
          {
            "startTime": 915,
            "endTime": 945,
            "brkType": 0,
            "brkUniqueID": 1204,
            "empID":"102"
          }
      ]
  }
}
        
      

Sample JSON body while posting Punches with multiple Job Codes for an employee

Case Description Example
Request body has Punch details of an employee who changed Job code after taking a break. In this case two records for an employee should be in packet,one is having Punch end time same as the Job Code change time and a new punch will be recorded with Start time same as Job code change time. Packet Data 1 -

First Name: John

Last Name: Doe

Employee ID : 101

Job Code ID : 1

Job Code Name: Supervisor

Punch Start Time: 8:00am

Punch End Time: 02:00pm

Rest/Paid Break

Break Start Time: 09:15am

Break End Time: 09:30am

Meal/Unpaid Break

Break Start Time: 01:45pm

Break End Time: 02:00pm

 

Packet Data 2 -

First Name: Mark

Last Name: Doe

Employee ID : 102

Job Code ID : 2

Job Code Name: Cashier

Punch Start Time: 2:00pm

Punch End Time: 5:00pm

Rest/Paid Break

Break Start Time: 04:00pm

Break End Time: 04:15pm

Request Body Including Breaks in Punches array:
          
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 480, 
        "endTime": 840,
        "empID": "101", 
        "jobCodeID": "1",
        "jobCodeName": "Supervisor",
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001,
        "breaksArray": [
          {
            "startTime": 555,
            "endTime": 570,
            "brkType": 1,
            "brkUniqueID": 1201
          },
          {
              "startTime": 825,
              "endTime": 840,
              "brkType": 0,
              "brkUniqueID":1202
          }
        ]
      },
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 840,
        "endTime": 1020, 
        "empID": "101", 
        "jobCodeID": "2",
        "jobCodeName": "Cashier",
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002,
        "breaksArray": [
          {
            "startTime": 960,
            "endTime": 975,
            "brkType": 1,
            "brkUniqueID": 1203
          }
        ]
      }
    ]
  }
}
        
      
Request body with Separate arrays for Punches and Breaks:
          
{
    "origBucketID": "Timekeeping",
    "version": "v1", 
    "data": {
      "punchesArray": [
        {
          "firstName": "John",
          "lastName": "Doe",
          "startTime": 480, 
          "endTime": 840,
          "empID": "101", 
          "jobCodeID": "1",
          "jobCodeName": "Supervisor",
          "payRate": 200,
          "cashTips": 23,
          "cashSales": 45,
          "ccTips": 30,
          "ccSales": 25,
          "uniquePunchID": 1001          
        },
        {
          "firstName": "John",
          "lastName": "Doe",
          "startTime": 840,
          "endTime": 1020, 
          "empID": "101", 
          "jobCodeID": "2",
          "jobCodeName": "Cashier",
          "payRate": 200,
          "cashTips": 20,
          "cashSales": 40,
          "ccTips": 30,
          "ccSales": 25,
          "uniquePunchID": 1002          
        }  
      ],
      "breaksArray": [
        {
          "startTime": 555,
          "endTime": 570,
          "brkType": 1,
          "brkUniqueID": 1201,
          "empID": "101"
        },
        {
            "startTime": 825,
            "endTime": 840,
            "brkType": 0,
            "brkUniqueID":1202,
            "empID":"101"
        },
        {
            "startTime": 960,
            "endTime": 975,
            "brkType": 1,
            "brkUniqueID": 1203,
            "empID": "102"
          }
      ]
    }
  }
          
        

Sample JSON body while posting data of an Overnight punch

Case Description Example

Request body has details of an overnight punch.

Overnight Punch is closed For Employee ID 2015720.And for Employee ID 2015721 overnight punch is still open and has an open break as well.

Packet Data 1 -

First Name: John

Last Name: Doe

Employee ID : 101

Punch Start Time: 08:00pm

Punch End Time: 04:00am +1 Day

Rest/Paid Break

Break Start Time: 09:15pm

Break End Time: 09:30pm

Meal/Unpaid Break

Break Start Time: 01:45am +1 Day

Break End Time: 02:00am +1 Day

 

Packet Data 2-

First Name: James

Last Name: Smith

Employee ID : 102

Punch Start Time: 10:00pm

Punch End Time: NA

Rest/Paid Break

Break Start Time: 09:15pm

Break End Time: NA

 

Request Body Including Breaks in Punches array:
      

{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 1200, 
        "endTime": 1680,
        "empID": "101", 
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001,
        "breaksArray": [
          {
            "startTime": 1275,
            "endTime": 1290,
            "brkType": 1,
            "brkUniqueID": 1201
          },
          {
              "startTime": 1545,
              "endTime": 1560,
              "brkType": 0,
              "brkUniqueID": 1204
          }
        ]
      },
      {
        "firstName": "Mark",
        "lastName": "Doe",
        "startTime": 1320,
        "empID": "102", 
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002,
        "breaksArray": [
          {
            "startTime": 1470,
            "brkType": 1,
            "brkUniqueID": 1203
          }
        ]
      }
    ]
  }
}
          
        
Request body with Separate arrays for Punches and Breaks:
            
{
  "origBucketID": "Timekeeping",
  "version": "v1", 
  "data": {
    "punchesArray": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "startTime": 1200, 
        "endTime": 1680,
        "empID": "101", 
        "payRate": 200,
        "cashTips": 23,
        "cashSales": 45,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1001        
      },
      {
        "firstName": "Mark",
        "lastName": "Doe",
        "startTime": 1320,
        "empID": "102", 
        "payRate": 200,
        "cashTips": 20,
        "cashSales": 40,
        "ccTips": 30,
        "ccSales": 25,
        "uniquePunchID": 1002        
      }
    ],
    "breaksArray": [
        {
          "startTime": 1275,
          "endTime": 1290,
          "brkType": 1,
          "brkUniqueID": 1201,
          "empID": "101"
        },
        {
            "startTime": 1545,
            "endTime": 1560,
            "brkType": 0,
            "brkUniqueID": 1204,
            "empID":"101"
        },
        {
            "startTime": 1470,
            "brkType": 1,
            "brkUniqueID": 203,
            "empID": "102"
          }
      ]
  }
}
          
        

Business management has never been easier. Try any business app free.

See what our customers are saying about us.

famous daves business management logo
"Our customer's trust is what keeps us in business. They expect fresh tasting food with no threat of ill-born diseases. Zip HACCP keeps us compliant with HACCP and FDA regulations through its integrated temperature solutions, food safety assurance, and end-to-end task reporting. We also use Zip Inventory to save time on inventory counts and have much-needed predictability to our ordering process. The Hubworks business management apps are perfect for our restaurants."

,

Attend a webinar

Our scheduled webinars are a great way to learn more.

Sign Up