Lists of Values
You
can use Lists of Values (LOVs) to retrieve frequently used static
data, such as country codes, zip codes, and state names, or to retrieve
resource specific values. You can get the values in an LOV through
a DESCRIBE
call.
The DESCRIBE
call for an API returns a list of all attributes, details of those
attributes, the look up values, and the reference details.
The following is the format of the resource URL.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/accounts/describe
The following is an example of the response body in JSON format.
{{ "Resources" : { "accounts" : { "discrColumnType" : false, "title" : "Account", "titlePlural" : "Accounts", "attributes" : [ { "name" : "PartyId", "type" : "integer", "updatable" : false, "mandatory" : true, "queryable" : true, "allowChanges" : "never", "precision" : 18, "hasDefaultValueExpression" : true, "title" : "Party ID", "annotations" : { "description" : "The unique identifier of the account." } }... { "name" : "Type", "type" : "string", "updatable" : true, "mandatory" : false, "queryable" : true, "allowChanges" : "always", "precision" : 30, "title" : "Type", "controlType" : "choice", "maxLength" : "30", "lov" : { "childRef" : "SalesProfileTypeLookupLOV", "attributeMap" : [ { "source" : "LookupCode", "target" : "Type" } ], "displayAttributes" : [ "Meaning" ], "lovResourcePath" : [ { "resource" : "fndStaticLookups", "filter" : "?finder=LookupTypeIsActiveEnabledFinder%3BBindLookupType%3DZCA_ACCOUNT_TYPE" } ] }, "annotations" : { "description" : "The account type that defines if the account is a sales account or a prospect or any other party type. The accepted values are defined in the lookup type ZCA_ACCOUNT_TYPE. It is defaulted to ZCA_CUSTOMER if no value is provided." } }, ... }
lovResourcePath
section of the payload.
childRef
: Contains the display name of the LOV.resource
: Contains the top level resource that contains specific LOVs.filter
: Contains the specific finder name, finder variable, and the finder value
For example, you can use
the finder LookupTypeIsActiveEnabledFinder
, the finder variable BindLookupType
, and the lookup type ZCA_ACCOUNT_TYPE
, to get the types of Accounts, Prospect or Sales Account.
The following is the format of the cURL command.
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups?finder=LookupTypeIsActiveEnabledFinder;BindLookupType=ZCA_ACCOUNT_TYPE
The following is an example of the response body in JSON format.
{ "items": [ { "LookupType": "ZCA_ACCOUNT_TYPE", "LookupCode": "ZCA_CUSTOMER", "Meaning": "Customer", "Description": null, "EnabledFlag": "Y", "StartDateActive": null, "EndDateActive": null, "DisplaySequence": 1, "CreatedBy": "SEED_DATA_FROM_APPLICATION", "CreationDate": "2013-10-24T23:05:27.018+00:00", "LastUpdateDate": "2018-05-16T02:26:14.623+00:00", "LastUpdateLogin": "-1", "LastUpdatedBy": "SEED_DATA_FROM_APPLICATION", "Tag": null, "links": [ { "rel": "self", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups/0002000000105A43415F4143434F554E545F545950450000000C5A43415F435553544F4D4552", "name": "fndStaticLookups", "kind": "item" }, { "rel": "canonical", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups/0002000000105A43415F4143434F554E545F545950450000000C5A43415F435553544F4D4552", "name": "fndStaticLookups", "kind": "item" } ] }, { "LookupType": "ZCA_ACCOUNT_TYPE", "LookupCode": "ZCA_PROSPECT", "Meaning": "Prospect", "Description": null, "EnabledFlag": "Y", "StartDateActive": null, "EndDateActive": null, "DisplaySequence": 2, "CreatedBy": "SEED_DATA_FROM_APPLICATION", "CreationDate": "2013-10-24T23:05:27.042+00:00", "LastUpdateDate": "2018-05-16T02:26:14.623+00:00", "LastUpdateLogin": "-1", "LastUpdatedBy": "SEED_DATA_FROM_APPLICATION", "Tag": null, "links": [ { "rel": "self", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups/0002000000105A43415F4143434F554E545F545950450000000C5A43415F50524F5350454354", "name": "fndStaticLookups", "kind": "item" }, { "rel": "canonical", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups/0002000000105A43415F4143434F554E545F545950450000000C5A43415F50524F5350454354", "name": "fndStaticLookups", "kind": "item" } ] } ], "count": 2, "hasMore": false, "limit": 25, "offset": 0, "links": [ { "rel": "self", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/fndStaticLookups", "name": "fndStaticLookups", "kind": "collection" } ] }