Favorite REST APIs

Overview

The Favorite REST APIs support Oracle CPQ Favorites, Favorites Lists, Favorites Folder, Sales Users, and Sales Groups features. Refer to Sales Users for details about the Sales Users and Sales Groups REST API.

Administration

Favorites and Favorites Lists

ClosedGet User's List of Favorites

Get User's List of FavoritesGET Method

Description

This endpoint returns a list of all favorites available to the user.

URI Endpoint

/rest/v17/favorites

Endpoint Parameters

This endpoint supports the following query specifications. For more information, see Manage Collections.

  • q - Declares a query specification expression.
  • expand - Return child resource details.
  • limit - Specifies the pagination limit, up to 1000. If no limit is specified or if a limit greater than 1000 is specified, a pagination limit of 1000 will be used.
  • offset - Specifies the offset in the record set to start the response from. Usually used in conjunction with limit parameter to obtain the next set of records.
  • totalResults - Specifies that the total count of records should be included in the response when doing pagination. Only effective when limit or offset are specified.
  • orderby - Specifies a comma-separated list of fields to order the response by.
  • excludeLinks - Exclude links from the response.
  • fields - A list of fields to be returned.
  • finder - Specifies the category for the favorite; personal (myFavorites), company (companyFavorites), or shared by other users (sharedWithMeFavorites).

HTTP Method

GET

Request Body Parameters None
Response Body Parameters The JSON data for all favorites available to the user

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites

Sample endpoint with decoded query parameters:

https://sitename.oracle.com/rest/v17/favorites?limit=50&offset=0&totalResults=true&finder=myFavorites&q=folderId:{$ne:6992502},$or[{"label":$like:"%@%",$options:'I'}}]}


Text file iconResponse Sample


ClosedGet a Favorite

Get a FavoriteGET Method

Description

This endpoint returns a list of all favorites available to the user.

URI Endpoint

/rest/v17/favorites/{id}

Endpoint Parameters

id

The identifier for the favorite

This endpoint supports the following query specifications. For more information, see Manage Collections.

  • q - Declares a query specification expression.
  • expand - Return child resource details.
  • limit - Specifies the pagination limit, up to 1000. If no limit is specified or if a limit greater than 1000 is specified, a pagination limit of 1000 will be used.
  • offset - Specifies the offset in the record set to start the response from. Usually used in conjunction with limit parameter to obtain the next set of records.
  • totalResults - Specifies that the total count of records should be included in the response when doing pagination. Only effective when limit or offset are specified.
  • excludeLinks - Exclude links from the response.
  • fields - A list of fields to be returned.
  • finder - Specifies the category for the favorite; personal (myFavorites), company (companyFavorites), or shared by other users (sharedWithMeFavorites).

HTTP Method

GET

Request Body Parameters None
Response Body Parameters The JSON data for the specified favorite

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/3022619257


ClosedResponse Sample


ClosedGet List of the Selected Options from a Favorite

Get List of the Selected Options from a FavoriteGET Method

Description

This endpoint returns the list of selected options of an individual favorite.

URI Endpoint

/rest/v17/favorites/{rootId}/subItems

Endpoint Parameters

rootId

The identifier for the parent favorite

This endpoint supports the following query specifications. For more information, see Manage Collections.

  • q - Declares a query specification expression.
  • orderby - Specifies a comma-separated lit of fields to order the response by.
  • fields - A list of fields to be returned.

HTTP Method

GET

Request Body Parameters None
Response Body Parameters The JSON data for the selected option of the specified favorite

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/9100006903/subItems


Text file iconResponse Sample


ClosedGet Details of a Favorite's Selected Option

Get Details of a Favorite's Selected OptionGET Method

Description

This endpoint returns the details of a favorite's selected option.

URI Endpoint

/rest/v17/favorites/{rootId}/subItems/{subitemId}

Endpoint Parameters

rootId

The identifier for the parent favorite

subitemId

The identifier for the child of the parent favorite

HTTP Method

GET

Request Body Parameters None
Response Body Parameters The JSON data for the selected option of the specified favorite

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/9100006903/subItems/9100006907


ClosedResponse Sample


ClosedUpdate the Favorite's Label or Description

Update the Favorite's Label or DescriptionPOST method

Description

Use this endpoint to update the favorite's label.

URI Endpoint

/rest/v17/favorites/{rootId}

Endpoint Parameters

rootId

The identifier for the parent favorite

HTTP Method

POST

Request Body Parameters None
Response Body Parameters The JSON data for favorite with the label updated

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/9100006903


