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

/file/list

This action returns a list of files associated with a work order.

Request

FieldDescriptionRequired
report_idUnique identifier for the work orderYes

Example:

{
  "report_id": 3749
}
curl -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -d '{"report_id": 3749}' \
     https://ppw.web/svc/file/list

Response

FieldDescriptionType
report_idUnique identifier for the work ordernumber
filesList of files associated with work orderarray

Each item in files is a JSON object describing a file associated with the work order. It contains the following information:

FieldDescriptionType
file_idUnique identifier for the filenumber
file_nameFile namestring
file_typeMIME-type identifierstring
file_area0 if it is a “Photo”; 1 if it is a “Document”number
flagsPhoto flag informationarray

The flags field will be populated if the file is a photo and if it’s flagged to bid, completion, PCR question, Damage or Violation. Each item in flags is a JSON object and will contain the following fields:

FieldDescriptionType
comp_note_idUnique identifier for a bid or completion.number
item_descriptionName of the bid or completion. Set only for Bid/Completion flag.string
pcr_question_idUnique identifier for a PCR question flag.number
questionQuestion name. Set only for a PCR question flag.string
pcr_form_idUnique identifier for the PCR Form associated to the PCR question. Set only for a PCR question flag.number
form_namePCR Form name. Set only for a PCR question flag.string
damage_idUnique identifier for a damage. Set when photo is flagged to a Damage or a Bid/Completion that has the “Damage” field checked.number
damage_titleDamage title. Set only for a Damage flag.string
violation_idUnique identifier for a violation. Set photo is flagged to a Violation or a Bid/Completion that has the “Violation” field checked.number
violation_titleViolation title. Set only for a Violation flag.string
typeFlag type. b if it is a Bid flag; c if it is a Completion flag; pc if it is a PCR question flag; d if it is a Damage flag; v if it is a Violation flag.string
stageStage is set when type is b or c. See the following table for the possible values.string

The value of the stage field depends on the type. The following table contains all possible values of stage:

Type fieldPossible stage values
b (Bid)b (Bid)
c (Completion)b (Before), i (During), a (After)

Example successful response:

{
  "report_id": 3749,
  "files": [{
      "file_id": 401,
      "file_name": "grass.jpg",
      "file_type": "image\/jpeg",
      "file_area": 0,
      "flags": [{
        "pcr_question_id": 3,
        "question": "Height of Grass",
        "pcr_form_id": 2,
        "form_name": "Grass Form",
        "type": "pc"
      }]
    }, {
      "file_id": 402,
      "file_name": "lawn.jpg",
      "file_type": "image\/jpeg",
      "file_area": 0,
      "flags": [{
        "comp_note_id": 85,
        "item_description": "Debris Exterior",
        "type": "c",
        "stage": "i"
      }]
    }, {
      "file_id": 403,
      "file_name": "Grasscut_Spec.pdf",
      "file_type": "application\/pdf",
      "file_area": 1,
      "flags": []
    },
    {
      "file_id": 101,
      "file_name": "photo-73.jpg",
      "file_type": "image/jpeg",
      "file_area": 0,
      "flags": [{
        "damage_id": 3,
        "damage_title": "Kitchen Damage",
        "type": "d"
      }]
    },
    {
      "file_id": 102,
      "file_name": "photo-74.jpg",
      "file_type": "image/jpeg",
      "file_area": 0,
      "flags": [{
        "violation_id": 3,
        "violation_title": "Door Violation",
        "type": "v"
      }]
    }
  ]
}

Errors

Error TypeDescriptionStatus Code
access_deniedAccess token is invalid or expired401
scope_invalidClient app does not have the required OAuth scope403
invalid_woreport_id in the request is invalid400