Parts REST APIs

Overview

This REST API is used to retrieve and search for Oracle CPQ parts. All endpoints are read-only; parts cannot be added, modified, or deleted using these web services.

Administration

ClosedGet All Parts

Get All PartsGET Method

Description

Use this endpoint to retrieve a list of all parts.

URI Endpoint

/rest/v17/parts

Endpoint Parameters

None

(Optional) This endpoint supports the following query specifications: expand, fields, limit, offset, orderby, q, and totalResults.

For more information, see Manage Collections.

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

A collection of parts.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/parts?limit=3


ClosedResponse Body Sample

{ "offset": 0, "limit": 3, "count": 3, "hasMore": true, "links": [{ "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/parts" }, { "rel": "next", "href": "https://sitename.oracle.com/rest/v17/parts?limit=3&offset=3" }, { "rel": "self", "href": "https://sitename.oracle.com/rest/v17/parts?limit=3&offset=0" } ], "items": [{ "enableSelfService": null, "_part_custom_field10": { "lookupCode": "External", "displayValue": "External", "id": 38272229, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22_PART_field10%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38272229" } ] }, "dateAdded": "2017-10-19T01:28:51.000Z", "bomItemVariableName": null, "_part_custom_field9": null, "id": 36551467, "_part_custom_field3": null, "_part_custom_field4": null, "_part_custom_field1": null, "_part_custom_field2": null, "_part_custom_field8": null, "_part_custom_field5": 0.0, "salesProductType": null, "configurableFlag": { "lookupCode": "0", "displayValue": "Not Configurable", "id": 38831190, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_CONFIGURABLE_FLAG%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38831190" } ] }, "status": { "lookupCode": "ORA_CREATED", "displayValue": "Created", "id": 38831140, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_CONFIG_PRODUCT_SETUP_STATUS%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38831140" } ] }, "eligibleForService": null, "directBuy": { "lookupCode": "1", "displayValue": "Direct Buy", "id": 36549639, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_PARTS_DIRECT_BUY%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/36549639" } ] }, "defaultUOMCode": null, "description": null, "leadTime": -1, "units": null, "eligibleToSell": null, "priceType": null, "numberOfPricePeriods": 0, "dateModified": "2021-04-19T12:10:26.000Z", "partDisplayNumber": "Green Server", "pricePeriod": null, "partNumberLower": "gs5004", "partNumber": "GS5004", "externalKey1": null, "externalKey2": null, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/parts/36551467" }, { "kind": "", "rel": "child", "name": "translations", "href": "https://sitename.oracle.com/rest/v17/parts/36551467/translations" } ] }, { "enableSelfService": null, "_part_custom_field10": { "lookupCode": "External", "displayValue": "External", "id": 38272229, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22_PART_field10%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38272229" } ] }, "dateAdded": "2017-11-13T13:57:14.000Z", "bomItemVariableName": null, "_part_custom_field9": null, "id": 36594573, "_part_custom_field3": null, "_part_custom_field4": null, "_part_custom_field1": null, "_part_custom_field2": null, "_part_custom_field8": { "lookupCode": "One Time", "displayValue": "One Time", "id": 36657633, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22_PART_field8%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/36657633" } ] }, "_part_custom_field5": 50.0, "salesProductType": null, "configurableFlag": { "lookupCode": "0", "displayValue": "Not Configurable", "id": 38831190, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_CONFIGURABLE_FLAG%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38831190" } ] }, "status": { "lookupCode": "ORA_CREATED", "displayValue": "Created", "id": 38831140, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_CONFIG_PRODUCT_SETUP_STATUS%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38831140" } ] }, "eligibleForService": null, "directBuy": { "lookupCode": "1", "displayValue": "Direct Buy", "id": 36549639, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_PARTS_DIRECT_BUY%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/36549639" } ] }, "defaultUOMCode": null, "description": null, "leadTime": -1, "units": null, "eligibleToSell": null, "priceType": null, "numberOfPricePeriods": 0, "dateModified": "2021-04-19T12:10:26.000Z", "partDisplayNumber": "Vario Tablet", "pricePeriod": null, "partNumberLower": "vario tablet custom", "partNumber": "Vario Tablet Custom", "externalKey1": null, "externalKey2": null, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/parts/36594573" }, { "kind": "", "rel": "child", "name": "translations", "href": "https://sitename.oracle.com/rest/v17/parts/36594573/translations" } ] }, { "enableSelfService": null, "_part_custom_field10": { "lookupCode": "External", "displayValue": "External", "id": 38272229, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22_PART_field10%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38272229" } ] }, "dateAdded": "2017-11-13T13:57:56.000Z", "bomItemVariableName": null, "_part_custom_field9": null, "id": 36594576, "_part_custom_field3": null, "_part_custom_field4": null, "_part_custom_field1": null, "_part_custom_field2": null, "_part_custom_field8": { "lookupCode": "One Time", "displayValue": "One Time", "id": 36657633, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22_PART_field8%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/36657633" } ] }, "_part_custom_field5": 20.0, "salesProductType": null, "configurableFlag": { "lookupCode": "0", "displayValue": "Not Configurable", "id": 38831190, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_CONFIGURABLE_FLAG%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38831190" } ] }, "status": { "lookupCode": "ORA_CREATED", "displayValue": "Created", "id": 38831140, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_CONFIG_PRODUCT_SETUP_STATUS%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38831140" } ] }, "eligibleForService": null, "directBuy": { "lookupCode": "1", "displayValue": "Direct Buy", "id": 36549639, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_PARTS_DIRECT_BUY%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/36549639" } ] }, "defaultUOMCode": null, "description": "Quad Core 1.9 GHz", "leadTime": -1, "units": null, "eligibleToSell": null, "priceType": null, "numberOfPricePeriods": 0, "dateModified": "2021-04-19T12:10:26.000Z", "partDisplayNumber": "Quad Core 1.9 GHz", "pricePeriod": null, "partNumberLower": "cpu-100m-19", "partNumber": "CPU-100M-19", "externalKey1": null, "externalKey2": null, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/parts/36594576" }, { "kind": "", "rel": "child", "name": "translations", "href": "https://sitename.oracle.com/rest/v17/parts/36594576/translations" } ] } ] }


