> This page is for version V1 (default).
> For other versions, use one of these documentation indexes:
> - V1 (default): https://docs.ottimate.com/v-1/llms.txt

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

# Accounts

This section shows how to fetch account-level entities like locations and companies.

### Fetching Locations

You can retrieve all locations associated with an account or search for a specific location by name.

**Fetch all locations:**

```python
# Fetch all the locations for the account   
locations = client.accounts.get_accounts_id_locations(id=ottimate_account_id)
```

**Search for a location by name:**

```python
# Search for location name
locations = client.accounts.get_accounts_id_locations(id=ottimate_account_id, search="Demo")
```

### Fetching Companies

Similarly, you can retrieve all companies for an account or search for a specific one.

**Fetch all companies:**

```python
# Fetch all the companies for the account
companies = client.accounts.get_accounts_id_companies(id=ottimate_account_id)
```

**Search for a company by name:**

```python
# Search for company name
companies = client.accounts.get_accounts_id_companies(id=ottimate_account_id, search="demo")
```