Upload
others
View
22
Download
0
Embed Size (px)
Citation preview
Page 1 of 14
FundConnext
Restful Web services API
Message Specification for AMC
Version 1.9
December 30, 2020
Page 2 of 14
Revision
Revision Description Updated by Updated Date
1.0 Create Chatchai 19/05/2017
1.1 Add Upload API Chatchai 07/08/2017
1.2 Update URL for Upload API Chatchai 04/09/2017
1.3 + Add Upload with version API + Add fund data possible value in Upload API
Chatchai 24/11/2017
1.4 Add change password API Chatchai 29/01/2018
1.5 - Download Customer attached files after 4:15 pm. - Upload Dividend files (news and transaction)
Chatchai 14/05/2018
1.6 -Upload fund fee -Upload Suspend Unitholder / LTF Unitholder Balance -Download PaidTransactions with specific round
Chatchai 16/08//2019
1.7 - Upload AssignUnitholderId
Chatchai 09/10/2019
1.8 API Download - Change URL Params: versionNo to version
Chatchai 15/06/2020
1.9 Download Specific Part File - If there are number of unitholders, FundConnext will spilt to more than one file. Using this api to download specific part of file. Add ‘Change Attachment zip file Password’ – you can change password of downloaded Attachment.zip
Surachet 30/12/2020
Page 3 of 14
Table of Contents
Table of Contents ....................................................................................................................... 3
Login .......................................................................................................................................... 4
Change Password ...................................................................................................................... 5
Download File ............................................................................................................................ 7
Download Specific Part File ....................................................................................................... 9
Change Attachment zip file Password .......................................................................................11
Upload File ................................................................................................................................13
Upload File with version ............................................................................................................14
Page 4 of 14
Login Title Login
Description Login to the system and acquire access tokens URL /api/auth Method POST URL Params Required:
N/A Optional: N/A
Header Attribute Example: {
"Content-Type": "application/json" }
Data Params Example:
{ "username": "AMC1", "password": "1233", }
Possible Data Params
Key Mandatory Type Max size
Remark
username Y Char 15 password Y Char 15
Success Response
Example:
Status: 200 { "username": "AMC1", "access_token": "n47vrc97jvneqop57xEDKO8E19LSBOEKoseF83", "amcCode": "AMCOne" }
Error Response List of error message:
Status: 401 Unauthorized { "errMsg": { "code": "E000", "message": "Unauthorized access" } }
Possible Response
Key Mandatory Type Remark
username Y Char [Success Case] access_token Y Char [Success Case] Access token to be sent
in header of future request amcCode Y Char [Success Case] AMC that user can act
on behalf of errMsg Y [Fail Case] code Y Char [Fail Case] Error code message Y Char [Fail Case] Error message for Error
response (status != 200)
Note Token has session time 30 minutes.
Page 5 of 14
Change Password Title Change Password
Description Change password of current user
URL /api/auth/changePassword/
Method POST
URL Params Required: N/A Optional: N/A
Header Attribute
Example:
{
"X-Auth-Token": "01KEOKD0387dKEPGKJEEDFKLJ", "Content-Type": "application/json" }
Data Params Example:
{ " newPassword":"pAssword0123" }
Possible
Data Params
Key Mandatory Type Max size
Remark
newPassword Y Char 32 Compiled Policy Password Password Length: 8 - 32 characters (Allow special characters such as ! @ # $).
Password Complexity: Password must contain at least
- One uppercase letter
- One lowercase letter
- One numeral
Enforce Password History: Five of different unique passwords that a user must use before the user is allowed to reuse a previous password.
Success Response
Example:
Status: 200
OK
Error Response
Example:
Status: 401 Unauthorized { "errMsg": { "code": "E000",
Page 6 of 14
"message": "Unauthorized access" } } Status: 500 Internal Server Error { "errMsg": { "code": "E002", "message": "InvalidPasswordPolicy" } }
Possible Response
Key Mandatory Type Max size
Remark
errMsg Y [Fail Case] Code Y Char 4 [Fail Case] Error code Message Y Char 100 [Fail Case] Error message for Error
response (status != 200)
Page 7 of 14
Download File Title Download File
Description Download file by fileType and businessDate URL /api/files/:businessDate/:fileType.zip?version=:versionNo
Method GET URL Params Required:
Example: /api/files/20170218/PaidTransactions.zip?version=9 Optional: N/A
Possible URL Params
Key Mandatory Type Max size
Remark
fileType Y Char 50 Possible Value AMC Download* “PaidTransactions” “NewAccount” “Attachment” *Use Effective Date
businessDate Y Char 10 Format YYYYMMDD version N Char 1 Possible value 1-9
1 = batch round 11:45 am 2 = batch round 12:15 pm 3 = batch round 12:45 pm 4 = batch round 1:15 pm 5 = batch round 1:45 pm 6 = batch round 2:15 pm 7 = batch round 2:45 pm 8 = batch round 3:15 pm 9 = batch round 3:45 pm Only fileType = PaidTransactions
Header Attribute Example: {
"X-Auth-Token": "01KEOKD0387dKEPGKJEEDFKLJ", "Content-Type": "application/json" }
Data Params N/A Success Response
Example:
Status: 200 Response Header
Content-Type: application/zip Content-Disposition: attachment; filename=":fileType.zip" Response Body
[File content]
Error Response Example:
Status: 401 Unauthorized { "errMsg": { "code": "E000", "message": "Unauthorized access" } } Status: 422 Unprocessable Entry { "errMsg": { "code": "E500", "message": "Requested file is not found"
Page 8 of 14
} } Status: 422 Unprocessable Entry { "errMsg": { "code": "E003", "message": "<Field Name> is invalid." } }
Possible Response
Key Mandatory Type Max size
Remark
errMsg [Fail Case] code Char 4 [Fail Case] Error code message Char 100 [Fail Case] Error message for Error
response (status != 200)
Page 9 of 14
Download Specific Part File Title Download File
Description Download file by fileType and businessDate URL /api/files/:businessDate/:fileType.zip?part=:part
Method GET URL Params Required:
Example: /api/files/20170218/Attachment.zip?part=2 Optional: N/A
Possible URL Params
Key Mandatory Type Max size
Remark
fileType Y Char 50 Possible Value “Attachment” *Use Effective Date
businessDate Y Char 10 Format YYYYMMDD part Y Number 3 Specific part of file
Header Attribute
Example: {
"X-Auth-Token": "01KEOKD0387dKEPGKJEEDFKLJ", "Content-Type": "application/json" }
Data Params N/A Success Response
Example: Status: 200 Response Header
Content-Type: application/zip Content-Disposition: attachment; filename=":fileType.zip" hasNext: true/false (If the value of this field is false, this file is the last file) totalFiles: 5 (No of total files) Response Body
[File content]
Error Response
Example:
Status: 401 Unauthorized { "errMsg": { "code": "E000", "message": "Unauthorized access" } } Status: 422 Unprocessable Entry { "errMsg": { "code": "E500", "message": "Requested file is not found" } } Status: 422 Unprocessable Entry { "errMsg": { "code": "E003", "message": "<Field Name> is invalid." } }
Page 10 of 14
Possible Response
Key Mandatory Type Max size
Remark
errMsg [Fail Case] code Char 4 [Fail Case] Error code message Char 100 [Fail Case] Error message for Error
response (status != 200)
Page 11 of 14
Change Attachment zip file Password Title Change Password
Description Change password of Attachment.zip
URL /api/auth/changePasswordAttachment
Method POST
URL Params Required: N/A Optional: N/A
Header Attribute
Example:
{
"X-Auth-Token": "01KEOKD0387dKEPGKJEEDFKLJ", "Content-Type": "application/json" }
Data Params Example: { " newPassword":"pAssword0123" }
Possible
Data Params
Key Mandatory Type Max size
Remark
newPassword Y Char 32 Compiled Policy Password Password Length: 8 - 32 characters Password Complexity: Password must contain - One uppercase letter - One lowercase letter - One numeral
Success
Response
Example: Status: 200
OK
Error Response
Example:
Status: 401 Unauthorized { "errMsg": { "code": "E000", "message": "Unauthorized access" } } Status: 500 Internal Server Error { "errMsg": { "code": "E002", "message": "InvalidPasswordPolicy" }
Page 12 of 14
}
Possible Response
Key Mandatory Type Max size
Remark
errMsg Y [Fail Case] Code Y Char 4 [Fail Case] Error code Message Y Char 100 [Fail Case] Error message for Error
response (status != 200)
Page 13 of 14
Upload File Title Upload File
Description Uploadload file by fileType URL /api/amc/upload/:fileType
Method POST URL Params Required:
Example: /api/amc/upload/nav Optional: N/A
Possible URL Params
Key Mandatory Type Max size
Remark
fileType Y Char 50 Possible Value “nav” “allottedTransaction” “unitholderBalance” FundData “fundMapping” “fundCalendar”
Header Attribute Example: {
"X-Auth-Token": "01KEOKD0387dKEPGKJEEDFKLJ", "Content-Type": "multipart/form-data" } Note: The uploaded file must be zipped
Data Params N/A Success Response
Example:
Status: 200
Error Response Example: Status: 401 Unauthorized { "errMsg": { "code": "E000", "message": "Unauthorized access" } } Status: 422 Unprocessable Entry { "errMsg": { "code": "E500", "message": "Upload failed : error message depends on failed case " } }
Possible Response
Key Mandatory Type Max size
Remark
errMsg [Fail Case] code Char 4 [Fail Case] Error code message Char 100 [Fail Case] Error message for Error
response (status != 200)
Page 14 of 14
Upload File with version Title Upload File with version
Description Uploadload file by fileType and version URL /api/amc/upload/:versionCode/:fileType
Method POST URL Params Required:
Example: /api/amc/upload/v2/fundRules Optional: N/A
Possible URL Params
Key Mandatory Type Max size
Remark
versionCode Y Char 5 Possible Value “v1”,“v2”
fileType Y Char 50 Possible Value versionCode = v2 “fundRules” “fundSwitchingMatrix” “tradeCalendar” versionCode = v1 “dividendNews” “dividendTransactions” “fee” “ltfBalance” “suspendUnitholder” “assignUnitholderId”
Header Attribute Example: {
"X-Auth-Token": "01KEOKD0387dKEPGKJEEDFKLJ", "Content-Type": "multipart/form-data" } Note: The uploaded file must be zipped
Data Params N/A Success Response
Example:
Status: 200 Error Response Example:
Status: 401 Unauthorized { "errMsg": { "code": "E000", "message": "Unauthorized access" } } Status: 422 Unprocessable Entry { "errMsg": { "code": "E500", "message": "Upload failed : error message depends on failed case " } }
Possible Response
Key Mandatory Type Max size
Remark
errMsg [Fail Case] code Char 4 [Fail Case] Error code message Char 100 [Fail Case] Error message for Error
response (status != 200)