Shopping Cart REST APIs

Overview

Oracle CPQ 22B introduced v14 stateless REST API to support the Oracle CPQ Shopping Cart features. The Shopping Cart feature is based on user session, therefore, the Shopping Cart REST APIs cannot be used in headless mode.

To use the stateless Shopping Cart REST APIs, users must provide their JSESSIONID cookie to maintain data retention for the shopping cart and their X-Cpq-Csrf-Token header for authentication. These parameters are available within the "Request Headers" area of the request in the network tab of the browser that initiated their session. These values must be entered every time a new user session is used to initiate shopping cart REST API calls.

Administration

ClosedGet List of All Shopping Carts

Get List of All Shopping CartsGET Method

Description

This endpoint returns a list of all shopping carts visible to the user.

URI Endpoint

/rest/v17/shoppingCarts

End Parameters None

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

priceBookApplicable

The boolean value for showing the price book indicator

showAddToQuoteButton

The boolean value for showing the Add to Quote indicator

showCheckoutButton

The boolean value for showing the Checkout button indicator

processVarName

The variable name of the process

processName

The name of the process

items

Array of links to individual shopping cart items

ClosedURI Endpoint Sample

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


ClosedResponse Sample


ClosedGet Most Recent Shopping Cart

Get Most Recent Shopping Cart POST method

Description

This endpoint returns the most recently modified shopping cart.

URI Endpoint

/rest/v17/shoppingCarts/actions/_getMostRecentShoppingCart

End Parameters None

HTTP Method

POST

Request Body Parameters

limit

(Optional) The maximum number of items to show in the response. The default is 1000.

offset

(Optional) The starting position of the response rows. The default is 0.

totalResults

(Optional) The boolean value includes all results for the response. The default is false.

If true, the totalResults and hasMore properties are included in the response.

If false, the totalResults and hasMore properties are excluded in the response.

expandNodes

(Optional) The boolean value for showing parent and child line items in the response.

If true, child line items from the nodesExceptionList are excluded in the response.

If false, child line items from the nodesExceptionList are included in the response.

nodesExceptionList

(Optional) List of shopping cart child line item ids to exclude when the parent item is in the shopping cart

totalPrice

(Optional) The boolean value for including the total price in the response. The default is false.

If true, the total price is included in the response.

If false, the total price is excluded from the response.

Response Body Parameters

priceBookApplicable

The boolean value for showing the price book indicator

showAddToQuoteButton

The boolean value for showing the Add to Quote indicator

showCheckoutButton

The boolean value for showing the Checkout button indicator

processVarName

The variable name of the process

processName

The name of the process

items

Array of links to individual shopping cart items

limit

(Optional) The maximum number of items to show in the response

offset

(Optional) The starting position of the response rows

count

(Optional) The count of the shopping cart items returned in the response

totalResults

(Optional) When the totalResults request parameter is set to true, this value indicates the total count of items in the shopping cart

hasMore

(Optional) When the totalResults request parameter is set to true, this boolean value indicates if there are more shopping cart items available in the database

totalPrice

(Optional) The string value for the total price of the items in the shopping cart. The value includes the currency symbol.

hasChildren

(Optional) The boolean value indicates whether the item has child items

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/quotes/actions/_getMostRecentShoppingCart


ClosedRequest Sample

This sample includes optional pagination parameters.

{ "offset": 0, "limit": 2, "expandNodes": true, "totalResults": true }


ClosedResponse Sample

This sample includes optional pagination parameters.

{ "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts/transaction" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts" } ], "priceBookApplicable": true, "showAddToQuoteButton": false, "showCheckoutButton": true, "processVarName": "transaction", "processName": "Quotes", "limit": 2, "offset": 0, "count": 2, "totalResults": 4, "hasMore": true, "items": [{ "id": 3022707088, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems/3022707088" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems" } ], "parentId": -1, "name": "part100", "quantity": 1, "price": { "value": -1.0, "currency": "USD", "priceComment": "US Dollar price not defined." }, "mandatory": false, "enabled": true, "priceBookName": "", "description": "", "hasChildren": true }, { "id": 3022707090, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems/3022707090" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems" } ], "parentId": 3022707088, "name": "part1", "quantity": 1, "price": { "value": 1.33, "currency": "USD" }, "mandatory": false, "enabled": true, "priceBookName": "Base Price", "description": "", "hasChildren": false } ] }


ClosedGet Shopping Cart

Get Shopping Cart GET Method

Description

This endpoint returns a shopping cart for a process.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}

