> 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 real estate office

GET https://api.modex.com/v1/resources/real-estate-offices/{real_estate_office_id}

A single active real estate office (brokerage office).

**Includes:** `mortgage` (real estate shape), `real_estate`, `census`.

| Field | Type | Description |
|---|---|---|
| `id` | UUID | Office ID |
| `type` | string | Always `real_estate_office` |
| `name` | string | Office name |
| `address` | object | Office address |
| `agent_count` | integer | Number of agents assigned to the office |

Reference: https://docs.modex.com/api-reference/real-estate-data/real-estate-offices/show-real-estate-office

## Authentication

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

## Request

### Path parameters

- `real_estate_office_id` (string, required)

### Query parameters

- `include` (string, optional) — Comma-separated extras: mortgage, real_estate, census.

## Response

### 200

OK

- `id` (string, optional) — Office ID
- `type` (string, optional) — Always `real_estate_office`
- `name` (string, optional) — Office name
- `address` (V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaAddress, optional) — Office address
- `agent_count` (integer, optional) — Number of agents assigned to the office
- `real_estate` (V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstate, optional) — MLS transactions over the rolling 12 months, split into combined, listing, and buyer sides. Present with `include=real_estate`.
- `mortgage` (V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaMortgage, optional) — Production over the rolling 12 months. Present when requested with `include=mortgage`.

## Types

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaAddress

Office 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

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstate

MLS transactions over the rolling 12 months, split into combined, listing, and buyer sides. Present with `include=real_estate`.

- `combined` (V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateCombined, optional) — Every transaction on either side
- `listing` (V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateListing, optional) — Transactions where the agent or office represented the seller
- `buyer` (V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateBuyer, optional) — Transactions where the agent or office represented the buyer

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaMortgage

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
- `buyer_loan_officers` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaMortgageBuyerLoanOfficersItems, optional)
- `listing_loan_officers` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaMortgageListingLoanOfficersItems, optional)
- `buyer_offices` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaMortgageBuyerOfficesItems, optional)
- `listing_offices` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaMortgageListingOfficesItems, optional)

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateCombined

Every transaction on either side

- `volume` (integer, optional) — Total dollar amount over the window
- `units` (integer, optional) — Number of transactions over the window
- `average` (integer, optional) — Average dollar amount
- `average_monthly` (integer, optional) — `volume` divided by the months in the window
- `city` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateCombinedCityItems, optional) — Breakdown by city
- `property_type` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateCombinedPropertyTypeItems, optional) — Breakdown by property type
- `senior_community` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateCombinedSeniorCommunityItems, optional) — Breakdown by senior-community flag (`Yes` / `No`)
- `view_description` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateCombinedViewDescriptionItems, optional) — Breakdown by listed view

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateListing

Transactions where the agent or office represented the seller

- `volume` (integer, optional) — Total dollar amount over the window
- `units` (integer, optional) — Number of transactions over the window
- `average` (integer, optional) — Average dollar amount
- `average_monthly` (integer, optional) — `volume` divided by the months in the window
- `city` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateListingCityItems, optional) — Breakdown by city
- `property_type` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateListingPropertyTypeItems, optional) — Breakdown by property type
- `senior_community` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateListingSeniorCommunityItems, optional) — Breakdown by senior-community flag (`Yes` / `No`)
- `view_description` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateListingViewDescriptionItems, optional) — Breakdown by listed view

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateBuyer

Transactions where the agent or office represented the buyer

- `volume` (integer, optional) — Total dollar amount over the window
- `units` (integer, optional) — Number of transactions over the window
- `average` (integer, optional) — Average dollar amount
- `average_monthly` (integer, optional) — `volume` divided by the months in the window
- `city` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateBuyerCityItems, optional) — Breakdown by city
- `property_type` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateBuyerPropertyTypeItems, optional) — Breakdown by property type
- `senior_community` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateBuyerSeniorCommunityItems, optional) — Breakdown by senior-community flag (`Yes` / `No`)
- `view_description` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateBuyerViewDescriptionItems, optional) — Breakdown by listed view

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaMortgageBuyerLoanOfficersItems

