Retrieving the dues
Description
This web service retrieves all the dues or a particular due for a day, given its due ID.
Definition
GET https://<domain>/services/apexrest/peer/v1/dues/*
Parameters
The table given below provides details of the request parameters used by this web service:
Fields | Type | Description |
---|---|---|
dueId | String |
|
date | String |
|
Error message
When you use this web service you can receive the following error message as shown in the table below:
Error Code | Error Message | System.Label | Reason | HTTP Status Code |
---|---|---|---|---|
INVALID_INPUT | Unable to parse the Request parameters. | UNABLE_PARSE_REQ_PARAMS | You will receive this error if there is any error while parsing the request parameters. | 400 |
INVALID_INPUT | Unable to find the Due. | DUE_NOT_FOUND | You will receive this error if no record exists in the system for the Due Id (dueId) specified(if any) in the Request Parameters. | 400 |
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:
GET https://na11.salesforce.com/services/apexrest/peer/v1/dues?date=2013-12-24
Sample response
This sample response contains the dues. The sample response that you will receive is as shown below:
{ "status": "SUCCESS", "response": [], "errorMessage": null, "errorCode": "NO_ERROR", "content": [ { "attributes": { "type": "loan__Loan_account_Due_Details__c", "url": "/services/data/v31.0/sobjects/loan__Loan_account_Due_Details__c/a1lG0000000Z5wsIAC" }, "loan__Payment_Date__c": "2013-12-23", "loan__Payment_Amt__c": 439.99, "loan__Late_Charge_Applied__c": false, "LastModifiedById": "005G0000004HCXIIA4", "loan__Due_Date__c": "2013-12-24", "loan__Due_Type__c": 1, "LastModifiedDate": "2014-08-08T08:58:05.000+0000", "loan__DD_Primary_Flag__c": true, "loan__Transaction_Date__c": "2013-12-24", "Name": "PCN-0000000009", "loan__Balance_Amount__c": 0, "loan__Payment_Satisfied__c": true, "SystemModstamp": "2014-08-08T08:58:05.000+0000", "CreatedById": "005G0000004HCXIIA4", "loan__Due_Amt__c": 439.99, "CreatedDate": "2014-07-28T06:56:44.000+0000", "IsDeleted": false, "Id": "a1lG0000000Z5wsIAC", "loan__Rescheduled_flag__c": false, "loan__Loan_Account__c": "a1WG0000000juuWMAQ", "loan__Tolerance__c": 0, "loan__Due_Type_Description__c": "BILL / DUE DATE" } ] }