> ## Documentation Index
> Fetch the complete documentation index at: https://docs.osaconnection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Occupancy and building type

> Which building types go with which occupancy type, and what the API answers when a pair is not allowed.

A claim's `building` can carry an **occupancy type** (`building.occupancy_type`, the National Flood Insurance Program, or NFIP, occupancy type of the insured building) and a **building type** (`building.building_type`, the kind of building). Both are optional.

The OSA app offers the adjuster only certain building types for each occupancy type. The API accepts only pairs the app offers (for now, all but two: see the note on `manufactured_home` and `travel_trailer` below) and refuses any other with `422 validation_failed`, so a claim never arrives with a pair the app would not offer.

## The rule

* A **residential** occupancy type, including `residential_manufactured_home`, takes a residential building type.
* A **non-residential** occupancy type takes a non-residential building type. `manufactured_home` and `travel_trailer` are non-residential building types.
* A building type sent with **no occupancy type** must be a residential building type.
* An occupancy type sent with **no building type** is always accepted.

## Allowed pairs

| `building.occupancy_type` | `building.building_type` may be |
| - | - |
| Not sent | Any [residential building type](#residential-building-types) |
| `single_family_home` | Any [residential building type](#residential-building-types) |
| `residential_unit` | Any [residential building type](#residential-building-types) |
| `residential_manufactured_home` | Any [residential building type](#residential-building-types) |
| `two_to_four_family_building` | Any [residential building type](#residential-building-types) |
| `residential_condo_building` | Any [residential building type](#residential-building-types) |
| `other_residential_building` | Any [residential building type](#residential-building-types) |
| `non_residential_building` | Any [non-residential building type](#non-residential-building-types) |
| `non_residential_unit` | Any [non-residential building type](#non-residential-building-types) |
| `non_residential_manufactured_home` | Any [non-residential building type](#non-residential-building-types) |

### Residential building types

* `main_dwelling`
* `detached_guest_house`
* `apartment_unit`
* `entire_apartment_building`
* `cooperative_unit`
* `entire_cooperative_building`
* `residential_condo_unit_residential`
* `residential_condo_unit_non_residential`
* `entire_residential_condo_building`
* `other_dwelling_type`

### Non-residential building types

* `agricultural_building`
* `commercial_building`
* `government_owned_building`
* `house_of_worship_building`
* `recreation_building`
* `detached_garage`
* `storage_or_tools_shed`
* `other_non_residential_type`
* `manufactured_home`
* `travel_trailer`

`manufactured_home` and `travel_trailer` are non-residential building types, so today they are accepted only with the three non-residential occupancy types. With `residential_manufactured_home` they are refused, with the `detail` `must be a residential building type when occupancy_type is residential_manufactured_home`. A later release will also accept `manufactured_home` and `travel_trailer` with `residential_manufactured_home`. Until then, for a manufactured home that is a residence, send `occupancy_type: residential_manufactured_home` and leave `building_type` out; the adjuster chooses it in the app.

## When a pair is not allowed

The request is refused with `422 validation_failed` and nothing is created. `errors` has one entry whose `pointer` is `/building/building_type`, and its `detail` says which building types the occupancy type takes.

For example, `"occupancy_type": "single_family_home"` with `"building_type": "commercial_building"` gets:

```json theme={"system"}
{
  "type": "https://docs.osaconnection.com/errors#validation_failed",
  "title": "Validation failed",
  "status": 422,
  "detail": "The request has 1 invalid field.",
  "code": "validation_failed",
  "request_id": "5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f",
  "errors": [
    {
      "pointer": "/building/building_type",
      "detail": "must be a residential building type when occupancy_type is single_family_home"
    }
  ]
}
```

Match on `code` and on the `pointer`. The wording of `detail` may change. See [Errors](/errors#validation_failed).

To fix it, send a building type from the occupancy type's row in the table, or leave `building_type` out and let the adjuster choose it in the app.

## No occupancy type

When the claim has no `building.occupancy_type`, the building type must be one of the residential building types. A non-residential building type sent on its own, for example `"building": { "building_type": "commercial_building" }`, is refused in the same way, with the `pointer` `/building/building_type`.

If your record has a non-residential building type, send the matching non-residential occupancy type with it.

## Values outside the lists

A value that isn't in the lists on this page, for either field, is also refused with `422 validation_failed`, like any other misspelled value. More values may be added to either list later.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.