Commerce Layout & Metadata REST APIs

Overview

The Commerce Administration REST APIs expose additional transactional data, metadata, layout, rules, and actions to enable seamless integration with third party user interfaces, such as the ADF UI and the Salesforce Lightning UI. These services are available v3 and higher RESTful services.

ClosedMetadata Hierarchy

The information for these items is organized in a hierarchical structure. The following image displays the parent child relationship for main documents, sub-documents, actions, attributes, menu items, and translations.

Commerce Metadata Hierarchy

A REST call to retrieve data for an object will return object's information and links to the child objects. For example, "Get Metadata for a Document" will return the object's definition information and links to actions and attributes. URI Endpoint queries can be used to expand or limit the returned data.

  • The "Expand All" query parameter can be used to return expanded actions, attributes, menu items, and translations as part of the response. To include child data in the response, append the "?expand=all*" query parameter to the end of the URI Endpoint.

ClosedTransaction Layout Service

Returns Oracle CPQ transaction desktop layout definitions for UI frameworks, like Oracle ADF (Application Development Framework) and Salesforce.com Lightning UI, to consume. The desktop layout definition contains the following items:

  • Layout parameters and properties for panels, tabs, columns, action strips, and transaction line grids
  • Properties for actions and attributes
  • Translations for layout items

ClosedMetadata Services

Expose information about the definitions of the Commerce main document, sub-document, actions, attributes, and translations.

ClosedAction Metadata REST APIs Overview

These services return the action metadata for the specified Commerce main document or sub-document.

The action metadata is comprised of the following information:

  • The defined action properties that are defined on the Admin Action page
  • Possible action states, such as whether an action can be visible or enabled
  • Dependencies and possible states, if an action can be altered by a step or rule
  • Links to the current REST call, parent items, and translations
Note: Process actions are only returned under the main document and are not accessible for process or sub-document requests. Standard process actions include copy, email, print, or create new transaction.

ClosedArray Set Metadata REST APIs Overview

These services return the array set metadata for the specified Commerce document.

The array set metadata is comprised of the following information:

  • The defined array set properties for all array sets defined for the specified Commerce document.
  • The defined array set attribute properties that are defined on the Attribute Editor page
  • Possible attribute states, such as whether an attribute is updatable, required, or visible. Other attribute states are domain, messages, hasError, hasWarning, or hasContraintViolation.
  • Dependencies and possible states, if an attribute can be altered by a formula, step, or rule
  • Links to the current REST call, parent items, menu items, and translations

ClosedAttribute Metadata REST APIs Overview

These services return the attribute metadata for the specified Commerce document.

The attribute metadata is comprised of the following information:

  • The defined attribute properties that are defined on the Attribute Editor page
  • Possible attribute states, such as whether an attribute is updatable, required, or visible. Other attribute states are domain, messages, hasError, hasWarning, or hasContraintViolation.
  • Dependencies and possible states, if an attribute can be altered by a formula, step, or rule
  • Links to the current REST call, parent items, menu items, and translations

ClosedMenu Item Metadata REST APIs Overview

These services return the menu item metadata for the specified attribute.

The menu item metadata is comprised of the following information:

  • Menu items are returned as composite values containing menu properties and domain items
  • Links to the current REST call, parent items, and translations

ClosedTranslation Service REST APIs Overview

The translation services retrieve translations for actions, attributes, and menu items.

Translations for all site-supported languages can be retrieved. If a translation is not defined, an empty string is returned for the requested value. The following fields are translatable:

  • Actions - labels and descriptions
  • Attributes - labels, descriptions, and user defaults
  • Menu Items - display values

When translations are requested, translations that have an empty value for all the properties are not returned. Translation data is returned if any of the property values are populated. For example, the following sample shows the reduced content response.

ClosedSample URI Endpoint

ClosedSample Response Body

In the following sample, the data for the "de" translation is not returned because both label and description values for the "de" translation are empty strings.

 "de" translation with empty strings


Administration

This API is used to retrieve Layout and Metadata information for Commerce documents, actions, attributes, menu items and translations. The endpoint for each REST API appends onto:


Sales User Access to Buy-Side Get Metadata REST APIs

Oracle CPQ 20A allows sales users access to Commerce and Configuration buy-side metadata information, including layout details, translated labels, action and attribute types, attribute input parameters, and display properties. Sales Agents, Channel Agents, and Restricted Access users can be granted access to the following Get Commerce Layout and Get Commerce Document Metadata REST APIs. Guest Users are not allowed access to these Commerce REST APIs.

To enable this feature, administrators must open a Service Request (SR) on My Oracle Support. This feature should only be enabled if there is a specific need to expose the metadata (i.e. digital assistant). This feature does not change the accessibility of administrator-only metadata. Sales users are not able to access the metadata REST API information for Data Tables, BML, rules, and formulas.

