GET api/Documents/{id}/CanPreview

Determines whether a document supports previewing.

Request

Parameters

Name Description Default
id Document number (unique ID).

Response

Body

Content Type: application/xml or application/json
Capability information or an error message.

XML JSON
<Response>                           
  <Result>                           
    <CanPreview>bool</CanPreview>    <!--Whether the document supports previewing--> 
    <Reason>string</Reason>          <!--Reason why previewing is unsupported--> 
    <MimeType>string</MimeType>      <!--Content type of preview--> 
  </Result>                          
  <Message>string</Message>          <!--Error message--> 
</Response>                          
{                              
   "Result": {                 
      "CanPreview": "bool",    // Whether the document supports previewing
      "Reason": "string",      // Reason why previewing is unsupported
      "MimeType": "string"     // Content type of preview
   },                          
   "Message": "string"         // Error message
}                              
                               

Status Codes

Code Condition
200 OK The operation completed successfully.
400 Bad RequestInvalid document number.
401 Unauthorized Access token is invalid, expired or not specified.
404 Not FoundDocument not found.
406 Not Acceptable Content type specified in the Accept header isn't supported.
500 Internal Server Error An internal error occurred.

Remarks

Previews are intended to be viewable in a web browser (perhaps with an appropriate plug-in) as an alternative to downloading the document and opening it in a separate application.