Creating a Party or Organization using REST API – Oracle Fusion

In the next few posts, we will try to create the TCA hierarchy objects such as Organization, Party, Party Sites, Party Site Uses, Accounts, Account Sites, Contacts etc. using Webservice (and SOAP as a tool) .

Also, the FBDI process need to be used for large data imports like master conversion process and not for daily data integration with third party systems. For daily integrations, Webservices such as SOAP or REST need to be used.

After 20D release, Organizations will be created using REST API. Accounts, Sites, Site Usage, Profile will be created using SOAP Webservices.

In this post, we will see what is the data that is required to create a Party or Organization. Later we will run few queries to see the data created in Oracle Fusion.

Use POSTMAN or some other tool to run the following REST API.

Request URL: https://xxx-your-oracle.oraclecloud.com/crmRestApi/resources/11.13.18.05/hubOrganizations

Method: POST

Payload:

{
	   "PartyNumber":"9988770",
	   "SourceSystemReference":[
		  {
			 "SourceSystem":"FranSysCustom",
			 "SourceSystemReferenceValue":"9988770LCE"
		  }
	   ],
	   "OrganizationName":"Oracle Learnings",
	   "PartyUsageCode":"EXTERNAL_LEGAL_ENTITY",
	   "RawPhoneNumber":"9199199199",
	   "EmailAddress":"[email protected]",
	   "URL":"www.oracle.com",
	   "Address":[
		  {
			 "AddressType":"BILL_TO",
			 "Address1":"1234 Sample Address1",
			 "City":"Sample City",
			 "Country":"US",
			 "County":"Oakland",
			 "PostalCode":"94065",
			 "PostalPlus4Code":"",
			 "State":"NY"
		  }
	   ],
	   "CorpCurrencyCode":"USD",
	   "CurcyConvRateType":"Corporate",
	   "CurrencyCode":"USD",
	   "DUNSNumber":"123456789"
}

Upon running this, the response will have the Party ID and Party Site ID. You can use this Party ID to further create Accounts etc.

Queries:

select * from hz_parties where party_name = 'Oracle Learnings';
select * from hz_party_sites where party_id in (select party_id from hz_parties where party_name = 'Oracle Learnings');
select * 
from hz_party_site_uses 
where party_site_id in (select party_site_id 
                        from hz_party_sites 
                        where party_id in (select party_id from hz_parties where party_name = 'Oracle Learnings'))

select * 
from hz_locations 
where location_id in (select location_id from hz_party_sites where party_id in (select party_id from hz_parties where party_name = 'Oracle Learnings'))

And thus, your Organization / Party, Party Site, Party Site Use, Location is created with a single call to the REST API.