ClosedGet a Part

Get a PartGET Method

Description

Use this endpoint to retrieve the specified part.

URI Endpoint

/rest/v17/part/{id}

Endpoint Parameters

id

The unique key identifying a part.

(Optional) This endpoint supports the expand parameter

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

Part Custom Fields

Oracle CPQ supports up to 600 part custom fields _part_custom_field1 through _part_custom_field600.

bomItemVariableName

Variable name of the root BOM item.

configurableFlag

Part Configurable Flag

dateAdded

System field indicating the date on which the part was created.

dateModified

System field indicating the date on which the part was last modified.

defaultUOMCode

Default unit of measure.

description

The description for the part.

directBuy

Determines how a part must be purchased.

eligibleForService

Enable this option, when integrating with a service request application.

eligibleToSell

Enable if the part should be visible to a sales person (If the part is sellable or not).

enableForService

When integrating with any customer self service application, enable this option to identify parts as self-service eligible.

externalKey1

External Key 1 references for parts coming in from external third party system.

externalKey2

External Key 1 references for parts coming in from external third party system.

id

The primary key for the part.

leadTime

Time taken in days for the part to be shipped.

numberofPricePeriods

Default number of price periods for a part.

partDisplayNumber

Part Number for display purpose.

partNumber

Part Number used to identify a part.

partNumberLower

Used to store part number in lower case.

pricePeriod

Default price period for the period.

priceType

Default price type applicable to the part- e.g. One-Time, Recurring or Usage-based.

salesProductType

Categorize the product by a product type.

