Committing a Portfolio
Description
This web service commits a Portfolio and returns the result in form of a boolean, true for success and false for failure. Committing a Portfolio confirms that the investor is willing to invest according to Investment Bookings in the Portfolio.
Definition
POST https://<domain>/services/apexrest/peer/v1/portfolios/commit/*
Parameters
The table given below provides details of the request parameters used by this web service:
Fields | Type | Description |
---|---|---|
portfolioId* | String |
|
accountId | String |
|
smsToken | String |
|
sms_Unique_Id | String |
|
ipaddress | String |
|
Error messages
When you post a web service, you can receive the possible error messages as shown in the table below:
Error Code | Error Message | System.Label | Reason | HTTP Status Code |
---|---|---|---|---|
INVALID_INPUT | Unknown Exception :<exception_message> | UNKNOWN_EXCEPTION | You will receive this error if there is an unknown exception while parsing request parameters. | 400 |
INVALID_INPUT | Portfolio Id is null | PORTFOLIO_ID_NULL | You will receive this error if the Portfolio Id (portfolioId) is not specified in the URL | 400 |
SMS_ERROR | SMS Parameters are not provided | NO_PARAMS_SMS | You will receive this error if the parameters required for SMS verification are not specified in the request parameters | 401 |
SMS_ERROR | SMS verification failed. | INCORRECT_SMS | You will receive this error if the SMS verification has failed | 401 |
SMS_ERROR | SMS has been resent maximum allowed times | MAX_RETRY_SMS | You will receive this error if the maximum limit of SMS retries has been reached | 401 |
SMS_ERROR | SMS has already been verified | VERIFIED_SMS | You will receive this error if the SMS has been verified already | 401 |
SMS_ERROR | SMS verification has been timed out | TIMEOUT_SMS | You will receive this error if the SMS has timed out | 401 |
API_EXCEPTION | <exception_message> | NA | You will receive this error if any validation fails or any unexpected error occurs during the processing of the request, the system will raise the exception. | 500 |
Sample Request
The sample request to be sent is as shown below:
https://na11.salesforce.com/services/apexrest/peer/v1/portfolios/commit/a2uG00000005oGdIAI
Sample Response
This sample response contains the commit status (commitStatus) in a custom object, true when the portfolio is committed successfully. This custom object is the first element in the array for the parameter named "response". The sample response is as shown below:
{ "status": "SUCCESS", "response": [ { "commitStatus": true } ], "errorMessage": null, "errorCode": "NO_ERROR", "content": [] }