Endpoint Parameters

processVarName

The variable name of the process

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

priceBookApplicable

The boolean value for showing the price book indicator

showAddToQuoteButton

The boolean value for showing the Add to Quote indicator

showCheckoutButton

The boolean value for showing the Checkout button indicator

processVarName

The variable name of the process

processName

The name of the process

shoppingCartItems

Array of links to individual shopping cart items

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction


ClosedResponse Sample


ClosedGet Shopping Cart (POST)

Get Shopping Cart POST method

Description

This endpoint returns the shopping cart associated with the specified process.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}/actions/_getShoppingCart

End Parameters None

HTTP Method

POST

Request Body Parameters

limit

(Optional) The maximum number of items to show in the response. The default is 1000.

offset

(Optional) The starting position of the response rows. The default is 0.

totalResults

(Optional) The boolean value includes all results for the response. The default is false.

If true, the totalResults and hasMore properties are included in the response.

If false, the totalResults and hasMore properties are excluded in the response.

expandNodes

(Optional) The boolean value for showing parent and child line items in the response.

If true, child line items from the nodesExceptionList are excluded in the response.

If false, child line items from the nodesExceptionList are included in the response.

nodesExceptionList

(Optional) List of shopping cart child line item ids to exclude when the parent item is in the shopping cart

totalPrice

(Optional) The boolean value for including the total price in the response. The default is false.

If true, the total price is included in the response.

If false, the total price is excluded from the response.

Response Body Parameters

priceBookApplicable

The boolean value for showing the price book indicator

showAddToQuoteButton

The boolean value for showing the Add to Quote indicator

showCheckoutButton

The boolean value for showing the Checkout button indicator

processVarName

The variable name of the process

processName

The name of the process

items

Array of links and the shopping cart items

limit

(Optional) The maximum number of items to show in the response

offset

(Optional) The starting position of the response rows

count

(Optional) The count of the shopping cart items returned in the response

totalResults

(Optional) When the totalResults request parameter is set to true, this value indicates the total count of items in the shopping cart

hasMore

(Optional) When the totalResults request parameter is set to true, this boolean value indicates if there are more shopping cart items available in the database

totalPrice

(Optional) The string value for the total price of the items in the shopping cart. The value includes the currency symbol.

hasChildren

(Optional) The boolean value indicates whether the item has child items

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/actions/_getShoppingCart


ClosedRequest Sample

This sample includes optional pagination parameters.

{ "offset": 0, "limit": 2, "expandNodes": true, "totalResults": true }


ClosedResponse Sample

This sample includes optional pagination parameters.

{ "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts/transaction" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts" } ], "priceBookApplicable": true, "showAddToQuoteButton": false, "showCheckoutButton": true, "processVarName": "transaction", "processName": "Quotes", "limit": 2, "offset": 0, "count": 2, "totalResults": 4, "hasMore": true, "items": [{ "id": 3022707088, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems/3022707088" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems" } ], "parentId": -1, "name": "part100", "quantity": 1, "price": { "value": -1.0, "currency": "USD", "priceComment": "US Dollar price not defined." }, "mandatory": false, "enabled": true, "priceBookName": "", "description": "", "hasChildren": true }, { "id": 3022707090, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems/3022707090" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems" } ], "parentId": 3022707088, "name": "part1", "quantity": 1, "price": { "value": 1.33, "currency": "USD" }, "mandatory": false, "enabled": true, "priceBookName": "Base Price", "description": "", "hasChildren": false } ] }


ClosedGet All Shopping Cart Items

Get All Shopping Cart ItemsGET Method

Description

This endpoint returns all items for a shopping cart.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}/shoppingCartItems

Endpoint Parameters

processVarName

The variable name of the process

HTTP Method

GET

Response Body Parameters None
Response Body Parameters

links

Links to the related object

id

The unique identifier for the a shopping cart item

rel

The relationship to the object. The default is self.

parentId

The unique identifier for the shopping cart item parent

name

The string value for name of the shopping cart item

quantity

The quantity of the shopping cart item

mandatory

The boolean value for the mandatory indicator

enabled

The boolean value for the enabled indicator

priceBookName

The name of the price book for the shopping cart item

description

The description of the shopping cart item

price

The price of the shopping cart item

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems


ClosedResponse Sample


ClosedGet Shopping Cart Item

Get Shopping Cart ItemGET Method

Description

