Portfolios

Get several portfolios by id

Fetches up to 100 portfolios in one call, each with its properties expanded. Every id must exist and belong to the company — one bad id fails the whole call.

GET
https://api.portal.magicdoor.com/company-app/portfolios/batch

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

portfolioIdsstring[]required

The portfolios to fetch. Give them comma-separated (portfolioIds=1830472847398404096,1830472847398404097) or repeat the parameter. At least 1 and at most 100 ids, each a positive decimal Snowflake.

example: 1830472847398404096

Response

200 · A JSON array of the requested portfolios, in the order the repository returned them rather than the order you asked for. The fields below describe one element.

idstring

Snowflake id of the portfolio.

activeboolean

false once the portfolio has been deactivated.

namestring

The portfolio's name, 1 to 150 characters.

propertyCountinteger

How many properties the portfolio holds, active and deactivated together. Maintained by MagicDoor; you cannot set it.

iconsstring[]

Icon keys pinned to the portfolio. Free-form strings; they are added and removed through the icons endpoints, not here.

activePropertyCountinteger

Computed: how many of properties are still active.

propertiesobject[]

Every property in the portfolio, active and deactivated alike, each with a count of its active units.

400 · No ids were given, more than 100 were given, or one of them is not a positive number. 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.

404 · At least one of the ids does not exist, or belongs to another company.