Recurring work orders

Get a recurring work order's totals

Returns how much work one schedule has produced: how many work orders it has raised and where they stand, when it first and last ran, and what it has cost in bills. Requires the work_orders:read permission.

GET
https://services.magicdoor.com/maintenance/company-portal/work-orders/recurring/{recurringWorkOrderId}/stats

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

recurringWorkOrderIdstringrequired

The recurring work order to act on. A Snowflake id, sent as a decimal string.

example: 1838400938471029248

Response

200 · The totals.

workOrderCountintegerrequired

How many work orders this schedule has raised in total.

openCountintegerrequired

How many of them are still open.

completedCountintegerrequired

How many were completed.

cancelledCountintegerrequired

How many were cancelled.

futureWorkOrderCountintegerrequired

How many already-raised work orders are due on a date still to come.

firstCreatedOnstring · date

The date the first work order was raised from this schedule, in the company's timezone. Absent when none has been.

lastCreatedOnstring · date

The date the most recent one was raised. Absent when none has been.

nextDueDatestring · date

The date of the next occurrence still to be raised. Absent when the schedule has finished.

draftBillCountintegerrequired

How many draft bills sit on this schedule's work orders.

draftBillTotalnumberrequired

What those draft bills add up to, for example 1850.00.

billCountintegerrequired

How many draft bills have been turned into real vendor bills.

billTotalnumberrequired

What those real bills add up to.

401 · The request carried no valid access token.

403 · The token is not a property manager token, or it lacks the `work_orders:read` permission.

404 · No such recurring work order, or it belongs to another company.