Get Bill Items by Bill and Service ID
get
/bcws/webresources/v1.0/items/bill/{id}/by-service
Gets the bill items for the specified bill and service. The bill items are grouped based on service type.
Request
Path Parameters
-
id(required): string
The ID of the bill.
Query Parameters
-
expand(required): string
The accepted values are:
- parentonly retrieves only charges made by the parent.
- childonly retrieves only the child charges.
- all retrieves charges from the parent and all children.
-
serviceID(required): string
The service ID, which could be a login ID or a device ID to get specific items for that service. The default is to return all services.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/xml
- application/json
200 Response
The bill items were returned successfully.
Root Schema : BillDetails
Type:
object
The list of bill details associated with the payment.
Show Source
-
accountNumber(required): string
The account number associated with the bill.
-
billId(required): string
The bill ID.
-
billUnitId(required): string
The ID for the bill unit associated with 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.
-
dueAmount(required): number
The total amount due.
-
dueDate(required): string
(date-time)
The due date for the bill.
-
itemsAffected: array
itemsAffected
Affected bill items.
-
itemsAffectedCount: integer
(int64)
The number of bill items affected by the bill.
Nested Schema : itemsAffected
Type:
array
Affected bill items.
Show Source
-
Array of:
object ItemsAffected
Affected bill items.
Nested Schema : ItemsAffected
Type:
object
Affected bill items.
Show Source
-
accountNumber(required): string
The account number associated with the bill item.
-
amount(required): number
The bill item amount.
-
billNumber(required): string
The bill number associated with the bill item.
-
billUnitId(required): string
The ID of the bill unit associated with the bill item.
-
cycleEnds: string
(date-time)
The date and time the billing cycle ends.
-
cycleStarts: string
(date-time)
The date and time the billing cycle starts.
-
item(required): string
The bill item.
-
settledNonTaxedAmount(required): number
The nontaxable amount for the bill item settled by the payment.
-
settledTaxAmount(required): number
The amount of tax for the bill item settled by the payment.
-
settledTaxedAmount(required): number
The taxable amount for the bill item settled by the payment.
500 Response
An internal server error occurred.
Examples
This example shows how to get a bill's bill items, grouped by service, by submitting a GET request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X GET 'http://hostname:port/bcws/webresources/version/items/bill/0.0.0.1+-bill+211720/by-service'
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.
Example of Response Body
This example shows the contents of the response body in JSON format. You can see the bill items grouped separately under the IP service and the email service.
{
"extension": null,
"fromPayingAccount": {
"extension": null,
"account": {
"extension": null,
"id": null,
"accountRef": null,
"firstName": null,
"lastName": null,
"billItem": [
{
"extension": null,
"id": "0.0.0.1+-item-misc+210696",
"name": "Usage",
"type": "/item/misc",
"accountRef": {
"id": "0.0.0.1+-account+57615",
"uri": null
},
"arBillinfoRef": null,
"arBillRef": null,
"billRef": {
"id": "0.0.0.1+-bill+211720",
"uri": null
},
"serviceRef": {
"id": "0.0.0.0++0",
"uri": null
},
"billinfoRef": null,
"creationDate": null,
"closedDate": null,
"currency": null,
"deltaDue": null,
"disputed": 0,
"adjusted": 0,
"due": 0,
"dueDate": null,
"itemNo": "B1-646,1",
"login": "",
"received": 0,
"transfered": 0,
"writeoff": 0,
"amount": 0,
"discount": 0,
"billNo": null,
"billInfoId": null,
"accountName": null,
"firstName": null,
"lastName": null,
"serviceTypeName": null,
"accountNumber": "0.0.0.1-57615",
"aliasList": [],
"status": null
}
]
},
"services": [
{
"extension": null,
"id": "0.0.0.1+-service-email+165033",
"accountRef": {
"id": "0.0.0.1+-account+57615",
"uri": null
},
"deviceID": null,
"serviceID": "email@example.com",
"serviceType": "email",
"firstName": null,
"lastName": null,
"accountNumber": "0.0.0.1-57615",
"billItem": [
{
"extension": null,
"id": "0.0.0.1+-item-cycle_forward+214985",
"name": "Cycle forward",
"type": "/item/cycle_forward",
"accountRef": {
"id": "0.0.0.1+-account+57615",
"uri": null
},
"arBillinfoRef": null,
"arBillRef": null,
"billRef": {
"id": "0.0.0.1+-bill+211720",
"uri": null
},
"serviceRef": {
"id": "0.0.0.1+-service-email+165033",
"uri": null
},
"billinfoRef": null,
"creationDate": null,
"closedDate": null,
"currency": null,
"deltaDue": null,
"disputed": 0,
"adjusted": 0,
"due": 0,
"dueDate": null,
"itemNo": "B1-646,4",
"login": "email@example.com",
"received": 0,
"transfered": 0,
"writeoff": 0,
"amount": 0,
"discount": 0,
"billNo": null,
"billInfoId": null,
"accountName": null,
"firstName": null,
"lastName": null,
"serviceTypeName": "email",
"accountNumber": "0.0.0.1-57615",
"aliasList": [],
"status": null
}
]
},
{
"extension": null,
"id": "0.0.0.1+-service-ip+161387",
"accountRef": {
"id": "0.0.0.1+-account+57615",
"uri": null
},
"deviceID": null,
"serviceID": "service_ip",
"serviceType": "ip",
"firstName": null,
"lastName": null,
"accountNumber": "0.0.0.1-57615",
"billItem": [
{
"extension": null,
"id": "0.0.0.1+-item-cycle_forward+213033",
"name": "Cycle forward",
"type": "/item/cycle_forward",
"accountRef": {
"id": "0.0.0.1+-account+57615",
"uri": null
},
"arBillinfoRef": null,
"arBillRef": null,
"billRef": {
"id": "0.0.0.1+-bill+211720",
"uri": null
},
"serviceRef": {
"id": "0.0.0.1+-service-ip+161387",
"uri": null
},
"billinfoRef": null,
"creationDate": null,
"closedDate": null,
"currency": null,
"deltaDue": null,
"disputed": 0,
"adjusted": 0,
"due": 10,
"dueDate": null,
"itemNo": "B1-646,5",
"login": "service_ip",
"received": 0,
"transfered": 0,
"writeoff": 0,
"amount": 10,
"discount": 0,
"billNo": null,
"billInfoId": null,
"accountName": null,
"firstName": null,
"lastName": null,
"serviceTypeName": "ip",
"accountNumber": "0.0.0.1-57615",
"aliasList": [],
"status": null
}
]
}
]
},
"fromOtherAccounts": {
"extension": null,
"account": {
"extension": null,
"id": null,
"accountRef": null,
"firstName": null,
"lastName": null,
"billItem": []
},
"services": []
}
}