Association violations

Raise a work order from a violation

Creates a maintenance work order to put the violation right, copying the violation's property, unit and lease onto it. Returns the new work order, not the violation.

POST
https://api.portal.magicdoor.com/company-app/associations/violations/{violationId}/work-order

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

violationIdstringrequired

The association violation to act on. A Snowflake id sent as a decimal string.

example: 1830472847398407007

Body

application/json

vendorIdstring

The vendor to assign the work to. Leave it out to create the work order unassigned.

permissionToEnterboolean

Whether the vendor may enter the unit without the tenant present.

default: false

Response

200 · The work order that was created.

idstring

The work order.

portfolioIdstring

The portfolio the work order belongs to.

propertyIdstring

The property the work order belongs to.

unitIdstring

The unit the work order is for. Absent when it is property-wide.

leaseIdstring

The lease the work order relates to. Absent when none.

vendorIdstring

The vendor assigned to do the work. Absent while unassigned.

chatIdstring

The one-to-one chat about this work order. Absent until one exists.

groupChatIdstring

The group chat about this work order. Absent until one exists.

assignedPropertyManagerIdstring

The property manager who owns the work order. Absent while unassigned.

referencestring

Short human-facing reference for the work order.

maintenanceRequestIdstring

The maintenance request this came from. Absent when it was raised directly.

statusenum<string>

Where the work order sits in its life cycle.

closedpendinginProgresscompletedcancelled
titlestring

Short title of the work.

createdstring · date-time

When the work order was created, in the company's timezone.

updatedstring · date-time

When it was last changed, in the company's timezone. Absent when never changed.

dueDatestring · date

When the work is due. Absent when no date was set.

urgencyenum<string>

How urgent the work is.

urgenthighmediumlownone
descriptionstring

What needs doing. Generated as Work Order from association violation: followed by the violation's description.

internalDescriptionstring

Note visible only to the management company. Absent when none was set.

permissionToEnterboolean

Whether the vendor may enter without the tenant present.

portfolioobject

The portfolio the work order belongs to.

propertyobject

The property the work order is against.

unitobject

The unit the work order is against. Absent when it is property-wide.

leaseobject

The lease the work order relates to. Absent when none.

vendorobject

The vendor assigned to the work. Absent while unassigned.

maintenanceRequestobject

The maintenance request this came from. Absent on a work order raised from a violation.

assignedPropertyManagerobject

The property manager who owns the work order. Absent while unassigned.

billsobject[]

Vendor bills raised against the work order.

filesobject[]

Files attached to the work order.

chartOfAccountsobject[]

Chart of accounts referenced by the work order's bills.

ownersobject[]

Owners of the property, with their ownership share.

ownerApprovalLimitnumber

Spend above which an owner must approve the work. Absent when no limit applies.

tenantsobject[]

Tenants on the related lease.

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

404 · No association violation with that id exists in the caller's company.

The work order is always created with urgency medium and with a description built from the violation's own description. Change either afterwards through the work order endpoints.