Skip to content
On this page

Upload Document

Accepts requests for uploading a document.

Endpoints

EnvironmentAPI Endpoint
Sandboxhttps://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

NameTypeRequiredDescription
vstringyesThe version of the API

Content type

multipart/form-data

Request Body

NameTypeDescription
NamestringThe name of the document being uploaded.
DocumentTypestringThe type of document (e.g., Passport, National ID).
Filestring (base64)The file content encoded in base64 format.
DescriptionstringA brief description of the document and its purpose.
MetadataobjectAdditional metadata associated with the document, containing various key-value pairs.
authorstringThe name of the author of the document.
createdBystringThe username or identifier of the person who created the document.
confidentialitystringThe level of confidentiality assigned to the document (e.g., Low, Medium, High).
ReferencestringA 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

NameTypeDescription
idstring (uuid)A GUID/UUID, a set of unique alphanumerical characters assigned to this verification request.
createdAtstring (ISO 8601 date-time)The timestamp when the document was created in ISO 8601 format.
lastUpdatedstring (ISO 8601 date-time)The timestamp when the document was last updated in ISO 8601 format.
namestringThe name of the document.
contentTypestringThe MIME type of the document (e.g., text/csv, application/pdf).
originalNamestringThe original name of the file before it was uploaded.
documentTypestringThe type of document (e.g., Passport, National ID).
sizestringThe size of the document file, typically in bytes or KB.
lengthnumberThe length of the document in bytes.
descriptionstringA brief description of the document.
referencestringA unique reference identifier for tracking purposes.
contentsstringThe contents of the document, if applicable (e.g., text data extracted from the file).
metadataobjectAdditional metadata associated with the document, containing various key-value pairs.
additionalProp1stringAn additional property that can hold extra information related to the document.
additionalProp2stringAnother 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

NameTypeDescription
typestring or nullType of error response
titlestring or nullThe title of the error response
statusinteger(int32)The status of the error response
traceIdstring or nullThe traceId of the error request producing the error
errorsobjectObject defining the errors

errors

NameTypeDescription
propertyArray of stringsThe definition of the errors

401 Unauthorized

application/json

NameTypeDescription
errorobject(Error)Type of error response

Error

NameTypeDescription
codestring or nullThe Error code
messagestring or nullThe Error message

403 Forbidden

application/json

NameTypeDescription
errorobject(Error)Type of error response

Error

NameTypeDescription
codestring or nullThe Error code
messagestring or nullThe Error message

404 Not Found

application/json

NameTypeDescription
errorobject(Error)Type of error response

Error

NameTypeDescription
codestring or nullThe Error code
messagestring or nullThe Error message

500 Server Error

application/json

NameTypeDescription
errorobject(Error)Type of error response

Error

NameTypeDescription
codestring or nullThe Error code
messagestring or nullThe Error message

Tech served right