Update Folder
/folders/{id}
Update Folder Type [PUT]
Update an existing folder.
To issue updates to existing schedules on the folder, include the id within the schedule in the schedules
array. To issue deletes of existing schedules on the folder, remove the schedule from the schedules
array. To create new schedules on the folder, add the schedule to the schedules
array with no id
key.
Authorization: Admin, Web, Mobile
Request
Body{ "id": 32988, "num": "IN1099", "description": "Facility Checks", "folderTypeId": 230, "closed": true, "locationId": 480, "schedules": [ { "id": 90812, "userId": 2228, "scheduleFrom": "2015-07-08T08:30:00Z", "scheduleTo": "2015-07-09T09:30:00Z", "note": null }, { "userId": 2228, "scheduleFrom": "2015-08-08T08:30:00Z", "scheduleTo": "2015-08-09T09:30:00Z", "note": "show ID at entrance" } ] }
Response 200
Body
{ "item": { "id": 32988, "num": FC908, "description": "Facility Checks", "folderType": { "id" :230, "name": "Quotes", "color": "9ff79f", "rowStatus": 1 }, "createdAt": "2015-08-08T08:30:00Z", "createdBy": { "id": 1000, "firstName": "Homer", "lastName": "Simpson" }, "closed": true, "closedAt": "2015-08-08T08:30:00Z", "closedBy": { "id": 1000, "firstName": "Homer", "lastName": "Simpson" }, "account": { "id": 6293, "name": "Alpha and Omega", "num": "AX89174", "address": "123 Elm Street NE", "city": "Springfield", "state": "IL", "zip": "80982", "country": "US" }, "location": { "id": 108, "name": "1st Branch" }, "schedules": [ { "id": 90812, "userId": 2228, "scheduleFrom": "2015-07-08T08:30:00Z", "scheduleTo": "2015-07-09T09:30:00Z", "note": null }, { "id": 90980, "userId": 2228, "scheduleFrom": "2015-08-08T08:30:00Z", "scheduleTo": "2015-08-09T09:30:00Z", "note": "show ID at entrance" } ], "locationId": 108, "folderTypeId": 230, "modifiedAt": "2015-08-08T08:30:00Z" } }
Response 422
Body
{ "errors": { "schedules[0].userId": [ "User is required." ], "schedules[0].scheduleFrom": [ "Start time is required." ] } } or... { "errors": { "schedules[0].scheduleFrom": [ "Must be on or before 8/19/2015." ] } }