Search

Search portfolios, properties, units and leases

Runs one free-text search across the company's portfolios, properties, units and leases, and returns the matches nested in that order. Built for a picker that drills down from portfolio to lease.

POST
https://api.portal.magicdoor.com/company-app/search/select

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Body

application/json

searchstringrequired

What to search for, 1 to 150 characters.

levelSearchenum<string>

How deep to search and therefore how deep the result nests. portfolio stops at portfolios, lease goes all the way down.

default: leaseportfoliopropertyunitlease
includeTenantsboolean

Whether to also return the tenants on each matched lease.

default: false
includeEndedLeasesboolean

Whether to include leases that have been closed out.

default: false
includeDeactivatedboolean

Whether to include deactivated portfolios, properties and units.

default: false
includeFutureLeaseboolean

Whether to include leases that have not started yet.

default: true
excludeUnlistedUnitboolean

Whether to leave out units that are not listed for rent.

default: false

Response

200 · The matches, nested portfolio to property to unit to lease.

portfoliosobject[]

Matched portfolios, each carrying whatever matched beneath it.

401 · The access token is missing, expired, or not valid for this company.

It is a POST because of the body, not because it changes anything

This endpoint reads only. It takes a POST so the seven options can be sent as JSON rather than crammed into a query string.

The nesting always follows portfolio, property, unit, lease. levelSearch decides where it stops: a levelSearch of property returns portfolios with properties inside them and no units array at all.