Lease custom fields report
Lists leases together with the values of the company's own custom fields, and lets you filter on those values. One row is one lease, with its tenants, its unit, its property, and the custom field values you asked to display.
Authorization
AuthorizationstringrequiredQuery parameters
propertyIdstringOnly return leases on this property.
portfolioIdstringOnly return leases in this portfolio.
propertyIdsstring[]Only return leases on these properties. Repeat the parameter once per id.
portfolioIdsstring[]Only return leases in these portfolios. Repeat the parameter once per id.
unitIdsstring[]Only return leases on these units. Repeat the parameter once per id.
leaseIdsstring[]Only return these leases. Repeat the parameter once per id.
tenantIdsstring[]Only return leases these tenants are on. Repeat the parameter once per id.
leaseStart.startstring · date-timeOnly return leases starting at or after this moment.
leaseStart.endstring · date-timeOnly return leases starting at or before this moment.
leaseEnd.startstring · date-timeOnly return leases ending at or after this moment.
leaseEnd.endstring · date-timeOnly return leases ending at or before this moment.
moveOutDate.startstring · date-timeOnly return leases with a move-out at or after this moment.
moveOutDate.endstring · date-timeOnly return leases with a move-out at or before this moment.
created.startstring · date-timeOnly return leases created at or after this moment.
created.endstring · date-timeOnly return leases created at or before this moment.
monthToMonthbooleanOnly return leases that do, or do not, roll month to month.
evictionbooleanOnly return leases with, or without, an eviction in progress.
endedbooleanOnly return leases that have, or have not, been closed out.
draftbooleanOnly return leases that are, or are not, still drafts.
balance.fromnumberOnly return leases whose balance is at least this much.
balance.tonumberOnly return leases whose balance is at most this much.
postedBalance.fromnumberOnly return leases whose posted balance is at least this much.
postedBalance.tonumberOnly return leases whose posted balance is at most this much.
searchstringFree-text search across the lease and its tenants.
displayCustomFieldIdsstring[]Which custom fields to return values for. Repeat the parameter once per id. Leave it out and no values are returned.
magicTags.equalStringobjectOnly return leases where the named custom field holds exactly this text. Written as magicTags.equalString[<customFieldId>]=<value>.
magicTags.containsStringobjectOnly return leases where the named custom field contains this text. Written as magicTags.containsString[<customFieldId>]=<value>.
magicTags.equalsBoolobjectOnly return leases where the named custom field holds this true or false value. Written as magicTags.equalsBool[<customFieldId>]=true.
magicTags.dateobjectOnly return leases where the named custom field's date falls in this range, both ends included. Written as magicTags.date[<customFieldId>].start and .end.
magicTags.numberobjectOnly return leases where the named custom field's number falls in this range. Written as magicTags.number[<customFieldId>].from and .to.
Response
200 · The matching leases with their custom field values.
leasesobject[]One entry per matching lease.
propertiesobject[]Every property named by a lease.
unitsobject[]Every unit named by a lease.
customFieldDefinitionsobject[]The custom fields whose values are returned, so their ids can be shown as names.
401 · The access token is missing, expired, or not valid for this company.
Custom fields are defined by the company, so a value's type depends on its definition. Each value object carries one filled slot and leaves the rest absent. Look the value's customFieldId up in customFieldDefinitions for its name, and in the custom fields endpoint for its options.type, which tells you which slot to read.
The field's options.type | Which property carries the value |
|---|---|
string | stringValue, or stringArray when the field is multiple |
number | numberValue |
boolean | booleanValue |
datetime | dateTimeValue |
reference | referenceValue, or referenceArray when the field is multiple |
The magicTags filters are keyed by custom field id, and which one you use depends on that field's type. They are written into the query string with the id in brackets.
curl --request GET \
--url '{{baseUrl}}/company-app/reports/magic-tags/leases?displayCustomFieldIds=1830472847398418018&magicTags.equalString%5B1830472847398418018%5D=A1' \
--header 'Authorization: Bearer $ACCESS_TOKEN'customFieldValues is only filled for the fields named in displayCustomFieldIds. Filtering on a field does not add it to the output; list it in displayCustomFieldIds as well if you want to see it.
This report has no page or pageSize. Every matching lease comes back in one response, so narrow it with the filters on a large portfolio.