status

Status of the product.

units

Number of units for the part number.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/parts/36594583


ClosedResponse Body Sample

{ "enableSelfService": null, "_part_custom_field10": { "lookupCode": "External", "displayValue": "External", "id": 38272229, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22_PART_field10%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38272229" } ] }, "dateAdded": "2017-11-13T13:59:28.000Z", "bomItemVariableName": null, "_part_custom_field9": null, "id": 36594583, "_part_custom_field3": null, "_part_custom_field4": null, "_part_custom_field1": null, "_part_custom_field2": null, "_part_custom_field8": { "lookupCode": "One Time", "displayValue": "One Time", "id": 36657633, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22_PART_field8%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/36657633" } ] }, "_part_custom_field5": 10.0, "salesProductType": null, "configurableFlag": { "lookupCode": "0", "displayValue": "Not Configurable", "id": 38831190, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_CONFIGURABLE_FLAG%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38831190" } ] }, "status": { "lookupCode": "ORA_CREATED", "displayValue": "Created", "id": 38831140, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_CONFIG_PRODUCT_SETUP_STATUS%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/38831140" } ] }, "eligibleForService": null, "directBuy": { "lookupCode": "1", "displayValue": "Direct Buy", "id": 36549639, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_PARTS_DIRECT_BUY%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/36549639" } ] }, "defaultUOMCode": null, "description": "1GB Memory", "leadTime": -1, "units": null, "eligibleToSell": null, "priceType": null, "numberOfPricePeriods": 0, "dateModified": "2021-04-19T12:10:26.000Z", "partDisplayNumber": "1GB Memory", "pricePeriod": null, "partNumberLower": "mem-100m-1", "partNumber": "MEM-100M-1", "externalKey1": null, "externalKey2": null, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/parts/36594583" }, { "kind": "", "rel": "child", "name": "translations", "href": "https://sitename.oracle.com/rest/v17/parts/36594583/translations" } ] }


ClosedSearch Parts

This REST API searches Oracle CPQ parts. Beginning in 18B The Search Parts REST API supports eligibility checking and filtering for the following scenarios: Search Parts using Configuration Context, Search Parts using Commerce Context, Perform a Quick Key Part Search, Search a List of Part Numbers, and Perform an Advanced Part Search.

Note: The Search Parts REST API supports customizing the REST response by specifying an advanced query object (i.e. “q” criteria) as a request body parameter. This allows administrators to customize the query by specifying various combinations of criteria.

Search Parts List POST method

Description

This operation is used to search parts based on Configuration attribute values. If account and user information is available in the authentication token, Eligibility Rules created on user and account attributes are applied.

URI Endpoint

/rest/v17/parts/actions/search

Endpoint Parameters

None

HTTP Method

POST

Request Body Parameters

 

 

 

 

 

 

 

criteria

A top-level object in the payload used to specify the fields used to filter the parts or limit the number of parts returned in the response.

* Advanced query object “q” criteria is supported.

context

 

 

 

 

 

This object contains the context definition for the part search and can include:

  • pricebookVarName

  • config or commerce.

pricebookVarName

The string value that specifies the variable name of the active price book. If the site uses price books, this is required.

config

 

 

 

 

 

The Configuration data for the part search.

currencyCode

The code for the desired currency

allProducts

Attributes belonging to all products

segment

The variable name of a segment

productLine

The variable name of a Product Line

model

The variable name of the a Model

commerce

Provides the Commerce process ID to be used in the part query.

id

Current unique user-side ID. This is the internal identifier for a transaction within an Oracle CPQ site

cacheInstanceId

The cache instance ID

currencyCode

The code for the desired currency

process

The process variable name

mainDocument

The main document variable name

Response Body Parameters

Returns a list of part numbers.

Use Case Examples

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/actions/search


ClosedRequest Body Sample - Configuration Context Parts Search

