> ## 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 Device Mappings

GET https://api.salaryboxapp.com/v2/customer/v1/requests/device-mapping

Returns staff phones registered for attendance: requests waiting for approval and, with `status`, the devices already mapped to staff. Pending requests come first, newest first; mapped devices follow in the order staff were added.

- `status` on each item is `pending` (waiting for approval) or `approved` (mapped). Mapped devices include those SalaryBox mapped automatically, without a request.
- `created_on` is when the request was made. It is `null` for mapped devices, because the mapping time is not recorded.
- Rejected requests are deleted, so declined devices cannot be listed.


Reference: https://docs.salarybox.in/api-reference/staff/requests-device-mapping-retrieve

## Authentication

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

## Request

### Query parameters

- `status` (enum, optional, default: current) — Which records to return. Defaults to `current`. - `current`: requests waiting for approval. - `approved`: devices mapped to staff. - `all`: both.
  - Allowed values: `current`, `approved`, `all`
- `salarybox_ids` (list of string, optional) — Repeatable. Limits the result to these staff members, for example `salarybox_ids=SBK7Q2M9TX&salarybox_ids=SBK3H8D1LP`.
- `page` (integer, optional) — Page number, starting at 1.
- `page_size` (integer, optional) — Results per page. Default and maximum 500.

## Response

### 200

- `data` (list of PendingDeviceMappingRequest, required)
- `message` (string, required)
- `status` (boolean, required)
- `count` (integer, required)
- `prev` (string, required, nullable)
- `next` (string, required, nullable)

## Types

### PendingDeviceMappingRequest

A device waiting for approval, or one already mapped to a staff member.

- `salarybox_id` (string, required)
- `employee_name` (string, required)
- `device_model` (string, required, nullable)
- `status` (enum, required) — `pending`: waiting for approval. `approved`: mapped to the staff member.
  - Allowed values: `pending`, `approved`
- `created_on` (datetime, required, nullable) — When the request was made. `null` for mapped devices.

## Examples

**Response**

```json
{
  "data": [
    {
      "salarybox_id": "SBHYBSEEIG",
      "employee_name": "apk test",
      "device_model": "iPhone 14",
      "status": "pending",
      "created_on": "2026-07-06T11:05:00Z"
    },
    {
      "salarybox_id": "SBK7Q2M9TX",
      "employee_name": "Ravi Kumar",
      "device_model": "Redmi Note 13",
      "status": "approved",
      "created_on": null
    }
  ],
  "message": "Success",
  "status": true,
  "count": 2,
  "prev": null,
  "next": null
}
```

**SDK Code**

```python Example
import requests

url = "https://api.salaryboxapp.com/v2/customer/v1/requests/device-mapping"

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/requests/device-mapping';
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/requests/device-mapping"

	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/requests/device-mapping")

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/requests/device-mapping")
  .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/requests/device-mapping', [
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
  ],
]);

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

```csharp Example
using RestSharp;

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