Custom fields

List custom field definitions

Returns a page of the custom fields the company has defined, newest page first by the store's own order. Active fields only unless you ask otherwise.

GET
https://api.portal.magicdoor.com/company-app/custom-fields

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: 1example: 1
pageSizeinteger

How many items per page, between 1 and 100.

default: 50example: 50
entityTypeenum<string>

Only return fields defined for this kind of record.

leaseunitpropertyportfoliocompanytenantvendormaintenanceRequestworkOrderbilltransactionchatchatMessagepropertyManagerunknownrentalApplicationleaseTemplateleaseDocumentassociationViolationownerunitListingfileworkOrderGroup
publicboolean

Only return fields that are, or are not, visible in the tenant, owner and vendor portals.

filterableboolean

Only return fields that can, or cannot, be filtered on.

listableboolean

Only return fields that can, or cannot, be shown as a list column.

activeboolean

Whether to return active or deactivated fields. Defaults to active only.

default: true
searchstring

Free-text search over the field name, 3 to 100 characters.

Response

200 · One page of custom field definitions.

itemsobject[]

The definitions on this page.

currentPageinteger

The page number that was returned.

totalPagesinteger

How many pages exist for this filter.

pageSizeinteger

How many items were requested per page.

totalCountinteger

How many items match the filter across all pages.

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

This resource creates and edits the definitions: what the field is called, what kind of record it hangs off, and what a valid value looks like. The values themselves are set and read on the record they belong to, through that record's own endpoints.

Because the definitions are written by the company, a value has no single fixed type. Which JSON property carries it depends entirely on options.type on the definition.

options.typeWhich value slot the field usesRules you can set
stringstringValue, or stringArray when multiple is trueminLength, maxLength, values, rejectUnknown, multiline, multiple, default
numbernumberValuemin, max, step, default
booleanbooleanValuedefault
datetimedateTimeValuemin, max, default, dateOnly
referencereferenceValue, or referenceArray when multiple is truereferenceEntityType, multiple

So to read a value you first look up its definition by customFieldId, read options.type, and then read the matching property off the value. There is no generic value property.