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

# Get branch workforce

GET https://api.modex.com/v1/resources/branches/{branch_id}/workforce

Loan officer headcount for a branch. Same parameters and response as **Show Company Workforce**.

Reference: https://docs.modex.com/api-reference/mortgage-data/branches/show-branch-workforce

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `branch_id` (string, required)

### Query parameters

- `timeframe` (integer, optional) — Workforce window: 3, 6, 9, 12, ytd, or a calendar year 2019–2025. Defaults to 12.

## Response

### 200

OK

- `timeframe` (string, optional)
- `total` (V1ResourcesBranchesBranchIdWorkforceGetResponsesContentApplicationJsonSchemaTotal, optional) — Totals for the timeframe, counting all loan officers.
- `producing` (V1ResourcesBranchesBranchIdWorkforceGetResponsesContentApplicationJsonSchemaProducing, optional) — Same totals, counting only loan officers with recorded loan production.
- `months` (list of V1ResourcesBranchesBranchIdWorkforceGetResponsesContentApplicationJsonSchemaMonthsItems, optional) — One row per month, oldest first.

## Types

### V1ResourcesBranchesBranchIdWorkforceGetResponsesContentApplicationJsonSchemaTotal

Totals for the timeframe, counting all loan officers.

- `headcount` (integer, optional)
- `arrivals` (integer, optional)
- `departures` (integer, optional)
- `change_count` (integer, optional)
- `change` (double, optional)

### V1ResourcesBranchesBranchIdWorkforceGetResponsesContentApplicationJsonSchemaProducing

Same totals, counting only loan officers with recorded loan production.

- `headcount` (integer, optional)
- `arrivals` (integer, optional)
- `departures` (integer, optional)
- `change_count` (integer, optional)
- `change` (double, optional)

### V1ResourcesBranchesBranchIdWorkforceGetResponsesContentApplicationJsonSchemaMonthsItems

- `period` (date, optional) — The current calendar month, in UTC.
- `headcount` (integer, optional)
- `arrivals` (integer, optional)
- `departures` (integer, optional)
- `producing_headcount` (integer, optional)
- `producing_arrivals` (integer, optional)
- `producing_departures` (integer, optional)

## Examples

**Response**

```json
{
  "timeframe": "6",
  "total": {
    "headcount": 45,
    "arrivals": 6,
    "departures": 1,
    "change_count": 4,
    "change": 0.1
  },
  "producing": {
    "headcount": 39,
    "arrivals": 4,
    "departures": 0,
    "change_count": 3,
    "change": 0.08
  },
  "months": [
    {
      "period": "2026-04-01",
      "headcount": 41,
      "arrivals": 1,
      "departures": 0,
      "producing_headcount": 36,
      "producing_arrivals": 1,
      "producing_departures": 0
    },
    {
      "period": "2026-05-01",
      "headcount": 42,
      "arrivals": 1,
      "departures": 0,
      "producing_headcount": 37,
      "producing_arrivals": 1,
      "producing_departures": 0
    },
    {
      "period": "2026-06-01",
      "headcount": 42,
      "arrivals": 0,
      "departures": 0,
      "producing_headcount": 37,
      "producing_arrivals": 0,
      "producing_departures": 0
    },
    {
      "period": "2026-07-01",
      "headcount": 44,
      "arrivals": 2,
      "departures": 0,
      "producing_headcount": 38,
      "producing_arrivals": 1,
      "producing_departures": 0
    },
    {
      "period": "2026-08-01",
      "headcount": 43,
      "arrivals": 0,
      "departures": 1,
      "producing_headcount": 38,
      "producing_arrivals": 0,
      "producing_departures": 0
    },
    {
      "period": "2026-09-01",
      "headcount": 45,
      "arrivals": 2,
      "departures": 0,
      "producing_headcount": 39,
      "producing_arrivals": 1,
      "producing_departures": 0
    }
  ]
}
```

**SDK Code**

```python 6 months
import requests

url = "https://api.modex.com/v1/resources/branches/branch_id/workforce"

querystring = {"timeframe":"12"}

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript 6 months
const url = 'https://api.modex.com/v1/resources/branches/branch_id/workforce?timeframe=12';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go 6 months
package main

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

func main() {

	url := "https://api.modex.com/v1/resources/branches/branch_id/workforce?timeframe=12"

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

	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 6 months
require 'uri'
require 'net/http'

url = URI("https://api.modex.com/v1/resources/branches/branch_id/workforce?timeframe=12")

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

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

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

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

HttpResponse<String> response = Unirest.get("https://api.modex.com/v1/resources/branches/branch_id/workforce?timeframe=12")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.modex.com/v1/resources/branches/branch_id/workforce?timeframe=12', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp 6 months
using RestSharp;

var client = new RestClient("https://api.modex.com/v1/resources/branches/branch_id/workforce?timeframe=12");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 6 months
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modex.com/v1/resources/branches/branch_id/workforce?timeframe=12")! 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()
```