Viewing Packages
Note that these routes do not have route keys, as they cannot be re-routed.
GET /v2/viewingPackages/{documentId}
Headers:
- Accusoft-Secret: mysecretkey
 
After a viewing package creator process has been created, information about the converted content can be requested as shown in the example below:
Example
GET http://localhost:3000/v2/viewingPackages/unT67Fxekm8lk1p0kPnyg8
    Successful Response:
200 OK
Content-Type: application/json
{
    "source": {
        "type": "document",
        "fileName": "sample.doc",
        "documentId": "unT67Fxekm8lk1p0kPnyg8"
    },
    "state": "complete",
    "packageExpirationDateTime": "2016-1-09T06:22:18.624Z",
    "pageFailures": [
        {
            "errorCode": "CouldNotRetrieveJpegContent",
            "pageNumber": "4"
        },
        {
            "errorCode": "CouldNotRetrieveSvgaContent",
            "pageNumber": "5"
        }
    ]
}
    Errored Response:
If a GET request is made with either a missing or an invalid header Accusoft-Secret, an error similar to the one below will be returned.
403 InvalidSecret
Content-Type: application/json
{
    "errorCode": "InvalidSecret"
}
    GET /v2/viewingPackages/{documentId}/creator
Headers:
- Accusoft-Secret: mysecretkey
 
This URL can provide a viewing package's creator process ID. A viewing package may outlive the process that created it, in which case a 404 response should be expected. When pre-converting viewing packages, the creator process ID is provided in response to the initial POST request. This URL is primarily useful to access to the creator process when creating a viewing session with caching enabled (when a documentId is provided) in which case the viewing package creator process is internally created by PrizmDoc Application Services.
Example
GET http://localhost:3000/v2/viewingPackages/unT67Fxekm8lk1p0kPnyg8/creator
    Successful Response:
200 OK
Content-Type: application/json
{
    "viewingPackageCreatorId": "khjyrfKLj2g6gv8fdqg710"
}
    Errored Responses:
If a request is made with an invalid viewing package ID or the creator process has expired, an error will be returned.
404 Not Found
    If a GET request is made with either a missing or an invalid header Accusoft-Secret, an error similar to the one below will be returned.
403 InvalidSecret
Content-Type: application/json
{
    "errorCode": "InvalidSecret"
}
    DELETE /v2/viewingPackages/{documentId}
Headers:
- Accusoft-Secret: mysecretkey
 
When the viewing package is no longer needed, a DELETE request to this URL will remove all content and delete the resource.
Example
DELETE http://localhost:3000/v2/viewingPackages/unT67Fxekm8lk1p0kPnyg8
    Successful Response:
If a DELETE request is made the content will be marked for asynchronous deletion.
204 No Content
    Errored Responses:
If a DELETE request is made with an invalid package ID, an error will be returned.
404 Not Found
    If a DELETE request is made with either a missing or an invalid header Accusoft-Secret, an error similar to the one below will be returned.
403 InvalidSecret
Content-Type: application/json
{
    "errorCode": "InvalidSecret"
}