> This page is for Unified.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# /employee-payroll-runs/{id}

GET https://api.merge.dev/api/hris/v1/employee-payroll-runs/{id}

Returns an `EmployeePayrollRun` object with the given `id`.

Reference: https://docs.merge.dev/merge-unified/hris/common-models/employee-payroll-runs/retrieve

## Authentication

- `Authorization` header (bearer token, required) — Token-based authentication with required prefix "Bearer"

## Servers

- `https://api.merge.dev/api` (Production, default)
- `https://api-eu.merge.dev/api` (ProductionEU)
- `https://api-ap.merge.dev/api` (ProductionAPSE1)

## Request

### Path parameters

- `id` (string, required)

### Query parameters

- `expand` (list of enum, optional) — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
  - Allowed values: `employee`, `payroll_run`
- `include_remote_data` (boolean, optional) — Whether to include the original data Merge fetched from the third-party to produce these models.
- `include_shell_data` (boolean, optional) — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

### Headers

- `X-Account-Token` (string, required) — Token identifying the end user.

## Response

### 200

- `id` (string, optional)
- `remote_id` (string, optional, nullable) — The third-party API ID of the matching object.
- `created_at` (datetime, optional) — The datetime that this object was created by Merge.
- `modified_at` (datetime, optional) — The datetime that this object was modified by Merge.
- `employee` (string, optional, nullable) — The employee whose payroll is being run.
- `payroll_run` (string, optional, nullable) — The payroll being run.
- `gross_pay` (double, optional, nullable) — The total earnings throughout a given period for an employee before any deductions are made.
- `net_pay` (double, optional, nullable) — The take-home pay throughout a given period for an employee after deductions are made.
- `start_date` (datetime, optional, nullable) — The day and time the payroll run started.
- `end_date` (datetime, optional, nullable) — The day and time the payroll run ended.
- `check_date` (datetime, optional, nullable) — The day and time the payroll run was checked.
- `earnings` (list of Earning, optional)
- `deductions` (list of Deduction, optional)
- `taxes` (list of Tax, optional)
- `remote_was_deleted` (boolean, optional) — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
- `field_mappings` (EmployeePayrollRunFieldMappings, optional, nullable)
- `remote_data` (list of RemoteData, optional, nullable)

## Types

### Earning

# The Earning Object ### Description The `Earning` object is used to represent an array of different compensations that an employee receives within specific wage categories. ### Usage Example Fetch from the `LIST Earnings` endpoint and filter by `ID` to show all earnings.

- `id` (string, optional)
- `remote_id` (string, optional, nullable) — The third-party API ID of the matching object.
- `created_at` (datetime, optional) — The datetime that this object was created by Merge.
- `modified_at` (datetime, optional) — The datetime that this object was modified by Merge.
- `employee_payroll_run` (string, optional, nullable)
- `amount` (double, optional, nullable) — The amount earned.
- `type` (enum, optional, nullable) — The type of earning.
  - Allowed values: `SALARY`, `REIMBURSEMENT`, `OVERTIME`, `BONUS`
- `remote_was_deleted` (boolean, optional) — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
- `field_mappings` (EarningFieldMappings, optional, nullable)
- `remote_data` (list of RemoteData, optional, nullable)

### Deduction

# The Deduction Object ### Description The `Deduction` object is used to represent an array of the wages withheld from total earnings for the purpose of paying taxes. ### Usage Example Fetch from the `LIST Deductions` endpoint and filter by `ID` to show all deductions.

- `id` (string, optional)
- `remote_id` (string, optional, nullable) — The third-party API ID of the matching object.
- `created_at` (datetime, optional) — The datetime that this object was created by Merge.
- `modified_at` (datetime, optional) — The datetime that this object was modified by Merge.
- `employee_payroll_run` (string, optional, nullable)
- `name` (string, optional, nullable) — The deduction's name.
- `employee_deduction` (double, optional, nullable) — The amount of money that is withheld from an employee's gross pay by the employee.
- `company_deduction` (double, optional, nullable) — The amount of money that is withheld on behalf of an employee by the company.
- `remote_was_deleted` (boolean, optional) — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
- `field_mappings` (DeductionFieldMappings, optional, nullable)
- `remote_data` (list of RemoteData, optional, nullable)

### Tax

# The Tax Object ### Description The `Tax` object is used to represent an array of the tax deductions for a given employee's payroll run. ### Usage Example Fetch from the `LIST Taxes` endpoint and filter by `ID` to show all taxes.

