Allocate a Payment to Bill Items
post
/bcws/webresources/v1.0/allocations/payment/{id}/items
Allocates a payment to one or more bill items.
Request
Path Parameters
-
id(required): string
The ID of the payment to allocate.
Supported Media Types
- application/xml
- application/json
A list of bill items containing an allocated amount, the account ID, and the bill item ID. The minimum required parameters are:
- amount
- id
Nested Schema : billItem
Type:
object
The bill item details.
Show Source
-
accountName: string
The name of the account.
-
accountNumber: string
The account number associated with the bill item.
-
accountRef: object
ResourceRef
-
adjusted: number
The total amount from debit and credit adjustments made to the bill item.
-
aliasList: array
aliasList
The list of aliases in the bill item.
-
amount(required): number
The amount of the bill item.
-
arBillinfoRef: object
ResourceRef
-
arBillRef: object
ResourceRef
-
billInfoId: string
The ID of the /billinfo object.
-
billinfoRef: object
ResourceRef
-
billNo: string
The bill number.
-
billRef: object
ResourceRef
-
closedDate: string
(date-time)
The date and time the bill item was closed. If the bill item is reopened for an adjustment, this is reset until the bill item is closed again.
-
creationDate: string
(date-time)
The date and time the bill item was created.
-
currency: integer
(int32)
The currency for the bill item, copied from the currency of the associated account.
-
deltaDue: number
The delta amount due.
-
discount: number
The amount discounted for the bill item.
-
disputed: number
The total amount from disputes associated with the bill item.
-
due: number
The amount due for the bill item.
-
dueDate: string
(date-time)
The date when the amount in the bill item is due.
-
extension: object
extension
The extended attributes.
-
firstName: string
The first name of the account holder.
-
id(required): string
The ID.
-
itemNo: string
The bill item's number.
-
lastName: string
The last name of the account holder.
-
login: string
The username associated with the bill item.
-
name: string
The bill item's name.
-
received: number
The amount of payments or credits applied to the bill item.
-
serviceRef: object
ResourceRef
-
serviceTypeName: string
The name of the service type.
-
status: string
The status of the bill item: active (10100), inactive (10102), or closed (10103)
-
transfered: number
The amount transferred out of the bill item.
-
type: string
The bill item's type.
-
writeoff: number
The amount written off for the bill item.
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 : aliasList
Type:
array
The list of aliases in the bill item.
Show Source
-
Array of:
object AliasList
The list of aliases associated with the service.
Nested Schema : extension
Type:
object
The extended attributes.
A list of bill items containing an allocated amount, the account ID, and the bill item ID. The minimum required parameters are:
- amount
- id
Nested Schema : billItem
Type:
object
The bill item details.
Show Source
-
accountName: string
The name of the account.
-
accountNumber: string
The account number associated with the bill item.
-
accountRef: object
ResourceRef
-
adjusted: number
The total amount from debit and credit adjustments made to the bill item.
-
aliasList: array
aliasList
The list of aliases in the bill item.
-
amount(required): number
The amount of the bill item.
-
arBillinfoRef: object
ResourceRef
-
arBillRef: object
ResourceRef
-
billInfoId: string
The ID of the /billinfo object.
-
billinfoRef: object
ResourceRef
-
billNo: string
The bill number.
-
billRef: object
ResourceRef
-
closedDate: string
(date-time)
The date and time the bill item was closed. If the bill item is reopened for an adjustment, this is reset until the bill item is closed again.
-
creationDate: string
(date-time)
The date and time the bill item was created.
-
currency: integer
(int32)
The currency for the bill item, copied from the currency of the associated account.
-
deltaDue: number
The delta amount due.
-
discount: number
The amount discounted for the bill item.
-
disputed: number
The total amount from disputes associated with the bill item.
-
due: number
The amount due for the bill item.
-
dueDate: string
(date-time)
The date when the amount in the bill item is due.
-
extension: object
extension
The extended attributes.
-
firstName: string
The first name of the account holder.
-
id(required): string
The ID.
-
itemNo: string
The bill item's number.
-
lastName: string
The last name of the account holder.
-
login: string
The username associated with the bill item.
-
name: string
The bill item's name.
-
received: number
The amount of payments or credits applied to the bill item.
-
serviceRef: object
ResourceRef
-
serviceTypeName: string
The name of the service type.
-
status: string
The status of the bill item: active (10100), inactive (10102), or closed (10103)
-
transfered: number
The amount transferred out of the bill item.
-
type: string
The bill item's type.
-
writeoff: number
The amount written off for the bill item.
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 : aliasList
Type:
array
The list of aliases in the bill item.
Show Source
-
Array of:
object AliasList
The list of aliases associated with the service.
Nested Schema : extension
Type:
object
The extended attributes.
Response
201 Response
The payment was allocated successfully.
500 Response
An internal server error occurred.
Examples
This example shows how to allocate a payment to bill items 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/v1.0/allocations/payment/0.0.0.1+-item-payment+128048/items' -H 'content-type: application/json' -d @allocateToItems.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.
- allocateToItems.json is the JSON file that specifies the payment allocation to make.
Example of Request Body
This example shows the contents of the allocateToItems.json file sent as the request body.
[
{
"extension": null,
"id": "0.0.0.1+-item-cycle_forward+169656",
"name": "Cycle forward",
"type": "/item/cycle_forward",
"accountRef": {
"id": "0.0.0.1+-account+81329",
"uri": null
},
"arBillinfoRef": null,
"arBillRef": {
"id": "0.0.0.1+-bill+143952",
"uri": null
},
"billRef": {
"id": "0.0.0.1+-bill+143952",
"uri": null
},
"serviceRef": {
"id": "0.0.0.1+-service-ip+78705",
"uri": null
},
"billinfoRef": null,
"creationDate": null,
"closedDate": null,
"currency": null,
"deltaDue": null,
"disputed": 0,
"adjusted": -0.25,
"due": 9.7,
"itemNo": "B1-591,3",
"login": "34",
"received": 0,
"transfered": 0,
"writeoff": 0,
"amount": 1,
"discount": null,
"billNo": "B1-591",
"billInfoId": "Bill Unit(1)",
"firstName": "Marie",
"lastName": "Fortin",
"serviceTypeName": "ip",
"accountNumber": "0.0.0.1-81329",
"aliasList": [],
"status": null
}
]
Example of Response Body
If successful, the response code 204 is returned with no response body.