- `first_name` (string, optional) — First name
- `last_name` (string, optional) — Last name
- `loan_officer_id` (string, optional) — Modex loan officer ID, when matched
- `company_name` (string, optional) — Company name
- `count` (integer, optional) — Number of transactions in this category
- `sale_amount_sum` (integer, optional) — Total sale amount, in dollars
- `sale_amount_average` (integer, optional) — Average sale amount, in dollars
- `loan_amount_sum` (integer, optional) — Total loan amount, in dollars
- `loan_amount_average` (integer, optional) — Average loan amount, in dollars
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaMortgageListingLoanOfficersItems

- `first_name` (string, optional) — First name
- `last_name` (string, optional) — Last name
- `loan_officer_id` (any, optional) — Modex loan officer ID, when matched
- `company_name` (string, optional) — Company name
- `count` (integer, optional) — Number of transactions in this category
- `sale_amount_sum` (integer, optional) — Total sale amount, in dollars
- `sale_amount_average` (integer, optional) — Average sale amount, in dollars
- `loan_amount_sum` (integer, optional) — Total loan amount, in dollars
- `loan_amount_average` (integer, optional) — Average loan amount, in dollars
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaMortgageBuyerOfficesItems

- `company_name` (string, optional) — Company name
- `count` (integer, optional) — Number of transactions in this category
- `sale_amount_sum` (integer, optional) — Total sale amount, in dollars
- `sale_amount_average` (integer, optional) — Average sale amount, in dollars
- `loan_amount_sum` (integer, optional) — Total loan amount, in dollars
- `loan_amount_average` (integer, optional) — Average loan amount, in dollars
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaMortgageListingOfficesItems

- `company_name` (string, optional) — Company name
- `count` (integer, optional) — Number of transactions in this category
- `sale_amount_sum` (integer, optional) — Total sale amount, in dollars
- `sale_amount_average` (integer, optional) — Average sale amount, in dollars
- `loan_amount_sum` (integer, optional) — Total loan amount, in dollars
- `loan_amount_average` (integer, optional) — Average loan amount, in dollars
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateCombinedCityItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateCombinedPropertyTypeItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateCombinedSeniorCommunityItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateCombinedViewDescriptionItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateListingCityItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateListingPropertyTypeItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateListingSeniorCommunityItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateListingViewDescriptionItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateBuyerCityItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateBuyerPropertyTypeItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateBuyerSeniorCommunityItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

### V1ResourcesRealEstateOfficesRealEstateOfficeIdGetResponsesContentApplicationJsonSchemaRealEstateBuyerViewDescriptionItems

- `label` (string, optional) — Category name. Records with no value are grouped as `Not provided`.
- `sum` (integer, optional) — Dollar amount in this category
- `count` (integer, optional) — Number of transactions in this category
- `average` (integer, optional) — Average dollar amount
- `percent_sum` (double, optional) — Share of total dollars, 0–100
- `percent_count` (double, optional) — Share of total transactions, 0–100

## Examples

### With real_estate

**Response**

