> ## Client identification
>
> Requests to this API should include a `Client-Platform` header alongside
> `Authorization`, identifying the application, tool, or model making the
> request. This is used for integration support and analytics.
>
> Use your model or tool name, for example `claude-code` or `chatgpt`.
>
> Example:
>
> ```bash
> curl https://api.salaryboxapp.com/... \
>   -H "Authorization: Api-Key <api-key>" \
>   -H "Client-Platform: claude-code"
> ```

# List Monthly Salary

GET https://api.salaryboxapp.com/v2/customer/v1/payroll/computed/months

Returns one staff member's payroll month by month, as last computed and stored by SalaryBox (the finalized one when the month is finalized). Requires Payroll Pro. Inactive staff can be fetched. Not paginated.

- This never computes payroll. A month nobody computed has `is_computed` `false` and its figures are `null`.
- Months are listed oldest first, one for every month in the range.
- `total_deductions` includes pay cuts, as on the payslip.
- For every staff member's net pay, amount paid or amount due, use List Payroll History.


Reference: https://docs.salarybox.in/api-reference/payroll/computed-months-retrieve

## Authentication

- `Authorization` header (required) (prefixed with ` Api-Key   `) — Format: "Api-Key \{api-key}"

## Request

### Query parameters

- `salarybox_id` (string, required) — The staff member to return.
- `from_month` (string, required) — First month to include, `YYYY-MM`.
- `to_month` (string, required) — Last month to include, `YYYY-MM`. Cannot be in the future. The range can cover at most 6 months.

## Response

### 200

The staff member's identity and one entry per month.

- `message` (string, required)
- `status` (boolean, required)
- `data` (EmployeeMonthlySalaryResponseData, required) — Identity fields shared by per-employee payroll responses.

## Errors

### 400 Bad Request Error

A parameter is invalid.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

### 403 Forbidden Error

Your plan does not include payroll.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

### 404 Not Found Error

No such staff member.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

## Types

### EmployeeMonthlySalaryResponseData

Identity fields shared by per-employee payroll responses.

- `months` (list of EmployeeMonthlySalaryMonth, required) — One entry per month in the range, oldest first.
- `salarybox_id` (string, optional) — SalaryBox ID of the staff member. Not null.
- `employee_id` (string, optional) — The employee ID your company assigned. Not null, may be empty.
- `name` (string, optional) — Full name of the staff member. Not null.
- `branches` (list of string, optional) — Names of the branches the staff member belongs to. Empty list if none.
- `departments` (list of string, optional) — Names of the departments the staff member belongs to. Empty list if none.

### EmployeeMonthlySalaryMonth

One payroll month as last computed and stored. Amounts are 2-decimal strings, or `null` when the month was not computed.

- `month` (string, required) — Month as `YYYY-MM`.
- `is_computed` (boolean, required) — `false` when nobody computed this month. The figures are then `null`.
- `is_finalized` (boolean, required)
- `earnings` (EmployeeMonthlySalaryMonthEarnings, optional, nullable)
- `deductions` (EmployeeMonthlySalaryMonthDeductions, optional, nullable)
- `employer_contributions` (EmployeeMonthlySalaryMonthEmployerContributions, optional, nullable)
- `total_earnings` (string, optional, nullable)
- `total_deductions` (string, optional, nullable) — Includes pay cuts, as on the payslip.
- `gross_salary` (string, optional, nullable)
- `net_salary` (string, optional, nullable)
- `total_paid` (string, optional, nullable)
- `remaining_balance` (string, optional, nullable)
- `computed_till` (date, optional, nullable) — Last day the computation covered.
- `computed_on` (datetime, optional, nullable)

### EmployeeMonthlySalaryMonthEarnings

- `basic_salary` (string, optional, nullable)
- `allowances` (list of MonthlySalaryNamedAmount, optional) — Includes custom allowances.
- `total_allowances` (string, optional, nullable)
- `overtime` (string, optional, nullable)
- `bonus` (string, optional, nullable)
- `incentive` (string, optional, nullable)
- `reimbursement` (string, optional, nullable)
- `work_basis` (string, optional, nullable)
- `other_allowance` (string, optional, nullable)

### EmployeeMonthlySalaryMonthDeductions

- `employee_pf` (string, optional, nullable)
- `employee_esi` (string, optional, nullable)
- `professional_tax` (string, optional, nullable)
- `labour_welfare_fund` (string, optional, nullable)
- `pf_edli_admin_charges` (string, optional, nullable)
- `tds` (string, optional, nullable) — `0.00` when TDS is off for the company.
- `other_deductions` (list of MonthlySalaryNamedAmount, optional) — Includes custom deductions.
- `total_other_deductions` (string, optional, nullable)
- `penalty` (string, optional, nullable)
- `late_fine` (string, optional, nullable)
- `early_leaving_fine` (string, optional, nullable)
- `loan_repayment` (string, optional, nullable)

