Create a Bill Unit

post

/bcws/webresources/v1.0/billunits

Creates a bill unit using the details specified in the request payload.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/xml ()
Root Schema : schema
Type: object
A bill unit.
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : balanceGroups
Type: array
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : PaymentMethod
Type: object
Show Source
Nested Schema : BalanceGroup
Type: object
Show Source
Nested Schema : balances
Type: array
The list of balances associated with the balance group.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : services
Type: array
Show Source
Nested Schema : Balances
Type: object
The list of balances associated with the balance group.
Show Source
Nested Schema : subBalances
Type: array
Show Source
Nested Schema : tempCreditLimit
Type: array
Show Source
Nested Schema : SubBalances
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : TempCreditLimit
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ServiceType
Type: object
Show Source
Nested Schema : aliasList
Type: array
The list of aliases associated with the service.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : AliasList
Type: object
The list of aliases associated with the service.
Show Source
Nested Schema : CreditCardType
Type: object
Show Source
Nested Schema : DirectDebitType
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : InvoiceType
Type: object
Show Source
Nested Schema : SepaType
Type: object
Show Source
Nested Schema : Details
Type: object
The offer details.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Request Body - application/json ()
Root Schema : schema
Type: object
A bill unit.
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : balanceGroups
Type: array
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : PaymentMethod
Type: object
Show Source
Nested Schema : BalanceGroup
Type: object
Show Source
Nested Schema : balances
Type: array
The list of balances associated with the balance group.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : services
Type: array
Show Source
Nested Schema : Balances
Type: object
The list of balances associated with the balance group.
Show Source
Nested Schema : subBalances
Type: array
Show Source
Nested Schema : tempCreditLimit
Type: array
Show Source
Nested Schema : SubBalances
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : TempCreditLimit
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ServiceType
Type: object
Show Source
Nested Schema : aliasList
Type: array
The list of aliases associated with the service.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : AliasList
Type: object
The list of aliases associated with the service.
Show Source
Nested Schema : CreditCardType
Type: object
Show Source
Nested Schema : DirectDebitType
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : InvoiceType
Type: object
Show Source
Nested Schema : SepaType
Type: object
Show Source
Nested Schema : Details
Type: object
The offer details.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Back to Top

Response

Supported Media Types

201 Response

The bill unit was created successfully.
Body ()
Root Schema : schema
Type: object
A bill unit.
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : balanceGroups
Type: array
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : PaymentMethod
Type: object
Show Source
Nested Schema : BalanceGroup
Type: object
Show Source
Nested Schema : balances
Type: array
The list of balances associated with the balance group.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : services
Type: array
Show Source
Nested Schema : Balances
Type: object
The list of balances associated with the balance group.
Show Source
Nested Schema : subBalances
Type: array
Show Source
Nested Schema : tempCreditLimit
Type: array
Show Source
Nested Schema : SubBalances
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : TempCreditLimit
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ServiceType
Type: object
Show Source
Nested Schema : aliasList
Type: array
The list of aliases associated with the service.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : AliasList
Type: object
The list of aliases associated with the service.
Show Source
Nested Schema : CreditCardType
Type: object
Show Source
Nested Schema : DirectDebitType
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : InvoiceType
Type: object
Show Source
Nested Schema : SepaType
Type: object
Show Source
Nested Schema : Details
Type: object
The offer details.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.

500 Response

An internal server error occurred.
Back to Top

Examples

This example shows how to create a bill unit 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/billunits' -H 'content-type: application/json' -d @createBillUnit.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.
  • createBillUnit.json is the JSON file that provides information about the bill unit to create.

Example of Request Body

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

