/pcr/get
This action gets a specific version of a PCR form.
Request
| Field | Description | Required |
|---|---|---|
pcr_form_id | Unique identifier for the PCR form | Yes |
version | PCR form version number | Yes |
Example:
{
"pcr_form_id": 28,
"version": 2
}
curl -H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"pcr_form_id": 28, "version": 2}' \
https://ppw.web/svc/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 | array |
Example successful response:
{
"pcr_form_id": "28",
"version": 2,
"name": "1- Exterior Inspection",
"questions": [{
"id": 3795,
"question": "Client",
"tip": "",
"active": true,
"group_id": null,
"type": "message",
"questionType": "ppwfield",
"questionDataType": "client_company",
"questionShareName": "Client",
"questionFormLength": "",
"required": false,
"thirdpartyfield_id": 0,
"maxLength": null,
"hide_errors": false,
"message": "",
"rules": [],
"previous": {
"value": "",
"hide": true,
"readonly": true,
"autocopy": false
},
"events": {
"valid": []
},
"photos": {
"min": 0,
"max": 0
}
},
{
"id": 3801,
"question": "Can you complete an exterior inspection?",
"tip": "",
"active": true,
"group_id": null,
"type": "single_choice",
"questionType": "radio",
"questionDataType": "int",
"questionShareName": "Can_you_complete_an_exterior_inspection",
"questionFormLength": "",
"required": true,
"thirdpartyfield_id": 0,
"maxLength": null,
"hide_errors": false,
"message": "",
"rules": [],
"previous": {
"value": "",
"hide": true,
"readonly": true,
"autocopy": false
},
"items": [
{
"id": 0,
"value": 7516,
"label": "Yes",
"thirdparty_value": 0
},
{
"id": 1,
"value": 7517,
"label": "No",
"thirdparty_value": 0
}
],
"events": {
"valid": [
{
"action": "show",
"question": 3802,
"rules": [
{
"condition": "equal",
"value": 7517
}
]
},
{
"action": "show",
"question": 3809,
"rules": [
{
"condition": "equal",
"value": 7517
}
]
},
{
"action": "show",
"question": 3803,
"rules": [
{
"condition": "equal",
"value": 7516
}
]
},
{
"action": "show",
"question": 3807,
"rules": [
{
"condition": "equal",
"value": 7516
}
]
},
{
"action": "show",
"question": 3808,
"rules": [
{
"condition": "equal",
"value": 7516
}
]
},
{
"action": "show",
"question": 3857,
"rules": [
{
"condition": "equal",
"value": 7516
}
]
},
{
"action": "show",
"question": 3861,
"rules": [
{
"condition": "equal",
"value": 7516
}
]
},
{
"action": "show",
"question": 3809,
"rules": [
{
"condition": "equal",
"value": 7516
}
]
}
]
},
"photos": {
"min": 0,
"max": 0
},
"validation_rules": [
{
"validation_rule_id": "1",
"pcr_question_id": "3801",
"operator": "=",
"ref_value": "7517",
"num_min_value": null,
"num_max_value": null,
"date_min_value": null,
"date_max_value": null,
"text_value": null,
"org_id": "951"
}
]
},
.
.
.
],
.
.
.
}
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 |
pcr_form_id_invalid | PCR Form Id invalid | 400 |
pcr_version_invalid | PCR form version invalid | 400 |
pcr_not_found | PCR form not found | 404 |