### EmployeeMonthlySalaryMonthEmployerContributions

- `employer_pf` (string, optional, nullable)
- `employer_esi` (string, optional, nullable)
- `labour_welfare_fund` (string, optional, nullable)

### MonthlySalaryNamedAmount

- `name` (string, required)
- `amount` (string, required)

## Examples

**Response**

```json
{
  "message": "Success",
  "status": true,
  "data": {
    "months": [
      {
        "month": "2026-09",
        "is_computed": true,
        "is_finalized": true,
        "earnings": {
          "basic_salary": "20000.00",
          "allowances": [
            {
              "name": "HRA",
              "amount": "8000.00"
            },
            {
              "name": "Site Allowance",
              "amount": "2000.00"
            }
          ],
          "total_allowances": "10000.00",
          "overtime": "1500.00",
          "bonus": "0.00",
          "incentive": "3000.00",
          "reimbursement": "500.00",
          "work_basis": "0.00",
          "other_allowance": "0.00"
        },
        "deductions": {
          "employee_pf": "1800.00",
          "employee_esi": "0.00",
          "professional_tax": "200.00",
          "labour_welfare_fund": "12.00",
          "pf_edli_admin_charges": "0.00",
          "tds": "0.00",
          "other_deductions": [
            {
              "name": "Canteen Recovery",
              "amount": "300.00"
            }
          ],
          "total_other_deductions": "300.00",
          "penalty": "0.00",
          "late_fine": "100.00",
          "early_leaving_fine": "0.00",
          "loan_repayment": "1000.00"
        },
        "employer_contributions": {
          "employer_pf": "1800.00",
          "employer_esi": "0.00",
          "labour_welfare_fund": "36.00"
        },
        "total_earnings": "35000.00",
        "total_deductions": "3412.00",
        "gross_salary": "35000.00",
        "net_salary": "31588.00",
        "total_paid": "31588.00",
        "remaining_balance": "0.00",
        "computed_till": "2026-09-30",
        "computed_on": "2026-10-01T10:15:00+05:30"
      },
      {
        "month": "2026-10",
        "is_computed": false,
        "is_finalized": false,
        "earnings": null,
        "deductions": null,
        "employer_contributions": null,
        "total_earnings": null,
        "total_deductions": null,
        "gross_salary": null,
        "net_salary": null,
        "total_paid": null,
        "remaining_balance": null,
        "computed_till": null,
        "computed_on": null
      }
    ],
    "salarybox_id": "SBK7Q2M9TX",
    "employee_id": "EMP-031",
    "name": "Ravi Kumar",
    "branches": [
      "Pune Plant"
    ],
    "departments": [
      "Sales"
    ]
  }
}
```

**SDK Code**

```python Example
import requests

url = "https://api.salaryboxapp.com/v2/customer/v1/payroll/computed/months"

querystring = {"from_month":"2026-09","salarybox_id":"SBK7Q2M9TX","to_month":"2026-10"}

headers = {"Authorization": "Api-Key  <apiKey>"}

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

print(response.json())
```

```javascript Example
const url = 'https://api.salaryboxapp.com/v2/customer/v1/payroll/computed/months?from_month=2026-09&salarybox_id=SBK7Q2M9TX&to_month=2026-10';
const options = {method: 'GET', headers: {Authorization: 'Api-Key  <apiKey>'}};

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

```go Example
package main

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

func main() {

	url := "https://api.salaryboxapp.com/v2/customer/v1/payroll/computed/months?from_month=2026-09&salarybox_id=SBK7Q2M9TX&to_month=2026-10"

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

	req.Header.Add("Authorization", "Api-Key  <apiKey>")

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

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

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

}
```

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

url = URI("https://api.salaryboxapp.com/v2/customer/v1/payroll/computed/months?from_month=2026-09&salarybox_id=SBK7Q2M9TX&to_month=2026-10")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Api-Key  <apiKey>'

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

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

HttpResponse<String> response = Unirest.get("https://api.salaryboxapp.com/v2/customer/v1/payroll/computed/months?from_month=2026-09&salarybox_id=SBK7Q2M9TX&to_month=2026-10")
  .header("Authorization", "Api-Key  <apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.salaryboxapp.com/v2/customer/v1/payroll/computed/months?from_month=2026-09&salarybox_id=SBK7Q2M9TX&to_month=2026-10', [
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
  ],
]);

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

```csharp Example
using RestSharp;

var client = new RestClient("https://api.salaryboxapp.com/v2/customer/v1/payroll/computed/months?from_month=2026-09&salarybox_id=SBK7Q2M9TX&to_month=2026-10");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Api-Key  <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Example
import Foundation

let headers = ["Authorization": "Api-Key  <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.salaryboxapp.com/v2/customer/v1/payroll/computed/months?from_month=2026-09&salarybox_id=SBK7Q2M9TX&to_month=2026-10")! 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()
```