ClosedRequest Sample

{ "label": 1233, "description": "123 desc 2" }


ClosedResponse Sample


ClosedUpdate the Label or Description of a Selected Option

Update the Label or Description of a Selected OptionPOST method

Description

Use this endpoint to update the favorite's selected option label.

URI Endpoint

/rest/v17/favorites/{rootId}/subItems/{subitemId}

Endpoint Parameters

rootId

The identifier for the parent favorite

subitemId

The identifier for the child of the parent favorite

HTTP Method

POST

Request Body Parameters None
Response Body Parameters The JSON data for the favorite with the selected option label updated

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/9100006903/subItems/9100006907


ClosedRequest Sample

{ "label": "Renamed Subitem" }


ClosedResponse Sample


ClosedDelete a List of Favorites

Delete a List of FavoritesPOST method

Description

This endpoint deletes a list of favorites.

URI Endpoint

/rest/v17/favorites/actions/delete

Endpoint Parameters None

HTTP Method

POST

Request Body Parameters

selections

The identifiers for the list of favorites to be deleted
Response Body Parameters JSON data showing an empty items array

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/actions/delete


ClosedRequest Sample

{ "selections": [123, 124] }


ClosedResponse Sample


ClosedDelete a Favorite

Delete a FavoritePOST method

Description

This endpoint deletes a favorite.

URI Endpoint

/rest/v17/favorites/{id}/actions/delete

Endpoint Parameters

id

The identifier for the favorite to delete

HTTP Method

POST

Request Body Parameters None
Response Body Parameters The JSON data showing an empty items array

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/123/actions/delete


ClosedResponse Sample


ClosedCopy a List of Favorites to a Folder

Copy a List of Favorites to a FolderPOST method

Description

This endpoint copies a list of favorites to a folder.

URI Endpoint

/rest/v17/favorites/actions/copyTo

Endpoint Parameters None

HTTP Method

POST

Request Body Parameters

selections

The identifiers for the list of favorites to be copied

targetFolderId

The folder identifier to put the copy of the favorite

labels

The label for the copy of the favorite
Response Body Parameters The identifiers for the new copy of the favorites

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/actions/copyTo


ClosedRequest Sample

{ "selections": [123, 124], "targetFolderId": 991, "labels": ["copy of 123", "copy of 124"] }


ClosedResponse Sample


ClosedCopy a Favorite

Copy a FavoritePOST method

Description

This endpoint copies a favorite.

URI Endpoint

/rest/v17/favorites/{id}/actions/copyTo

Endpoint Parameters

id

The identifier for the favorite to copy

HTTP Method

POST

Request Body Parameters

targetFolderId

The folder identifier to put the copy of the favorite

label

The label for the copy of the favorite
Response Body Parameters The identifier for the new copy of the favorite

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/123/actions/copyTo


ClosedRequest Sample

{ "targetFolderId": 123, "label": "copy of fav" }


ClosedResponse Sample


ClosedMove a List of Favorites to a Folder

Move a List of Favorites to a FolderPOST method

Description

This endpoint moves a list of favorites to a folder.

URI Endpoint

/rest/v17/favorites/actions/moveTo

Endpoint Parmeters None

HTTP Method

POST

Request Body Parameters

selections

The identifiers for the favorites to be moved

targetFolderId

The folder identifier to put the favorites
Response Body Parameters JSON data showing an empty items array

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/actions/moveTo


ClosedRequest Sample

{ "selections": [123, 124], "targetFolderId": 991 }


ClosedResponse Sample


ClosedMove a Favorite to a Folder

Move a Favorite to a FolderPOST method

Description

This endpoint moves a favorite to a folder.

URI Endpoint

/rest/v17/favorites/{id}/actions/moveTo

Endpoint Parameters

id

The identifier for the favorite to move

HTTP Method

POST

Request Body Parameters

targetFolderId

The folder identifier to put the favorite
Response Body Parameters JSON data showing an empty items array

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/123/actions/moveTo


ClosedRequest Sample

{ "targetFolderId": 123 }


ClosedResponse Sample


ClosedReconfigure a Favorite

Reconfigure a FavoritePOST method

Description

This endpoint reconfigures a favorite.

URI Endpoint

/rest/v17/favorites/{id}/actions/reconfigure

Endpoint Parameters

id

The identifier for the favorite

HTTP Method

POST

Request Body Parameters None
Response Body Parameters The response contains the destinationUrl to launch the Configuration page

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/123/actions/reconfigure


ClosedResponse Sample


ClosedGet Sharing Settings for a Favorite

