Oracle CRM On Demand REST API Developer's Guide > Using the Oracle CRM On Demand REST API > Creating Oracle CRM On Demand Resources >
Creating Oracle CRM On Demand Top-Level Resources
You can create Oracle CRM On Demand top-level resources by sending an HTTP POST request to the resource's URL. The following details are for a request to create an Accounts resource on the Oracle CRM On Demand Server:
- URL: OnDemand/user/Rest/latest/Accounts
- HTTP Method: POST
- Content-Type: application/vnd.oracle.adf.resource+json
- Request body:
{
"Accounts": [ { "AccountName": "test post", "Location": "Hometown", "AccountType": "Customer", "PublicCompany": true, "Region": "West", "MarketShare": 3, "NumberEmployees": 1, "OptimizedCustomNumber0":99 } ] }
The following are the details for the response to a successful request:
- HTTP Code: 201
- Content-Type: application/vnd.oracle.adf.resource+json
- Location: https://<host>/OnDemand/user/Rest/latest/Accounts/1QA2-21SEFX
- Response body:
{ "Accounts": [ { "Region": "West", "PublicCompany": true, "OptimizedCustomNumber0": 99, "MarketShare": 3, "Location": "Hometown", "AccountName": "test post", "NumberEmployees": 1, "AccountType": "Customer", "links": { "self": { "rel": "self", "href": "/OnDemand/user/Rest/latest/Accounts/1QA2-21SEFX" }, "canonical": { "rel": "canonical", "href": "/OnDemand/user/Rest/latest/Accounts/1QA2-21SEFX" }, "Opportunity": { "rel": "child", "href": "/OnDemand/user/Rest/latest/Accounts/1QA2-21SEFX/child/Opportunities" } } } ] }
|