Preview a schedule change
Shows what a proposed change to a recurring work order would do to the work orders it has already raised, without changing anything. Send the body you are about to send to the update endpoint and you get back the future work orders the new pattern would no longer cover. Requires the work_orders:read permission.
Authorization
AuthorizationstringrequiredPath parameters
recurringWorkOrderIdstringrequiredThe recurring work order to act on. A Snowflake id, sent as a decimal string.
Body
application/json
The same body as the update endpoint. Only frequency, interval, weekdays, startsFrom, endsOn and workSessionTemplates affect the answer; the rest is accepted and ignored.
descriptionstringrequiredWhat the recurring job is. Between 1 and 2000 characters. MagicDoor writes the title from it when you leave title out.
urgencyenum<string>requiredThe urgency each generated work order gets.
frequencyenum<string>requiredHow often the job repeats, before interval is applied.
startsFromstring · daterequiredThe earliest date an occurrence may fall on. MagicDoor moves it forward to the first date the pattern allows, and the response tells you where it landed.
propertyIdstringThe property the work is on. Give either this, unitId or leaseId — whichever you give, the rest of the location is worked out from it.
unitIdstringThe unit the work is on.
leaseIdstringThe lease the work is tied to.
vendorIdstringThe vendor each generated work order goes to. It must be one of the company's vendors and must still be active.
assignedPropertyManagerIdstringThe property manager to put on each generated work order. They must belong to the company and must still be active.
titlestringThe title each generated work order gets. At most 250 characters. Leave it out and MagicDoor writes one from the description.
internalDescriptionstringNotes for staff only. At most 2000 characters.
permissionToEnterbooleanWhether someone may enter the unit when the tenant is not home.
intervalintegerHow many periods sit between occurrences. Between 1 and 99. 2 with weekly means every other week.
weekdaysenum<string>[]Which days of the week an occurrence falls on. Only allowed when frequency is weekly — sending it with any other frequency is rejected.
workSessionTemplatesobject[]The visits to book into each occurrence. Leave it out and the generated work order carries a due date but no booked visit.
endsOnstring · dateThe date the schedule stops. It cannot be earlier than startsFrom. Leave it out to run forever.
Response
200 · What the change would strand. Nothing has been changed.
dayRemovedCountintegerrequiredHow many stranded work orders fall on a date the new pattern no longer produces.
sessionsChangedCountintegerrequiredHow many stranded work orders keep their date but have visits booked at times the new pattern no longer uses.
orphansobject[]requiredThe stranded work orders, one entry each. An empty array when the change strands nothing.