Get Sharing Settings for a FavoriteGET Method

Description

This endpoint returns the sharing settings for a favorite.

URI Endpoint

/rest/v17/favorites/{id}/sharePermissions

Endpoint Parameters

id

The identifier for the favorite

HTTP Method

GET

Request Body Parameters None
Response Body Parameters The JSON data for the sharing permissions for the favorite

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/123/sharePermissions


ClosedResponse Sample


ClosedUpdate Sharing Settings for a Favorite

Update Sharing Settings for a FavoritePUT method

Description

This endpoint updates the sharing settings for a favorite. Only the owner of the favorite or FullAccess user can update a favorite.

URI Endpoint

/rest/v17/favorites/{id}/sharePermissions

Endpoint Parameters

id

The identifier for the favorite

HTTP Method

PUT

Request Body Parameters

items

The list of all permission settings for the favorite. All permissions must be included in the request regardless if being updated.
Successful Response HTTP Code 204

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/123/sharePermissions


ClosedRequest Sample

{ "items": [{ "accessLevel": { "lookupCode": "1" }, "userId": { "key": "abcd-efgh" } }, { "accessLevel": { "lookupCode": "1" }, "groupId": { "id": 21081266 } } ] }


ClosedRemove Myself from a Shared Favorite

Remove Myself from a Shared FavoritePOST method

Description

This endpoint removes the current user from a shared favorite.

URI Endpoint

/rest/v17/favorites/{id}/actions/removeMe

Endpoint Parameters

id

The identifier for the shared favorite

HTTP Method

POST

Request Body Parameters None
Successful Response JSON data showing an empty items array

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/123/actions/removeMe


ClosedResponse Sample


Favorite Folders

ClosedGet a List of Favorite Folders

Get a List of Favorite FoldersGET Method

Description

This endpoint returns a list of all favorite folders available to the user.

URI Endpoint

/rest/v17/favoriteFolders

Endpoint Parameters

This endpoint supports the following query specifications. For more information, see Manage Collections.

  • q - Declares a query specification expression.
  • expand - Return child resource details.
  • limit - Specifies the pagination limit, up to 1000. If no limit is specified or if a limit greater than 1000 is specified, a pagination limit of 1000 will be used.
  • offset - Specifies the offset in the record set to start the response from. Usually used in conjunction with limit parameter to obtain the next set of records.
  • totalResults - Specifies that the total count of records should be included in the response when doing pagination. Only effective when limit or offset are specified.
  • orderby - Specifies a comma-separated list of fields to order the response by.
  • excludeLinks - Exclude links from the response.
  • fields - A list of fields to be returned.

HTTP Method

GET

Request Body Parameters None
Response Body Parameters The JSON data for all favorite folders available to the user

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favoriteFolders


Text file iconResponse Sample


ClosedGet a Favorite Folder

Get a Favorite FolderGET Method

Description

This endpoint returns a favorite folder available to the user.

URI Endpoint

/rest/v17/favoriteFolders/{id}

  Endpoint Parameters

id

The identifier for the favorite

This endpoint supports the following query specifications. For more information, see Manage Collections.

  • q - Declares a query specification expression.
  • expand - Return child resource details.
  • limit - Specifies the pagination limit, up to 1000. If no limit is specified or if a limit greater than 1000 is specified, a pagination limit of 1000 will be used.
  • offset - Specifies the offset in the record set to start the response from. Usually used in conjunction with limit parameter to obtain the next set of records.
  • totalResults - Specifies that the total count of records should be included in the response when doing pagination. Only effective when limit or offset are specified.
  • orderby - Specifies a comma-separated list of fields to order the response by.
  • excludeLinks - Exclude links from the response.
  • fields - A list of fields to be returned.

HTTP Method

GET

Request Body Parameters None
Response Body Parameters The JSON data for the specified favorite folder

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favoriteFolder/123


ClosedResponse Sample


ClosedCreate a Favorite Folder

Create a Favorite FolderPOST method

Description

This endpoint creates a favorite folder.

URI Endpoint

/rest/v17/favoriteFolders

Endpoint Parmeters None

HTTP Method

POST

Request Body Parameters

name

The name of the favorite folder
Response Body Parameters The JSON data for the new favorite folder

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/faavoriteFodlers


ClosedRequest Sample

{ "name": "abc", }


ClosedResponse Sample

