/jobnote/file/detach
The action detaches a file from a job note.
Request
| Field | Description | Type | Required |
|---|---|---|---|
note_id | Unique identifier for the job note | number | Yes |
file_id | Unique identifier for a file attached the job note | number | Yes |
Example:
{
"note_id": 245,
"file_id": 53
}
curl -H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"note_id": 245, "file_id": 53}' \
https://ppw.web/svc/jobnote/file/detach
Response
| Field | Description | Type |
|---|---|---|
message | File detach message | string |
latest_note | Information about the latest job note revesion | object |
See /jobnote/update for information about
the latest_note object.
Example successful response:
{
"message": "File detached",
"latest_note": {
"note_id": 246,
"revisions": [226, 228, 233, 244, 245, 246],
"base_revision": 226
}
}
Errors
| Error Type | Description | Status Code |
|---|---|---|
note_id_required | Valid note_id is required | 400 |
file_id_required | Valid file_id is required | 400 |
file_not_found | File not found attached to job note | 400 |
file_detach_not_allowed | File cannot be detached from the job note | 400 |