```json
{
  "id": "f0a1b2c3-d4e5-4f60-8a7b-9c0d1e2f3a44",
  "type": "real_estate_office",
  "name": "Cascade Realty Group",
  "address": {
    "street": "2300 NE Broadway",
    "city": "Portland",
    "state": "OR",
    "zipcode": "97232",
    "formatted": "2300 NE Broadway, Portland, OR 97232"
  },
  "agent_count": 87,
  "real_estate": {
    "combined": {
      "volume": 412600000,
      "units": 598,
      "average": 689967,
      "average_monthly": 34383333,
      "city": [
        {
          "label": "Portland",
          "sum": 301200000,
          "count": 433,
          "average": 695612,
          "percent_sum": 73.0005,
          "percent_count": 72.408
        },
        {
          "label": "Beaverton",
          "sum": 64300000,
          "count": 98,
          "average": 656122,
          "percent_sum": 15.5841,
          "percent_count": 16.388
        },
        {
          "label": "Lake Oswego",
          "sum": 47100000,
          "count": 67,
          "average": 702985,
          "percent_sum": 11.4154,
          "percent_count": 11.204
        }
      ],
      "property_type": [
        {
          "label": "Single Family Residence",
          "sum": 344800000,
          "count": 482,
          "average": 715353,
          "percent_sum": 83.5676,
          "percent_count": 80.602
        },
        {
          "label": "Condominium",
          "sum": 41300000,
          "count": 83,
          "average": 497590,
          "percent_sum": 10.0097,
          "percent_count": 13.8796
        },
        {
          "label": "Townhouse",
          "sum": 26500000,
          "count": 33,
          "average": 803030,
          "percent_sum": 6.4227,
          "percent_count": 5.5184
        }
      ],
      "senior_community": [
        {
          "label": "No",
          "sum": 412600000,
          "count": 598,
          "average": 689967,
          "percent_sum": 100,
          "percent_count": 100
        }
      ],
      "view_description": [
        {
          "label": "Not provided",
          "sum": 412600000,
          "count": 598,
          "average": 689967,
          "percent_sum": 100,
          "percent_count": 100
        }
      ]
    },
    "listing": {
      "volume": 226900000,
      "units": 321,
      "average": 706854,
      "average_monthly": 18908333,
      "city": [
        {
          "label": "Portland",
          "sum": 165600000,
          "count": 236,
          "average": 701695,
          "percent_sum": 72.9837,
          "percent_count": 73.5202
        },
        {
          "label": "Beaverton",
          "sum": 35400000,
          "count": 51,
          "average": 694118,
          "percent_sum": 15.6016,
          "percent_count": 15.8879
        },
        {
          "label": "Lake Oswego",
          "sum": 25900000,
          "count": 34,
          "average": 761765,
          "percent_sum": 11.4147,
          "percent_count": 10.5919
        }
      ],
      "property_type": [
        {
          "label": "Single Family Residence",
          "sum": 190200000,
          "count": 262,
          "average": 725954,
          "percent_sum": 83.8255,
          "percent_count": 81.6199
        },
        {
          "label": "Condominium",
          "sum": 22100000,
          "count": 42,
          "average": 526190,
          "percent_sum": 9.74,
          "percent_count": 13.0841
        },
        {
          "label": "Townhouse",
          "sum": 14600000,
          "count": 17,
          "average": 858824,
          "percent_sum": 6.4346,
          "percent_count": 5.296
        }
      ],
      "senior_community": [
        {
          "label": "No",
          "sum": 226900000,
          "count": 321,
          "average": 706854,
          "percent_sum": 100,
          "percent_count": 100
        }
      ],
      "view_description": [
        {
          "label": "Not provided",
          "sum": 226900000,
          "count": 321,
          "average": 706854,
          "percent_sum": 100,
          "percent_count": 100
        }
      ]
    },
    "buyer": {
      "volume": 185700000,
      "units": 277,
      "average": 670397,
      "average_monthly": 15475000,
      "city": [
        {
          "label": "Portland",
          "sum": 135600000,
          "count": 197,
          "average": 688325,
          "percent_sum": 73.021,
          "percent_count": 71.1191
        },
        {
          "label": "Beaverton",
          "sum": 28900000,
          "count": 47,
          "average": 614894,
          "percent_sum": 15.5627,
          "percent_count": 16.9675
        },
        {
          "label": "Lake Oswego",
          "sum": 21200000,
          "count": 33,
          "average": 642424,
          "percent_sum": 11.4163,
          "percent_count": 11.9134
        }
      ],
      "property_type": [
        {
          "label": "Single Family Residence",
          "sum": 154600000,
          "count": 220,
          "average": 702727,
          "percent_sum": 83.2526,
          "percent_count": 79.4224
        },
        {
          "label": "Condominium",
          "sum": 19200000,
          "count": 41,
          "average": 468293,
          "percent_sum": 10.3393,
          "percent_count": 14.8014
        },
        {
          "label": "Townhouse",
          "sum": 11900000,
          "count": 16,
          "average": 743750,
          "percent_sum": 6.4082,
          "percent_count": 5.7762
        }
      ],
      "senior_community": [
        {
          "label": "No",
          "sum": 185700000,
          "count": 277,
          "average": 670397,
          "percent_sum": 100,
          "percent_count": 100
        }
      ],
      "view_description": [
        {
          "label": "Not provided",
          "sum": 185700000,
          "count": 277,
          "average": 670397,
          "percent_sum": 100,
          "percent_count": 100
        }
      ]
    }
  }
}
```