{ "canAdd": true, "dateModified": "2022-03-01T02:55:21.010Z", "folderType": { "displayValue": "User Defined", "lookupCode": "2", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_FOLDER_TYPE%22%7D%7D" } ] }, "dateAdded": "2022-03-01T02:55:21.010Z", "isOwner": true, "name": "newFolder", "id": 9100006914, "isShared": false, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/favoriteFolders/9100006914" }, { "kind": "", "rel": "child", "name": "sharePermissions", "href": "https://sitename.oracle.com/rest/v17/favoriteFolders/9100006914/sharePermissions" }, { "kind": "", "rel": "child", "name": "translations", "href": "https://sitename.oracle.com/rest/v17/favoriteFolders/9100006914/translations" } ] }


ClosedUpdate a Favorite Folder

Update a Favorite FolderPOST method

Description

This endpoint updates a favorite folder.

URI Endpoint

/rest/v17/favoriteFolders/{id}

Endpoint Parameters

id

The identifier for the favorite folder to update

HTTP Method

POST

Request Body Parameters

name

The name for the favorite folder
Response Body Parameters The JSON data for the updated favorite folder

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favoriteFolders/1234


ClosedRequest Sample

{ "name": "Renamed abc", }


ClosedResponse Sample


ClosedDelete a Favorite Folder

Delete a Favorite FolderDELETE method

Description

This endpoint deletes a favorite folder. Favorites included in the folder are moved to the Trash folder.

URI Endpoint

/rest/v17/favoriteFolders/{id}

Endpoint Parameters

id

The identifier for the favorite folder to delete

HTTP Method

POST

Request Body Parameters None
Successful Response HTTP Code 204

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favoirteFolders/1234


ClosedGet Permissions for a Favorite Folder

Get Permissions for a Favorite FolderGET Method

Description

This endpoint retrieves the favorite folder share permissions.

URI Endpoint

/rest/v17/favoriteFolders/{id}/sharePermissions

End Parameters

id

The identifier for the favorite folder to get permissions

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

hasMore

The boolean value indicates if there are more folder permissions available in the database

items

The list of share permissions for the favorite folder

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favoriteFolders/1234/sharePermissions


ClosedResponse Sample


ClosedUpdate or Remove Permissions for a Favorite Folder

Update or Remove Permissions for a Favorite FolderPUT method

Description

This endpoint modifies the shared permissions for a favorite folder. Only groups can be granted folder permissions.

URI Endpoint

/rest/v17/favoriteFolders/{id}/sharePermissions

End Parameters

id

The identifier for the favorite folder to update

HTTP Method

PUT

Request Body Parameters

items

The list of specific permissions to update or [] to remove all permissions.
Successful Response HTTP Code 204

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favoriteFolders/1234/sharePermissions


ClosedRequest Sample


Favorite Process Invocations

ClosedGet Favorite Process Invocations

Get Favorite Process InvocationsPOST method

Description

This endpoint returns the process invocations for favorites.

URI Endpoint

/rest/v17/favorites/actions/getProcessInvocations

End Parameters None

HTTP Method

POST

Request Body Parameters

None

Response Body Parameters

hasMore

The boolean value indicates if there are more process invocations available in the database

items

The JSON data for process invocations for favorites

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/actions/getProcessInvocations


ClosedResponse Sample


ClosedInvoke Favorite

Invoke FavoritePOST method

Description

This endpoint invokes a process actions upon user request.

URI Endpoint

/rest/v17/favorites/actions/start

End Parameters None

HTTP Method

POST

Request Body Parameters

variableName

The variable name for the process invocation

selections

The selected favorites for process invocation
Note: For Add or Cancel actions, the transaction details are required. Therefore the Add from Favorite action must be performed before Add or Cancel actions.
Response Body Parameters The response contains the destinationUrl to launch the process

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/actions/start


ClosedRequest Sample

{ "variableName": "_cm_4359285", "selections": ["123", "456", "789"] }


ClosedResponse Sample


ClosedInvoke Add to Cart from Favorites

Invoke Add to Cart from FavoritesPOST method

Description

This endpoint invokes the Shopping Cart process action to add selected items to the specified process shopping cart.

URI Endpoint

/rest/v17/favorites/actions/shoppingCart

End Parameters None

HTTP Method

POST

Request Body Parameters

variableName

The variable name for the process invocation

selections

The selected favorites for process invocation
Response Body Parameters The response contains the most recent updated shopping cart process

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/favorites/actions/shoppingCart


ClosedRequest Sample

{ "selections": [3022726820], "variableName": "CM_7065206" }


ClosedResponse Sample


Notes

For more information on the Interface Catalogs, see the topic Interface Catalog.

Related Topics

Related Topics Link IconSee Also