Quick Start

You can make many types of HTTP requests using the Oracle Loyalty Cloud REST API. You can easily make requests to view, create, update, or delete records. As an example, let's look at how to send a simple REST HTTP request to find out the structure of a member object.

Step 1: Consider Before You Start

Review the basics. If you're new to REST APIs, make sure you understand the basics of REST and JSON, and scan our list of important terms.

Review roles and privileges. You must have the necessary security roles and privileges to use the GET, POST, PATCH, and DELETE methods on parent and child resources. For details, see:

Review opt-in requirements. Some REST resources or their attributes may be associated with features that require opt-in before you can use them. You must make sure that you enable opt-in features before you start.

Choose a REST client. REST APIs connect software programs over the HTTP protocol. You need a software client to send the HTTP requests. In our examples, we use cURL. But, cURL isn't the only tool you can use. To help you choose one, see Work with your REST Client.

Step 2: Get Your Oracle Loyalty Account Info

To make a REST HTTP request, you need to gather a few bits of information:

  • REST Server URL. Typically, the URL of your Oracle Cloud service. For example, https://servername.fa.us2.oraclecloud.com.
  • User name and password. An Oracle Cloud service user with permissions to access the resources you're using.

You can find the REST Server URL, user name, and password in the welcome email sent to your Oracle Cloud service administrator.

Step 3: Configure Your Client

With the information gathered so far, you're ready to configure your client to send a REST HTTP request.

  1. Construct the request URL. The URL consists of the server name and the resource path:

    https://<server>/<resource-path>

    The <server> is the REST Server URL from Step 2, as in:

    https://servername.fa.us2.oraclecloud.com

    The <resource-path> is the relative path or endpoint to the resource you're working with. You can pick any endpoint in All REST Endpoints. However, some resources or their attributes may be associated with features that require opt-in before you can use them. Ask your implementation manager which features are opted in for your company.

    In our example, we're interested in the Members resource or its attributes, which requires us to opt in the feature associated with it.

    /crmRestApi/resources/11.13.18.05/loyMembers

    Combine the REST Server URL and, in this example, the Members resource path and your request URL is complete. For more information, see URL Paths.

    https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers

    In a client, such as Postman, you enter this combined URL in the Request URL field.

    Note:

    If you're using Visual Builder Studio to access REST APIs, see Create a Service Connection from a Service Specification. To access REST APIs using Oracle Integration Cloud, see Configure the REST Adapter to Consume an External REST API with No Metadata Described in a Document. You can also build your own client to access REST resources. To build a client using the Java programming language, see Accessing REST Resources with the JAX-RS Client API.

  2. Provide your account information. Include your user name and password (from Step 2) in the client. For example, if you are using cURL, you can specify your account information using the -u cURL command as follows:

    -u <username:password>

    In a client such as Postman, you enter the user name and password on the Authorization tab. This screenshot shows how to specify this information in Postman:

    Postman example with basic authentication, user name, and password
  3. Set the media type. Media type defines the structure of the HTTP payloads exchanged between the server and the client. For example, if you're using cURL, you can specify a resource item media type using the header -H command as follows:

    -H 'Content-Type: application/vnd.oracle.adf.resourceitem+json'

    For any request that has a request body (like POST or PATCH), you must include the Content-Type request header. For more on media types, see Supported Media Types.

When you're done, the complete cURL command should look like this:

curl -u <username:password> \
 -X GET https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/describe \
 -H 'Content-Type: application/vnd.oracle.adf.resourceitem+json'  | json_pp

If you're not familiar with any of the syntax used in the example, check out Work with your REST Client.

Depending on your business requirements, you might want to set the REST Framework or configure Cross-Origin Resource Sharing (CORS) now to fine-tune the REST API behavior. Otherwise, you're ready to move on to Step 4.

Step 4: Authenticate and Authorize

Now that you've configured the client with a complete request URL, it's time to authenticate and authorize yourself. Authentication proves that your credentials are genuine, and authorization allows you to apply your access privileges.

Authentication

To make sure data access over a network is secure, Oracle Fusion Cloud Applications REST APIs use a global Oracle Web Services Manager (OWSM) security policy called Multi Token Over SSL RESTful Service Policy (oracle/multi_token_over_ssl_rest_service_policy). This security policy enforces the following authentication standards:

  • Basic authentication over SSL (Secure Socket Layer), which extracts the user name and password credentials from the HTTP header.
  • SAML 2.0 bearer token in the HTTP header over SSL , which extracts a SAML 2.0 bearer assertion (XML security token).
  • Jason Web Token in the HTTP header over SSL, which extracts the user name from the JWT.