This operation is used to search parts based on Configuration attribute values. If account and user information is available in the authentication token, Eligibility Rules created on user and account attributes are applied.


{ "criteria": { "totalResults": true, "limit": 15, "offset": 0, "fields": ["partNumber", "_part_custom_field8", "_part_custom_field9", "_part_custom_field11", "_part_custom_field17", "directBuy", "units", "leadTime", "partDisplayNumber"], "q": "{\"partNumber\":{\"$like\": \"EligibilityForPartRESTAPICONFIGPart%\"}}" }, "context": { "pricebookVarName": "pricebook1", "config": { "allProducts": { "attributes": { "conditionsAllPF": "true" } }, "segment": { "variableName": "testbed", "attributes": { "aVPMSMCheckboxesOther": { "items": ["Value 1"] } } }, "productLine": { "variableName": "recommendedItems", "attributes": { "advancedCondition1": "true" } }, "model": { "variableName": "performance", "attributes": { "numberOfLineItems": "50" } } } } }


ClosedRequest Body Sample - Commerce Context Parts Search

When an Eligibility Rule is based on a Commerce attribute and a Transaction is created with values that satisfy the Eligibility Rule, this operation is used to search for parts using Transaction data.


{ "criteria": { "totalResults": true, "limit": 15, "offset": 0, "fields": ["partNumber", "_part_custom_field8", "_part_custom_field9", "_part_custom_field11", "_part_custom_field17", "directBuy", "units", "leadTime", "partDisplayNumber"], "q": "{\"partNumber\":{\"$like\": \"Basic Pricing 01\"}}" }, "context": { "pricebookVarName": "pricebook1", "commerce": { "id": "20587705" } } }


ClosedRequest Body Sample - Commerce Quick Key Search

In an Oracle CPQ Transaction, Quick Key line items are used to add parts to a quote without navigating away from the Transaction page and to auto - suggest a part to aid in part selection.The Search Part REST API allows implementers to build similar functionality where the Quick Key part selector auto - populates with part numbers when users enter characters into an item field in the Line Item Grid.


{ "context": { "pricebookVarName": "pricebook1", "commerce": { "id": "20516360", "cacheInstanceId": "3KR11zuA1UZzhlH2ohStrgwgRrlrYa9YbrSIY2OofoRPBbluv8MCYfm40Ag33nGP" } }, "criteria": { "q": "{\"partNumber\":{$like: \"part2690%\", $options:\"I\"}}", "fields": ["partDisplayNumber", "partNumber"], "totalResults": true, "limit": 10, "offset": 0 } }

Notes:

  • If cacheInstanceId is present, the id and process data are ignored.
  • If cacheInstanceId is not present and id is present, the id is used.
  • If cacheInstanceId and id are not available, Commerce attribute values are passed.

ClosedRequest Body Sample - Search List of Part Numbers

Used to filter a given list of parts. The list of parts is provided in the "q" parameter(concatenated with 'OR') of the criteria object.


{ "context": { "pricebookVarName": "pricebook1", "commerce": { "id": "20104203" } }, "criteria": { "q": "{ $or: [ { \"partNumber\": { $eq: \"part2690\" }}, { \"partNumber\": { $eq: \"part2691\" }} ] }" } }


ClosedRequest Body Sample - Advanced Part Search

This operation is used to search for parts using a single or combination of multiple part fields with Eligibility Rules applied. The part search criteria supports operators based on field type.

Search parts based on a part custom field, such as an MSM field.As shown in the below example, any MSM field can be searched using the value attribute.


{ "criteria": { "totalResults": true, "limit": 5, "offset": 0, "fields": ["_part_customfield16", "partNumber"], "q": "{$and:[{partNumber:\"EligibilityForPartRESTAPIPart3\"},{\"_part_customfield16.value\":{$ne:[\"Value 1\"]}}]}" }, "context": { "pricebookVarname": "pricebook1" } }


 

Notes

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

Related Topics

Related Topics Link IconSee Also