Read Document
Read a document by ID with access details
GET /di/document-access/read
Query parameters
| Param | Required | Description |
|---|---|---|
document_id | Yes | Document ID (the _id returned by Create Document, or document_id from List User Documents) |
accessRemark | No | Optional access remark. Added to apiAccessRemarks with the time of the read. |
childAccountId | No | Required when reading for a child account |
Example request
curl 'https://api.qidpro.xyz/di/document-access/read?document_id=66b3174a38534634dd13040b&accessRemark=Identity%20verification' \
--header 'Authorization: Bearer your-secret-key' \
--header 'tokenId: your-token-id'Example response
Status 200 OK:
{
"_id": "66b3174a38534634dd130413",
"deleteTime": null,
"document": {
"deleteTime": null,
"sid": {
"_id": "63c145cb20926fed9d12568a",
"name": "Aadhaar",
"logoUrl": "810d926f693.png",
"keyName": "ADHAR",
"photos": [
{
"name": "Front",
"testKeywords": "MALE|FEMALE|TRANSGENDER|पुरुष|जन्म",
"faceCheck": 2
},
{
"name": "Back",
"testKeywords": "",
"faceCheck": 0
}
],
"isSystemApproved": true
},
"documentNumberMasked": "XXXXXXXX2804",
"verificationTime": null,
"_id": "66b3174a38534634dd13040b",
"createTime": "2026-11-10T11:44:43.171Z",
"lastUpdateTime": "2026-11-10T11:44:43.171Z"
},
"grantedToAccount": {
"_id": "66a9b3cdc784371e2fe15634",
"name": "HotelX",
"displayPictureUrl": "e207e30819.jpeg"
},
"documentOwnerAccount": {
"_id": "66b3172e38534634dd1303f2",
"name": "Rahul Sharma",
"email": "[email protected]",
"phoneNumber": "916123456780",
"countryIsoCode": null
},
"documentData": {
"idNumber": "XXXXXXXX2804",
"expiry": null,
"scannedImages": [
{
"imageUrl": "c975e4082c1.png",
"faceLandmark": [
{ "x": 36, "y": 94 },
{ "x": 98, "y": 94 },
{ "x": 98, "y": 168 },
{ "x": 36, "y": 168 }
]
},
{
"imageUrl": "ea46c9193b.png",
"faceLandmark": null
}
],
"fullName": "Rahul Sharma",
"firstName": null,
"lastName": null,
"nameMatchPercentage": 100,
"dob": "1995-04-12",
"yearOfBirth": "1995",
"gender": "Male",
"userPhotoURL": null,
"userPhotoURI": null,
"careOf": null,
"address": "S/O: Ramesh Kumar, 12 MG Road, Indiranagar, Bengaluru, Karnataka, 560038",
"manualFields": null
},
"accessRemark": "Identity verification",
"apiAccessRemarks": [
{
"time": "2026-11-10T11:44:48.614Z",
"remark": "Identity verification"
}
],
"shareAllowed": false,
"createTime": "2026-11-10T11:44:43.171Z",
"lastUpdateTime": "2026-11-10T11:44:48.614Z",
"__v": 0
}Response fields
| Field | Type | Description |
|---|---|---|
_id | string | Access record ID. This is not the document ID. |
deleteTime | string | null | Deletion time, or null |
document | object | Document summary: deleteTime, sid, documentNumberMasked, verificationTime, _id (the document ID), createTime and lastUpdateTime. documentNumberMasked is omitted if the document was created without an idNumber. |
document.sid | object | Document type (SID): _id, name, logoUrl, keyName, photos and isSystemApproved |
grantedToAccount | object | Organisation the document is granted to: _id, name, displayPictureUrl |
documentOwnerAccount | object | Document owner: _id, name, email, phoneNumber (country code + number, e.g. 916123456780) and countryIsoCode. email and phoneNumber can be null. |
documentData | object | The body sent to Create Document, as stored. Omitted if the document was created without a body. |
accessRemark | string | null | accessRemark sent to Create Document. Omitted if none was sent. |
apiAccessRemarks | array | One { time, remark } entry per earlier read that sent accessRemark. The remark from the current request is saved after the response is built, so it shows up from the next read on. |
shareAllowed | boolean | Whether the document can be shared |
createTime | string | Access record creation time (ISO 8601) |
lastUpdateTime | string | Access record last update time (ISO 8601) |
__v | integer | Internal version |
Errors
Errors return this shape:
{
"statusCode": 400,
"message": "Access Denied: This document is not granted to you",
"timestamp": "2026-11-10T11:44:49.369Z",
"path": "/di/document-access/read?document_id=66b3174a38534634dd130000",
"requestId": "9c9e5f72-fba8-4be2-b34d-173803907dbb"
}| Status | Message | Cause |
|---|---|---|
400 | Access Denied: This document is not granted to you | document_id is missing, does not exist, or is not granted to you (or to childAccountId) |
401 | Error: Token Missing | Authorization header is missing |
401 | HttpException: Invalid Token ID | tokenId header is missing |
401 | HttpException: Wrong/Invalid Authorisation | Secret key is wrong |
401 | HttpException: No record found with the provided Token ID | tokenId does not match any account |
500 | Internal server error | document_id or childAccountId is not a valid 24-character ID |
Updated 17 days ago
Did this page help you?