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

send_pcr_answers – Sending PCR Results

The PCR form results are sent using the information from the PCR forms JSON. The question data type and the question ID is sent with every answer object.

Request payload JSON - send_pcr_answers

{
  "username": "demo",
  "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
  "event_name": "send_pcr_answers",
  "event_data": "{\"dst_report_id\":\"14413749\",\"pcr_form_id\":\"76\",\"pcr_ form_rows\":[ {\"pcr_question_id\":\"6716\",\"question_data_type\":\"varchar\",\"varchar_ value\":\"hello!!!\"},{\"pcr_question_id\":\"14243098\",\"question_data_type\":\"varchar\", \"varchar_value\":\"nothing to see here\"}, {\"pcr_question_id\":\"14243099\",\"question_data_type\":\"int\",\"int_valu e\":\"30932050\"}, {\"pcr_question_id\":\"1027910\",\"question_data_type\":\"date\",\"date_value\":\"2017-04-06\"}, {\"pcr_question_id\":\"877651\",\"question_data_type\":\"longtext\",\"longtext_value\":\"hello!!!\"} ]}"
}
curl -X POST \
  --data 'payload={
    "username": "demo",
    "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
    "event_name": "send_pcr_answers",
    "event_data": "{\"dst_report_id\":\"14413749\",\"pcr_form_id\":\"76\",\"pcr_form_rows\":[{\"pcr_question_id\":\"6716\",\"question_data_type\":\"varchar\",\"varchar_value\":\"hello!!!\"},{\"pcr_question_id\":\"14243098\",\"question_data_type\":\"varchar\",\"varchar_value\":\"nothing to see here\"},{\"pcr_question_id\":\"14243099\",\"question_data_type\":\"int\",\"int_value\":\"30932050\"},{\"pcr_question_id\":\"1027910\",\"question_data_type\":\"date\",\"date_value\":\"2017-04-06\"},{\"pcr_question_id\":\"877651\",\"question_data_type\":\"longtext\",\"longtext_value\":\"hello!!!\"}]}"
  }' \
  https://www.propertypreswizard.com/api/link/receiver.php

Question type checkbox requires each answer to be sent as an individual record in the event data. There will be multiple entries for the pcr_question_id. An example payload is below. The first three entries represent what the data should look like.

Request payload JSON - checkbox example - send_pcr_answers

{
  "username": "demo",
  "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
  "event_name": "send_pcr_answers",
  "event_data": "{\"dst_report_id\":\"14413749\",\"pcr_form_id\":\"76\",\"pcr_ form_rows\":[ {\"pcr_question_id\":\"6716\",\"question_data_type\":\"int\",\"int_value\": \"1\"},{\"pcr_question_id\":\"6716\",\"question_data_type\":\"int\",\"int_va lue\":\"2\"}, {\"pcr_question_id\":\"6716\",\"question_data_type\":\"int\",\"int_value\":\"3\"}, {\"pcr_question_id\":\"6717\",\"question_data_type\":\"date\",\"date_value\":\"2017-04-06\"}, {\"pcr_question_id\":\"6718\",\"question_data_type\":\"longtext\",\"longtex t_value\":\"hello!!!\"} ]}"
}
curl -X POST \
  --data 'payload={
    "username": "demo",
    "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
    "event_name": "send_pcr_answers",
    "event_data": "{\"dst_report_id\":\"14413749\",\"pcr_form_id\":\"76\",\"pcr_form_rows\":[{\"pcr_question_id\":\"6716\",\"question_data_type\":\"int\",\"int_value\":\"1\"},{\"pcr_question_id\":\"6716\",\"question_data_type\":\"int\",\"int_value\":\"2\"},{\"pcr_question_id\":\"6716\",\"question_data_type\":\"int\",\"int_value\":\"3\"},{\"pcr_question_id\":\"6717\",\"question_data_type\":\"date\",\"date_value\":\"2017-04-06\"},{\"pcr_question_id\":\"6718\",\"question_data_type\":\"longtext\",\"longtext_value\":\"hello!!!\"}]}"
  }' \
  https://www.propertypreswizard.com/api/link/receiver.php