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/flag

This action flags a file to a bid or a PCR question. Note that only photos (area=0) can be flagged.

Request

FieldDescriptionRequired
file_idUnique identifier for a fileYes
comp_note_idUnique identifier for a bid itemYes, if flagging file to a bid
pcr_question_idUnique identifier for a PCR questionYes, if flagging file to a PCR question
typeFlag type. It is b if flagging file to a bid; c if flagging file to a completion; pc if flagging file to a PCR questionYes
stageb for flagging a “Before” photo; i flagging a “During” photo; a for flagging an “After” photoYes, if type is c (Completion)

Example 1. Flag a photo as a “Bid” photo:

{
  "file_id": 452,
  "comp_note_id": 60,
  "type": "b"
}
curl -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -d '{"file_id": 452, "comp_note_id": 60, "type": "b"}' \
     https://ppw.web/svc/file/flag

Example 2. Flag a photo as a “During” photo:

{
  "file_id": 160,
  "comp_note_id": 93,
  "type": "c",
  "stage": "i"
}
curl -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -d '{"file_id": 160, "comp_note_id": 93, "type": "c", "stage": "i"}' \
     https://ppw.web/svc/file/flag

Response

FieldDescriptionType
resultInformational messagestring

Example successful response:

{"result":"File flagged to bid"}

Errors

Error TypeDescriptionStatus Code
access_deniedAccess token is invalid or expired401
scope_invalidClient app does not have the required OAuth scope403
type_requiredThe flag type not specified in the request400
type_invalidThe specified flag type in the request is invalid400
stage_invalidThe specifiecd stage is invalid or `stage is not set when it is a required field400
file_id_requiredThe file_id is not specified in the request400
file_id_invalidThe specified file_id is invalid400
comp_note_id_requiredThe flag type is b and the comp_note_id is not specified in the request400
comp_note_id_invalidThe specified comp_note_id is invalid400
cannot_flagThe specified file_id is not a photo (area=0)400