GET api/Files/{id}/Documents

Retrieves a list of documents for a file.

Request

Parameters

Name Description Default
id Unique file ID.
folder Optional filter by folder. *
includeRelatedFiles Whether to include documents on related files. False

Response

Body

Content Type: application/xml or application/json
Data set containing the documents, or an error message.

XML JSON
<Response>                                             
  <Result>                                             <!--Array of 'Item'--> 
    <Item>                                             
      <DocumentID>long</DocumentID>                    <!--Document number (unique ID)--> 
      <DocumentDate>datetime</DocumentDate>            <!--Document date (primary date)--> 
      <FileID>long</FileID>                            <!--Unique file ID--> 
      <ContactID>long</ContactID>                      <!--Contact number (primary contact)--> 
      <DocumentName>string</DocumentName>              <!--Document description--> 
      <Attributes>int</Attributes>                     <!--Document attributes (flags)--> 
      <Folder>string</Folder>                          <!--Folder path--> 
      <DocumentExtension>string</DocumentExtension>    <!--File extension--> 
      <Pages>int</Pages>                               <!--Page count (if known)--> 
      <DocumentType>string</DocumentType>              <!--Name of document type--> 
      <InReplyToID>long</InReplyToID>                  <!--In reply to document number--> 
      <CreatedDate>datetime</CreatedDate>              <!--Created/uploaded date--> 
      <ModifiedDate>datetime</ModifiedDate>            <!--Metadata last modified date--> 
      <Tags>string</Tags>                              <!--Document tags (comma separated)--> 
      <FileNumber>string</FileNumber>                  <!--Human-readable file number--> 
      <FileAs>string</FileAs>                          <!--File-as name (primary contact)--> 
      <Url>string</Url>                                <!--Location--> 
    </Item>                                            
  </Result>                                            
  <Message>string</Message>                            <!--Error message--> 
</Response>                                            
{                                       
   "Result": [{                         
      "DocumentID": "long",             // Document number (unique ID)
      "DocumentDate": "datetime",       // Document date (primary date)
      "FileID": "long",                 // Unique file ID
      "ContactID": "long",              // Contact number (primary contact)
      "DocumentName": "string",         // Document description
      "Attributes": "int",              // Document attributes (flags)
      "Folder": "string",               // Folder path
      "DocumentExtension": "string",    // File extension
      "Pages": "int",                   // Page count (if known)
      "DocumentType": "string",         // Name of document type
      "InReplyToID": "long",            // In reply to document number
      "CreatedDate": "datetime",        // Created/uploaded date
      "ModifiedDate": "datetime",       // Metadata last modified date
      "Tags": "string",                 // Document tags (comma separated)
      "FileNumber": "string",           // Human-readable file number
      "FileAs": "string",               // File-as name (primary contact)
      "Url": "string"                   // Location
   }],                                  
   "Message": "string"                  // Error message
}                                       
                                        

Status Codes

Code Condition
200 OK The operation completed successfully.
400 Bad RequestInvalid file ID.
401 Unauthorized Access token is invalid, expired or not specified.
403 ForbiddenUser does not have permission to list documents on the file.
404 Not FoundFile not found.
406 Not Acceptable Content type specified in the Accept header isn't supported.
500 Internal Server Error An internal error occurred.

Remarks

This operation lists documents in all folders by default. You can also specify the path (backslash-delimited) to a specific folder, or use one of the following values:
ValueDescription
*Documents in all folders.
$Discoverable documents only.
tag:TAGNAMEDocuments with a particular tag (e.g. tag:orange).
product:PRODUCTIDDocuments associated with a specific product (e.g. product:1234).

When including documents on related files, if the user does not have permission to view documents on a particular matter then results for that matter are excluded.