> ## 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 Settings

GET https://api.salaryboxapp.com/v2/customer/v1/company/feature-toggles

Returns your company settings, as the SalaryBox app's Settings screen shows them: Block Fake GPS Attendance, Device Verification, AI Face Recognition, Auto Live Track, the Salary Settings (salary calculation days, Include Weekoffs and Include Holidays), Auto-Calculate TDS, Round Off Total Salary and Enable Custom Role. A setting that was never changed shows the app's default.

**Salary calculation days** set how many days a month's salary is spread over. The per-day salary (monthly salary divided by these days) is what an absence deducts and what fines and overtime multiply.

| `salary_calculation_days` | In the app | Days in the month |
|---|---|---|
| `calendar_month` | Calendar Month | The days in that month: January 31, February 28. |
| `30_day_month` | 30 Day Month | Always 30. |
| `26_day_month` | 26 Day Month | Always 26. |

**Include Weekoffs** and **Include Holidays** apply to `calendar_month` only. On, week offs and holidays are paid days of the month. Off, they are taken out of the month's days: a 31-day month with 4 week offs counts as 27 days, and with 1 holiday as 30 days. On a 30 Day Month or 26 Day Month both are always `true`.


Reference: https://docs.salarybox.in/api-reference/company/feature-toggles-retrieve

## Authentication

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

## Response

### 200

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

## Types

### CompanySettingsResponseData

- `block_fake_gps_attendance` (boolean, required) — Block Fake GPS Attendance: punches from a phone using a fake GPS app are refused.
- `device_verification` (boolean, required) — Device Verification: staff can punch only from an approved device. A new device needs approval (see Approve or Reject Device Request).
- `ai_face_recognition` (boolean, required) — AI Face Recognition: a staff member's punch photo is matched against their enrolled face. Turning it on also turns on selfie attendance for every staff member, and face matching applies only to staff whose face is enrolled (enrolment is done in the SalaryBox Android app). Needs AI Face Recognition on your plan.
- `auto_live_track` (boolean, required) — Auto Live Track: staff's live location is tracked automatically during working hours.
- `salary_calculation_days` (enum, required) — How many days a month's salary is spread over, which sets the per-day salary used for absences, fines and overtime. `calendar_month`: the days in that month (January 31, February 28). `30_day_month`: always 30. `26_day_month`: always 26.
  - Allowed values: `calendar_month`, `30_day_month`, `26_day_month`
- `include_week_offs` (boolean, required) — Include Weekoffs: week offs count as paid days of the calendar month. Off, they are taken out of the month's days, so a 31-day month with 4 week offs counts as 27 days. Can be `false` only with `salary_calculation_days` `calendar_month`.
- `include_holidays` (boolean, required) — Include Holidays: holidays count as paid days of the calendar month. Off, they are taken out of the month's days, so a 31-day month with 1 holiday counts as 30 days. Can be `false` only with `salary_calculation_days` `calendar_month`.
- `auto_calculate_tds` (boolean, required) — Auto-Calculate TDS: payroll works out and deducts TDS for staff.
- `round_off_total_salary` (boolean, required) — Round Off Total Salary: each staff member's total salary is rounded to the nearest rupee. Needs Payroll on your plan.
- `custom_permissions` (boolean, required) — Enable Custom Role: staff can be given the Custom role, with permissions set person by person.

## Examples

**Response**

```json
{
  "message": "Data retrieved successfully",
  "status": true,
  "data": {
    "block_fake_gps_attendance": true,
    "device_verification": false,
    "ai_face_recognition": false,
    "auto_live_track": false,
    "salary_calculation_days": "calendar_month",
    "include_week_offs": true,
    "include_holidays": true,
    "auto_calculate_tds": false,
    "round_off_total_salary": false,
    "custom_permissions": false
  }
}
```

**SDK Code**

```python Example
import requests

url = "https://api.salaryboxapp.com/v2/customer/v1/company/feature-toggles"

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

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

print(response.json())
```

```javascript Example
const url = 'https://api.salaryboxapp.com/v2/customer/v1/company/feature-toggles';
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/company/feature-toggles"

	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/company/feature-toggles")

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/company/feature-toggles")
  .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/company/feature-toggles', [
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
  ],
]);

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

```csharp Example
using RestSharp;

var client = new RestClient("https://api.salaryboxapp.com/v2/customer/v1/company/feature-toggles");
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/company/feature-toggles")! 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()
```