This endpoint returns an item from a shopping cart.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}/shoppingCartItems/{id}

Endpoint Parameters

processVarName

The variable name of the process

id

The unique identifier for the shopping cart item

HTTP Method

GET

Response Body Parameters

links

Links to the related object

id

The unique identifier for the a shopping cart item

parentId

The unique identifier for the shopping cart item parent

name

The string value for name of the shopping cart item

quantity

The quantity of the shopping cart item

mandatory

The boolean value for the mandatory indicator

enabled

The boolean value for the enabled indicator

priceBookName

The name of the price book for the shopping cart item

description

The description of the shopping cart item

price

The price of the shopping cart item

hasChildren

The boolean value to indicate if the item has child items

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems/3022707088


ClosedResponse Sample


ClosedAdd Selected Items to Quote

Add Selected Items to QuotePOST method

Description

This endpoint adds the selected items from the shopping cart to the current quote.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}/actions/_addToQuote

Endpoint Parameters

processVarName

The variable name of the process

HTTP Method

POST

Response Body Parameters

selections

The items selected in the shopping cart. The item ids for specific items or [] to indicate all items in the cart.

selectionMode

The mode setting for the selected items

Success Response The response contains the destinationUrl to launch the Transaction page

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/actions/_addToQuote


ClosedRequest Sample

Example 1: All items are selected in the shopping cart

{ "selections": [], "selectionMode": "ResultSetExceptSelected" }

Example 2: Specific items are selected in the shopping cart

{ "selections": [3022564637, 3022564638], "selectionMode": "" }


ClosedResponse Sample


ClosedCheck Out the Selected Items

Check out the Selected ItemsPOST method

Description

This endpoint adds the selected items from the shopping cart to a new quote.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}/actions/_checkout

Endpoint Parameters

processVarName

The variable name of the process

HTTP Method

POST

Response Body Parameters

selections

The items selected in the shopping cart. The item ids for specific items or [] to indicate all items in the cart.

selectionMode

The mode setting for the selected items

Success Response The response contains the destinationUrl to launch the Transaction page

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/actions/_checkout


ClosedRequest Sample

Example 1: All items are selected in the shopping cart

{ "selections": [], "selectionMode": "ResultSetExceptSelected" }

Example 2: Specific items are selected in the shopping cart

{ "selections": [3022564637, 3022564638], "selectionMode": "" }


ClosedResponse Sample


ClosedClear All Items from a Shopping Cart

Clear All Items from a Shopping CartPOST method

Description

This endpoint clears all shopping cart items from the shopping cart.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}/actions/_clearItems

Endpoint Parameters

processVarName

The variable name of the process

HTTP Method

POST

Request Body Parameters None
Success Response HTTP Code 204

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/actions/_clearItems


ClosedClear Shopping Cart Item

Clear Shopping Cart ItemDELETE method

Description

This endpoint clears a shopping cart item from the shopping cart.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}/shoppingCartItems/{id}

Endpoint Parameters

processVarName

The variable name of the process

HTTP Method

DELETE

Request Body Parameters None
Success Response HTTP Code 204

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/shoppingCartItems/3022564638


ClosedReturn to Quote

Return to QuotePOST method

Description

This endpoint returns to the quote URL from the shopping cart.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}/action/_returnToQuote

Endpoint Parameters

processVarName

The variable name of the process

HTTP Method

POST

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

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/actions/_returnToQuote


ClosedResponse Sample


ClosedGet All Shopping Cart Layouts

Get All Shopping Cart LayoutsGET Method

Description

This endpoint returns the layout definition for all shopping carts.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}/layouts

Endpoint Parameters

processVarName

The variable name of the process

HTTP Method

GET

Request Body Parameters None
Success Response The JSON data containing the desktop layout definition for all shopping carts

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/layouts


ClosedResponse Sample


ClosedGet Shopping Cart Layout

Get Shopping Cart LayoutGET Method

Description

This endpoint returns the layout definition for a specific shopping cart.

URI Endpoint

/rest/v17/shoppingCarts/{processVarName}/layouts/{layoutVarName}

Endpoint Parameters

processVarName

The variable name of the process

layoutVarName

The variable name of a shopping cart layout

HTTP Method

GET

Request Body Parameters None
Success Response The JSON data containing the desktop layout definition for the specified shopping cart

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/shoppingCarts/transaction/layouts/desktopLayout


ClosedResponse Sample


Notes

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

Related Topics

Related Topics Link IconSee Also