# Retrieve a list of documents Retrieve a list of documents. Endpoint: GET /documents Version: 2.51.0 Security: OAuth2 ## Query parameters: - `projectId` (array) Project ids to to find items by. If ommitted, items from all existing projects are returned. - `offset` (integer) A zero-based offset of the first item in the data collection to return. - `limit` (integer) Limit the amount of items returned in the response. If the value exceeds the maximum, then the maximum value will be used. - `sort` (string) The field to sort reponse items by. Enum: "createdAt", "-createdAt", "+createdAt", "updatedAt", "-updatedAt", "+updatedAt" - `state` (array) Used to retrieve documents that are in specific states only. Multiple states can be used for this filtering. By default, documents in all states are returned. Enum: "done", "doneAutomatically", "extracted", "failed", "inCompletion", "junk", "new", "processing", "rejected", "reviewRequired", "split", "transferFailed", "transferred" - `fileId` (string) File identifier to retrieve documents that were created from that file ## Response 200 fields (application/json): - `data` (array) - `data.id` (string, required) Example: "6040dc9680b782b365ea77d5" - `data.completedAt` (string) Example: "1990-12-31T15:59:60-08:00" - `data.completedBy` (string) - `data.createdAt` (string, required) Example: "1990-12-31T15:59:60-08:00" - `data.createdBy` (string, required) - `data.fileId` (string) Identifier of the primary file associated with this document. Example: "5349b4ddd2781d08c09890f4" - `data.files` (array) List of files associated with this document, each with their assigned role and main file flag. Example: [{"id":"5349b4ddd2781d08c09890f4","type":"salesOrder","mainFile":true}] - `data.files.id` (string, required) Identifier of the file as returned by the upload endpoint. Example: "5349b4ddd2781d08c09890f4" - `data.files.type` (string, required) The role the file plays in the document (e.g. salesOrder, attachment). Must only contain letters from the Latin alphabet with no whitespace or special characters. Example: "salesOrder" - `data.files.mainFile` (boolean, required) Indicates whether this file is the main file of the document. Example: true - `data.entities` (object) Example: {"currency":"EUR","items":[{"name":"High quality cement for rabbit hole sealing","qty":1}],"number":"2018-DE-0011122351","qty":2} - `data.externalId` (string) Example: "doc-0001" - `data.externalData` (object) Example: {"internalSystemId":"sap-01"} - `data.projectId` (string) Example: "6040dc9680b782b365ea77d5" - `data.state` (string, required) Enum: "done", "doneAutomatically", "extracted", "failed", "inCompletion", "junk", "new", "processing", "rejected", "reviewRequired", "split", "transferFailed", "transferred" - `data.title` (string, required) Example: "scan-doc-1.jpg" - `data.updatedAt` (string) Example: "1990-12-31T15:59:60-08:00" - `data.updatedBy` (string) - `data.url` (string) URL to access the document Example: "https://example.com/documents/6040dc9680b782b365ea77d5" - `limit` (integer) The limit used for this page of results. This will be the same as the limit query parameter unless it exceeds the maximal allowed value. Example: 20 - `offset` (integer) The offset used for this page of results. This will be the same as the offset query parameter - `totalCount` (integer) The total number of elements in the data attribute Example: 1000 ## Response 400 fields (application/json): - `detail` (string, required) A human readable explanation of the error. - `status` (integer, required) The HTTP status code. - `title` (string, required) A short summary of the error ## Response 429 fields