Skip to content
On this page

Download Application Document

Endpoint for downloading an applicant's document. The endpoint takes the document identifier as a path parameter and returns the document in a jpeg format.

Endpoints

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

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

NameTypeRequiredDescription
vstringnoThe API Version

Header Parameters

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

Response

Content type

image/jpeg

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