- `id` (string, optional)
- `remote_id` (string, optional, nullable) — The third-party API ID of the matching object.
- `created_at` (datetime, optional) — The datetime that this object was created by Merge.
- `modified_at` (datetime, optional) — The datetime that this object was modified by Merge.
- `employee_payroll_run` (string, optional, nullable)
- `name` (string, optional, nullable) — The tax's name.
- `amount` (double, optional, nullable) — The tax amount.
- `employer_tax` (boolean, optional, nullable) — Whether or not the employer is responsible for paying the tax.
- `remote_was_deleted` (boolean, optional) — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
- `field_mappings` (TaxFieldMappings, optional, nullable)
- `remote_data` (list of RemoteData, optional, nullable)

### EmployeePayrollRunFieldMappings

- `organization_defined_targets` (map from string to any, optional)
- `linked_account_defined_targets` (map from string to any, optional)

### RemoteData

# The RemoteData Object ### Description The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. ### Usage Example TODO

- `path` (string, required) — The third-party API path that is being called.
- `data` (any, optional) — The data returned from the third-party for this object in its original, unnormalized format.

### EarningFieldMappings

- `organization_defined_targets` (map from string to any, optional)
- `linked_account_defined_targets` (map from string to any, optional)

### DeductionFieldMappings

- `organization_defined_targets` (map from string to any, optional)
- `linked_account_defined_targets` (map from string to any, optional)

### TaxFieldMappings

- `organization_defined_targets` (map from string to any, optional)
- `linked_account_defined_targets` (map from string to any, optional)

## Examples

**Response**

```json
{
  "id": "fb8c55b6-1cb8-4b4c-9fb6-17924231619d",
  "remote_id": "19202938",
  "created_at": "2021-09-15T00:00:00Z",
  "modified_at": "2021-10-16T00:00:00Z",
  "employee": "d2f972d0-2526-434b-9409-4c3b468e08f0",
  "payroll_run": "35347df1-95e7-46e2-93cc-66f1191edca5",
  "gross_pay": 1342.67,
  "net_pay": 865.78,
  "start_date": "2020-11-08T00:00:00Z",
  "end_date": "2020-11-09T00:00:00Z",
  "check_date": "2020-11-10T00:00:00Z",
  "earnings": [
    {
      "employee_payroll_run": "35347df1-95e7-46e2-93cc-66f1191edca5",
      "amount": 1002.34,
      "type": "SALARY"
    },
    {
      "employee_payroll_run": "35347df1-95e7-46e2-93cc-66f1191edca5",
      "amount": 8342.34,
      "type": "OVERTIME"
    }
  ],
  "deductions": [
    {
      "employee_payroll_run": "35347df1-95e7-46e2-93cc-66f1191edca5",
      "name": "Social Security",
      "employee_deduction": 34.54,
      "company_deduction": 78.78
    }
  ],
  "taxes": [
    {
      "employee_payroll_run": "35347df1-95e7-46e2-93cc-66f1191edca5",
      "name": "California State Income Tax",
      "amount": 100.25,
      "employer_tax": "False"
    }
  ],
  "remote_was_deleted": true,
  "field_mappings": {
    "organization_defined_targets": {
      "custom_key": "custom_value"
    },
    "linked_account_defined_targets": {
      "custom_key": "custom_value"
    }
  },
  "remote_data": [
    {
      "path": "/employee-payroll",
      "data": null
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.merge.dev/api/hris/v1/employee-payroll-runs/id"

querystring = {"include_remote_data":"true"}

headers = {
    "X-Account-Token": "X-Account-Token",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.merge.dev/api/hris/v1/employee-payroll-runs/id?include_remote_data=true';
const options = {
  method: 'GET',
  headers: {'X-Account-Token': 'X-Account-Token', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.merge.dev/api/hris/v1/employee-payroll-runs/id?include_remote_data=true"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Account-Token", "X-Account-Token")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.merge.dev/api/hris/v1/employee-payroll-runs/id?include_remote_data=true")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Account-Token"] = 'X-Account-Token'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.merge.dev/api/hris/v1/employee-payroll-runs/id?include_remote_data=true")
  .header("X-Account-Token", "X-Account-Token")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.merge.dev/api/hris/v1/employee-payroll-runs/id?include_remote_data=true', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Account-Token' => 'X-Account-Token',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.merge.dev/api/hris/v1/employee-payroll-runs/id?include_remote_data=true");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Account-Token", "X-Account-Token");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Account-Token": "X-Account-Token",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.merge.dev/api/hris/v1/employee-payroll-runs/id?include_remote_data=true")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```