> ## 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"
> ```

# Fetch Company Payslips Status

GET https://api.salaryboxapp.com/v2/customer/v1/payroll/payslip/status

Says whether the payslips PDF started by Create Company Payslips is ready. Needs Payroll and Payroll and Compliance Reports on your plan. Poll every 10 seconds; a faster poll gets `429` with `Retry-After`. Large companies can take a few minutes.

`status` is one of:

- `pending`, `in_progress`: keep polling.
- `successful`: finished. Download `file_url`.
- `failed`: call Create Company Payslips again to retry.
- `invalid`: your company has no payslip run with this `report_id`. `month` and `staff_count` are `null`.

`file_url` is `null` unless `status` is `successful`. Polls don't count towards the 10-minute limit. See [Rate limits](/rate-limits).

**Errors**
- `400` `"Invalid Data"` with `errors.report_id` when it is missing or not a positive integer.
- `403` `"Payroll reports are not included in your plan. Contact us."`


Reference: https://docs.salarybox.in/api-reference/payroll/payslip-status-retrieve

## Authentication

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

## Request

### Query parameters

- `report_id` (integer, required) — The `report_id` from Create Company Payslips.

## Response

### 200

- `message` (string, required)
- `status` (boolean, required)
- `data` (PayslipStatusResponseData, required)

## Types

### PayslipStatusResponseData

- `report_id` (integer, required)
- `month` (string, required, nullable) — `YYYY-MM`.
- `status` (enum, required)
  - Allowed values: `pending`, `in_progress`, `successful`, `failed`, `invalid`
- `staff_count` (integer, required, nullable)
- `file_url` (string, required, nullable) — Set only when `status` is `successful`.

## Examples

**Response**

```json
{
  "message": "Payslip status fetched successfully",
  "status": true,
  "data": {
    "report_id": 99812,
    "month": "2026-10",
    "status": "successful",
    "staff_count": 42,
    "file_url": "https://cdn.example.com/payslips.pdf"
  }
}
```

**SDK Code**

```python Example
import requests

url = "https://api.salaryboxapp.com/v2/customer/v1/payroll/payslip/status"

querystring = {"report_id":"1"}

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/payslip/status?report_id=1';
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/payslip/status?report_id=1"

	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/payslip/status?report_id=1")

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/payslip/status?report_id=1")
  .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/payslip/status?report_id=1', [
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
  ],
]);

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

```csharp Example
using RestSharp;

var client = new RestClient("https://api.salaryboxapp.com/v2/customer/v1/payroll/payslip/status?report_id=1");
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/payslip/status?report_id=1")! 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()
```