Get Loan Profiles
get
/bcws/webresources/v1.0/loans/loanProfiles
Gets the loan profiles that have been configured for the account with the specified ID.
Request
Query Parameters
-
id(required): string
The ID of the account to get loan profiles from. For example: 0.0.0.1+-account+123123
-
name(required): string
The name of the loan profile. For example: Resource Loan
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/xml
- application/json
200 Response
The loan profiles were returned successfully.
Nested Schema : loanProfileDetails
Type:
Show Source
object
-
id(required): string
Default Value:
configLoanId
The loan profile's ID. -
loanInfo: object
LoanInfo
The loan information.
-
locations: array
locations
-
name(required): string
Default Value:
name
The loan profile's name.
Nested Schema : LoanInfo
Type:
object
The loan information.
Show Source
-
age: integer
(int32)
Default Value:
0
The minimum number of days, months, or years the account must be active to be eligible for a loan. -
ageOffsetUnit(required): string
The unit (days, months, or years) for the account age eligibility number.
-
loanTaxCode(required): string
The tax code for the loan.
-
locationMode: integer
(int32)
Whether the locations specified are where the loan is allowed (0) or not (1).
-
maximum(required): number
Default Value:
0
The fixed maximum amount for the loan. If you specify this, you cannot specify scaledMaximum. -
maxQuantity: integer
(int32)
Default Value:
0
The maximum number of times the loan can be granted in each loan cycle. -
minimum(required): number
Default Value:
0
The minimum amount for the loan. -
percentFee(required): number
Default Value:
0
The percent of the loan to charge as a service fee. If you specify this, you cannot specify serviceFee. -
reasonDomainId: integer
(int32)
Default Value:
0
The A/R reason domain to map to the G/L ID. -
reasonId: integer
(int32)
Default Value:
0
The A/R reason code to map to the G/L ID. -
resourceId: integer
(int32)
Default Value:
0
The ID of a noncurrency resource to use when calculating the loan when scaledMaximum is specified. -
scaledMaximum(required): number
Default Value:
0
The maximum scaled amount to grant. This is a percent of the resource specified in resourceId, which represents consumption of a noncurrency resource in the previous calendar month. If you specify this, you cannot specify the maximum element. -
serviceFee(required): number
Default Value:
0
The fixed amount to charge as service fee. If you specify this, you cannot specify percentFee. -
taxCode(required): string
The tax code for the loan service fee.
Nested Schema : Location
Type:
Show Source
object
-
location(required): string
A location where the loan is allowed or not, depending on the value of locationMode.
500 Response
An internal server error occurred.
Examples
This example shows how to get a loan configuration by name by submitting a GET request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X GET 'http://hostname:port/bcws/webresources/version/loans/loanProfiles?name=Loan Resource USD'
where:
- hostname is the URL for the Billing Care REST server.
- port is the port for the Billing Care REST server.
- version is the version of the API you're using, such as v1.0.
Example of Response Body
This example shows the contents of the response body in JSON format.
[
{
"id": "0.0.0.1+-config-loan+56748",
"name": "Loan Resource USD",
"loanInfo": {
"age": 0,
"serviceFee": 10,
"ageOffsetUnit": "Day",
"minimum": 1,
"maximum": 10000,
"resourceId": 840,
"maxQuantity": 5000,
"taxCode": "",
"loanTaxCode": "transfer",
"percentFee": 0,
"scaledMaximum": 0,
"reasonId": 0,
"reasonDomainId": 100,
"locationMode": 0
},
"locations": [
{
"location": "IN"
},
{
"location": "US"
}
]
}
]