/workorder/pcr/get
This action gets a simplified version of the PCR form object for a PCR form attached to a work order.
Request
| Field | Description | Required |
|---|---|---|
report_id | Unique identifier for the work order | Yes |
pcr_form_id | Unique identifier for the PCR form | Yes |
Example:
{
"report_id": 18851,
"pcr_form_id": 28
}
curl -H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"report_id":18851,"pcr_form_id":28}' \
https://ppw.web/svc/workorder/pcr/get
Response
| Field | Description | Type |
|---|---|---|
pcr_form_id | Unique identifier for the PCR form | number |
version | PCR form version | number |
name | PCR form name | string |
questions | PCR form questions with answers | array |
Example successful response:
{
"pcr_form_id": 28,
"version": 2,
"name": "1- Exterior Inspection",
"questions": [{
"pcr_question_id": 3801,
"pcr_question_type": "radio",
"pcr_question_name": "Can you complete an exterior inspection?",
"pcr_question_share_name": "Can_you_complete_an_exterior_inspection",
"items": [{
"id": 0,
"value": 7516,
"label": "Yes",
"thirdparty_value": 0
},
{
"id": 1,
"value": 7517,
"label": "No",
"thirdparty_value": 0
}
],
"answer": 7517
},
{
"pcr_question_id": 3802,
"pcr_question_type": "checkbox",
"pcr_question_name": "Why can't you complete the exterior inspection? (Check all that apply)",
"pcr_question_share_name": "Why_cant_you_complete_the_exterior_inspection_Check_all_that_apply",
"items": [{
"id": 0,
"value": 7518,
"label": "Unable to locate",
"thirdparty_value": 0
},
{
"id": 1,
"value": 7519,
"label": "Bad address",
"thirdparty_value": 0
},
{
"id": 2,
"value": 7520,
"label": "Gated",
"thirdparty_value": 0
},
{
"id": 3,
"value": 7521,
"label": "Security guard",
"thirdparty_value": 0
},
{
"id": 4,
"value": 7522,
"label": "Private drive",
"thirdparty_value": 0
},
{
"id": 5,
"value": 7523,
"label": "Disaster-restricted access",
"thirdparty_value": 0
},
{
"id": 6,
"value": 7524,
"label": "Weather issue",
"thirdparty_value": 0
},
{
"id": 7,
"value": 7525,
"label": "Easement issue",
"thirdparty_value": 0
},
{
"id": 8,
"value": 7526,
"label": "Safety concerns",
"thirdparty_value": 0
},
{
"id": 9,
"value": 7527,
"label": "\"No Trespassing\"/\"Do Not Enter\" sign\"",
"thirdparty_value": 0
}
],
"answer": [
7518,
7519,
7520
]
},
{
"pcr_question_id": 3803,
"pcr_question_type": "radio",
"pcr_question_name": "In an HOA?",
"pcr_question_share_name": "In_an_HOA",
"items": [{
"id": 0,
"value": 7528,
"label": "Yes",
"thirdparty_value": 0
},
{
"id": 1,
"value": 7529,
"label": "No",
"thirdparty_value": 0
}
]
},
{
"pcr_question_id": 3804,
"pcr_question_type": "textbox",
"pcr_question_name": "HOA name",
"pcr_question_share_name": "HOA_name",
"answer": "Briar Mount"
},
{
"pcr_question_id": 3809,
"pcr_question_type": "dropdown",
"pcr_question_name": "Occupancy status",
"pcr_question_share_name": "Occupancy_status",
"items": [{
"id": 0,
"value": 7557,
"label": "Occupied",
"thirdparty_value": 0
},
{
"id": 1,
"value": 7558,
"label": "Vacant",
"thirdparty_value": 0
},
{
"id": 2,
"value": 7559,
"label": "Vacant Lot",
"thirdparty_value": 0
},
{
"id": 3,
"value": 7560,
"label": "Unknown",
"thirdparty_value": 0
}
],
"answer": 7557
},
{
"pcr_question_id": 3870,
"pcr_question_type": "textarea",
"pcr_question_name": "Exterior Comments",
"pcr_question_share_name": "Exterior_Comments",
"answer": "Lorem ipsum something"
},
.
.
.
]
}
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 invalid | 400 |
pcr_form_id_invalid | PCR Form Id invalid | 400 |
pcr_not_attached | PCR form not attached to work order | 400 |