Get the source file data for a credential
GET /credentials/file-data/{credential_ref}
Returns the source file data for a previously issued (by you) credential.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
Authorization |
header | yes | Access key generated from the auth API Example: |
credential_ref |
path | yes | The opaque reference returned in the |
Responses
| Status | Description |
|---|---|
200 OK | Source file data for the credential |
400 Bad Request | Invalid request parameters |
401 Unauthorized | Unauthorized - Invalid or missing authentication |
404 Not Found | Credential not found |
410 Gone | Credential has been revoked |
412 Precondition Failed | Credential verification failed |
Content type application/json
Response fields (200)
| Field | Type | Required | Description |
|---|---|---|---|
data |
object | no | The raw file data for the credential |
correlation_id |
string | no | Unique identifier for tracking the verification request |
Example 200 response
{
"data": {
"file_data": "base64 encoded file data"
},
"correlation_id": "corr_abc123xyz"
}Content type application/json
Error (400, 404, 410, 412)
| Field | Type | Required | Description |
|---|---|---|---|
error |
object | no | |
error.message |
string | yes | Human-readable error message |
error.code |
string | yes | Machine-readable error code One of: |
error.type |
string | yes | Error type identifier One of: |
error.timestamp |
string | yes | |
error.correlation_id |
string | no | |
error.details |
object | no | Additional error context |
Example 400 response
{
"error": {
"message": "Invalid phone number format",
"code": "E1001",
"type": "VALIDATION_ERROR",
"timestamp": "2024-02-20T03:14:15Z",
"correlation_id": "req_1234567890",
"details": {
"validation_errors": {
"phone": "Must be in format +61423123456"
}
}
}
}
Example request
curl --request GET \
--url https://api.sandbox.truevault.com.au/api/v1/credentials/file-data/{credential_ref} \
--header 'Authorization: <value>'