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
Get User's List of Favorites | ||
---|---|---|
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.
|
|
HTTP Method |
GET |
|
Request Body Parameters | None | |
Response Body Parameters | The JSON data for all favorites available to the user |
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'}}]}
Get a Favorite | ||
---|---|---|
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.
|
||
HTTP Method |
GET |
|
Request Body Parameters | None | |
Response Body Parameters | The JSON data for the specified favorite |
https://sitename.oracle.com/rest/v17/favorites/3022619257
{ "items": [{ "type": 2, "lineBomDisplayName": null, "ownerUserEmail": "john.jones@oracle.com", "dateAdded": "2022-02-16T21:46:23.000Z", "ownerUserFirstName": "John", "userAddedFirstName": "John", "prefCurrencyName": "US Dollar", "serialNumberDescription": null, "priceBook": { "variableName": "_default_price_book", "name": "Base Price", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/priceBooks" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/priceBooks/_default_price_book" } ] }, "itemName": "car1", "prefLanguageName": "English", "isFolderShared": false, "price": { "value": -1.0, "currency": "USD" }, "id": 3022619257, "refName": "partpriority:car1", "isMandatory": false, "visibilityType": 3, "serialNumber": null, "userModifiedLastName": null, "folderId": "6992501", "sysNavInfo": {}, "userModifiedFirstName": "John", "itemId": "12466079", "productLineName": "Car 1", "subType": 0, "folderName": "[Default]", "status": 1, "supplierCompanyId": 4118171, "rootId": 3022619257, "typeSpecificAttrs": null, "description": null, "isReadOnly": false, "configAttributes": { "_config_upgrade_name": { "name": "Config Upgrade Name", "value": "" }, "_configuration_id": { "name": "Configuration Id", "value": "" }, "systemConfigModelPath": { "name": "System Config Model Path", "value": "" }, "_array_key_searchFlowArrayControl": { "name": "searchFlowArrayControl array key", "value": "[1] = 2fcab1c3-4563-4fca-8abf-54a2890f63af" }, "_array_key_numberOfItems1": { "name": "numberOfItems1 array key", "value": "[1] = f62f4bc9-3ce4-4306-84ab-afd48cffcf58" }, "ruleActionType": { "name": "Rule Action Type", "value": "Advanced action, hardcoded" }, "numberOfLineItems": { "name": "Number of Line Items", "value": "3" } }, "isShareable": true, "userAddedLastName": null, "sysConfigPath": null, "productType": "Economy SUV", "ownerUserLastName": null, "quantity": 1, "activeActions": ["copyTo", "reconfigure", "moveTo"], "dateModified": "2022-02-17T21:07:31.000Z", "partProps": null, "label": "Model", "buyerCompanyId": 4118171, "parentId": -1, "segmentName": "Economy SUV", "modelName": "ESUV100", "sysNavError": null, "supplierCompanyName": "ABC Company", "ownerUserKey": "bd6172e3-71b6-4b4d-a2c9-41c82e3e707c", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/favorites/3022619257" }, { "kind": "", "rel": "child", "name": "sharePermissions", "href": "https://sitename.oracle.com/rest/v17/favorites/3022619257/sharePermissions" }, { "kind": "", "rel": "child", "name": "subItems", "href": "https://sitename.oracle.com/rest/v17/favorites/3022619257/subItems" } ] } ] }
Get List of the Selected Options from a Favorite
Get List of the Selected Options from a Favorite | ||
---|---|---|
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.
|
||
HTTP Method |
GET |
|
Request Body Parameters | None | |
Response Body Parameters | The JSON data for the selected option of the specified favorite |
https://sitename.oracle.com/rest/v17/favorites/9100006903/subItems
Get Details of a Favorite's Selected Option
https://sitename.oracle.com/rest/v17/favorites/9100006903/subItems/9100006907
{ "type": 3, "lineBomDisplayName": "part12", "ownerUserEmail": "john.jones@oracle.com", "dateAdded": "2022-03-01T02:45:00.000Z", "ownerUserFirstName": "John", "userAddedFirstName": "John", "prefCurrencyName": "US Dollar", "serialNumberDescription": null, "priceBook": { "variableName": "_default_price_book", "name": "Base Price", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/priceBooks" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/priceBooks/_default_price_book" } ] }, "itemName": "part12", "prefLanguageName": "English", "price": { "value": 12.0, "currency": "USD" }, "id": 9100006907, "refName": "part12", "isMandatory": true, "serialNumber": null, "userModifiedLastName": null, "userModifiedFirstName": "John", "itemId": "8523095", "productLineName": null, "subType": 2, "status": 0, "supplierCompanyId": 4118171, "rootId": 9100006903, "typeSpecificAttrs": null, "configAttributes": null, "userAddedLastName": null, "sysConfigPath": "_root:::part12::0::0", "productType": "Part", "ownerUserLastName": null, "quantity": 1, "dateModified": "2022-03-01T02:48:15.000Z", "partProps": { "Part Number": "part12", "Part Lead Time": "N/A", "Part Description": "", "Line BOM Display Name": "part12", "Part Type (Custom Field 9)": "100K Parts", "String (Custom Field 1)": "String", "String Filter (Custom Field 4)": "", "Float (Custom Field 5)": "0.0", "Float Filter (Custom Field 6)": "0.0", "Integer (Custom Field 7)": "0", "SSM (Custom Field 2)": "Value 1 Label", "SSM Filter (Custom Field 8)": "", "MSM (Custom Field 16)": "", "MSM Filter (Custom Field 17)": "", "Page Specific Label (Custom Field 3)": "", "Required String (Custom Field 10)": "Custom Field 10, part12", "Required SSM (Custom Field 11)": "Required value", "Custom Field 13": "Custom Field 13, part12", "Custom Field 14": "Custom Field 14, part12", "Custom Field 15": "Custom Field 15, part12", "Custom Field 18": "Custom Field 18, part12", "Custom Field 19": "Custom Field 19, part12", "Custom Field 20": "Custom Field 20, part12", "Custom Field 21": "Custom Field 21, part12", "Custom Field 22": "Custom Field 22, part12", "Custom Field 23": "Custom Field 23, part12", "Custom Field 24": "Custom Field 24, part12", "Custom Field 25": "Custom Field 25, part12", "Custom Field 26": "Custom Field 26, part12", "Custom Field 27": "Custom Field 27, part12", "Custom Field 30": "Custom Field 30, part12" }, "label": "Part", "parentId": 9100006903, "segmentName": null, "modelName": null, "supplierCompanyName": "abcCompany", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/favorites/9100006903/subItems/9100006907" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/favorites/9100006903" } ] }
Update the Favorite's Label or Description
https://sitename.oracle.com/rest/v17/9100006903
{ "label": 1233, "description": "123 desc 2" }
{ "rootId": 9100006903, "description": "Updated description", "userModifiedLastName": null, "dateModified": "2022-03-01T02:46:05.491Z", "label": "Updated value", "folderId": "6992501", "userModifiedFirstName": "Justin", "isFolderShared": false, "isReadOnly": false, "isShareable": true, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/favorites/9100006903" }, { "kind": "", "rel": "child", "name": "sharePermissions", "href": "https://sitename.oracle.com/rest/v17/favorites/9100006903/sharePermissions" }, { "kind": "", "rel": "child", "name": "subItems", "href": "https://sitename.oracle.com/rest/v17/favorites/9100006903/subItems" } ] }
Update the Label or Description of a Selected Option
https://sitename.oracle.com/rest/v17/favorites/9100006903/subItems/9100006907
{ "label": "Renamed Subitem" }
{ "supplierCompanyId": 4118171, "rootId": 9100006903, "userModifiedLastName": null, "dateModified": "2022-03-01T18:13:51.217Z", "label": "Renamed Subitem", "userModifiedFirstName": "Joe", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/favorites/9100006903/subItems/9100006907" } ] }
https://sitename.oracle.com/rest/v17/favorites/actions/delete
{ "selections": [123, 124] }
{ "items": [] }
https://sitename.oracle.com/rest/v17/favorites/123/actions/delete
{ "items": [] }
Copy a List of Favorites to a Folder
https://sitename.oracle.com/rest/v17/favorites/actions/copyTo
{ "selections": [123, 124], "targetFolderId": 991, "labels": ["copy of 123", "copy of 124"] }
{ "result": { "ids": [3023768871, 3023768873] } }
https://sitename.oracle.com/rest/v17/favorites/123/actions/copyTo
{ "targetFolderId": 123, "label": "copy of fav" }
{ "result": { "ids": [3023768871] } }
Move a List of Favorites to a Folder
https://sitename.oracle.com/rest/v17/favorites/actions/moveTo
{ "selections": [123, 124], "targetFolderId": 991 }
{ "items": [] }
https://sitename.oracle.com/rest/v17/favorites/123/actions/moveTo
{ "targetFolderId": 123 }
{ "items": [] }
https://sitename.oracle.com/rest/v17/favorites/123/actions/reconfigure
{ "destinationUrl": "https://localhost:8080//commerce/buyside/commerce_list_detail.jsp?id=<favoriteId>&contentType=7&autosubmit=true" }
Get Sharing Settings for a Favorite
https://sitename.oracle.com/rest/v17/favorites/123/sharePermissions
{ "items": [{ "accessLevel": { "lookupCode": "1" }, "userId": { "key": "abcd-efgh" } }, { "accessLevel": { "lookupCode": "1" }, "groupId": { "id": 21081266 } } ] }
Update Sharing Settings for a Favorite
https://sitename.oracle.com/rest/v17/favorites/123/sharePermissions
{ "items": [{ "accessLevel": { "lookupCode": "1" }, "userId": { "key": "abcd-efgh" } }, { "accessLevel": { "lookupCode": "1" }, "groupId": { "id": 21081266 } } ] }
Remove Myself from a Shared Favorite
https://sitename.oracle.com/rest/v17/favorites/123/actions/removeMe
{ "items": [] }
Favorite Folders
Get a List of Favorite Folders
Get a List of Favorite Folders | ||
---|---|---|
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.
|
|
HTTP Method |
GET |
|
Request Body Parameters | None | |
Response Body Parameters | The JSON data for all favorite folders available to the user |
https://sitename.oracle.com/rest/v17/favoriteFolders
Get a Favorite Folder | ||
---|---|---|
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.
|
||
HTTP Method |
GET |
|
Request Body Parameters | None | |
Response Body Parameters | The JSON data for the specified favorite folder |
https://sitename.oracle.com/rest/v17/favoriteFolder/123
{ "id": 123, "name": "SUV List", "isShared": true, "canAdd": true, "dateAdded": "08/17/2021 2:00 AM", "dateModified": "08/17/2021 2:00 AM", "createdBy": "john.jones", "links": ... }
https://sitename.oracle.com/rest/v17/faavoriteFodlers
{ "name": "abc", }
{ "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" } ] }
https://sitename.oracle.com/rest/v17/favoriteFolders/1234
{ "name": "Renamed abc", }
{ "canAdd": true, "dateModified": "2022-03-01T02:53:08.275Z", "folderType": { "lookupCode": "2", "displayValue": "User Defined", "id": 3022586488, "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" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/3022586488" } ] }, "dateAdded": "2022-02-19T05:10:27.000Z", "isOwner": true, "name": "jj2999", "id": 3022633752, "isShared": false, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/favoriteFolders/3022633752" }, { "kind": "", "rel": "child", "name": "sharePermissions", "href": "https://sitename.oracle.com/rest/v17/favoriteFolders/3022633752/sharePermissions" }, { "kind": "", "rel": "child", "name": "translations", "href": "https://sitename.oracle.com/rest/v17/favoriteFolders/3022633752/translations" } ] }
https://sitename.oracle.com/rest/v17/favoirteFolders/1234
Get Permissions for a Favorite Folder
https://sitename.oracle.com/rest/v17/favoriteFolders/1234/sharePermissions
{ "hasMore": false, "items": [{ "accessLevel": { "lookupCode": "1", "displayValue": "Edit", "id": 3022550530 }, "groupId": { "id": 21081269, "variableName": "salesAdministrator" }, "groupLabel": "Sales Administrator", "dateModified": "2021-10-29T04:36:24.000Z", "dateAdded": "2021-10-29T04:36:24.000Z", "favoriteFolderId": { "id": 3022551859, "name": "an" } } ] }
Update or Remove Permissions for a Favorite Folder
https://sitename.oracle.com/rest/v17/favoriteFolders/1234/sharePermissions
{ "items": [{ "accessLevel": { "displayValue": "Edit" }, "groupId": { "variableName": "salesAdministrator" } } ] }
Favorite Process Invocations
Get Favorite Process Invocations
https://sitename.oracle.com/rest/v17/favorites/actions/getProcessInvocations
{ "result": { "hasMore": false, "items": [{ "variableName": "CM_4174166", "name": "Create Quotes", "description": "Create Quote", "targetType": "start" }, { "variableName": "CM_7065206", "name": "Add to Cart (Quotes)", "description": "", "targetType": "shoppingCart" }, { "variableName": "CM_18321147", "name": "Add from Favorite", "description": "", "targetType": "start" } ] } }
https://sitename.oracle.com/rest/v17/favorites/actions/start
{ "variableName": "_cm_4359285", "selections": ["123", "456", "789"] }
{ "destinationUrl": "" https: //sitename.oracle.com/commerce/buyside/commerce_list_detail.jsp?id=3022619257&contentType=7&autosubmit=true" }
Invoke Add to Cart from Favorites
https://sitename.oracle.com/rest/v17/favorites/actions/shoppingCart
{ "selections": [3022726820], "variableName": "CM_7065206" }
{ “processVarName”: “oraclecpqo” }
Notes
For more information on the Interface Catalogs, see the topic Interface Catalog.