Web Services Reference for Oracle Billing Insight > Examples of Web Services > Examples of the Accounts Web Service >

Example of Creating a B2B Billing Account


This example shows you how to use the accounts Web service to create a B2B billing account and add it to the company's billing hierarchy.

Operation

Use the following operation to create a B2B account:

POST /accounts

Sample URL

The following is a sample URL for this Web service example:

http://myhost.example.com:7017/rs/api/v2/accounts

Sample XML Input

The following is an example of XML input:

<accountInfo>
<billerId>BS1</billerId>
<accountNumber>AC-B2B-123368-99</accountNumber>
<accountName>Account Name</accountName>
<contactName>Account owner</contactName>
<accountType>UNK</accountType>
<companyId>CUELLE</companyId>
<billCycleEndDay>21</billCycleEndDay>
<startDate pattern="MM/dd/yyyy">06/12/2015</startDate>
<billType>BF</billType>
<paperOnFlag>Y</paperOnFlag>
<billableFlag>Y</billableFlag>
<b2bFlag>Y</b2bFlag>
<flexField1>flex1</flexField1>
<flexField2>flex2</flexField2>
<flexField3>flex3</flexField3>
<flexField4>flex4</flexField4>
<flexField5>flex5</flexField5>
<flexField6>flex6</flexField6>
<flexField7>flex7</flexField7>
<flexField8>flex8</flexField8>
<flexField9>flex9</flexField9>
<flexField10>flex10</flexField10>
</accountInfo>

Sample JSON Input

The following is an example of JSON input:

{
   "billerId": "BS1",
   "accountNumber": "AC-B2B-123368-99",
   "accountName": "Account Name",
   "contactName": "Account owner",
   "accountType": "UNK",
   "companyId": "CUELLE",
   "billCycleEndDay": "21",
   "startDate": {
      "@pattern": "MM/dd/yyyy",
      "#text": "06/12/2015"
   },
   "billType": "BF",
   "paperOnFlag": "Y",
   "billableFlag": "Y",
   "b2bFlag": "Y",
   "flexField1": "flex1",
   "flexField2": "flex2",
   "flexField3": "flex3",
   "flexField4": "flex4",
   "flexField5": "flex5",
   "flexField6": "flex6",
   "flexField7": "flex7",
   "flexField8": "flex8",
   "flexField9": "flex9",
   "flexField10": "flex10"
}

Response Message

The following is an example of the response message:

Account Create Success

Visit <link>http://myhost.example.com:7017/rs/api/v2/accounts/BS1%7C7836380B2B1</link>

Web Services Reference for Oracle Billing Insight Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.