Unit listings

List unit listings

Returns a page of unit listings in summary form, plus the portfolios and properties behind them so a search page can render without further calls. The heavy fields — description, gallery, amenities — are only on the single-listing endpoint.

GET
https://api.portal.magicdoor.com/company-app/unit-listings

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.

Query parameters

pageinteger

Which page to return. Starts at 1.

default: 1
pageSizeinteger

How many records per page. Between 1 and 100. Defaults to 50.

default: 50
portfolioIdstring

Return only listings whose unit sits in this portfolio.

propertyIdstring

Return only listings whose unit sits on this property.

listedboolean

true returns only published listings, false only unpublished ones. Omit to get both.

pinnedboolean

true returns only pinned listings.

availableFromstring · date

Return listings available from this date, as YYYY-MM-DD. Interpreted in the company's timezone.

minRentalPricenumber

Lowest asking rent to include. A decimal with at most two places.

maxRentalPricenumber

Highest asking rent to include. A decimal with at most two places.

minBedsnumber

Fewest bedrooms to include. Zero or more, in steps of 0.5.

minBathsnumber

Fewest bathrooms to include. Zero or more, in steps of 0.5.

propertyTypesenum<string>[]

Return only listings on properties of these kinds. Repeat the parameter for more than one.

singleFamilymultiFamilycommercialcondotownHomeother
searchstring

Free-text search. The term is stripped of punctuation and common address words are abbreviated — "avenue" becomes "ave", "apartment" becomes "apt" — and then every word in it must appear in the record's searchable text, which is built from its name and address. Must not be empty if given.

Response

200 · One page of listings in summary form, plus the portfolios and properties they belong to.

itemsUnitListing[]

The listings on this page. This summary shape has no description, images, videos, amenities, petPolicy, terms or canNotBeListedReasons — fetch a single listing for those.

currentPageinteger

The page you asked for. Note the name: this endpoint calls it currentPage, not page.

totalPagesinteger

How many pages the filtered set fills at this page size.

pageSizeinteger

How many records a page holds.

totalCountinteger

How many records match the filter across every page.

portfoliosPortfolio[]

Each portfolio referenced by the page, once.

propertiesProperty[]

Each property referenced by the page, once.

400 · A query parameter failed validation — `page` below 1, `pageSize` outside 1 to 100, a price with more than two decimal places, or a bed or bath count that is not a multiple of 0.5. The response carries an `errors` member mapping each rejected field name to its message.

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

Listing versus unit

The unit holds the facts of the physical space — beds, baths, square feet, floor, marketRent. The unit listing is the public marketing record: title, description, photos, videos, amenities, pet policy, asking rentalPrice, availableFrom. They share an id but have separate lifecycles: editing one does not touch the other, and a unit can exist with no listing at all. listed is what decides whether the listing is published; active on the unit is a different flag entirely.

A listing is keyed by its unit

A unit listing has no id of its own: its id, its unitId and the {unitId} in the path are all the same Snowflake. So there is exactly one listing per unit, and you address it by the unit's id.

This envelope names the page `currentPage`

The rest of the MagicDoor API returns page in its pagination envelope. The legacy Portal endpoints, including this one, return currentPage instead. The request parameter is still page.