Create a Balance Transfer

post

/bcws/webresources/v1.0/billunits/balancegroups/transferbalance

Creates a balance transfer.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/xml ()
The details of the balance transfer to create. The minimum required parameters are:
  • sourceRef
  • targetRef
  • transferAmount
The source and target can be balance group IDs, account IDs, account numbers, service IDs, or service numbers/MSISDN numbers.
Root Schema : schema
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : LocationDetails
Type: object
Show Source
Nested Schema : SourceRef
Type: object
The balance transfer's source.
Show Source
Nested Schema : TargetRef
Type: object
The balance transfer's target.
Show Source
Request Body - application/json ()
The details of the balance transfer to create. The minimum required parameters are:
  • sourceRef
  • targetRef
  • transferAmount
The source and target can be balance group IDs, account IDs, account numbers, service IDs, or service numbers/MSISDN numbers.
Root Schema : schema
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : LocationDetails
Type: object
Show Source
Nested Schema : SourceRef
Type: object
The balance transfer's source.
Show Source
Nested Schema : TargetRef
Type: object
The balance transfer's target.
Show Source
Back to Top

Response

201 Response

The balance was created succesfully.

400 Response

The request isn't valid.

500 Response

An internal server error occurred.
Back to Top

Examples

This example shows how to transfer a balance 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/billunits/balancegroups/transferbalance' -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 that specifies the balance to transfer.

Example of Request Body

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

{
   "description":"Balance transfer",
   "sourceRef":{
      "id":"90989098",
      "type":"service"
   },
   "targetRef":{
      "id":"89878987",
      "type":"service"
   },
   "transferAmount":10,
   "transferAmountType":1000095,
   "validFrom":"2021-09-21T13:14:53",
   "validTo":"2023-12-21T13:14:53",
   "chargeSource":"true",
   "chargeDestination":"true",
   "sourceLocation":{
      "locale":"Bangalore;Karnataka;560076;IN"
   },
   "targetLocation":{
      "locale":"Bangalore;Karnataka;560076;BT"
   }
}

Example of Response Body

This example shows the contents of the response body in JSON format.

{
    "extension": null,
    "id": "0.0.0.1+-event-audit-transfer_balance+3355",
    "uri": "http://host:port/bcws/webresources/v1.0/billunits/balancegroups/transferbalance/0.0.0.1+-event-audit-transfer_balance+3355",
    "transferAmount": 10,
    "transferAmountType": 1000095,
    "sourceRef": {
        "id": "90989098",
        "type": "service"
    },
    "targetRef": {
        "id": "89878987",
        "type": "service"
    },
    "sourceBucket": [
        {
            "validFrom": 1647993600000,
            "validTo": 0,
            "currentBalance": -2760.0
        }
    ],
    "targetBucket": [
        {
            "validFrom": 1647993600000,
            "validTo": 0,
            "currentBalance": -4390
        },
        {
            "validFrom": 1632230093000,
            "validTo": 1703164493000,
            "currentBalance": -50.0
        }
    ],
    "sourceTransferFee": {
        "amount": 3.00,
        "feeTax": 0.21,
        "resourceId": 840
    },
    "targetTransferFee": {
        "amount": 3.00,
        "feeTax": 0.15,
        "resourceId": 840
    }
}
Back to Top