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

/workorder/pcr/get

This action gets a simplified version of the PCR form object for a PCR form attached to a work order.

Request

FieldDescriptionRequired
report_idUnique identifier for the work orderYes
pcr_form_idUnique identifier for the PCR formYes

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

FieldDescriptionType
pcr_form_idUnique identifier for the PCR formnumber
versionPCR form versionnumber
namePCR form namestring
questionsPCR form questions with answersarray

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 TypeDescriptionStatus Code
access_deniedAccess token is invalid or expired401
scope_invalidClient app does not have the required OAuth scope403
wo_invalidWork order invalid400
pcr_form_id_invalidPCR Form Id invalid400
pcr_not_attachedPCR form not attached to work order400