> 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 a branch

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

A single active branch.

**Includes:** `mortgage`, `non_qm`, `lender_beneficiaries`, `census`, `licenses`, `trade_names`.

| Field | Type | Description |
|---|---|---|
| `id` | UUID | Branch ID |
| `type` | string | Always `branch` |
| `name` | string | Branch name |
| `nmls_id` | integer, nullable | Branch NMLS ID |
| `company` | object, nullable | Parent company: `id`, `name`, `nmls_id` |
| `address` | object | Branch address |

`mortgage` and `non_qm` for a branch count loans by the loan officers located at that branch.

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

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

- `include` (string, optional) — Comma-separated extras: mortgage, licenses, census, non_qm, lender_beneficiaries, trade_names. trade_names returns current and prior trade names. lender_beneficiaries returns 403 when lender beneficiaries aren't enabled for your account.

## Response

### 200

OK

- `id` (string, optional) — Branch ID
- `type` (string, optional) — Always `branch`
- `name` (string, optional) — Branch name
- `nmls_id` (integer, optional) — Branch NMLS ID
- `company` (V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaCompany, optional) — Parent company: `id`, `name`, `nmls_id`
- `address` (V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaAddress, optional) — Branch address
- `mortgage` (V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaMortgage, optional) — Production over the rolling 12 months. Present when requested with `include=mortgage`.
- `licenses` (V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaLicenses, optional) — Active mortgage licenses and authorized states. Present with `include=licenses`.

## Errors

### 404 Not Found Error

Not Found

- `error` (ApiErrorError, required)

## Types

### V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaCompany

Parent company: `id`, `name`, `nmls_id`

- `id` (string, optional) — Modex ID (UUID)
- `name` (string, optional) — Name
- `nmls_id` (integer, optional) — NMLS ID

### V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaAddress

Branch address

- `street` (string, optional) — Street line
- `city` (string, optional) — City
- `state` (string, optional) — Two-letter state code
- `zipcode` (string, optional) — ZIP code
- `formatted` (string, optional) — Full single-line address

### V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaMortgage

Production over the rolling 12 months. Present when requested with `include=mortgage`.

- `volume` (integer, optional) — Total loan amount, in dollars
- `units` (integer, optional) — Number of loans
- `average` (integer, optional) — Average loan amount in this category, in dollars
- `transaction_type` (list of V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaMortgageTransactionTypeItems, optional) — Breakdown by purpose: Purchase, Refinance, Home Equity, Construction
- `loan_type` (list of V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaMortgageLoanTypeItems, optional) — Breakdown by loan type: Conventional, FHA, VA, USDA, Stand Alone Second, and others
- `property_type` (list of V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaMortgagePropertyTypeItems, optional) — Breakdown by property type: Single Family Residence, Condominium, Townhouse, and others

### V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaLicenses

Active mortgage licenses and authorized states. Present with `include=licenses`.

- `items` (list of V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaLicensesItemsItems, optional)
- `authorized_states` (list of string, optional) — Two-letter codes of states with an active license

### ApiErrorError

- `type` (string, required) — Error category: invalid_request, authentication_error, permission_error, not_found, rate_limit_error, or api_error.
- `code` (string, required) — Specific error code. Same as `type`, except `validation_error` for request-body validation failures.
- `message` (string, required) — Human-readable explanation.
- `details` (map from string to list of string, optional) — Validation errors only: each invalid field mapped to its messages.

### V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaMortgageTransactionTypeItems

- `label` (string, optional) — Category name. Loans with no value recorded are grouped as `Not provided`.
- `sum` (integer, optional) — Loan amount in this category, in dollars
- `count` (integer, optional) — Number of loans in this category
- `average` (integer, optional) — Average loan amount in this category, in dollars
- `percent_sum` (double, optional) — Share of `volume`, 0–100
- `percent_count` (double, optional) — Share of `units`, 0–100

### V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaMortgageLoanTypeItems

- `label` (string, optional) — Category name. Loans with no value recorded are grouped as `Not provided`.
- `sum` (integer, optional) — Loan amount in this category, in dollars
- `count` (integer, optional) — Number of loans in this category
- `average` (integer, optional) — Average loan amount in this category, in dollars
- `percent_sum` (double, optional) — Share of `volume`, 0–100
- `percent_count` (double, optional) — Share of `units`, 0–100

### V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaMortgagePropertyTypeItems

- `label` (string, optional) — Category name. Loans with no value recorded are grouped as `Not provided`.
- `sum` (integer, optional) — Loan amount in this category, in dollars
- `count` (integer, optional) — Number of loans in this category
- `average` (integer, optional) — Average loan amount in this category, in dollars
- `percent_sum` (double, optional) — Share of `volume`, 0–100
- `percent_count` (double, optional) — Share of `units`, 0–100

### V1ResourcesBranchesBranchIdGetResponsesContentApplicationJsonSchemaLicensesItemsItems

- `name` (string, optional) — License name as issued, e.g. `Mortgage Loan Originator License`
- `license_id` (string, optional) — State license number, when the regulator publishes one
- `regulator` (string, optional) — Issuing state or agency, e.g. `Washington`, `California - DFPI`
- `status_label` (string, optional) — License status, e.g. `Approved`
- `issued_date` (date, optional) — Original issue date
- `status_date` (date, optional) — Date of the latest status change
- `renewed_through` (integer, optional) — Year the license is renewed through
- `authorized_to_conduct_business` (boolean, optional) — Whether the license currently authorizes business

