Create an Installment Schedule

post

/bcws/webresources/v1.0/installmentManagement/installmentSchedule

Creates an installment schedule.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/xml ()
Root Schema : schema
Type: object
Show Source
Nested Schema : bills
Type: array
Show Source
Nested Schema : Money
Type: object
Show Source
Nested Schema : installments
Type: array
Show Source
Nested Schema : TimePeriod
Type: object
Show Source
Nested Schema : InstallmentScheduleBills
Type: object
Show Source
Nested Schema : Installment
Type: object
Show Source
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : bills
Type: array
Show Source
Nested Schema : Money
Type: object
Show Source
Nested Schema : installments
Type: array
Show Source
Nested Schema : TimePeriod
Type: object
Show Source
Nested Schema : InstallmentScheduleBills
Type: object
Show Source
Nested Schema : Installment
Type: object
Show Source
Back to Top

Response

201 Response

The installment schedule was created successfully, and the ID of the new schedule was returned.

500 Response

An error occurred. An exception has been raised.
Back to Top

Examples

This example shows how to create an installment schedule by submitting a POST request on the REST resource using cURL. For more information about cURL, see "Use cURL".

cURL Command

curl -X POST 'http://hostname:port/bcws/webresources/version/installmentManagement/installmentScheduleSpec' -H 'content-type: application/json' -d @createInstallmentSchedule.json

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.
  • createInstallmentSchedule.json is the JSON file that specifies the installment schedule to create.

Example of Request Body

This example shows the contents of the createInstallmentSchedule.json file sent as the request body.

{   
    "name": "New Installment Schedule",   
    "descr": "descr",
    "billPreference": "IMMEDIATE",  
    "installmentType": "EQUAL_INSTALLMENT",
    "code": "newinstallment",
    "status": "OPEN",   
    "validFor": {   
        "startDateTime": "2021-07-28T21:28:02.763Z",    
        "endDateTime": "2021-08-28T21:28:02.763Z"   
    },   
    "totalInstallments": "2", 
    "totalAmount": {    
        "amount": "1000", 
        "currency": "INR"   
    },  
    "customerRef": "0.0.0.1+-account+134849+0",    
    "billProfileRef": "0.0.0.1+-billinfo+132545+0",    
    "bills": [  
        {   
            "billId": "0.0.0.1+-item+105318+7"
        }   
    ],  
    "scheduleSpecRef": "0.0.0.1+-config-installment-schedule_spec+82484", 
    "installments": [
        {   
            "status": "OPEN",   
            "dueDate": "2021-07-28T21:28:02.762Z",  
            "amount": { 
                "amount": "500",  
                "currency": "INR"
            }   
        },       
        {   
            "status": "OPEN",   
            "dueDate": "2021-08-28T21:28:02.763Z",  
            "amount": { 
                "amount": "500",  
                "currency": "INR"   
            }           
        }
    ]   
}

Example of Response Body

This example shows the contents of the response body in JSON format.

{
	"id": "0.0.0.1+installment_schedule+124524",
	"href": "http:// hostname:port/bcws/webresources/version/installmentManagement/installmentScheduleSpec/0.0.0.1+-installment_schedule+124524"
}
Back to Top