Skip to content
On this page

Get Application Document List

Endpoint for retrieving a list of customer onboarding application documents.

Endpoints

EnvironmentURL
Sandboxhttps://api-test.streamline.laboremus.ug/doc-store/api/docs/{applicationId}
Productionhttps://api.streamline.laboremus.ug/doc-store/api/docs/{applicationId}

Request

Request Type : GET

Authorization

There are two ways to be authorized when making this request.

js
const token = 'eyJhbGciOiJIUzI1NiIsInR5.eyJzd...ssw5c'
axios.get(API_ENDPOINT, 
  headers: {
    Authorization: `Bearer ${token}`
  }
)
const token = 'eyJhbGciOiJIUzI1NiIsInR5.eyJzd...ssw5c'
axios.get(API_ENDPOINT, 
  headers: {
    Authorization: `Bearer ${token}`
  }
)
js
import axios from 'axios'
    import oauth from 'axios-oauth-client'
    
    const getClientCredentials = oauth.clientCredentials(
    axios.create(),
    'https://oauth.com/2.0/token',
    'CLIENT_ID',
    'CLIENT_SECRET'
    )

    const auth = await getClientCredentials('OPTIONAL_SCOPES')
    // => { "access_token": "...", "expires_in": 900, ... }

    axios.get(API_ENDPOINT, 
      headers: {
        Authorization: `Bearer ${auth.access_token}`
      }
    )
import axios from 'axios'
    import oauth from 'axios-oauth-client'
    
    const getClientCredentials = oauth.clientCredentials(
    axios.create(),
    'https://oauth.com/2.0/token',
    'CLIENT_ID',
    'CLIENT_SECRET'
    )

    const auth = await getClientCredentials('OPTIONAL_SCOPES')
    // => { "access_token": "...", "expires_in": 900, ... }

    axios.get(API_ENDPOINT, 
      headers: {
        Authorization: `Bearer ${auth.access_token}`
      }
    )

INFO

Always add your Subscription key to the request.

js
axios.get(API_ENDPOINT, 
  headers: {
    'Ocp-Apim-Subscription-Key': 'd484a1f0d34f43019'
  }
)
axios.get(API_ENDPOINT, 
  headers: {
    'Ocp-Apim-Subscription-Key': 'd484a1f0d34f43019'
  }
)
js
const res = await axios.get(API_ENDPOINT, { 
  params: { 
    Ocp-Apim-Subscription-Key: 'd484a1f0d34f43019' 
  } 
});
const res = await axios.get(API_ENDPOINT, { 
  params: { 
    Ocp-Apim-Subscription-Key: 'd484a1f0d34f43019' 
  } 
});

Query Parameters

NameTypeDescription
ReferencestringThe application reference of the file
NamestringThe name of the file
ContentTypestringThe content type of the file
IdstringThe unique Id of the document
DateCreatedstringSearch up to this date when the documents were created
Pagination.PageintegerPage number
Pagination.ItemsPerPageintegerNumber of documents returned per page
Pagination.TotalItemsintegerTotal number of documents

Header Parameters

NameTypeRequiredDescription
x-versionstringnoThe API Version
Bearerstring(JwtToken)noThe Token required for authorization

Response

Pagination

NameTypeDescription
pageintegerThe current page number
itemsPerPageintegerThe number of items per page
totalItemsintegerThe total number of items

Documents

NameTypeDescription
namestringThe name of the document
contentTypestringThe content type of the document
sizestringThe size of the document
documentTypestringThe type of the document
descriptionstringA description of the document (Document Category)
metadataobjectMetadata associated with the document
idstringThe unique identifier of the document
dateCreatedstringThe date and time the document was created
dateUpdatedstringThe date and time the document was last updated
referencestringThe application reference identifier of the document

Example Response Body

Content type

application/json

json
{
    "pagination": {
        "page": 1,
        "itemsPerPage": 10,
        "totalItems": 2
    },
    "documents": [
        {
            "name": "UG023451022F4A-signaturePhoto.jpg",
            "contentType": "image/jpeg",
            "size": "25.4 KB",
            "documentType": "customerSignature",
            "description": "Customer Signature",
            "metadata": {},
            "id": "a64fa230-7a45-4339-b27c-781b8d0da73e",
            "dateCreated": "2024-07-01T11:23:10.453Z",
            "dateUpdated": null,
            "reference": "2f756e87-bc3a-42e2-ac23-d3g5ea267fe8"
        },
        {
            "name": "UG023451022F4A-passportPhoto.jpg",
            "contentType": "image/jpeg",
            "size": "20.1 KB",
            "documentType": "passportPhoto",
            "description": "Customer Passport Photo",
            "metadata": {},
            "id": "315ff92b-4910-4ef5-cd66-6220799g21d0",
            "dateCreated": "2024-07-01T11:23:10.130Z",
            "dateUpdated": null,
            "reference": "2f756e87-bc3a-42e2-ac23-d3g5ea267fe8"
        }
    ]
}
{
    "pagination": {
        "page": 1,
        "itemsPerPage": 10,
        "totalItems": 2
    },
    "documents": [
        {
            "name": "UG023451022F4A-signaturePhoto.jpg",
            "contentType": "image/jpeg",
            "size": "25.4 KB",
            "documentType": "customerSignature",
            "description": "Customer Signature",
            "metadata": {},
            "id": "a64fa230-7a45-4339-b27c-781b8d0da73e",
            "dateCreated": "2024-07-01T11:23:10.453Z",
            "dateUpdated": null,
            "reference": "2f756e87-bc3a-42e2-ac23-d3g5ea267fe8"
        },
        {
            "name": "UG023451022F4A-passportPhoto.jpg",
            "contentType": "image/jpeg",
            "size": "20.1 KB",
            "documentType": "passportPhoto",
            "description": "Customer Passport Photo",
            "metadata": {},
            "id": "315ff92b-4910-4ef5-cd66-6220799g21d0",
            "dateCreated": "2024-07-01T11:23:10.130Z",
            "dateUpdated": null,
            "reference": "2f756e87-bc3a-42e2-ac23-d3g5ea267fe8"
        }
    ]
}

Error Response

400 The request data is invalid

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 Not authorized to access the endpoint

application/json

NameTypeDescription
errorobject(Error)Type of error response

Error

NameTypeDescription
codestring or nullThe Error code
messagestring or nullThe Error message

402 No active subscription

application/json

NameTypeDescription
errorobject(Error)Type of error response

Error

NameTypeDescription
codestring or nullThe Error code
messagestring or nullThe Error message

403 Refuse to authorize access to the endpoint

application/json

NameTypeDescription
errorobject(Error)Type of error response

Error

NameTypeDescription
codestring or nullThe Error code
messagestring or nullThe Error message

404 Request does not exist

application/json

NameTypeDescription
errorobject(Error)Type of error response

Error

NameTypeDescription
codestring or nullThe Error code
messagestring or nullThe Error message

500 The server encountered an unexpected 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