/workorder/pcr/list
This action lists PCR forms attached to a work order.
Request
| Field | Description | Required |
|---|---|---|
report_id | Unique identifier for the work order | Yes |
Example:
{
"report_id": 18851
}
curl -H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"report_id":18851}' \
https://ppw.web/svc/workorder/pcr/list
Response
A successful response returns a list of PCR form objects. Each object has the following fields.
| Field | Description | Type |
|---|---|---|
pcr_form_id | Unique identifier for the PCR form | number |
pcr_form_name | Name of the PCR form | string |
version | PCR form version number | number |
required | true if PCR form is required; false otherwise | boolean |
has_errors | true if PCR form has errors; false otherwise | boolean |
Example successful response:
FORMATTED_RESPONSE
[{
"pcr_form_id": 28,
"pcr_form_name": "1- Exterior Inspection",
"version": 2,
"required": false,
"has_errors": true
}, {
"pcr_form_id": 25,
"pcr_form_name": "3 - Interior Inspection",
"version": 1,
"required": false,
"has_errors": false
}]
Errors
| Error Type | Description | Status Code |
|---|---|---|
access_denied | Access token is invalid or expired | 401 |
scope_invalid | Client app does not have the required OAuth scope | 403 |
wo_invalid | Work order is invalid | 400 |