Documents

Document List

Markdown for LLMs
GET
/documents/document/list

Returns one page of document records — what the API stores about the documents generated on the caller's subscription, newest first unless orderby says otherwise. A record is metadata, not the file: to fetch the bytes, take the record's urn and call documents-document-download.

Each row carries where the document came from as well as what it is: documentTemplateId and documentTemplateName for the template it was generated from, and the documentSolution… and documentSolutionConfiguration… properties when generation ran through a solution rather than straight from a template. That is enough to show provenance in a listing without a second call per row.

What a row contains depends on how the document was delivered. A Storage document has a GUID urn and no url or sharing links; a OneDrive or GoogleDrive document has that drive's own file id in urn, a browsable url, and the six sharing links. Properties that do not apply are omitted rather than returned as null.

Page with top and skip, and read pagination inside result.data: totalCount is the number of matches across all pages, while count is only how many came back in this one.

Authorization

AuthorizationBearer <token>

JWT token to authenticate the request.

In: header

X-Api-Key<token>

API key, sent as a request header.

In: header

Query Parameters

top?integer

Maximum number of records to return — the page size. Optional; the server applies its own default when omitted.

skip?integer

How many records to skip before the page begins — the offset. Optional; defaults to 0. Combine with top to page: the third page of 25 is top=25&skip=50.

orderby?string

Sort clause as Column|DIRECTION with a literal pipe between the two, for example CreatedDate|DESC. DIRECTION is ASC or DESC. Optional.

filter?string

Filter clauses as a URL-encoded JSON array, each entry { key, column, type, condition, value }. Optional; omit it to return everything.

Decoded, one clause looks like [{"key":"Filter1","column":"Title","type":"string","condition":"CONTAINS","value":"invoice"}]. Several clauses narrow the result further.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/documents/document/list?top=50&skip=0&orderby=CreatedDate%7CDESC&filter=%255B%257B%2522key%2522%253A%2522Filter1%2522%252C%2522column%2522%253A%2522Title%2522%252C%2522type%2522%253A%2522string%2522%252C%2522condition%2522%253A%2522CONTAINS%2522%252C%2522value%2522%253A%2522invoice%2522%257D%255D"
{  "result": {    "statusCode": 200,    "message": "OK",    "data": {      "documents": [        {          "id": "810980b2-319e-4ea3-9878-8b54b1dc5da9",          "subscriptionId": "44b20059-2442-44cc-82ed-a0d0070804d2",          "ownerId": "c7c906bf-cbd0-41bb-818f-5df5ca8d1751",          "lastModifiedUserId": "c7c906bf-cbd0-41bb-818f-5df5ca8d1751",          "ownerName": "Jane Doe",          "title": "Quarterly invoice",          "urn": "19a9cf71-893a-4ed1-b73d-8ec034d698e3",          "fileFormat": "pdf",          "deliveryMethod": "Storage",          "createdDate": "2026-09-11T04:24:31.000Z",          "lastModifiedDate": "2026-09-11T04:24:31.000Z",          "documentTemplateId": "53f715fb-4b35-4e28-a7f8-1d92db332d0e",          "documentTemplateName": "Quarterly invoice template",          "documentRequestId": "1d989651-5e80-489c-b7b2-3723bfff4a9c",          "documentRequestName": "Northwind Logistics invoice",          "dataSourceId": "55c90b7c-0742-4500-9393-70c4680ec9db",          "dataSourceName": "Customer invoice data"        },        {          "id": "c8a5fe84-5a0a-4d88-8902-b926b1fa9595",          "subscriptionId": "44b20059-2442-44cc-82ed-a0d0070804d2",          "ownerId": "1d8b89c4-0889-4d03-a90c-9af09ac3bc9b",          "lastModifiedUserId": "1d8b89c4-0889-4d03-a90c-9af09ac3bc9b",          "ownerName": "Alex Johnson",          "title": "New Request 1",          "urn": "01LRVIIUZEMPOTTBLNAVGL2WLSKNHWTBKK",          "url": "https://example.sharepoint.com/personal/alex/Documents/New%20Request%201.pdf",          "fileFormat": "pdf",          "deliveryMethod": "OneDrive",          "viewAnonymousLink": "",          "editAnonymousLink": "",          "viewUserLink": "",          "editUserLink": "",          "viewOrganizationLink": "",          "editOrganizationLink": "",          "createdDate": "2026-08-31T12:09:11.000Z",          "lastModifiedDate": "2026-08-31T12:09:11.000Z",          "documentSolutionId": "c3478bf5-b347-4736-a4c6-1f5c4afcf52c",          "documentSolutionName": "Quarterly Invoicing",          "documentTemplateId": "7f3fa1cf-6b90-4937-a289-baa212e9d310",          "documentTemplateName": "Invoice spreadsheet",          "documentRequestId": "1d989651-5e80-489c-b7b2-3723bfff4a9c",          "documentRequestName": "Northwind Logistics invoice",          "dataSourceId": "55c90b7c-0742-4500-9393-70c4680ec9db",          "dataSourceName": "Customer invoice data",          "documentSolutionConfigurationId": "efbf1cb6-7014-4b89-bb2a-8e579670e621",          "documentSolutionConfigurationName": "PDF from XLSX on OneDrive"        }      ],      "pagination": {        "currentPage": 1,        "count": 2,        "pageSize": 50,        "totalCount": 34,        "hasNext": false,        "hasPrevious": false      }    }  },  "origin": "GET https://api.doctavian.com/v1/documents/document/list",  "dateTime": "2026-09-25T02:21:07.000Z",  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "a466bda0c19b9da6d806ee25706a5b19"}
{  "error": {    "statusCode": 401,    "message": "The request could not be authenticated.",    "innerErrors": [      {        "code": "UNAUTHORIZED",        "message": "The request could not be authenticated.",        "userMessage": "Your session has expired or is invalid. Please sign in again."      }    ]  },  "origin": "GET https://api.doctavian.com/v1/documents/document/list",  "dateTime": "2026-09-25T02:21:07.000Z",  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "a466bda0c19b9da6d806ee25706a5b19"}
{  "error": {    "statusCode": 500,    "message": "The document list could not be retrieved.",    "innerErrors": [      {        "code": "GET_DOCUMENT_LIST_ERROR",        "message": "The document list could not be retrieved.",        "userMessage": "Something went wrong. Please try again or contact support."      }    ]  },  "origin": "GET https://api.doctavian.com/v1/documents/document/list",  "dateTime": "2026-09-25T02:21:07.000Z",  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "a466bda0c19b9da6d806ee25706a5b19"}