## Examples

### Base record

**Response**

```json
{
  "id": "2b9d4e71-6c3a-4f8b-b2d1-7e8f9a0b1c22",
  "type": "branch",
  "name": "Northstar Lending Group, LLC, Portland, OR",
  "nmls_id": 1234568,
  "company": {
    "id": "8f3c2a10-4b7e-4d21-9a6f-1c2d3e4f5a60",
    "name": "Northstar Lending Group, LLC",
    "nmls_id": 1234567
  },
  "address": {
    "street": "500 SW Main Street, Suite 300",
    "city": "Portland",
    "state": "OR",
    "zipcode": "97204",
    "formatted": "500 SW Main Street, Suite 300, Portland, OR 97204"
  }
}
```

**SDK Code**

```python Base record
import requests

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

querystring = {"include":"mortgage,licenses,census,non_qm,lender_beneficiaries,trade_names"}

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

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

print(response.json())
```

```javascript Base record
const url = 'https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names';
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 Base record
package main

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

func main() {

	url := "https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names"

	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 Base record
require 'uri'
require 'net/http'

url = URI("https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names")

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 Base record
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?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Base record
using RestSharp;

var client = new RestClient("https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Base record
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names")! 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()
```

### With mortgage and licenses

**Response**

```json
{
  "id": "2b9d4e71-6c3a-4f8b-b2d1-7e8f9a0b1c22",
  "type": "branch",
  "name": "Northstar Lending Group, LLC, Portland, OR",
  "nmls_id": 1234568,
  "company": {
    "id": "8f3c2a10-4b7e-4d21-9a6f-1c2d3e4f5a60",
    "name": "Northstar Lending Group, LLC",
    "nmls_id": 1234567
  },
  "address": {
    "street": "500 SW Main Street, Suite 300",
    "city": "Portland",
    "state": "OR",
    "zipcode": "97204",
    "formatted": "500 SW Main Street, Suite 300, Portland, OR 97204"
  },
  "mortgage": {
    "volume": 214300000,
    "units": 571,
    "average": 375306,
    "transaction_type": [
      {
        "label": "Purchase",
        "sum": 151900000,
        "count": 392,
        "average": 387500,
        "percent_sum": 70.8819,
        "percent_count": 68.6515
      },
      {
        "label": "Refinance",
        "sum": 55100000,
        "count": 151,
        "average": 364901,
        "percent_sum": 25.7116,
        "percent_count": 26.4448
      },
      {
        "label": "Home Equity",
        "sum": 7300000,
        "count": 28,
        "average": 260714,
        "percent_sum": 3.4064,
        "percent_count": 4.9037
      }
    ],
    "loan_type": [
      {
        "label": "Conventional",
        "sum": 160500000,
        "count": 412,
        "average": 389563,
        "percent_sum": 74.895,
        "percent_count": 72.1541
      },
      {
        "label": "FHA",
        "sum": 31200000,
        "count": 101,
        "average": 308911,
        "percent_sum": 14.559,
        "percent_count": 17.6883
      },
      {
        "label": "VA",
        "sum": 22600000,
        "count": 58,
        "average": 389655,
        "percent_sum": 10.546,
        "percent_count": 10.1576
      }
    ],
    "property_type": [
      {
        "label": "Single Family Residence",
        "sum": 176000000,
        "count": 463,
        "average": 380130,
        "percent_sum": 82.1279,
        "percent_count": 81.0858
      },
      {
        "label": "Condominium",
        "sum": 24800000,
        "count": 74,
        "average": 335135,
        "percent_sum": 11.5726,
        "percent_count": 12.9597
      },
      {
        "label": "Townhouse",
        "sum": 13500000,
        "count": 34,
        "average": 397059,
        "percent_sum": 6.2996,
        "percent_count": 5.9545
      }
    ]
  },
  "licenses": {
    "items": [
      {
        "name": "Mortgage Lender Branch License",
        "license_id": "MLB-1234568",
        "regulator": "Oregon",
        "status_label": "Approved",
        "issued_date": "2016-09-12",
        "status_date": "2026-01-02",
        "renewed_through": 2026,
        "authorized_to_conduct_business": true
      }
    ],
    "authorized_states": [
      "OR"
    ]
  }
}
```

**SDK Code**

```python With mortgage and licenses
import requests

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

querystring = {"include":"mortgage,licenses,census,non_qm,lender_beneficiaries,trade_names"}

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

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

print(response.json())
```

```javascript With mortgage and licenses
const url = 'https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names';
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 With mortgage and licenses
package main

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

func main() {

	url := "https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names"

	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 With mortgage and licenses
require 'uri'
require 'net/http'

url = URI("https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names")

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 With mortgage and licenses
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?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php With mortgage and licenses
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp With mortgage and licenses
using RestSharp;

var client = new RestClient("https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift With mortgage and licenses
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modex.com/v1/resources/branches/branch_id?include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names")! 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()
```