You must select one of the standards. Let's look at our example using Basic authentication over SSL.

Note:

Oracle REST APIs support SSL/TLS 1.3 version. Transport Layer Security (TLS) allows clients and servers to communicate over the secured layer, where data travels in an encrypted format understood only by the involved parties. TLS supports various methods of key exchange and data encryption, and authenticates message integrity.

To authenticate, you must submit the user name and password for your Oracle Cloud account. Typically, the user name and password are encoded in Base64 format, as in:

curl \
-X GET https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/describe \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-H 'Content-Type: application/vnd.oracle.adf.resourceitem+json'

Alternatively, you can use the -u cURL option to pass the user name and password for your Oracle Cloud account, as in this example:

curl -u username:password \
-X GET https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/describe \
-H 'Content-Type: application/vnd.oracle.adf.resourceitem+json'

Your authorization and authentication information gets passed in the Authorization key of the request header. When passing tokens (SAML or JWT) in Postman, the Authorization key must include Bearer, followed by the token, as shown in this screenshot:

Passing of the authorization and authentication information in Postman

Authorization

Authorization enforces access privileges by service role. Access to an object determines access to a resource. So, make sure that your user has the proper role.

For additional details, including a list of specific roles for accessing a resource, see:

Step 5: Send an HTTP Request

You're almost done. Now that your authentication and authorization are set, you're ready to send a test HTTP request. Continuing with our example, you want to get all the information about the structure of the Member object in REST. You can do this using the describe action in cURL:

curl -u username:password \
 -X GET https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/describe \
-H 'Content-Type: application/vnd.oracle.adf.resourceitem+json'

This is how the request looks in Postman:

Example of a request in Postman.

If your request for information about the Member object is successful, you receive a response with a body similar to the following abbreviated example. If your request fails, and you're using cURL, review the response comments, adjust your request, and then try again. If you're using other clients, review the failure Status Codes, and then try again.

