# Retrieve a document by id Retrieve a document by id Endpoint: GET /documents/{id} Version: 2.51.0 Security: OAuth2 ## Path parameters: - `id` (string, required) Id of the document to get. ## Response 200 fields (application/json): - `id` (string, required) Example: "6040dc9680b782b365ea77d5" - `completedAt` (string) Example: "1990-12-31T15:59:60-08:00" - `completedBy` (string) - `createdAt` (string, required) Example: "1990-12-31T15:59:60-08:00" - `createdBy` (string, required) - `fileId` (string) Identifier of the primary file associated with this document. Example: "5349b4ddd2781d08c09890f4" - `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}] - `files.id` (string, required) Identifier of the file as returned by the upload endpoint. Example: "5349b4ddd2781d08c09890f4" - `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" - `files.mainFile` (boolean, required) Indicates whether this file is the main file of the document. Example: true - `entities` (object) Example: {"currency":"EUR","items":[{"name":"High quality cement for rabbit hole sealing","qty":1}],"number":"2018-DE-0011122351","qty":2} - `externalId` (string) Example: "doc-0001" - `externalData` (object) Example: {"internalSystemId":"sap-01"} - `projectId` (string) Example: "6040dc9680b782b365ea77d5" - `state` (string, required) Enum: "done", "doneAutomatically", "extracted", "failed", "inCompletion", "junk", "new", "processing", "rejected", "reviewRequired", "split", "transferFailed", "transferred" - `title` (string, required) Example: "scan-doc-1.jpg" - `updatedAt` (string) Example: "1990-12-31T15:59:60-08:00" - `updatedBy` (string) - `url` (string) URL to access the document Example: "https://example.com/documents/6040dc9680b782b365ea77d5" ## Response 404 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