Professional Documents
Culture Documents
Swagger UI
Swagger UI
Swagger UI
0 OAS3
Truewiser Backend
API documentation
Authorize
health
Parameters Cancel
No parameters
Execute Clear
Responses
Curl
curl -X 'GET' \
'https://dna-assets-truewiser.alpha.mckinsey.digital/api/health' \
-H 'accept: application/json'
Request URL
https://dna-assets-truewiser.alpha.mckinsey.digital/api/health
Server response
Code Details
Code Details
200
Response body
"status": "HEALTHY"
}
Download
Response headers
access-control-allow-origin: *
cache-control: no-store
content-length: 20
content-type: application/json; charset=utf-8
date: Fri,22 Apr 2022 05:39:41 GMT
etag: W/"14-94WU8cQMcXwDc3aOB5nUrRFySiI"
expires: 0
pragma: no-cache
server: CloudFront
strict-transport-security: max-age=63072000; includeSubdomains; preload
surrogate-control: no-store
via: 1.1 6a3d98aad6a6ea4a9a35b5590bdb3da6.cloudfront.net (CloudFront)
x-amz-cf-id: OON4Xg7pL452HBh7yiRj69Wqnwl-zFLkuDFTvWrw3Goq26jfERInbg==
x-amz-cf-pop: MRS52-P1
x-cache: Miss from cloudfront
x-powered-by: Express
Responses
200 No links
Health status of the server
Media type
application/json
Controls Accept header.
"status": "HEALTHY"
auth
Login to the application using username & password, Also create a new user if username does not exist
required
Request body application/json
"username": "tw_admin",
"password": "tw_admin"
Execute Clear
Responses
Curl
curl -X 'POST' \
'https://dna-assets-truewiser.alpha.mckinsey.digital/api/auth/login' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"username": "tw_admin",
"password": "tw_admin"
}'
Request URL
https://dna-assets-truewiser.alpha.mckinsey.digital/api/auth/login
Server response
Code Details
Code Details
201
Response body
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsInVzZXJuYW1lI‐
joidHdfYWRtaW4iLCJyb2xlIjoiQWRtaW4iLCJpYXQiOjE2NTA2MDYwMDYsImV4cCI6MTY1MDc3ODgwNn0.Mq
KGrfheEOZUbg0AAGpNUh4froE2H2DTdKNANIm8wwM",
"userId": 1,
"username": "tw_admin"
Download
}
Response headers
access-control-allow-origin: *
cache-control: no-store
content-length: 243
content-type: application/json; charset=utf-8
date: Fri,22 Apr 2022 05:40:06 GMT
etag: W/"f3-XnqMvAPTmIhgENeHhgodSTHjMG4"
expires: 0
pragma: no-cache
server: CloudFront
strict-transport-security: max-age=63072000; includeSubdomains; preload
surrogate-control: no-store
via: 1.1 6a3d98aad6a6ea4a9a35b5590bdb3da6.cloudfront.net (CloudFront)
x-amz-cf-id: syfLvhTBUd_MHZ6iULdGh7YOMVxd1lKgoN739wb3czl0-kYpGvHcug==
x-amz-cf-pop: MRS52-P1
x-cache: Miss from cloudfront
x-powered-by: Express
Responses
200 No links
Valid token to access the other endpoints
201 No links
users
Parameters Cancel
Name Description
Name Description
required
id *
number 1
(path)
Execute Clear
Responses
Curl
curl -X 'GET' \
'https://dna-assets-truewiser.alpha.mckinsey.digital/api/users/1' \
-H 'accept: application/json' \
Request URL
https://dna-assets-truewiser.alpha.mckinsey.digital/api/users/1
Server response
Code Details
200
Response body
"id": 1,
"username": "tw_admin",
"password": "$2a$10$xIi8pzl/Z11Wf4gO27uTMOvLULGnX/p/WEMkvGVbCyu/TXSDg9T0a",
"role": "Admin",
"createdAt": "2022-04-21T11:31:02.071Z",
"updatedAt": "2022-04-21T11:31:02.071Z",
"userProfile": null,
"userOccupation": null,
"userFinance": null
Download
}
Response headers
access-control-allow-origin: *
cache-control: no-store
content-length: 257
content-type: application/json; charset=utf-8
date: Fri,22 Apr 2022 05:41:14 GMT
etag: W/"101-y0ac0gqCxixLZhO6tIVbH8ccNQ8"
expires: 0
pragma: no-cache
server: CloudFront
strict-transport-security: max-age=63072000; includeSubdomains; preload
surrogate-control: no-store
via: 1.1 6a3d98aad6a6ea4a9a35b5590bdb3da6.cloudfront.net (CloudFront)
x-amz-cf-id: Kk_OJ81EaGL6zbFLPY2CWOdwscnjtEIwV0a91AhWVxLKZTW8qlmWaQ==
x-amz-cf-pop: MRS52-P1
x-cache: Miss from cloudfront
x-powered-by: Express
Responses
Code Description Links
200 No links
Get the user profile details
Media type
application/json
Controls Accept header.
"id": 0,
"username": "string",
"password": "string",
"createdAt": "2022-04-22T05:54:41.157Z",
"updatedAt": "2022-04-22T05:54:41.157Z"
Parameters Cancel
No parameters
Execute Clear
Responses
Curl
curl -X 'GET' \
'https://dna-assets-truewiser.alpha.mckinsey.digital/api/users' \
-H 'accept: application/json' \
Request URL
https://dna-assets-truewiser.alpha.mckinsey.digital/api/users
Server response
Code Details
Code Details
200
Response body
{
"id": 6,
"username": "John5"
},
"id": 5,
"username": "shubham"
},
"id": 4,
"username": "string"
},
"id": 3,
"username": "pushya"
},
"id": 2,
"username": "priyanka_admin"
},
"id": 1,
"username": "tw_admin"
Download
]
Response headers
access-control-allow-origin: *
cache-control: no-store
content-length: 185
content-type: application/json; charset=utf-8
date: Fri,22 Apr 2022 05:40:52 GMT
etag: W/"b9-vPR3NJN2pgIOI/nOnBEuIi6rrwI"
expires: 0
pragma: no-cache
server: CloudFront
strict-transport-security: max-age=63072000; includeSubdomains; preload
surrogate-control: no-store
via: 1.1 6a3d98aad6a6ea4a9a35b5590bdb3da6.cloudfront.net (CloudFront)
x-amz-cf-id: hl-nzzlw74V-3BgS5yAVZyaoxWzY6c_EM5vvpBHghT_hlxBkLy3FLA==
x-amz-cf-pop: MRS52-P1
x-cache: Miss from cloudfront
x-powered-by: Express
Responses
200 No links
Get the list of users.
Media type
application/json
Controls Accept header.
"id": 0,
"username": "string",
"password": "string",
"createdAt": "2022-04-22T05:54:41.159Z",
"updatedAt": "2022-04-22T05:54:41.159Z"
Name Description
required
userId *
number 1
(path)
required
Request body application/json
"email": "test@mail.com",
"age": 0,
"maritalStatus": "MARRIED",
"kids": [
"string"
],
"dualIncome": true,
"income": 0,
"spouseIncome": 0,
"nationalIdNo": "string",
"allowCreditCheck": true,
"createdAt": "2022-04-22T05:41:26.770Z",
"updatedAt": "2022-04-22T05:41:26.770Z"
}
Execute
Responses
200 No links
Create new user profile
Media type
application/json
Controls Accept header.
"id": 0,
"occupationalDetail": "SALARIED_PROFESSIONAL",
"isHealthInsurance": true,
"isLifeInsurance": true,
"healthInsuranceAmount": 0,
"lifeInsuranceAmount": 0,
"createdAt": "2022-04-22T05:54:41.163Z",
"updatedAt": "2022-04-22T05:54:41.163Z"
201 No links
POST /api/users/{userId}/profile/{profileId} Update the existing user profile by userId & profileId
Name Description
required
userId *
number
userId
(path)
required
profileId *
number
profileId
(path)
required
Request body application/json
"id": 0,
"email": "string",
"age": 0,
"maritalStatus": "MARRIED",
"kids": [
"string"
],
"dualIncome": true,
"income": 0,
"spouseIncome": 0,
"nationalIdNo": "string",
"allowCreditCheck": true,
"createdAt": "2022-04-22T05:54:41.168Z",
"updatedAt": "2022-04-22T05:54:41.168Z"
Responses
200 No links
Update the existing user profile
Media type
application/json
Controls Accept header.
"id": 0,
"email": "string",
"age": 0,
"maritalStatus": "MARRIED",
"kids": [
"string"
],
"dualIncome": true,
"income": 0,
"spouseIncome": 0,
"nationalIdNo": "string",
"allowCreditCheck": true,
"createdAt": "2022-04-22T05:54:41.169Z",
"updatedAt": "2022-04-22T05:54:41.169Z"
201 No links
Name Description
required
userId *
number userId
(path)
required
Request body application/json
"id": 0,
"occupationalDetail": "SALARIED_PROFESSIONAL",
"isHealthInsurance": true,
"isLifeInsurance": true,
"healthInsuranceAmount": 0,
"lifeInsuranceAmount": 0,
"createdAt": "2022-04-22T05:54:41.173Z",
"updatedAt": "2022-04-22T05:54:41.173Z"
Responses
200 No links
Create new user ocuupation profile
Media type
application/json
Controls Accept header.
"id": 0,
"occupationalDetail": "SALARIED_PROFESSIONAL",
"isHealthInsurance": true,
"isLifeInsurance": true,
"healthInsuranceAmount": 0,
"lifeInsuranceAmount": 0,
"createdAt": "2022-04-22T05:54:41.174Z",
"updatedAt": "2022-04-22T05:54:41.174Z"
201 No links
Name Description
required
userId *
number
userId
(path)
required
occupationId *
number
occupationId
(path)
required
Request body application/json
"id": 0,
"occupationalDetail": "SALARIED_PROFESSIONAL",
"isHealthInsurance": true,
"isLifeInsurance": true,
"healthInsuranceAmount": 0,
"lifeInsuranceAmount": 0,
"createdAt": "2022-04-22T05:54:41.179Z",
"updatedAt": "2022-04-22T05:54:41.179Z"
Responses
200 No links
Update the existing user occupation profile
Media type
application/json
Controls Accept header.
"id": 0,
"occupationalDetail": "SALARIED_PROFESSIONAL",
"isHealthInsurance": true,
"isLifeInsurance": true,
"healthInsuranceAmount": 0,
"lifeInsuranceAmount": 0,
"createdAt": "2022-04-22T05:54:41.180Z",
"updatedAt": "2022-04-22T05:54:41.180Z"
201 No links
Name Description
required
userId *
number
userId
(path)
required
Request body application/json
"id": 0,
"monthlyExpenditure": 0,
"totalEmis": 0,
"valueOfInvestment": 0,
"currentBankBalance": 0,
"property": 0,
"car": 0,
"createdAt": "2022-04-22T05:54:41.184Z",
"updatedAt": "2022-04-22T05:54:41.184Z"
Responses
200 No links
Create new user ocuupation profile
Media type
application/json
Controls Accept header.
"id": 0,
"monthlyExpenditure": 0,
"totalEmis": 0,
"valueOfInvestment": 0,
"currentBankBalance": 0,
"property": 0,
"car": 0,
"createdAt": "2022-04-22T05:54:41.185Z",
"updatedAt": "2022-04-22T05:54:41.185Z"
201 No links
Name Description
required
userId *
number
userId
(path)
required
financeId *
number
financeId
(path)
required
Request body application/json
"id": 0,
"monthlyExpenditure": 0,
"totalEmis": 0,
"valueOfInvestment": 0,
"currentBankBalance": 0,
"property": 0,
"car": 0,
"createdAt": "2022-04-22T05:54:41.189Z",
"updatedAt": "2022-04-22T05:54:41.189Z"
Responses
200 No links
Update the existing user finance profile
Media type
application/json
Controls Accept header.
"id": 0,
"monthlyExpenditure": 0,
"totalEmis": 0,
"valueOfInvestment": 0,
"currentBankBalance": 0,
"property": 0,
"car": 0,
"createdAt": "2022-04-22T05:54:41.190Z",
"updatedAt": "2022-04-22T05:54:41.190Z"
201 No links
Name Description
required
userId *
number userId
(path)
Responses
200 No links
Download raw data for user
categories
Run & get financial health check for user for each
POST /api/categories/users/{userId}/report
category
Run & get financial health check for user for each category with userId
Name Description
required
userId *
number
userId
(path)
Responses
200 No links
Run & get financial health check for each category
201 No links
Media type
application/json
Controls Accept header.
{}
GET /api/categories/users/{userId}/report Get financial health check report for all categories
Get financial health check report for all categories for user with userId
Name Description
required
userId *
number userId
(path)
Responses
200 No links
Get financial health check report for all categories
Media type
application/json
Controls Accept header.
"id": 0,
"userId": 0,
"categoryId": 0,
"score": 0,
"message": "string",
"recommendation": "GOOD",
"recommendationCount": 0,
"createdAt": "2022-04-22T05:54:41.197Z",
"updatedAt": "2022-04-22T05:54:41.197Z"
Get financial report for a category for a particular user with categoryId & userId
required
userId *
number userId
(path)
required
categoryId *
number categoryId
(path)
Responses
200 No links
Get report for a category for a particular user
Media type
application/json
Controls Accept header.
"id": 0,
"userId": 0,
"categoryId": 0,
"subCategoryId": 0,
"subCategoryAtttributeId": 0,
"score": 0,
"message": "string",
"recommendation": "GOOD",
"name": "string",
"createdAt": "2022-04-22T05:54:41.199Z",
"updatedAt": "2022-04-22T05:54:41.200Z"
Name Description
required
userId *
number userId
(path)
Responses
200 No links
Get recommendation count by user id
Media type
application/json
Controls Accept header.
"recommendation": "GOOD",
"count": 0
No parameters
Responses
200 No links
Download Persona & Formula Config files
POST /api/categories/upload Upload a file & dump data for user persona
Responses
201 No links
Success for all the persona for which data update was successful
utils
No parameters
required
Request body application/json
"query": "string"
Responses
200 No links
Raw response
Media type
application/json
Controls Accept header.
"string"
mails
GET /api/mails/auth/user/{userId} Generate Auth URL for validating the email id.
Name Description
required
userId *
number
userId
(path)
Responses
200 No links
Generate Auth URL for validating the email id.
Media type
application/json
Controls Accept header.
"string"
Redirect URL once the authorization recieved by user & generates the
GET /api/mails/redirect
access_token
Redirect URL once the authorization recieved by user & generates the access_token
No parameters
Responses
200 No links
Redirect URL once the authorization recieved by user & generates the
access_token
Media type
application/json
Controls Accept header.
"string"
Name Description
required
userId *
number
userId
(path)
Responses
200 No links
Get all attachment details for the user.
Media type
application/json
Controls Accept header.
"id": 0,
"userId": 0,
"filename": "string",
"extension": "string",
"location": "string"
Name Description
required
userId *
number userId
(path)
required
attachmentId *
number
attachmentId
(path)
Responses
200 No links
Download attachment for specific userId & attachmentId.
Schemas
HealthDTO {
status* string
example: HEALTHY
}
AuthLoginDTO {
username* string
password* string
}
UserDTO {
id number
username* string
password* string
createdAt* string($date-time)
updatedAt* string($date-time)
}
UserProfileDTO {
id number
email* string
age* number
maritalStatus* string
Enum:
Array [ 3 ]
kids*
[...]
dualIncome* boolean
income* number
spouseIncome* number
nationalIdNo string
allowCreditCheck boolean
createdAt* string($date-time)
updatedAt* string($date-time)
}
UserOccupationDTO {
id number
occupationalDetail* string
Enum:
Array [ 4 ]
isHealthInsurance* boolean
isLifeInsurance* boolean
healthInsuranceAmount* number
lifeInsuranceAmount* number
createdAt* string($date-time)
updatedAt* string($date-time)
}
UserFinanceDTO {
id number
monthlyExpenditure* number
totalEmis* number
valueOfInvestment* number
currentBankBalance* number
property* number
car* number
createdAt* string($date-time)
updatedAt* string($date-time)
}
CategoryRecommendationDTO {
id number
userId number
categoryId number
score* number
message* string
recommendation* string
Enum:
Array [ 4 ]
recommendationCount* number
createdAt* string($date-time)
updatedAt* string($date-time)
}
SubCategoryAndAttrRecomDTO {
id number
userId number
categoryId number
subCategoryId number
subCategoryAtttributeId number
score* number
message* string
recommendation* string
Enum:
Array [ 4 ]
name* string
createdAt* string($date-time)
updatedAt* string($date-time)
}
SubCategoryAndAttrRecomCountDTO {
recommendation* string
Enum:
Array [ 4 ]
count number
}
QueryDTO {
query string
}
AttachmentDTO {
id number
userId number
filename string
extension string
location string
}