Service bills

Create a service bill

Charges a property for work the management company did outside the management agreement. The amount is booked as an expense on the property's books and as revenue on the company's, and is drawn out later by a company payout.

POST
https://api.portal.magicdoor.com/company-app/service-bills

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

propertyIdstringrequired

The property to charge. Must belong to the caller's company.

amountnumberrequired

What to charge, in dollars and cents. At least 1.00. Positive — money the property owes the management company.

propertyChartOfAccountIdstringrequired

The chart of account to book the charge to as an expense on the property's books.

companyChartOfAccountIdstringrequired

The chart of account to book the charge to as revenue on the company's books.

unitIdstring

The unit the charge relates to.

leaseIdstring

The lease the charge relates to.

chargeDatestring · date

The day to date the charge. Left out, today is used.

memostring

A note on the bill. At most 200 characters.

Response

200 · The service bill that was created.

idstring

The service bill. A Snowflake id sent as a decimal string.

chargeDatestring · date

The day the charge is dated.

totalAmountnumber

What the bill comes to in dollars and cents. Positive — money the property owes the management company for work beyond the management agreement.

paidAmountnumber

How much of it has been drawn out to the company.

outstandingAmountnumber

What is left: totalAmount less paidAmount.

memostring

A note on the bill. Absent when none was set.

referencestring

A reference on the bill. Absent when none was set.

companyVendorIdstring

The vendor record standing for the management company itself, which the bill is billed from.

lineItemsobject[]

The bill broken down by property, in display order.

filesobject[]

Files attached to the bill.

metadataobject

Free-form key-value pairs kept on the bill.

createdstring · date-time

When the bill was created, in the company's timezone.

updatedstring · date-time

When it last changed, in the company's timezone.

creatorobject

Who created the bill.

vendorobject

The vendor record standing for the management company, resolved.

portfoliosobject[]

The portfolios the lines belong to, resolved.

propertiesobject[]

The properties the lines charge, resolved.

unitsobject[]

The units the lines refer to, resolved.

leasesobject[]

The leases the lines refer to, resolved.

transactionsobject[]

The accounting transactions behind the payouts, resolved.

bankAccountsobject[]

The bank accounts those transactions moved money through, resolved. Account and routing numbers are masked to their last four digits.

chartOfAccountsobject[]

The chart of accounts the bill books to, resolved.

hydratedFilesobject[]

The attachments in files, resolved to full file records with signed download URLs.

creatorInfoobject

The person behind creator, resolved. Exactly one of propertyManager, vendor, tenant and owner is present, matching creator.type.

400 · `amount` is below 1.00, or a required id is missing or not a Snowflake id.

401 · The access token is missing, expired, or does not belong to a property manager.

404 · The property, unit, lease or chart of account does not exist for the caller's company.

422 · The accounting service refused the charge.