/jobnote/update
The action updates a job note.
Request
| Field | Description | Type | Required |
|---|---|---|---|
note_id | Unique identifier for the job note | number | Yes |
note_type | Note type. It wo if it is a work order note and prop if it is a property note | string | Yes |
send_to_users | List of PPW users to send the job note to. Each item in the list is a user_id. | array | No |
send_to_emails | List of email addresses to send to the job note to. | array | No |
reminder_date | Job note reminder date. Accepted formats: MM/DD/YYYY, YYYY-MM-DD, YYYYMMDD | string | No |
reminder_time | Job note reminder time. For a liste of accepted times, see /jobnote/reminder/times | string | No |
note_text | Job note body | string | Yes |
group_permissions | List of user groups that will have permission to view the job note. See /user/group/list | array | Yes |
For send_to_users field to get the user_id for a PPW user use the
/user/search action.
If reminder_date is specified, then reminder_time is required.
The reminder_time must be US Central time.
Example:
{
"report_id": 40945,
"note_id": 240,
"note_type": "wo",
"send_to_emails": [],
"send_to_users": [45592],
"reminder_date": "08/02/2024",
"reminder_time": 143000,
"note_text": "Performed deep cleaning on 7 rooms of carpet. Stains were treated and removed successfully. Client expressed satisfaction with the results and requested a follow-up cleaning in 6 months.",
"group_permissions": [3651, 3654]
}
curl -H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"report_id":40945,"note_id":240,"note_type":"wo","send_to_emails":[],"send_to_users":[45592],"reminder_date":"08/02/2024","reminder_time":143000,"note_text":"Performed deep cleaning on 7 rooms of carpet. Stains were treated and removed successfully. Client expressed satisfaction with the results and requested a follow-up cleaning in 6 months.","group_permissions":[3651,3654]}' \
https://ppw.web/svc/jobnote/update
Response
| Field | Description | Type |
|---|---|---|
latest_note | Information about the latest job note revesion | object |
The latest_note object has the following fields:
| Field | Description | Type |
|---|---|---|
note_id | The current latest Unique identifier for the job note | number |
revisions | List of all revisions of the job note. Each item in the list is a job note note_id | array |
base_revision | First revision (note_id) of the job note | number |
Example successful response:
{
"latest_note": {
"note_id": 241,
"revisions": [240, 241],
"base_revision": 240
}
}
Errors
| Error Type | Description | Status Code |
|---|---|---|
invalid_report_id | Unique work order identifier is invalid | 400 |
note_type_required | Job note type is required | 400 |
invalid_note_type | Job note type is invalid | 400 |
note_text_required | Job note text is required | 400 |
invalid_send_to_users | send_to_users field is invalid | 400 |
invalid_send_to_emails | send_to_emails field is invalid | 400 |
invalid_reminder_date | Reminder date is invalid | 400 |
reminder_time_required | Reminder time is required | 400 |
invalid_reminder_time | Reminder time is invalid | 400 |
invalid_group_permission | group_permissions is invalid | 400 |
note_not_found | Job note not found | 400 |
note_update_error | Error updating job note | 400 |
note_update_not_allowed | Job note revision cannot be updated | 400 |