{
   "id": null,
   "name": "BU2",
   "accountingCycleDom": 1,
   "accountingType": 1,
   "invoiceTemplate": "0.0.0.1 /config/business_profile 1238296",
   "correctiveInvoiceType": 0,
   "creationDate": null,
   "balanceGroups": [],
   "accountRef": {
      "id": "0.0.0.1+-account+255881"
   },
   "paymentInstrumentRef": {
      "id": "10001"
   },
   "parentAccountId": null,
   "parentFirstName": null,
   "parentLastName": null,
   "parentCompanyName": null,
   "parentSalutation": null,
   "parentAccountNumber": null,
   "billingFrequencyInMonths": 1,
   "paymentInstrumentName": null,
   "paymentType": 10001,
   "paymentMethod": {
      "invoice": {
         "details": {
            "invoiceId": "inv712",
            "deliveryPrefer": "1",
            "name": "Ashish Patel",
            "address": "500 Oracle Parkway",
            "city": "Redwood Shores",
            "state": "CA",
            "zip": "94065",
            "country": "US"
         },
         "accountRef": {
            "id": "0.0.0.1+-account+255881"
         },
         "paymentType": "10001"
      }
   },
   "arBillUnitRef": {}
}

Example of Response Body

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

{
   "extension": null,
   "id": "0.0.0.1+-billinfo+280023",
   "name": "BU2",
   "accountRef": {
      "id": "0.0.0.1+-account+255881",
      "uri": null
   },
   "accountingCycleDom": 1,
   "accountingType": 1,
   "balanceGroups": [
      {
         "extension": null,
         "id": "0.0.0.1+-balance_group+282583",
         "name": null,
         "services": [],
         "balances": [],
         "elem": null
      }
   ],
   "paymentInstrumentRef": {
      "id": "0.0.0.1+-payinfo-invoice+278999",
      "uri": null
   },
   "currency": 840,
   "currencySecondary": 0,
   "status": null,
   "arBillUnitRef": {
      "id": "0.0.0.1+-billinfo+280023",
      "uri": null
   },
   "parentBillUnitName": null,
   "parentAccountId": null,
   "parentFirstName": null,
   "parentLastName": null,
   "parentCompanyName": null,
   "parentSalutation": null,
   "parentAccountNumber": null,
   "invoiceTemplate": "0.0.0.1 /config/business_profile 1238296",
   "businessProfile": null,
   "wholesaleBilling": null,
   "correctiveInvoiceType": 0,
   "lastModified": 1613132512000,
   "creationDate": null,
   "accountingCyclesUntilBillCycleEnds": null,
   "billForCurrentCycleRef": {
      "id": "0.0.0.1+-bill+282071",
      "uri": null
   },
   "defaultBillUnit": null,
   "parentBillUnit": false,
   "billingFrequencyInMonths": 1,
   "accountingCycleStart": null,
   "accountingCycleEnd": null,
   "lastActualBillRef": null,
   "lastActualBillDate": null,
   "lastBillFromBillingRef": null,
   "billingCycleStart": 1613116800000,
   "billingCycleEnd": 1614585600000,
   "segment": "17",
   "daysInBillCycle": 17,
   "daysRemainingInBillCycle": 17,
   "exemptFromCollections": null,
   "scenarioRef": null,
   "numSuppressedCycles": null,
   "suppressed": null,
   "suppressionCyclesLeft": null,
   "collectionDate": null,
   "paymentInstrumentName": "10001inv712",
   "collectionDetailsRef": null,
   "inCollections": false,
   "paymentMethod": {
      "extension": null,
      "creditCard": null,
      "directDebit": null,
      "invoice": {
         "extension": null,
         "id": null,
         "name": null,
         "paymentType": 10001,
         "accountRef": {
            "id": "0.0.0.1+-account+255881",
            "uri": null
         },
         "correctiveInvoiceType": null,
         "details": {
            "invoiceId": "inv 712",
            "address": "500 Oracle Parkway",
            "city": "Redwood Shores",
            "country": "US",
            "deliveryPrefer": "1",
            "emailAddr": null,
            "name": "Ashish Patel",
            "state": "CA",
            "zip": "94065",
            "elem": null
         }
      },
      "sepa": null,
      "paymentType": null
   },
   "paymentType": 10001,
   "totalChildAccounts": null
}
Back to Top