Skip to main content

GreytHr

GreytHR is a cloud-based HR and payroll management platform used widely across India and the Middle East. Its REST API exposes employee master data, attendance, leave, and payroll records, letting you sync HR information and push payroll inputs programmatically. The API uses OAuth 2.0 client-credentials authentication and scopes every request to a specific company domain.

GreytHr icon

Power end-to-end data operations for your GreytHr API with Nexla. Our bi-directional GreytHr connector is purpose-built for GreytHr, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to GreytHr or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your GreytHr workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating a GreytHR credential, you need an API user in your GreytHR account and the OAuth 2.0 Client ID and Client Secret generated for it. GreytHR authenticates API requests using the OAuth 2.0 client-credentials grant: Nexla exchanges the Client ID and Client Secret for a short-lived access token at your account's token endpoint, then sends that token as a Bearer token in the Authorization header. Every request also carries an x-greythr-domain header identifying your company domain.

To obtain your GreytHR API credentials, an administrator must complete the following steps:

  1. Sign in to your GreytHR account as an administrator.

  2. Navigate to Settings > My Account > API Users in the GreytHR admin portal.

  3. Click Create API User and provide the requested details to register a new API user for the integration.

  4. Assign the required access to the API user by selecting API User Provisioning and granting the roles and permissions that cover the data you plan to read or write (for example, employee, attendance, leave, and payroll access).

  5. Generate the API credentials for the API user. GreytHR issues a Client ID and Client Secret — copy and store both securely, as the secret may not be retrievable again after it is generated.

  6. Note your company domain (for example, yourcompany.greythr.com) and the corresponding base URL (https://yourcompany.greythr.com). Both are required when configuring the credential in Nexla.

For complete details about API user provisioning, the token endpoint, and available endpoints, refer to the GreytHR developer documentation and GreytHR API reference.

Authenticate

Credentials required

FieldRequiredSecretDescription
Base URLYesNoThe base URL for the GreytHR API. Pattern: https://{company}.greythr.com (e.g. https://yourcompany.greythr.com).
Client IDYesYesYour GreytHR API client ID. Generated from Settings > My Account > API Users in the GreytHR admin portal.
Client SecretYesYesYour GreytHR API client secret. Generated alongside the Client ID from the GreytHR admin portal.
Company DomainYesNoYour GreytHR company domain (e.g. yourcompany.greythr.com). Sent as x-greythr-domain header in all API requests.

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

  2. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  3. Enter your GreytHR API base URL in the Base URL field, using the pattern https://yourcompany.greythr.com. Nexla uses this URL to construct every API request and to reach the OAuth 2.0 token endpoint.

  4. Enter your Client ID and Client Secret in the corresponding fields. Nexla exchanges these credentials for a short-lived access token using the OAuth 2.0 client-credentials grant and sends the token as a Bearer token in the Authorization header of each request.

  5. Enter your Company Domain (for example, yourcompany.greythr.com) in the Company Domain field. Nexla sends this value in the x-greythr-domain header on every request to scope the call to your GreytHR account.

    The Client Secret is sensitive. If it is compromised, regenerate the API user's credentials in the GreytHR admin portal under Settings > My Account > API Users and update the credential in Nexla.

  6. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the GreytHR connector tile, then select the credential that will be used to connect to the GreytHR instance, and click Next; or, create a new GreytHR credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common GreytHR endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

[Rest API] List Employees

Returns a list of all employees in the organization.

  • Use this template to ingest the full employee roster. No additional parameters are required — Nexla reads the employee records returned by the endpoint into a Nexset.

[Rest API] List Employee Categories

Returns a list of employee categories or classifications available in the organization.

  • Use this template to ingest the category or classification reference data used to group employees. No additional parameters are required.

[Rest API] List Employee Profiles

Returns profile information for all employees including basic details and identifiers.

  • Use this template to ingest core employee profile records. No additional parameters are required.

[Rest API] List Employee Personal Details

Returns personal information for all employees such as contact details, emergency contacts, and personal attributes.

  • Use this template to ingest personal employee attributes. No additional parameters are required.

[Rest API] List Employee Work Details

Returns work-related information for all employees including job title, department, manager, and employment terms.

  • Use this template to ingest employment and organizational details for each employee. No additional parameters are required.

[Rest API] List Employee Separation Details

Returns separation and exit information for employees including resignation dates, last working days, and severance details.

  • Use this template to ingest employee separation and exit records. No additional parameters are required.

[Rest API] List Employee Statutory Details (India)

Returns statutory and compliance information for employees in India including tax identifiers and regulatory details.

  • Use this template to ingest India statutory compliance records. No additional parameters are required.

[Rest API] List Employee Bank Details

Returns banking information for all employees including account numbers, IFSC codes, and payment method details.

  • Use this template to ingest employee banking and payment records. No additional parameters are required.

[Rest API] List Employee PF & ESI Details

Returns provident fund and employee state insurance details for all employees including contribution amounts and account numbers.

  • Use this template to ingest provident fund (PF) and employee state insurance (ESI) records. No additional parameters are required.

[Rest API] List Employee Qualifications

Returns educational qualifications and certifications for all employees including degree, institution, and graduation details.

  • Use this template to ingest employee qualification and certification records. No additional parameters are required.

[Rest API] List Users

Returns a list of all users in the GreytHR system.

  • Use this template to ingest GreytHR system users. This endpoint is paginated — Nexla automatically pages through the results using offset-based pagination until all users have been retrieved.

[Rest API] Get Employee by ID

Retrieves details for a single employee by their employee ID.

  • Provide the Employee Id parameter to identify the employee whose details should be retrieved.

[Rest API] Employee Lookup

Searches for employees by employee number, email, GUID, access card, or personal email address.

  • Provide the Query parameter — an employee number, email, GUID, access card, or personal email — to search for matching employees.

[Rest API] Get Employee Leave Balance

Retrieves leave balance details for a specific employee for a given year.

  • Provide the Employee Id and Year parameters to retrieve the leave balance for that employee and year.

[Rest API] Get Leave Transactions for Specific Employee

Returns leave transactions for a specific employee within a specified date range.

  • Provide the Employee Id, Start Date, and End Date parameters to scope the leave transactions returned.

[Rest API] Get Attendance Muster for Specific Employee

Returns attendance muster details for a specific employee within a specified date range.

  • Provide the required Employee Id parameter, along with the Start Date and End Date parameters, to scope the attendance muster returned.

[Rest API] Get Attendance Swipes for Specific Employee

Returns raw attendance swipes (check-in/check-out records) for a specific employee within a date range.

  • Provide the required Employee Id, Start Date, and End Date parameters to scope the attendance swipes returned.

[Rest API] Get Salary Revision History for Employee

Returns salary revision history for a specific employee filtered by approval status.

  • Provide the Employee Id and Status parameters to retrieve the salary revision history for that employee, filtered by approval status.

[Rest API] Get Employee Resettlement Details

Get resettlement (final settlement) details for employees in a given payroll month.

  • Provide the required Payrollmonth parameter to retrieve resettlement (final settlement) details for that payroll month.

[Rest API] Get Employee Attendance Snapshot

Retrieve the attendance snapshot for an employee that will be used in payroll.

  • Provide the required Employee Id parameter to retrieve the payroll attendance snapshot for that employee.

[Rest API] Get Employee Salary Statement

Fetch salary statement for a specific employee for a given month.

  • Provide the required Payrollmonth and Employee Id parameters to fetch the salary statement for that employee and month.

[Rest API] List Pay Periods

Enumerate all pay periods for the financial year.

  • Use this template to ingest the list of pay periods for the financial year. No additional parameters are required.

[Rest API] Get Salary Component Repository

Retrieve salary component repository (pay-head definitions).

  • Use this template to ingest the salary component repository, which defines the pay-heads used in payroll. No additional parameters are required.

[Rest API] Get Employee Salary Revision Difference

Get the salary revision difference (arrears) for an employee.

  • Provide the required Employee Id parameter to retrieve the salary revision difference (arrears) for that employee.

[Rest API] Get Employee Documents

Retrieve employee documents by category (e.g., ID proofs, contracts).

  • Provide the required Employeeid and Categoryid parameters to retrieve documents for that employee within the specified document category.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

GreytHR data sources can also be manually configured to ingest data from any valid GreytHR API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new GreytHR data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.

Use as a destination

Click the + icon on the Nexset that will be sent to the GreytHR destination, and select the Send to Destination option from the menu. Select the GreytHR connector from the list of available destination connectors, then select the credential that will be used to connect to the GreytHR organization, and click Next; or, create a new GreytHR credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common GreytHR endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

[Rest API] Create Loan Record

Create a loan record for an employee.

  • Each record from your Nexset is sent as a JSON request body to create a loan record. Ensure your Nexset fields match the loan payload expected by the GreytHR payroll API.

[Rest API] Push Employee Attendance Snapshot

Push attendance snapshot for an employee into payroll processing.

  • Provide the required Employee Id parameter to identify the employee, and send the attendance snapshot as the JSON request body for payroll processing.

[Rest API] Create List-of-Values Entry

Query or create List-of-Values (LoV) entries such as designations, departments, positions.

  • Each record from your Nexset is sent as a JSON request body to create a List-of-Values (LoV) entry, such as a designation, department, or position.

[Rest API] Delete Employee Attendance Snapshot

Remove an attendance snapshot previously submitted for an employee.

  • Provide the required Employee Id parameter to remove the attendance snapshot previously submitted for that employee. This endpoint uses the HTTP DELETE method and does not require a request body.

[Rest API] Download Employee Form 16

Download Form 16 (annual tax certificate) for employees — India statutory compliance.

  • Each record from your Nexset is sent as a JSON request body to trigger a Form 16 (annual tax certificate) download for the specified employees, supporting India statutory compliance.

Manual configuration

GreytHR destinations can also be manually configured to send data to any valid GreytHR API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.

GreytHR APIs expect JSON format for most write operations. For endpoints that target a specific record, include the relevant identifier (such as the employee ID) in the endpoint URL.

Save & activate

Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured GreytHR endpoint, open the destination resource menu, and select Activate.

The Nexset data will not be sent to the GreytHR endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.