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-70</accountNumber>
<accountName>Account Name</accountName>
<contactName>Account owner</contactName>
<accountType>PREPAY</accountType>
<companyId>CUELLE</companyId>
<billCycleEndDay>21</billCycleEndDay>
<startDate pattern="MM/dd/yyyy">01/12/2015</startDate>
<billType>BF</billType>
<paperOnFlag>Y</paperOnFlag>
<billableFlag>Y</billableFlag>
<b2bFlag>Y</b2bFlag>
<contactInfo>
contactType>BILLTO</contactType>
<city>city</city>
<state>state</state>
<country>country</country>
<postalCode>01205</postalCode>
<address1>address1</address1>
<address2>address2</address2>
<address3>address3</address3>
<extReference>1</extReference>
</contactInfo>
<contactInfo>
<contactType>SHIPTO</contactType>
<city>city</city>
<state>state</state>
<country>country</country>
<postalCode>01205</postalCode>
<address1>address11</address1>
<address2>address22</address2>
<address3>address32</address3>
<extReference>2</extReference>
</contactInfo>
<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:

{
"accountId":"BS1|AC-B2B-123368-70",
"billerId":"BS1",
"accountNumber":"AC-B2B-123368-70",
"accountName":"Account Name",
"companyId":"CUELLE",
"contactName":" Account owner ",
"accountType":"PREPAY",
"startDate":{
"pattern":"MM/dd/yyyy",
"value":"01/12/2015"
},
"billCycleEndDay":21,
"billType":"BF",
"paperOnFlag":"Y",
"billableFlag":"Y",
"b2bFlag":"Y",
" flexField1":" flexField1",
" flexField2":" flexField2",
" flexField3":" flexField3",
" flexField4":" flexField4",
" flexField5":" flexField5",
" flexField6":" flexField6",
" flexField7":" flexField7",
" flexField8":" flexField8",
" flexField9":" flexField9",
" flexField10":" flexField10",
"contactInfo":[
{
"contactType":"BILLTO",
"city":"city",
"state":"state",
"country":"country",
"postalCode":"state",
"address1":"address1",
"address2":"address2",
"address3":"address3",
"extReference":"1"
},
{
"contactType":"CONTACT",
"city":"city",
"state":"state",
"country":"country",
"postalCode":"state",
"address1":"address11",
"address2":"address22",
"address3":"address33",
"extReference":"2"
}

]
}

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 © 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices.