This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Accounts
Overview
The following operations allow you to work with accounts. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with accounts, see Sample configuration .
For more details click Accounts.
Operation | Description |
---|---|
createAnAccount | Creates a new account. |
updateAnAccount | Updates an account. |
getAListOfAccounts | Retrieves a list of accounts. |
getAnAccount | Retrieves the details of an account associated with the account id. |
deleteAnAccount | Deletes an account associated with the specified account id. |
Operation Details
This section provides further details on the operations related to Accounts.
Create An Account
The createAnAccount
operation creates a new account.
<eloquaStandardAPI.createAnAccount> <address1>20 palm Grove</address1> <address2>Kollupitiya</address2> <address3>Colombo</address3> <name>20 palm Grove</name> <city>Colombo</city> <province>Western</province> <postalCode>00300</postalCode> <country>Sri Lanka</country> <businessPhone>0111234567</businessPhone> <fieldValues>[{"id": "5","value": "new field value"}]</fieldValues> </eloquaStandardAPI.createAnAccount>
properties
address1Â Â Â Â Â :
This field will contain Street Number, Street Name, or maybe PO Box.address2Â Â Â Â Â :
This field will contain Apartment, Floor, Suite, Bldg # or more specific information within Address1.address3Â Â Â Â Â :
The will contain specific office/room in a building or apartment.name         :
Name of the account to create an account on this name.city         :
The city, in which the address 1 is located.province     :
The province, in which the city is located.postalCode   :
The postal code of the province.country      :
The country of the address.businessPhone
:fieldValues  :
The array of the custom fields.
Sample request
Following is a sample REST/JSON request that can be handled by the createAnAccount
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "name":"my account", "address1":"20 palm Grove", "address2":"Kollupitiya", "address3":"Colombo", "city":"Colombo", "province":"Western", "postalCode":"00300", "country":"Sri Lanka", "businessPhone":"0111234567", "fieldValues":[{"id": "5","value": "new field value"}] }
Update An Account
The updateAnAccount
operation updates an account.
<eloquaStandardAPI.updateAnAccount> <accountId>1</accountId> <address1>20 palm Grove</address1> <address2>Kollupitiya</address2> <address3>Colombo</address3> <name>20 palm Grove</name> <city>Colombo</city> <province>Western</province> <postalCode>00300</postalCode> <country>Sri Lanka</country> <businessPhone>0111234567</businessPhone> <fieldValues>[{"id": "5","value": "new field value"}]</fieldValues> </eloquaStandardAPI.updateAnAccount>
properties
accountId    :Â
Unique identifier of the account.address1Â Â Â Â Â :
This field will contain Street Number, Street Name, or maybe PO Box.address2Â Â Â Â Â :
This field will contain Apartment, Floor, Suite, Bldg # or more specific information within Address1.address3Â Â Â Â Â :
The will contain specific office/room in a building or apartment.name         :
Name of the account to create an account on this name.city         :
The city, in which the address 1 is located.province     :
The province, in which the city is located.postalCode   :
The postal code of the province.country      :
The country of the address.businessPhone
:fieldValues  :
The array of the custom fields.
Sample request
Following is a sample REST/JSON request that can be handled by the updateAnAccount
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "accountId":"1", Â "name":"my account", "address1":"20 palm Grove", "address2":"Kollupitiya", "address3":"Colombo", "city":"Colombo", "province":"Western", "postalCode":"00300", "country":"Sri Lanka", "businessPhone":"0111234567", "fieldValues":[{"id": "5","value": "new field value"}] }
Get A List Of Accounts
The getAListOfAccounts
operation retrieves all accounts.
<eloquaStandardAPI.getAListOfAccounts> <count>2</count> <depth>1</depth> <search></search> <page>1</page> <orderBy></orderBy> <lastUpdatedAt>1426066807</lastUpdatedAt> <viewId>1</viewId> </eloquaStandardAPI.getAListOfAccounts>
properties
count        :
The number of results in a page to display. This must me in between 1 and 1000.depth
        :search
       :page
         :orderBy
      :lastUpdatedAt
:viewId
       :
Sample Request
Following is a sample REST/JSON request that can be handled by getAListOfAccounts
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "count":2, "page":1, "lastUpdatedAt":1426066807, "depth":"Complete", "viewId":"1" }
Get An Account
The getAnAccount
operation retrieves the details of an account associated with the specified account id.
<eloquaStandardAPI.getAnAccount> <accountId>1</accountId> <depth>Complete</depth> <viewId>1</viewId> </eloquaStandardAPI.getAnAccount>
properties
accountId :Â
Unique identifier of the account.depth
    :viewId
   :
Sample request
Following is a sample REST/JSON request that can be handled by the getAnAccount
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "accountId":"1", "depth":"Complete", "viewId":"1" }
Delete An Account
The deleteAnAccount
operation deletes the account information associated with the specified account id.
<eloquaStandardAPI.deleteAnAccount> <accountId>1</accountId> </eloquaStandardAPI.deleteAnAccount>
properties
accountId :Â
Unique identifier of the account.
Sample request
Following is a sample REST/JSON request that can be handled by the deleteAnAccount
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "accountId":"1" }
Sample Configuration
Following is a sample proxy service that illustrates how to connect to Eloqua Standard API with the init
operation to use the getAListOfAccounts
operation. The sample request for this proxy can be found in getAListOfAccounts
sample request . You can use this sample as a template for using other operations in this category.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="eloqua_getAListOfAccounts" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="siteName" expression="json-eval($.siteName)"/> <property name="username" expression="json-eval($.username)"/> <property name="password" expression="json-eval($.password)"/> <property name="count" expression="json-eval($.count)"/> <property name="depth" expression="json-eval($.depth)"/> <property name="search" expression="json-eval($.search)"/> <property name="page" expression="json-eval($.page)"/> <property name="orderBy" expression="json-eval($.orderBy)"/> <property name="lastUpdatedAt" expression="json-eval($.lastUpdatedAt)"/> <property name="viewId" expression="json-eval($.viewId)"/> <eloquaStandardAPI.init> <siteName>{$ctx:siteName}</siteName> <username>{$ctx:username}</username> <password>{$ctx:password}</password> </eloquaStandardAPI.init> <eloquaStandardAPI.getAListOfAccounts> <count>{$ctx:count}</count> <depth>{$ctx:depth}</depth> <search>{$ctx:search}</search> <page>{$ctx:page}</page> <orderBy>{$ctx:orderBy}</orderBy> <lastUpdatedAt>{$ctx:lastUpdatedAt}</lastUpdatedAt> <viewId>{$ctx:viewId}</viewId> </eloquaStandardAPI.getAListOfAccounts> <respond/> </inSequence> <outSequence/> <faultSequence/> </target> <description/> </proxy>