Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/pcr/get

This action gets a specific version of a PCR form.

Request

FieldDescriptionRequired
pcr_form_idUnique identifier for the PCR formYes
versionPCR form version numberYes

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

FieldDescriptionType
pcr_form_idUnique identifier for the PCR formnumber
versionPCR form versionnumber
namePCR form namestring
questionsPCR form questionsarray

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 TypeDescriptionStatus Code
access_deniedAccess token is invalid or expired401
scope_invalidClient app does not have the required OAuth scope403
pcr_form_id_invalidPCR Form Id invalid400
pcr_version_invalidPCR form version invalid400
pcr_not_foundPCR form not found404