ClosedGet Commerce Document Layout

Get Commerce Document Layout GET Method

Description

This action returns the desktop layout definition for a specific Commerce process.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/layouts/{mainDocVarName}

Endpoint Parameters

processVarName

The variable name of the Commerce process

mainDocVarName

The variable name of the main document

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing the desktop layout definition for the requested Commerce process

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/layouts/transaction


ClosedGet Commerce Documents Metadata

Get Commerce Documents MetadataGET Method

Description

This service returns the document metadata for all Commerce documents.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents

Endpoint Parameters

processVarName

The variable name of the Commerce process

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing the document metadata for all documents

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents


ClosedResponse Body Sample


ClosedGet Commerce Document Metadata

Get Commerce Document MetadataGET Method

Description

This service returns the metadata for a specific Commerce document.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}

Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the Commerce document

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing the document metadata for the specified document

Use Case Examples

Get document metadata for "transaction"

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction


ClosedResponse Body Sample

{ "id": 36244074, "dateModified": "2019-02-01", "links": [{ "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo" }, { "rel": "self", "href": "https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction" }, { "rel": "child", "href": "https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/attributes" }, { "rel": "child", "href": "https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/arraySets" }, { "rel": "child", "href": "https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/actionDefs" } ], "variableName": "transaction", "label": "Transaction", "description": "Main (Header Level) Commerce Document - serves as Quote/Order depending on step in process flow", "resourceVarName": "commerceDocumentsOraclecpqoTransaction", "type": { "lookupCode": "0", "displayValue": "Main Document" }, "process": { "id": 36244034, "variableName": "oraclecpqo" } }


Get document metadata for "transaction" using the 'Expand All' parameter to include metadata for all related actions, attributes, and translations

ClosedURI Endpoint Sample


ClosedGet Commerce Actions Metadata

Get Commerce Actions MetadataGET Method

Description

This service returns the metadata for all actions defined for the specified Commerce document.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/actionDefs

Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing metadata for all actions related to the specified document

Use Case Examples

ClosedURI Endpoint Sample Get metadata for all "transaction" actions

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/actionDefs


ClosedURI Endpoint Sample Get metadata for all "transaction" actions using the 'Expand All' parameter to include all translations


ClosedGet Commerce Action Metadata

Get Commerce Action Metadata GET Method

Description

This service returns the metadata for a specific Commerce action.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/actionDefs/{actionVarName}

Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

actionVarName

The variable name of a Commerce action

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing the action metadata for a specific Commerce action

ClosedURI Endpoint Sample Get action metadata for "update_line_items"

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/actionDefs/_update_line_items


ClosedResponse Body Sample


ClosedGet Commerce Array Sets Metadata

Get Commerce Array Sets Metadata GET Method

Description

This service returns metadata for all array sets defined for the specified Commerce document.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/arraySets

Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the main or sub-document

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

JSON data containing the array sets metadata for a specific Commerce document

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/arraySets


ClosedResponse Body Sample


ClosedGet Commerce Array Set Metadata

Get Commerce Array Set MetadataGET Method

Description

This service returns metadata for the specified array set.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/arraySets/{arraySetVarName}

Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the main or sub-document

arraySetVarName

The variable name of the array set

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

JSON data containing the metadata for a specified array set

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/arraySets/laborServices


ClosedResponse Body Sample


ClosedGet Commerce Array Attributes Metadata

Get Commerce Array Attributes MetadataGET Method

Description

This service returns metadata for all attributes defined for the specified array set.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/arraySets/{arraySetVarName}/attributes

Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the main or sub-document

arraySetVarName

The variable name of the array set

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

JSON data containing the attribute metadata for a specified array set

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/arraySets/laborServices/attributes


ClosedResponse Body Sample


ClosedGet Commerce Array Attribute Metadata

Get Commerce Array Attribute MetadataGET Method

Description

This service returns metadata for the specified array attribute.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/arraySets/{arraySetVarName}/attributes/(attributeVarName}

Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the main or sub-document

arraySetVarName

The variable name of the array set

attributeVarName

The variable name of the array attribute

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

JSON data containing the metadata for a specified array attribute

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/arraySets/laborServices/attributes/laborCategory


ClosedResponse Body Sample


ClosedGet Commerce Attributes Metadata

Get Commerce Attributes MetadataGET Method

Description

This service returns the metadata for all attributes defined for the specified Commerce document.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/attributes

Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing metadata for all attributes related to the specified document

Use Case Examples

ClosedURI Endpoint Sample Get metadata for all "transaction" attributes

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/attributes


ClosedURI Endpoint Sample Get metadata for all "transaction" attributes using the 'Expand All' parameter to include all translations


