Allocate a Payment to Bills

post

/bcws/webresources/v1.0/allocations/payment/{id}/bills

Allocates a payment to one or more bills that you specify.

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

201 Response

The payment was allocated to the bills successfully.

500 Response

An internal server error occurred
Back to Top

Examples

This example shows how to allocate a payment to 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/allocations/payment/0.0.0.1+-item-payment+128048/bills' -H 'content-type: application/json' -d @allocateToBill.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.
  • allocateToBill.json is the JSON file that specifies how to allocate the payment.

Example of Request Body

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

[
  {
    "extension": null,
    "id": "0.0.0.1+-bill+200506",
    "accountRef": {
      "id": "0.0.0.1+-account+81329",
      "uri": null
    },
    "adjusted": -0.5,
    "arBillinfoRef": {
      "id": "0.0.0.1+-billinfo+78769",
      "uri": null
    },
    "billUnitRef": {
      "id": "0.0.0.1+-billinfo+78769",
      "uri": null
    },
    "billNo": "B1-641",
    "creationDate": null,
    "currency": null,
    "disputed": 0,
    "currentTotal": 22.95,
    "due": 22.45,
    "previousTotal": -1341.73,
    "totalDue": 22.95,
    "receivedForBill": 0,
    "arActionsAmtExcludingPayments": -0.5,
    "cycleEnds": 1607673600000,
    "name": null,
    "parent": null,
    "hierarchySize": 0,
    "parentAccountRef": null,
    "parentFirstName": null,
    "parentLastName": null,
    "parentCompanyName": null,
    "parentSalutation": null,
    "cycleStarts": 1605081600000,
    "subordsTotal": 0,
    "transfered": 0,
    "writeoff": 0,
    "amount": 0.5,
    "billInfoId": "Bill Unit(1)",
    "billPaidDate": 0,
    "recurringCharges": null,
    "billDisputed": null,
    "originalBillNo": null
  }
]

Example of Response Body

If successful, the response code 204 is returned with no response body.

Back to Top