Leases

Send an invoice

Emails an existing invoice to the lease's tenants and records the send. The returned lastSent tells you when it went out.

POST
https://api.portal.magicdoor.com/company-app/leases/{leaseId}/invoices/{invoiceId}/send

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.

Path parameters

leaseIdstringrequired

The lease the invoice is on. A Snowflake id, sent as a decimal string.

example: 1830472847398404096
invoiceIdstringrequired

The invoice to send. Comes from creating or fetching an invoice. A Snowflake id, sent as a decimal string.

example: 1848019384756201984

Response

200 · The invoice, with `lastSent` updated.

idstring

Id of the invoice. A Snowflake id, sent as a decimal string.

leaseIdstring

The lease the invoice is for. A Snowflake id, sent as a decimal string.

issueDatestring · date-time

When the invoice was issued, in the company's timezone.

dueDatestring · date

The date the invoiced amount is due.

invoiceNumberstring

Human-readable invoice number.

totalAmountnumber

Total invoiced, as a decimal amount.

lastSentstring · date-time

When the invoice was last emailed out. Absent until it has been sent.

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

404 · No lease or invoice matched the id, or it belongs to another company.