ClosedGet Commerce Attribute Metadata

Get Commerce Attribute MetadataGET Method

Description

This service returns the metadata for a specific Commerce attribute.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/attributes/{attributeVarName}

Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

attributeVarName

The variable name of a Commerce attribute

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing the attribute metadata for a specific Commerce attribute

ClosedURI Endpoint Sample Get attribute metadata for "_customer_t_email "

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/attributes/_customer_t_email


ClosedResponse Body Sample


ClosedGet Commerce Menu Items Metadata

Get Commerce Menu Items Metadata GET Method

Description

This service returns the metadata for all menu items defined for the specified Commerce attribute.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/attributes/{attributeVarName}/menuItems

Endpoint Parameters

processVarName 

The variable name of the Commerce process

docVarName

The variable name of the document

attributeVarName

The variable name of the Commerce menu type attribute

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing metadata for all menu items related to the specified attribute

ClosedURI Endpoint Sample Get menu item metadata for " paymentTerms_t "

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/attributes/paymentTerms_t/menuItems


ClosedResponse Body Sample


ClosedGet Commerce Menu Item Metadata

Get Commerce Menu Item Metadata GET Method

Description

This service returns the metadata for a specific menu item.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/attributes/{attributeVarName}/menuItems/{id}

Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

attributeVarName

The variable name of the Commerce menu type attribute

id

The id of the menu item

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing the menu item metadata for a specific menu item

ClosedURI Endpoint Sample Get metadata for the "paymentTerms_t" menu item 36244405

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/attributes/paymentTerms_t/menuItems/36244405


ClosedResponse Body Sample


ClosedGet Commerce Action Translations

Get Commerce Action TranslationsGET Method

Description

This service returns all language translations for an action.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/actionDefs/{actionVarName}/translations

URI Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

actionVarName

The variable name of the Commerce action

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing all translations for an action

ClosedURI Endpoint Sample Get all translations for "_update_line_items" action


ClosedGet Commerce Action Translation

Get Commerce Action TranslationGET Method

Description

This service returns a specific language translation for an action.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/actionDefs/{actionVarName}/translations/{languageCode}

URI Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

actionVarName

The variable name of the Commerce action

languageCode

The language code

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing specific language translation for an action

ClosedURI Endpoint Sample Get French translation for "_update_line_items" action

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/actionDefs/_update_line_items/translations/fr


ClosedResponse Body Sample


ClosedGet Commerce Attribute Translations

Get Commerce Attribute TranslationsGET Method

Description

This service returns all language translations for an attribute

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/
{docVarName}/attributes/{attributeVarName}/translations

URI Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

attributeVarName

The variable name of the Commerce attribute

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing all translations for an attribute

ClosedURI Endpoint Sample Get all translations for "_customer_t_email" attribute


ClosedGet Commerce Attribute Translation

Get Commerce Attribute TranslationGET Method

Description

This service returns the specified language translation for an attribute

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/attributes/{attributeVarName}/translations/{languageCode}

URI Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

attributeVarName

The variable name of the Commerce attribute

languageCode

The language code

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing the specified language translation information for an attribute

ClosedURI Endpoint Sample Get German translation for "_customer_t_email " attribute

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/attributes/_customer_t_email/translations/de


ClosedResponse Body Sample


ClosedGet Commerce Menu Item Translations

Get Commerce Menu Item TranslationsGET Method

Description

This service returns all translations for a menu item.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/attributes/{attributeVarName}/menuItems/{id}/translations

URI Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

attributeVarName

The variable name of the attribute

id

The menu item id number

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing all translations for a menu item

ClosedURI Endpoint Sample Get all translations for "paymentTerms_t" menu item 3624405


ClosedGet Commerce Menu Item Translation

Get Commerce Menu Item TranslationGET Method

Description

This service returns the specified language translation for a menu item.

URI Endpoint

/rest/v17/commerceProcesses/{processVarName}/documents/{docVarName}/attributes/{attributeVarName}/menuItems/{id}/translations/{languageCode}

URI Endpoint Parameters

processVarName

The variable name of the Commerce process

docVarName

The variable name of the document

attributeVarName

The variable name of the Commerce attribute

id

The id of the menu item

languageCode

The language code

HTTP Method

GET

Request Body Parameters

None

Success Response

JSON data containing the specified language translation for a menu item

ClosedURI Endpoint Sample Get Spanish translation for "paymentTerms_t" menu item 3624405

https://sitename.oracle.com/rest/v17/commerceProcesses/oraclecpqo/documents/transaction/attributes/paymentTerms_t/menuItems/36244405/translations/es


ClosedResponse Body Sample


Related Topics

Related Topics Link IconSee Also