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

Example of Creating a B2B User


This example shows you how to use the users Web service to create a B2B user.

Operation

Use the following operation to create a B2B user (for SSO, not enrollment):

POST /users

Sample URL

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

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

Sample XML Input Rules

The following are the XML input rules:

  • Tags in bold are required, and the corresponding fields cannot be updated.
  • If tags are not present, then the corresponding fields are set to the default values.
Sample XML Input

The following is an example of XML input:

<userProfile>
<userId>mdhoni</userId>
<role>Manager</role>
<firstName>Mahendra</firstName>
<lastName>Dhoni</lastName>
<addressLine1>j street apt 1900</addressLine1>
<city>boston</city>
<state>MA</state>
<zip>04109</zip>
<country>USA</country>
<homePhone>555-111-1884</homePhone>
<email>mdhoni@example.com</email>
<paperOn>Y</paperOn>
<language>en_US</language>
<companyId>Dutch Home Insurance</companyId>
<userType>b2c</userType>
</userProfile>

Sample JSON Input

The following is an example of JSON input:

{
"userId":"rsamb2b5",
"role":"Manager",
"firstName":"Rob",
"lastName":"Sunny",
"email":"rs002@example.com",
"language":"en_US",
"companyId":"CUELLE",
"userType":"b2b"
}

Response Message

The following is an example of the response message:

User Create Success

Visit <link>http://myhost.example.com:7017/rs/api/v2/users/mdhoni</link>

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