Work Requests
Create or update work request by external ID
Changed onIdempotent upsert keyed on the external ID in the path. If a work request has this external ID, it will be updated (and undeleted, if the work request was previously deleted). Otherwise, a new work request will be created with this external ID.
patch/workrequests/external/{externalId}
Request
- Base URLhttps://api.getmaintainx.com/v1
- AuthHTTP bearer
Path parameters
externalIdstring required
External ID of the work request
Query parameters
skipWebhookboolean
Set skipWebhook=true, skipWebhook=1 or skipWebhook=yes to skip all webhooks upon successful operation on the endpoint. Learn more about webhooks
Headers
x-organization-idinteger
Required if using a multi organizations token
Request body
Example request
{
"title": "Forklift Preventive Maintenance Form",
"description": "A forklift that needs to be reviewed for any potential problems",
"priority": "MEDIUM",
"assetId": 843,
"locationId": 852,
"extraFields": {
"Request Type": "Water Leak"
},
"approverTeamId": 254,
"creatorContactInfo": "james@example.com"
}Response
Successfully updated work request
Example response
{
"workRequest": {
"id": 963,
"title": "Forklift Preventive Maintenance Form",
"attachments": [
{
"id": 12345,
"mimeType": "image/png",
"fileName": "image.png",
"url": "http://example.com/image.png",
"createdAt": "2022-01-01T00:00:00.000Z",
"width": 220,
"height": 100
}
],
"thumbnail": {
"id": 12345,
"mimeType": "image/png",
"fileName": "image.png",
"url": "http://example.com/image.png",
"createdAt": "2022-01-01T00:00:00.000Z",
"width": 220,
"height": 100
},
"priority": "MEDIUM",
"description": "A forklift that needs to be reviewed for any potential problems",
"requestStatus": "PENDING",
"assetId": 843,
"locationId": 852,
"workOrderId": 254,
"sendEmailNotification": true,
"extraFields": {
"Request Type": "Water Leak"
},
"approverTeamId": 254,
"creatorContactInfo": {
"type": "EMAIL",
"value": "james@example.com"
},
"createdAt": "2022-01-01T00:00:00.000Z",
"updatedAt": "2022-01-01T00:00:00.000Z",
"externalId": "ext-workrequest-001"
}
}Changes
- info
endpoint added
- info