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
-
id(required): string
The ID of the bill to transfer the negative balance from.
Supported Media Types
- application/xml
- application/json
The details of the bills to transfer the balance to.
Nested Schema : bill
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
adjusted: number
The amount on the bill that was adjusted.
-
amount: number
The amount to be allocated.
-
arActionsAmtExcludingPayments: number
The total of all accounts receivable actions applied toward the bill, excluding any payments.
-
arBillinfoRef: object
ResourceRef
-
billDisputed: boolean
Whether the bill includes a disputed item (true) or not (false).
-
billInfoId: string
The ID of the bill unit associated with the bill.
-
billNo: string
The bill number.
-
billPaidDate(required): string
(date-time)
The date and time the bill was paid.
-
billUnitRef: object
ResourceRef
-
creationDate(required): string
(date-time)
The date and time the bill was created.
-
currency: integer
(int32)
The type of currency associated with the bill.
-
currentTotal: number
The current total of the bill.
-
cycleEnds: string
(date-time)
The date and time the billing cycle ends.
-
cycleStarts: string
(date-time)
The date and time the billing cycle starts.
-
disputed: number
The amount in the bill that is in dispute.
-
due: number
The amount due for the bill.
-
dueDate: string
(date-time)
The date and time the bill is due.
-
extension: object
extension
The extended attributes.
-
hierarchySize: integer
(int32)
The number of bills in a hierarchy.
-
id(required): string
The ID.
-
name: string
he name of the bill.
-
originalBillNo: string
The bill number associated with the original bill.
-
parent: object
ResourceRef
-
parentAccountRef: object
ResourceRef
-
parentCompanyName(required): string
The company name of the parent associated with the bill.
-
parentFirstName: string
The first name of the parent associated with the bill.
-
parentLastName: string
The last name of the parent associated with the bill.
-
parentSalutation(required): string
The title of the parent associated with the bill.
-
previousTotal: number
The previous total for the bill.
-
receivedForBill: number
The payment amount received for the bill.
-
recurringCharges: number
The total amount of all recurring charges in the bill.
-
subordsTotal: number
The total amount from all subordinates, if the bill is a parent in a billing hierarchy.
-
totalDue: number
The total due for the bill.
-
transfered: number
The amount in the bill that has been transferred.
-
writeoff: number
The amount in the bill that has been written off.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
The details of the bills to transfer the balance to.
Nested Schema : bill
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
adjusted: number
The amount on the bill that was adjusted.
-
amount: number
The amount to be allocated.
-
arActionsAmtExcludingPayments: number
The total of all accounts receivable actions applied toward the bill, excluding any payments.
-
arBillinfoRef: object
ResourceRef
-
billDisputed: boolean
Whether the bill includes a disputed item (true) or not (false).
-
billInfoId: string
The ID of the bill unit associated with the bill.
-
billNo: string
The bill number.
-
billPaidDate(required): string
(date-time)
The date and time the bill was paid.
-
billUnitRef: object
ResourceRef
-
creationDate(required): string
(date-time)
The date and time the bill was created.
-
currency: integer
(int32)
The type of currency associated with the bill.
-
currentTotal: number
The current total of the bill.
-
cycleEnds: string
(date-time)
The date and time the billing cycle ends.
-
cycleStarts: string
(date-time)
The date and time the billing cycle starts.
-
disputed: number
The amount in the bill that is in dispute.
-
due: number
The amount due for the bill.
-
dueDate: string
(date-time)
The date and time the bill is due.
-
extension: object
extension
The extended attributes.
-
hierarchySize: integer
(int32)
The number of bills in a hierarchy.
-
id(required): string
The ID.
-
name: string
he name of the bill.
-
originalBillNo: string
The bill number associated with the original bill.
-
parent: object
ResourceRef
-
parentAccountRef: object
ResourceRef
-
parentCompanyName(required): string
The company name of the parent associated with the bill.
-
parentFirstName: string
The first name of the parent associated with the bill.
-
parentLastName: string
The last name of the parent associated with the bill.
-
parentSalutation(required): string
The title of the parent associated with the bill.
-
previousTotal: number
The previous total for the bill.
-
receivedForBill: number
The payment amount received for the bill.
-
recurringCharges: number
The total amount of all recurring charges in the bill.
-
subordsTotal: number
The total amount from all subordinates, if the bill is a parent in a billing hierarchy.
-
totalDue: number
The total due for the bill.
-
transfered: number
The amount in the bill that has been transferred.
-
writeoff: number
The amount in the bill that has been written off.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Response
200 Response
The balance was transferred successfully.
400 Response
The bill doesn't exist.
500 Response
An internal server error occurred.
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"
}
}