Appearance
Get Application Document List
Endpoint for retrieving a list of customer onboarding application documents.
Endpoints
| Environment | URL |
|---|---|
| Sandbox | https://api-test.streamline.laboremus.ug/doc-store/api/docs/{applicationId} |
| Production | https://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
| Name | Type | Description |
|---|---|---|
| Reference | string | The application reference of the file |
| Name | string | The name of the file |
| ContentType | string | The content type of the file |
| Id | string | The unique Id of the document |
| DateCreated | string | Search up to this date when the documents were created |
| Pagination.Page | integer | Page number |
| Pagination.ItemsPerPage | integer | Number of documents returned per page |
| Pagination.TotalItems | integer | Total number of documents |
Header Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| x-version | string | no | The API Version |
| Bearer | string(JwtToken) | no | The Token required for authorization |
Response
Pagination
| Name | Type | Description |
|---|---|---|
| page | integer | The current page number |
| itemsPerPage | integer | The number of items per page |
| totalItems | integer | The total number of items |
Documents
| Name | Type | Description |
|---|---|---|
| name | string | The name of the document |
| contentType | string | The content type of the document |
| size | string | The size of the document |
| documentType | string | The type of the document |
| description | string | A description of the document (Document Category) |
| metadata | object | Metadata associated with the document |
| id | string | The unique identifier of the document |
| dateCreated | string | The date and time the document was created |
| dateUpdated | string | The date and time the document was last updated |
| reference | string | The 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
| 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 Not authorized to access the endpoint
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 |
402 No active subscription
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 Refuse to authorize access to the endpoint
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 Request does not exist
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 The server encountered an unexpected 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 |