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
Query Parameters
  • 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.
  • 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 Top

Response

Supported Media Types

200 Response

The bill items were returned successfully.
Body ()
Root Schema : BillDetails
Type: object
The list of bill details associated with the payment.
Show Source
Nested Schema : itemsAffected
Type: array
Affected bill items.
Show Source
Nested Schema : ItemsAffected
Type: object
Affected bill items.
Show Source

500 Response

An internal server error occurred.
Back to Top

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": []
    }
}
Back to Top