Transfer a Negative Balance

post

/bcws/webresources/v1.0/bills/{id}/balance/transfer

Transfers a negative balance from a bill to the bills specified in the request body.

Request

Path Parameters
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: array
Show Source
Nested Schema : bill
Type: object
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Request Body - application/xml ()
Root Schema : schema
Type: array
Show Source
Nested Schema : bill
Type: object
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Back to Top

Response

200 Response

The balance was transferred successfully.

400 Response

The bill doesn't exist.

500 Response

An internal server error occurred.
Back to Top

Examples

This example shows how to transfer a balance from one bill to other bills 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/bills/0.0.0.1+-bill+4241389/balance/transfer' -H 'content-type: application/json' -d @balanceTransfer.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.
  • balanceTransfer.json is the JSON file containing the balance transfer information.

Example of Request Body

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

[
	{
		"extension":null,
		"id":"0.0.0.1+-bill+4243230",
		"accountRef": {
			"id":"0.0.0.1+-account+4241399",
			"uri":null
		},
		"adjusted":0,
		"arBillinfoRef": {
			"id":"0.0.0.1+-billinfo+4240399",
			"uri":null
		},
		"billUnitRef": {
			"id":"0.0.0.1+-billinfo+4240399",
			"uri":null
		},
		"billNo":"B1-8627",
		"creationDate":null,
		"currency":null,
		"disputed":0,
		"currentTotal":100,
		"due":100,
		"previousTotal":700,
		"totalDue":100,
		"receivedForBill":0,
		"arActionsAmtExcludingPayments":0,
		"cycleEnds":1391212800000,
		"name":null,
		"parent":null,
		"hierarchySize":0,
		"parentAccountRef":null,
		"parentFirstName":null,
		"parentLastName":null,
		"parentCompanyName":null,
		"parentSalutation":null,
		"cycleStarts":1388534400000,
		"subordsTotal":0,
		"transfered":0,
		"writeoff":0,
		"amount":-5,
		"billInfoId":"Bill Unit(1)",
		"billPaidDate":0,
		"recurringCharges":null,
		"billDisputed":null,
		"originalBillNo":null
	}
]

Example of Response Body

This example shows the response body in JSON format.

{
	"extension":null,
	"reference": {
		"id":"0.0.0.1+-bill+4241389",
		"uri":"http://host:port/bc/webresources/v1.0/bills/0.0.0.1+-bill+4241389"
	}
}
Back to Top