**SDK Code**

```python With real_estate
import requests

url = "https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id"

querystring = {"include":"mortgage,real_estate,census"}

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

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

print(response.json())
```

```javascript With real_estate
const url = 'https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus';
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 real_estate
package main

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

func main() {

	url := "https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus"

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

url = URI("https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus")

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 real_estate
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php With real_estate
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp With real_estate
using RestSharp;

var client = new RestClient("https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift With real_estate
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus")! 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

**Response**

```json
{
  "id": "f0a1b2c3-d4e5-4f60-8a7b-9c0d1e2f3a44",
  "type": "real_estate_office",
  "name": "Cascade Realty Group",
  "address": {
    "street": "2300 NE Broadway",
    "city": "Portland",
    "state": "OR",
    "zipcode": "97232",
    "formatted": "2300 NE Broadway, Portland, OR 97232"
  },
  "agent_count": 87,
  "mortgage": {
    "volume": 136450000,
    "units": 225,
    "average": 606444,
    "buyer_loan_officers": [
      {
        "first_name": "Jordan",
        "last_name": "Ellery",
        "loan_officer_id": "c4e5f6a7-8b9c-4d0e-a1f2-3b4c5d6e7f80",
        "company_name": "Northstar Lending Group, LLC",
        "count": 100,
        "sale_amount_sum": 61500000,
        "sale_amount_average": 615000,
        "loan_amount_sum": 49200000,
        "loan_amount_average": 492000,
        "percent_sum": 45.0715,
        "percent_count": 44.4444
      },
      {
        "first_name": "Riley",
        "last_name": "Chen",
        "loan_officer_id": "d5f6a7b8-9c0d-4e1f-b2a3-4c5d6e7f8091",
        "company_name": "Northstar Lending Group, LLC",
        "count": 50,
        "sale_amount_sum": 29400000,
        "sale_amount_average": 588000,
        "loan_amount_sum": 23520000,
        "loan_amount_average": 470400,
        "percent_sum": 21.5464,
        "percent_count": 22.2222
      }
    ],
    "listing_loan_officers": [
      {
        "first_name": "Avery",
        "last_name": "Brooks",
        "company_name": "Evergreen Home Loans, Inc.",
        "count": 75,
        "sale_amount_sum": 52650000,
        "sale_amount_average": 702000,
        "loan_amount_sum": 42120000,
        "loan_amount_average": 561600,
        "percent_sum": 38.5856,
        "percent_count": 33.3333
      }
    ],
    "buyer_offices": [
      {
        "company_name": "Northstar Lending Group, LLC",
        "count": 150,
        "sale_amount_sum": 90900000,
        "sale_amount_average": 606000,
        "loan_amount_sum": 72720000,
        "loan_amount_average": 484800,
        "percent_sum": 66.6178,
        "percent_count": 66.6667
      }
    ],
    "listing_offices": [
      {
        "company_name": "Evergreen Home Loans, Inc.",
        "count": 75,
        "sale_amount_sum": 52650000,
        "sale_amount_average": 702000,
        "loan_amount_sum": 42120000,
        "loan_amount_average": 561600,
        "percent_sum": 38.5856,
        "percent_count": 33.3333
      }
    ]
  }
}
```

**SDK Code**

```python With mortgage
import requests

url = "https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id"

querystring = {"include":"mortgage,real_estate,census"}

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

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

print(response.json())
```

```javascript With mortgage
const url = 'https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus';
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
package main

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

func main() {

	url := "https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus"

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

url = URI("https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus")

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp With mortgage
using RestSharp;

var client = new RestClient("https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift With mortgage
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id?include=mortgage%2Creal_estate%2Ccensus")! 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()
```