To change a customer’s assigned bill cycle a bill cycle change request must be submitted. As part of this request the bill period the change will become effective on must be specified. Validation rules around when a bill cycle change is allowed can be found in the API documentation (see link below).
Steps
Get Recommended Bill Periods
Before submitting a bill cycle change request, you must specify which bill period within the new cycle the change should become effective on. IDI provides a method which will return the recommended bill period per cycle. This will return a list of bill periods (one per bill cycle).
Example:
GET https://api.idibilling.com/CustomerManagement/2x/{environment}/api/customer/{id}/recommendedbillperiodResponse:
{ "value": [ { "billCycle": "Monthly on the 7th", "billCycleDescription": "Occurs monthly on the 7th", "billCycleID": 1234, "billingDate": "2017-08-07T09:00:00.1568626-05:00", "billPeriodID": 211170707, "endDate": "2017-08-07T09:00:00.0000000-05:00", "name": "211170707", "startDate": "2017-07-07T09:00:00.0000000-05:00" } ] }Create Bill Cycle Change Request
Once the recommended bill period id is obtained, use it when invoking the BillCycleChange operation, in the Customer Management web service, to put in the request.
Example:
POST https://api.idibilling.com/CustomerManagement/2x/{environment}/api/customer/{id}/billcyclechangeRequest body:
{ "newBillPeriodID": 31170707 }Response:
{ "billCycleChangeID": 777, "customerID": 1, "effectiveDate": "2017-08-07T09:00:00.1568626-05:00", "newBillCycleID": 2, "newBillPeriodID": 21170707, "oldBillCycleID": 3, "oldBillPeriodID": 31170303 }