Payroll Report API

This API provides support for Pay Period Details API.

Request URL:

https://people.zoho.com/api/timetracker/getpayrollreport?userErecNo=0&fromDate=01-07-2020&toDate=31-07-2020&sIndex=0&limit=100&dateFormat=dd-MM-yyyy

Header:

Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Scope:

ZOHOPEOPLE.timetracker.ALL
OR
ZOHOPEOPLE.timetracker.READ 

Possible Operation Types:

ALL - Complete access to data
READ - Only to read data

Request Parameters:

ParametersVales AllowedDefault ValueDescription
*userErecNo< all | ERECNO | Email-ID | Employee-ID >allSpecify the user whose payroll data needs to be fetched
isDirectSubOnlyNeeded<true|false>falseUsed to get reportees, considered only when userErecno parameter value is all
*fromDate<date in yyyy-MM-dd | dateFormat><Mandatory>Specify the date from when payroll data needs to be fetched
*toDate<date in yyyy-MM-dd |dateFormat><Mandatory>Specify the date range until when payroll data needs to be fetched
dateFormat<dateFormat><yyyy-MM-dd>Specify the date format
payPeriodId< payPeriodId > Specify the pay period Id for which payroll data needs to be fetched
employeeStatus < all|users |employeeprofiles| exemployees| logindisabled>allSpecify the employee status based on which payroll needs to be fetched
employeeDateOfExitBased<true|false>falseFetches ex-employees whose  data of exit is on or after from date specified
approvalStatus< approved | unapproved | all >allSpecify the approval Status based on which payroll data needs to be fetched
sIndex<sIndex>0Specify from which record the response should be fetched
limit< limit>100Specify the number of records to be fetched. Maximum value is 100

Error Codes & Messages

Error CodeError Message
9000Permission Denied
9002No Parameter Specified
9004Wrong date format is used in parameter
9006To date should be after the From date
9007A maximum of one month of data can be fetched
9049Specified 'from date' and 'to date' should match pay period's 'from date' and 'to date'

Note 1: A maximum of one month data can be fetched.

Note 2: When Pay period ID is given 'from date' and 'to date' values should match with pay period's cycle's 'from date' and 'to date'.

Note 3: WeekendOtHours, holidayOtHours values are already added in over time hours.

Success Response Format

{
    "response": {
        "result": [
            {
                "userErecNo": <User Id>,
                "employeeDisplayName": <User name>,
                "employeeId": <Employee Id>,
                "employeeEmail": <User mail Id>,
                "regularHour": <Regular Hours >,
       "ratePerHour": <Employee rate per hour,
  "regularTimeAmount": <regular time amount>,
          "OtHours": <over time Hours >, (note :key will be available only if over time is configured),
      "otRatePerHour": <Employee Over time rate per hour>,
  "OtAmount": <over time amount>  (note :key will be available only if over time is configured),
    "extendedOtHours": <Extended over time hours >  (note :key will be available only if extended over time is configured),
      "extendedOtRatePerHour": <Employee Extended Over time rate per hour>,
      "extendedOtAmount": <Extended over time amount>  (note :key will be available only if extended over time is configured),
"paidLeaveHours": <Paid leave hours >(note :key will be available only when include/consider leave for payroll option is configured),
      "paidLeaveAmt": <Paid leave amount>(note :key will be available only when include/consider leave for payroll option is configured),
  "totalAmount" : <total  amount>,
  "weekendOtHours" : <weekend hours> (note :key will be available only when user weekend logged hours as over time option is configured)
      "holidayOtHours": <holiday Hours> (note :key will be available only when user consider holidays hours as over time option is configured)
                 "hasLeaveDataOnly" : <true> (note :key will be available only when user has only leave data)
                
            },....
        ],
        "message": "Payroll Report data fetched successfully",
        "uri": "/api/timetracker/getpayrollreport",
        "status": 0
    }}
 

Error Response Format

{
  "response": {
    "message": "Error in fetching data",
    "uri": "/api/timetracker/getpayrollreport",
    "errors": [
      {
        "code": < error_code >,
        "message": < error_message >
      }],
    "status": 1
  }

 Threshold Limit:  20 requests | Lock period: 5 minutes

Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.

Sample Request

Copiedhttps://people.zoho.com/api/timetracker/getpayrollreport?userErecNo=0&fromDate=01-07-2020&toDate=31-07-2020&sIndex=0&limit=100&dateFormat=dd-MM-yyyy

Header

CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Sample Response

Copied{
    "response": {
        "result": [
            {
                "paidLeaveAmt": "2695.8",
                "extendedOtHours": "00:00",
                "regularTimeAmount": "0",
                "totalOtHours": "05:00",
                "OtHours": "05:00",
                "paidLeaveHours": "24:00",
                "userErecNo": "111796000000209005",
                "employeeEmail": "c.spalding@zylker.com",
                "employeeId": "1",
                "regularHours": "00:00",
                "holidayOtHours": "02:00",
                "otRatePerHour": 132,
                "extendedOtAmount": "0",
                "totalAmount": "3355.8",
                "OtAmount": "660",
                "weekendOtHours": "03:00",
                "extendedOtRatePerHour": 145,
                "ratePerHour": 112.32485969079,
                "employeeDisplayName": "Christine Spalding"
            }
        ],
        "message": ""Payroll Report data fetched successfully",",
        "uri": "/api/timetracker/getpayrollreport",
        "status": 0
    }
}
Copied<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/getpayrollreport">
    <status>0</status>
    <message>User report fetched successfully</message>
    <result>
        <userReport>
            <paidLeaveAmt>2695.8</paidLeaveAmt>
            <extendedOtHours>00:00</extendedOtHours>
            <regularTimeAmount>0</regularTimeAmount>
            <totalOtHours>05:00</totalOtHours>
            <OtHours>05:00</OtHours>
            <paidLeaveHours>24:00</paidLeaveHours>
            <userErecNo>111796000000209005</userErecNo>
            <employeeEmail>c.spalding@zylker.com</employeeEmail>
            <employeeId>1</employeeId>
            <regularHours>00:00</regularHours>
            <holidayOtHours>02:00</holidayOtHours>
            <otRatePerHour>132.0</otRatePerHour>
            <extendedOtAmount>0</extendedOtAmount>
            <totalAmount>3355.8</totalAmount>
            <OtAmount>660</OtAmount>
            <weekendOtHours>03:00</weekendOtHours>
            <extendedOtRatePerHour>145.0</extendedOtRatePerHour>
            <ratePerHour>112.32485969079</ratePerHour>
            <employeeDisplayName>Christine Spalding</employeeDisplayName>
        </userReport>
    </result>
</response>