You are here: Integrating With CPQ Cloud > REST APIs > REST API for Transactional Objects

REST API for Transactional OBJECTS

OVERVIEW

CPQ Cloud exposes transactional objects and Transaction data through REST APIs and RESTful standards. Adding to existing Web Services functionality that allows for Transactions to be created and updated via SOAP APIs, these REST APIs provide a new, modern way to access Transaction and line item information.

Exposing transactional objects through REST APIs promotes simpler API calls and more robust integrations using HTTP standards. With appropriate HTTP Basic authentication, any other third-party system can query CPQ Cloud’s REST APIs, get a response, and use the return data as needed. Additional resources allow credentialed third-party systems to create Transactions, and to update Transactions by invoking modify, version, and submit and approval actions in a Commerce Process through REST APIs.

With the exception of importing or exporting attachments, all Commerce operations that are supported by CPQ Cloud SOAP APIs are supported by CPQ Cloud REST APIs.

ADMINISTRATION

The endpoint for each REST API appends onto http://{siteurl}, where {siteurl} is the base URL of the CPQ Cloud site.

ClosedCommerce Process API Table


Commerce Process REST API Resources

ClosedGet Transaction List (GET)


ClosedGet Transaction (GET)


ClosedCreate Transaction (POST)


ClosedUpdate Main (and Sub) Document Attributes (POST)


ClosedGet Line Items (GET)


ClosedGet Line Item (GET)


ClosedAdd Line Item (POST)


ClosedDelete Line Item (DELETE)


ClosedUpdate Sub Document Attributes (POST)


ClosedRequest Payload Syntax

Request payloads must be written in JSON and adhere to standard JSON syntax.


Structure of Commerce Process REST API Resources

ClosedOverview

Commerce Process REST API resources follow a specific structure. There are two “lists” of data that can be accessed by the URI endpoints:

When either list is referenced by the URI endpoint, you can perform a GET call to retrieve the list data, or you can perform a POST call to add one item to the list.

You can append an identifier to the end of either list to focus your call on a specific item in the list:

When an identifier has been appended to either list, you can perform a GET call to retrieve the data for the item in the list.

Further, you can append actions/{actionVarName} to the list item’s endpoint, where {actionVarName} is the variable name of an action, and perform a POST call in order to update attributes within the list item while invoking the specified action. Attributes that can be updated are:

The one exception to this pattern is that you can perform a DELETE call for a line item (to delete the line item), but you cannot perform a DELETE call for a Transaction, because Transactions cannot be deleted in CPQ Cloud.

For more information, go to My Oracle Support and query for "Integrating Oracle Sales Cloud with Oracle CPQ".

ClosedExample: Oracle Sales Cloud Proposals


Additional Information

ClosedAuthentication

CPQ Cloud uses HTTP Basic authentication to authenticate REST calls from third-party systems. When making a call to a CPQ Cloud REST API, the third-party system’s REST client must have encrypted CPQ Cloud login credentials in the Header and an Accept Header that both adhere to HTTP Basic authentication standards. The Accept Header must be set to application/schema+json to see the detailed schema of the resource.


ClosedREST APIs Metadata

Metadata for all REST APIs can be accessed directly by appending /rest/v1/metadata-catalog to a site’s base URL. Admins can use this metadata to better inform custom API calls. REST API metadata can only be accessed by currently-logged-in CPQ Cloud FullAccess users.

Specific metadata for each individual CPQ Cloud REST API can be accessed through the Interface Catalogs. For more information, see the topic Interface Catalog.


Accessing JSON Data

ClosedJSON Transaction Data

Accessing a commerceDocuments{processVarName}{MainDocName} REST API’s URI endpoint directly reveals all Transaction data for the given Commerce Process in JSON form. While building API calls to retrieve or update Transaction data, admins can use these pages to see how CPQ Cloud references Transaction data in JSON.

JSON Transaction data can only be accessed by currently-logged-in CPQ Cloud users. Each user that accesses JSON Transaction data will only see data for Transactions that the user has access to in the Transaction Manager. JSON Transaction data can be loaded into a third-party JSON viewer for simpler viewing.

Use the URL and parameters below to access a Commerce Process’s JSON Transaction data:

URL

/rest/v1/commerceDocuments{ProcessVarName}{MainDocName}

Parameters

{ProcessVarName}

The variable name of the Commerce Process. The first character must be capitalized.

{MainDocName}

The variable name of the Main Document in the Commerce Process. The first character must be capitalized.

The following system attributes will have an “_” prepended on to their variable names in the JSON Transaction data: supplier_company_name, last_document_number, buyer_company_name, document_var_name, currency_pref, step_var_name, id, process_var_name, date_added, and date_modified.


ClosedJSON Line Item Data

JSON data for a single line item on a specific Transaction can be accessed directly by currently-logged-in CPQ Cloud users. While building API calls to retrieve or update line item data, admins can use these pages to see how CPQ Cloud references line item data in JSON.

Each user that accesses JSON line item data will only be able to see the data if they have access to the Transaction being referenced. JSON Transaction data can be loaded into a third-party JSON viewer for simpler viewing.

Use the URL and parameters below to access a line item’s JSON data:

URL

/rest/v1/commerceDocuments{ProcessVarName}{MainDocName}/{id}/{subDocName}/{docNum}

Parameters

{ProcessVarName}

The variable name of the Commerce Process. The first character must be capitalized.

{MainDocName}

The variable name of the Main Document in the Commerce Process. The first character must be capitalized.

{id}

The Transaction ID of the Transaction

{subDocName}

The variable name of the sub document.

{docNum}

The document number of the line item to be updated

The following system attributes will have an “_” prepended on to their variable names in the JSON line item data: document_number, id, document_var_name, date_added, bs_id, and date_modified.


NOTES

Process actions cannot be invoked through a REST API.

The length of the sessionId may have changed.  If you are using this parameter, confirm that it is not being truncated, or that it has to be a certain length.

RELATED TOPICS

Related Topics Link IconSee Also