Appearance
Upload Document
Accepts requests for uploading a document.
Endpoints
Environment | API Endpoint |
---|---|
Sandbox | https://onprem-test.streamline.laboremus.ug/doc-store/api/docs |
Request
Request Type : POST
Authorization
INFO
Always add your Subscription key
to the request.
Query Parameters
Name | Type | Required | Description |
---|---|---|---|
v | string | yes | The version of the API |
Content type
multipart/form-data
Request Body
Name | Type | Description |
---|---|---|
Name | string | The name of the document being uploaded. |
DocumentType | string | The type of document (e.g., Passport , National ID ). |
File | string (base64) | The file content encoded in base64 format. |
Description | string | A brief description of the document and its purpose. |
Metadata | object | Additional metadata associated with the document, containing various key-value pairs. |
author | string | The name of the author of the document. |
createdBy | string | The username or identifier of the person who created the document. |
confidentiality | string | The level of confidentiality assigned to the document (e.g., Low , Medium , High ). |
Reference | string | A unique reference identifier for tracking purposes. |
Example Request Body
json
{
"name": "Sample Document",
"documentType": "Passport",
"file": "base64EncodedFileStringHere",
"description": "This document serves as a sample passport.",
"metadata": {
"author": "John Doe",
"createdBy": "Admin",
"confidentiality": "High"
},
"Reference": "ref-123456789"
}
{
"name": "Sample Document",
"documentType": "Passport",
"file": "base64EncodedFileStringHere",
"description": "This document serves as a sample passport.",
"metadata": {
"author": "John Doe",
"createdBy": "Admin",
"confidentiality": "High"
},
"Reference": "ref-123456789"
}
Response
Content type
application/json
Response Body
Name | Type | Description |
---|---|---|
id | string (uuid) | A GUID/UUID, a set of unique alphanumerical characters assigned to this verification request. |
createdAt | string (ISO 8601 date-time) | The timestamp when the document was created in ISO 8601 format. |
lastUpdated | string (ISO 8601 date-time) | The timestamp when the document was last updated in ISO 8601 format. |
name | string | The name of the document. |
contentType | string | The MIME type of the document (e.g., text/csv , application/pdf ). |
originalName | string | The original name of the file before it was uploaded. |
documentType | string | The type of document (e.g., Passport , National ID ). |
size | string | The size of the document file, typically in bytes or KB. |
length | number | The length of the document in bytes. |
description | string | A brief description of the document. |
reference | string | A unique reference identifier for tracking purposes. |
contents | string | The contents of the document, if applicable (e.g., text data extracted from the file). |
metadata | object | Additional metadata associated with the document, containing various key-value pairs. |
additionalProp1 | string | An additional property that can hold extra information related to the document. |
additionalProp2 | string | Another additional property that can hold extra information related to the document. |
Example Response Body
json
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"createdAt": "2024-09-30T13:06:22.163Z",
"lastUpdated": "2024-09-30T13:06:22.163Z",
"name": "string",
"contentType": "string",
"originalName": "string",
"documentType": "string",
"size": "string",
"length": 0,
"description": "string",
"reference": "string",
"contents": "string",
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"createdAt": "2024-09-30T13:06:22.163Z",
"lastUpdated": "2024-09-30T13:06:22.163Z",
"name": "string",
"contentType": "string",
"originalName": "string",
"documentType": "string",
"size": "string",
"length": 0,
"description": "string",
"reference": "string",
"contents": "string",
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
Error Response
400 Bad Request
application/json
Name | Type | Description |
---|---|---|
type | string or null | Type of error response |
title | string or null | The title of the error response |
status | integer(int32) | The status of the error response |
traceId | string or null | The traceId of the error request producing the error |
errors | object | Object defining the errors |
errors
Name | Type | Description |
---|---|---|
property | Array of strings | The definition of the errors |
401 Unauthorized
application/json
Name | Type | Description |
---|---|---|
error | object(Error) | Type of error response |
Error
Name | Type | Description |
---|---|---|
code | string or null | The Error code |
message | string or null | The Error message |
403 Forbidden
application/json
Name | Type | Description |
---|---|---|
error | object(Error) | Type of error response |
Error
Name | Type | Description |
---|---|---|
code | string or null | The Error code |
message | string or null | The Error message |
404 Not Found
application/json
Name | Type | Description |
---|---|---|
error | object(Error) | Type of error response |
Error
Name | Type | Description |
---|---|---|
code | string or null | The Error code |
message | string or null | The Error message |
500 Server Error
application/json
Name | Type | Description |
---|---|---|
error | object(Error) | Type of error response |
Error
Name | Type | Description |
---|---|---|
code | string or null | The Error code |
message | string or null | The Error message |