{
    "Resources": {
        "loyMembers": {
            "discrColumnType": true,
            "title": "Loyalty Member",
            "attributes": [
                {
                    "name": "LoyMemberId",
                    "type": "integer",
                    "updatable": true,
                    "mandatory": true,
                    "queryable": true,
                    "allowChanges": "always",
                    "precision": 18,
                    "hasDefaultValueExpression": true,
                    "title": "Loyalty Member ID",
                    "annotations": {
                        "description": "Primary key of member"
                    }
                },
                {
                    "name": "MemberClassCode",
                    "type": "string",
                    "updatable": true,
                    "mandatory": false,
                    "queryable": true,
                    "allowChanges": "always",
                    "precision": 30,
                    "title": "Member Class",
                    "controlType": "choice",
                    "maxLength": "30",
                    "lov": {
                        "childRef": "MemberClass",
                        "attributeMap": [
                            {
                                "source": "LookupCode",
                                "target": "MemberClassCode"
                            }
                        ],
                        "displayAttributes": [
                            "Meaning"
                        ],
                        "lovResourcePath": [
                            {
                                "resource": "fndStaticLookups",
                                "filter": "?finder=LookupTypeActiveEnabledOrBindCodeFinder%3BBindLookupType%3DORA_LOY_MEM_CLASS"
                            }
                        ]
                    },
                    "annotations": {
                        "description": "Member class code"
                    }
                },
                {
                    "name": "MemberGrpCode",
                    "type": "string",
                    "updatable": true,
                    "mandatory": false,
                    "queryable": true,
                    "allowChanges": "always",
                    "precision": 30,
                    "title": "Member Group",
                    "controlType": "choice",
                    "maxLength": "30",
                    "lov": {
                        "childRef": "MemberGroup",
                        "attributeMap": [
                            {
                                "source": "LookupCode",
                                "target": "MemberGrpCode"
                            }
                        ],
                        "displayAttributes": [
                            "Meaning"
                        ],
                        "lovResourcePath": [
                            {
                                "resource": "fndStaticLookups",
                                "filter": "?finder=LookupTypeActiveEnabledOrBindCodeFinder%3BBindLookupType%3DORA_LOY_MEM_GRP"
                            }
                        ]
                    },
                    "annotations": {
                        "description": "Member group code"
                    }
                },
                {
                    "name": "MemberNumber",
                    "type": "string",
                    "updatable": true,
                    "mandatory": true,
                    "queryable": true,
                    "allowChanges": "always",
                    "precision": 30,
                    "hasDefaultValueExpression": true,
                    "title": "Member Number",
                    "maxLength": "30",
                    "annotations": {
                        "description": "Member number"
                    }
                },
                {
                    "name": "MemberPhaseCode",
                    "type": "string",
                    "updatable": true,
                    "mandatory": false,
                    "queryable": true,
                    "allowChanges": "always",
                    "precision": 30,
                    "title": "Member Phase",
                    "controlType": "choice",
                    "maxLength": "30",
                    "lov": {
                        "childRef": "MemberPhase",
                        "attributeMap": [
                            {
                                "source": "LookupCode",
                                "target": "MemberPhaseCode"
                            }
                        ],
                        "displayAttributes": [
                            "Meaning"
                        ],
                        "lovResourcePath": [
                            {
                                "resource": "fndStaticLookups",
                                "filter": "?finder=LookupTypeActiveEnabledOrBindCodeFinder%3BBindLookupType%3DORA_LOY_MEM_PHASE"
                            }
                        ]
                    },
                    "annotations": {
                        "description": "Member phase code"
                    }
                },
                {
                    "name": "RelationshipType",
                    "type": "string",
                    "updatable": false,
                    "mandatory": true,
                    "queryable": false,
                    "allowChanges": "never",
                    "precision": 30,
                    "title": "Relationship Type",
                    "maxLength": "30",
                    "annotations": {
                        "description": "Relationship type"
                    }
                },
.
.
.
                {
                    "name": "PartyNumber",
                    "type": "string",
                    "updatable": false,
                    "mandatory": true,
                    "queryable": true,
                    "allowChanges": "never",
                    "precision": 30,
                    "title": "Registry ID",
                    "maxLength": "30",
                    "annotations": {
                        "description": "The Party Number of the contact associated to the Loyalty Member"
                    }
                }
            ],
            "collection": {
                "rangeSize": 25,
                "finders": [
                    {
                        "name": "MemNumSearch",
                        "title": "GetMemberByNumber",
                        "attributes": [
                            {
                                "name": "MemberNumber",
                                "type": "string",
                                "updatable": true,
                                "required": "Optional",
                                "queryable": false,
                                "allowChanges": "always"
                            }
                        ]
                    },
                    {
                        "name": "MemberUpdate",
                        "title": "GetMemberByNumber",
                        "attributes": [
                            {
                                "name": "MemberNumber",
                                "type": "string",
                                "updatable": true,
                                "required": "Optional",
                                "queryable": false,
                                "allowChanges": "always"
                            }
                        ]
                    },
                    {
                        "name": "PrimaryKey",
                        "attributes": [
                            {
                                "name": "LoyMemberId",
                                "type": "integer",
                                "updatable": true,
                                "mandatory": true,
                                "queryable": true,
                                "allowChanges": "always",
                                "precision": 18,
                                "hasDefaultValueExpression": true,
                                "title": "Loyalty Member ID"
                            }
                        ]
                    }
                ],
                "links": [
                    {
                        "rel": "self",
                        "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers",
                        "name": "self",
                        "kind": "collection"
                    }
                ],
                "actions": [
                    {
                        "name": "get",
                        "method": "GET",
                        "responseType": [
                            "application/vnd.oracle.adf.resourcecollection+json",
                            "application/json"
                        ]
                    },
                    {
                        "name": "create",
                        "method": "POST",
                        "requestType": [
                            "application/vnd.oracle.adf.resourceitem+json",
                            "application/json"
                        ],
                        "responseType": [
                            "application/vnd.oracle.adf.resourceitem+json",
                            "application/json"
                        ]
                    },
                    {
                        "name": "upsert",
                        "method": "POST",
                        "header": "Upsert-Mode=true",
                        "requestType": [
                            "application/vnd.oracle.adf.resourceitem+json",
                            "application/json"
                        ],
                        "responseType": [
                            "application/vnd.oracle.adf.resourceitem+json",
                            "application/json"
                        ]
                    }
                ]
            },
            "item": {
                "links": [
                    {
                        "rel": "lov",
                        "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/lov/MemberClass",
                        "name": "MemberClass",
                        "kind": "collection"
                    },
.
.
.
                    {
                        "rel": "canonical",
                        "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}",
                        "name": "canonical",
                        "kind": "item"
                    }
                ],
                "actions": [
                    {
                        "name": "get",
                        "method": "GET",
                        "responseType": [
                            "application/vnd.oracle.adf.resourceitem+json",
                            "application/json"
                        ]
                    },
                    {
                        "name": "update",
                        "method": "PATCH",
                        "requestType": [
                            "application/vnd.oracle.adf.resourceitem+json",
                            "application/json"
                        ],
                        "responseType": [
                            "application/vnd.oracle.adf.resourceitem+json",
                            "application/json"
                        ]
                    }
                ]
            },
            "annotations": {
                "description": "Member Data Object for Loyalty Member Service",
                "children": [
                    {
                        "name": "MemberAttributes",
                        "description": "Attributes associated with Member"
                    },
                    {
                        "name": "MemberReferrals",
                        "description": "Member Referrals associated with Member"
                    },
                    {
                        "name": "MemberTier",
                        "description": "Member tier object associated to the Member"
                    },
                    {
                        "name": "MemberTransactions",
                        "description": "Transaction Object Associated with Member"
                    },
                    {
                        "name": "cards",
                        "description": "Member card object associated to the Member"
                    },
                    {
                        "name": "promotions",
                        "description": "Member Enrollments into Enrollable Promotions."
                    },
                    {
                        "name": "vouchers",
                        "description": "Member voucher object associated to the Member"
                    }
                ],
                "categories": {
                    "lba": [
                        "SalesTop-Sales : LoyTop-Loyalty Top : LoyMember-Loyalty Member"
                    ],
                    "lbo": [
                        "CRM-CRM : LOY-Loyalty : ORA_LOY_LOYALTY_MEMBER-Loyalty Member"
                    ]
                }
            },
            "children": {
                "AccountType": {
                    "discrColumnType": false,
                    "attributes": [
                        {
                            "name": "LookupType",
                            "type": "string",
                            "updatable": false,
                            "mandatory": true,
                            "queryable": true,
                            "allowChanges": "never",
                            "precision": 30,
                            "title": "Lookup Type",
                            "maxLength": "30",
                            "properties": {
                                "DISPLAYWIDTH": "30"
                            }
                        },
                        {
                            "name": "LookupCode",
                            "type": "string",
                            "updatable": false,
                            "mandatory": true,
                            "queryable": true,
                            "allowChanges": "never",
                            "precision": 30,
                            "title": "Lookup Code",
                            "maxLength": "30",
                            "properties": {
                                "DISPLAYWIDTH": "30"
                            }
                        },
.
.
.
                        {
                            "name": "Tag",
                            "type": "string",
                            "updatable": false,
                            "mandatory": false,
                            "queryable": true,
                            "allowChanges": "never",
                            "precision": 150,
                            "title": "Tag",
                            "maxLength": "150"
                        }
                    ],
                    "collection": {
                        "rangeSize": 0,
                        "finders": [
                            {
                                "name": "LookupTypeActiveEnabledOrBindCodeFinder",
                                "title": "ByLookupTypeActiveEnabledOrBindCodeFinder",
                                "attributes": [
                                    {
                                        "name": "BindCurrentDate",
                                        "type": "date",
                                        "updatable": true,
                                        "required": "Optional",
                                        "queryable": false,
                                        "allowChanges": "always"
                                    },
                                    {
                                        "name": "BindLookupCode",
                                        "type": "string",
                                        "updatable": true,
                                        "required": "Optional",
                                        "queryable": false,
                                        "allowChanges": "always"
                                    },
                                    {
                                        "name": "BindLookupType",
                                        "type": "string",
                                        "updatable": true,
                                        "required": "Optional",
                                        "queryable": false,
                                        "allowChanges": "always"
                                    }
                                ]
                            },
                            {
                                "name": "LookupTypeFinder",
                                "title": "ByLookupTypeFinder",
                                "attributes": [
                                    {
                                        "name": "BindLookupType",
                                        "type": "string",
                                        "updatable": true,
                                        "required": "Optional",
                                        "queryable": false,
                                        "allowChanges": "always"
                                    }
                                ]
                            },
                            {
                                "name": "LookupTypeIsActiveEnabledFinder",
                                "title": "ByLookupTypeIsActiveEnabledFinder",
                                "attributes": [
                                    {
                                        "name": "BindCurrentDate",
                                        "type": "date",
                                        "updatable": true,
                                        "required": "Optional",
                                        "queryable": false,
                                        "allowChanges": "always"
                                    },
                                    {
                                        "name": "BindLookupType",
                                        "type": "string",
                                        "updatable": true,
                                        "required": "Optional",
                                        "queryable": false,
                                        "allowChanges": "always"
                                    }
                                ]
                            },
                            {
                                "name": "LookupTypeIsActiveFinder",
                                "title": "ByLookupTypeIsActiveFinder",
                                "attributes": [
                                    {
                                        "name": "BindCurrentDate",
                                        "type": "date",
                                        "updatable": true,
                                        "required": "Optional",
                                        "queryable": false,
                                        "allowChanges": "always"
                                    },
                                    {
                                        "name": "BindLookupType",
                                        "type": "string",
                                        "updatable": true,
                                        "required": "Optional",
                                        "queryable": false,
                                        "allowChanges": "always"
                                    }
                                ]
                            },
                            {
                                "name": "LookupTypeIsEnabledFinder",
                                "title": "ByLookupTypeIsEnabledFinder",
                                "attributes": [
                                    {
                                        "name": "BindLookupType",
                                        "type": "string",
                                        "updatable": true,
                                        "required": "Optional",
                                        "queryable": false,
                                        "allowChanges": "always"
                                    }
                                ]
                            },
                            {
                                "name": "PrimaryKey",
                                "attributes": [
                                    {
                                        "name": "LookupCode",
                                        "type": "string",
                                        "updatable": true,
                                        "mandatory": true,
                                        "queryable": true,
                                        "allowChanges": "never",
                                        "precision": 30,
                                        "title": "Lookup Code",
                                        "maxLength": "30",
                                        "properties": {
                                            "DISPLAYWIDTH": "30"
                                        }
                                    },
                                    {
                                        "name": "LookupType",
                                        "type": "string",
                                        "updatable": true,
                                        "mandatory": true,
                                        "queryable": true,
                                        "allowChanges": "never",
                                        "precision": 30,
                                        "title": "Lookup Type",
                                        "maxLength": "30",
                                        "properties": {
                                            "DISPLAYWIDTH": "30"
                                        }
                                    }
                                ]
                            }
                        ],
                        "links": [
                            {
                                "rel": "self",
                                "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/child/AccountType",
                                "name": "self",
                                "kind": "collection"
                            }
                        ],
                        "actions": [
                            {
                                "name": "get",
                                "method": "GET",
                                "responseType": [
                                    "application/vnd.oracle.adf.resourcecollection+json",
                                    "application/json"
                                ]
                            }
                        ]
                    },
                    "item": {
                        "links": [
                            {
                                "rel": "self",
                                "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/child/AccountType/{id}",
                                "name": "self",
                                "kind": "item"
                            },
                            {
                                "rel": "parent",
                                "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}",
                                "name": "parent",
                                "kind": "item"
                            },
                            {
                                "rel": "canonical",
                                "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/child/AccountType/{id}",
                                "name": "canonical",
                                "kind": "item"
                            }
                        ],
                        "actions": [
                            {
                                "name": "get",
                                "method": "GET",
                                "responseType": [
                                    "application/vnd.oracle.adf.resourceitem+json",
                                    "application/json"
                                ]
                            }
                        ]
                    },
                    "links": [
                        {
                            "rel": "self",
                            "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/child/AccountType/describe",
                            "name": "self",
                            "kind": "describe"
                        },
                        {
                            "rel": "canonical",
                            "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/child/AccountType/describe",
                            "name": "canonical",
                            "kind": "describe"
                        }
                    ]
                },
                "ContactLOV": {
                    "discrColumnType": false,
                    "title": "Contact",
                    "titlePlural": "Contacts",
                    "attributes": [
                        {
                            "name": "PersonProfileId",
                            "type": "integer",
                            "updatable": false,
                            "mandatory": true,
                            "queryable": false,
                            "allowChanges": "never",
                            "precision": 18,
                            "hasDefaultValueExpression": true,
                            "annotations": {
                                "description": "Unique identifier for the person profile"
                            }
                        },
                        {
                            "name": "PartyId",
                            "type": "integer",
                            "updatable": false,
                            "mandatory": true,
                            "queryable": true,
                            "allowChanges": "never",
                            "precision": 18,
                            "annotations": {
                                "description": "Identifier for the party. Foreign key to the HZ_PARTIES table."
                            }
                        },
                        {
                            "name": "LastUpdateDate",
                            "type": "datetime",
                            "updatable": false,
                            "mandatory": true,
                            "queryable": true,
                            "allowChanges": "never",
                            "title": "Last Updated Date",
                            "annotations": {
                                "description": "Who column: indicates the date and time of the last update of the row."
                            }
                        },
                        {
                            "name": "LastUpdatedBy",
                            "type": "string",
                            "updatable": false,
                            "mandatory": true,
                            "queryable": true,
                            "allowChanges": "never",
                            "precision": 64,
                            "title": "Last Updated By",
                            "maxLength": "64",
                            "properties": {
                                "DISPLAYWIDTH": "40"
                            },
                            "annotations": {
                                "description": "Who column: indicates the user who last updated the row."
                            }
                        },
                        {
                            "name": "CreationDate",
                            "type": "datetime",
                            "updatable": false,
                            "mandatory": true,
                            "queryable": true,
                            "allowChanges": "never",
                            "title": "Creation Date",
                            "annotations": {
                                "description": "Who column: indicates the date and time of the creation of the row."
                            }
                        },
                        {
                            "name": "CreatedBy",
                            "type": "string",
                            "updatable": false,
                            "mandatory": true,
                            "queryable": true,
                            "allowChanges": "never",
                            "precision": 64,
                            "title": "Created By",
                            "maxLength": "64",
                            "properties": {
                                "DISPLAYWIDTH": "40"
                            },
                            "annotations": {
                                "description": "Who column: indicates the user who created the row."
                            }
                        },
                        {
                            "name": "LastUpdateLogin",
                            "type": "string",
                            "updatable": false,
                            "mandatory": false,
                            "queryable": false,
                            "allowChanges": "never",
                            "precision": 32,
                            "title": "Last Update Login",
                            "maxLength": "32",
                            "properties": {
                                "DISPLAYWIDTH": "40"
                            },
                            "annotations": {
                                "description": "Who column: indicates the session login associated to the user who last updated the row."
                            }
                        },
                        {
                            "name": "DateOfBirth",
                            "type": "date",
                            "updatable": true,
                            "mandatory": false,
                            "queryable": true,
                            "allowChanges": "always",
                            "title": "Date of Birth",
                            "annotations": {
                                "description": "Date the person was born"
                            }
                        },
.
.
.
                        {
                            "name": "PrimaryEmailDoNotContactFlag",
                            "type": "string",
                            "updatable": true,
                            "mandatory": false,
                            "queryable": false,
                            "allowChanges": "always",
                            "maxLength": "0"
                        }
                    ],
                    "collection": {
                        "rangeSize": 0,
                        "finders": [
                            {
                                "name": "PartyIdAltKey",
                                "attributes": [
                                    {
                                        "name": "PartyId",
                                        "type": "integer",
                                        "updatable": true,
                                        "mandatory": true,
                                        "queryable": true,
                                        "allowChanges": "never",
                                        "precision": 18
                                    }
                                ]
                            },
.
.
.
                            {
                                "name": "PrimaryKey",
                                "attributes": [
                                    {
                                        "name": "PersonProfileId",
                                        "type": "integer",
                                        "updatable": true,
                                        "mandatory": true,
                                        "queryable": false,
                                        "allowChanges": "never",
                                        "precision": 18,
                                        "hasDefaultValueExpression": true
                                    }
                                ]
                            }
                        ],
                        "links": [
                            {
                                "rel": "self",
                                "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/child/ContactLOV",
                                "name": "self",
                                "kind": "collection"
                            }
                        ],
                        "actions": [
                            {
                                "name": "get",
                                "method": "GET",
                                "responseType": [
                                    "application/vnd.oracle.adf.resourcecollection+json",
                                    "application/json"
                                ]
                            }
                        ]
                    },
                    "item": {
                        "links": [
                            {
                                "rel": "self",
                                "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/child/ContactLOV/{id}",
                                "name": "self",
                                "kind": "item"
                            },
                            {
                                "rel": "parent",
                                "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}",
                                "name": "parent",
                                "kind": "item"
                            },
                            {
                                "rel": "canonical",
                                "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/child/ContactLOV/{id}",
                                "name": "canonical",
                                "kind": "item"
                            }
                        ],
                        "actions": [
                            {
                                "name": "get",
                                "method": "GET",
                                "responseType": [
                                    "application/vnd.oracle.adf.resourceitem+json",
                                    "application/json"
                                ]
                            }
                        ]
                    },
                    "annotations": {
                        "description": "A trading community person's profile information. For example this person is a married woman whose previous last name was Smith.",
                        "categories": {
                            "lba": [
                                "CdmTop-Customer Data Management",
                                "CdmTop-Customer Data Management : FoundationTop-Foundation",
                                "CdmTop-Customer Data Management : FoundationTop-Foundation : FoundationParties-Parties"
                            ]
                        }
                    },
                    "links": [
                        {
                            "rel": "self",
                            "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/child/ContactLOV/describe",
                            "name": "self",
                            "kind": "describe"
                        },
                        {
                            "rel": "canonical",
                            "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/loyMembers/{id}/child/ContactLOV/describe",
                            "name": "canonical",
                            "kind": "describe"
                        }
                    ]
                },
                "MemberAccrualType": {
                    "discrColumnType": false,
                    "attributes": [
                        {
                            "name": "LookupType",
                            "type": "string",
                            "updatable": false,
                            "mandatory": true,
                            "queryable": true,
                            "allowChanges": "never",
                            "precision": 30,
                            "title": "Lookup Type",
                            "maxLength": "30",
                            "properties": {
                                "DISPLAYWIDTH": "30"
                            }
                        },
.
.
.
                        {
                            "name": "Tag",
                            "type": "string",
                            "updatable": false,
                            "mandatory": false,
                            "queryable": true,
                            "allowChanges": "never",
                            "precision": 150,
                            "title": "Tag",
                            "maxLength": "150"
                        }
                    ],
.
.
.
                                {
                                    "name": "TotalLines",
                                    "type": "number",
                                    "updatable": false,
                                    "mandatory": false,
                                    "queryable": true,
                                    "allowChanges": "never",
                                    "title": "Total Lines",
                                    "properties": {
                                        "DisplayFlag": "N",
                                        "DisplayName": "Total Lines"
                                    }
                                },
                                {
                                    "name": "TransferMemId",
                                    "type": "integer",
                                    "updatable": false,
                                    "mandatory": false,
                                    "queryable": true,
                                    "allowChanges": "never",
                                    "precision": 18,
                                    "title": "Transfer Member",
                                    "properties": {
                                        "DisplayFlag": "Y",
                                        "DisplayName": "Transfer Member Id"
                                    }
                                },
                                {
                                    "name": "TransferTxnId",
                                    "type": "integer",
                                    "updatable": false,
                                    "mandatory": false,
                                    "queryable": true,
                                    "allowChanges": "never",
                                    "precision": 18,
                                    "title": "Transfer Transaction ID",
                                    "properties": {
                                        "DisplayFlag": "N",
                                        "DisplayName": "Transfer Transaction Id"
                                    }
                                },
                                {
                                    "name": "TrvClassCode",
                                    "type": "string",
                                    "updatable": false,
                                    "mandatory": false,
                                    "queryable": true,
                                    "allowChanges": "never",
                                    "precision": 30
                                }
                            ]
                        }
                    }
                }
            }
        }
    }
}

In a client such as Postman, the results are formatted and displayed in the Response section. For example, Postman lets you view the output in multiple formats. This screenshot shows the response in JSON.

Example of a response in Postman

Note:

When working with a resource that uses both an auto-generated unique identifier and a user-defined identifier to expose an entity relationship (foreign key), you must use only one of these parameters in the request payload in any of the CRUD actions. If you include both, the behavior isn't specified and may change without notice. To understand this, let's assume that the transaction resource includes a foreign key to a member resource. Suppose the member resource has a unique identifier LoyMemberId (300100125127098) and an alternative user-defined identifier called MemberNumber (300100125127099). When you crate a new transaction, or update a transaction's reference to a member, you must not include both the LoyMemberId and the MemberNumber parameters in the request payload.

Congratulations! Now you're ready to do more with your REST APIs.

  • Learn about common processes in the Use Cases section, such as how to create and process a loyalty transaction, or how to enroll a member to a loyalty program.
  • Explore the Learn More section to better manage collections.
  • Join the Oracle Developer Community, where you can share tips and advice with others.