Searches Parts List
/rest/v19/parts/actions/search
Request
- application/json
objectPart Search Collection Request Definitions-
context:
object Part Search Context
Title:
Part Search ContextContext definition for part search. -
criteria:
object Query Definition
Title:
Query DefinitionCaptures the query definition for the current resource request.
objectPart Search Context-
commerce:
object Commerce Data
Title:
Commerce DataTransaction data for part search. -
config:
object Config Data
Title:
Config DataConfig data for part search. -
pricebookVarName:
string
Title:
Pricebook Variable NameString value that specifies the variable Name of the pricebook.
objectQuery Definition-
actions:
array actions
Array of actions names, whose state is requested in the state object response.
-
childDefs:
array childDefs
-
enableHierarchy:
boolean
Parameter value should be true to execute hierarchy search and sort. Default value is false.
-
excludeFieldTypes:
array excludeFieldTypes
Array of field names that you want to exclude in the response.
-
expand:
array expand
Array of child resource names that you want to expand so that the contents return with the parent in the same request.
-
expandedDomainCriteria:
array expandedDomainCriteria
Map of dynamic menu field names, whose expanded domains are requested in the state object response, to a map of criteria, which are meant for filtering dynamic menu options. The criteria map should contain the node(s) information when dynamic menus on LIG are expanded. The criteria map also contains the search string. The search strings support contains, and are case-insensitive.
-
expandedDomains:
array expandedDomains
Array of field names, whose expanded domains are requested in the state object response.
-
expandNodes:
boolean
Boolean value that only be available when enableHierarchy is true. True = all nodes will be expanded; False = All nodes will be collapsed.Default value is true.
-
fields:
array fields
Array of field names that you wanted returned in a request.
-
groups:
array groups
Array of group names, whose state is requested in the state object response.
-
limit:
integer
Positive integer value that specifies the maximum number of items returned by the server.
-
nodesExceptionList:
array nodesExceptionList
Array of document_number, recording the nodes that violate current expandNodes flag
-
offset:
integer
Non-negative integer values that specifies the index of the first item to be returned. The offset index begins at 0. By default, the offset is 0, which returns all items starting from the first item in the collection.
-
orderBy:
array orderBy
Array of field names, each optionally followed by asc or desc, that specifies the order of items returned in the response payload.
-
q:
string
Filter (a ???where???clause) to restrict the items returned in the collection. By default, no filtering is applied.
-
state:
boolean
Boolean value that specifies whether to calculate the state property. By default, this value is set to false indicating that state is not calculated.
-
totalResults:
boolean
Boolean value that specifies whether to calculate the totalResults property. By default, this value is set to false indicating that totalResults is not calculated.
objectCommerce Data-
cacheInstanceId:
string
Title:
Cache Instance IdThe unique identifier for the entry of transaction data stored in the cache. This typically is obtained from first createTransaction or OpenTransaction action to avoid reload transaction data from db. -
currencyCode:
string
Title:
Currency CodeThe currencyCode value in which the attribute is represented -
id:
string
Title:
Transaction IdCurrent Unique Buyside ID of the transaction. -
mainDocument:
object MainDocument Data
Title:
MainDocument DataThe transaction's main document data. -
process:
object Process
Title:
ProcessThe transaction's process meta-data.
objectConfig Data-
allProducts:
object All Products
Title:
All ProductsHolds attribute data that belong to all products -
currencyCode:
string
Title:
Currency CodeThe currencyCode value in which the attribute is represented -
model:
object ConfiguratorDataDefinition
Title:
ConfiguratorDataDefinitionHolds configurator related data like variable name and attribute values -
productLine:
object ConfiguratorDataDefinition
Title:
ConfiguratorDataDefinitionHolds configurator related data like variable name and attribute values -
segment:
object ConfiguratorDataDefinition
Title:
ConfiguratorDataDefinitionHolds configurator related data like variable name and attribute values
objectMainDocument Data-
attributes:
object Attributes
Title:
AttributesA set of key, value pairs with key being attribute's variableName and value being the value of the attribute.If its an msm, it can take list of values in items array. -
variableName:
string
Title:
MainDocument Variable NameThe variable name of the main document that the current transaction data belongs to.
objectProcess-
variableName:
string
Title:
Process Variable NameThe variable name of the process that the current transaction data belongs to.
objectAttributesobjectAll Products-
attributes:
object Attributes
Title:
AttributesA set of key, value pairs with key being attribute's variableName and value being the value of the attribute.If its an msm, it can take list of values in items array.
objectConfiguratorDataDefinition-
attributes:
object Attributes
Title:
AttributesA set of key, value pairs with key being attribute's variableName and value being the value of the attribute.If its an msm, it can take list of values in items array. -
variableName:
string
The variableName of the configurator entity like segment,productLine,model
arrayarray-
Array of:
object Child query criteria.
Title:
Child query criteria.Captures the query criteria for the child resource.
arrayarrayarrayarrayarrayarrayarrayarrayobjectChild query criteria.-
name:
string
Rest alias name of the child resource this query belongs to.
-
queryDef:
object Query Definition
Title:
Query DefinitionCaptures the query definition for the current resource request. -
recursive:
boolean
Boolean value that specifies whether this query is a recursive expand on the current child resource query.
Response
- application/json
Default Response
objectPart Search Collection Response Definitions-
result:
object Part Collection Definitions
Title:
Part Collection Definitions
objectPart Collection Definitions-
count:
integer
The number of resource instances returned in the current range.
-
hasMore:
boolean
Returns true if more resources are available on the server than the subset returned in current page.
-
items:
array items
-
limit:
integer
The actual paging size used by the server.
-
offset:
integer
The offset used in the current page.
-
totalResults:
integer
Capture the total count of the resource instances, which not only includes the instances in the current range, but all instances on the server that satisfy the request.
array-
Array of:
object Part Instance Definitions
Title:
Part Instance Definitions
objectPart Instance Definitions-
_part_custom_field1:
string
Title:
Product Group -
_part_custom_field3:
string
Title:
Max discount % -
_part_custom_field4:
object Price Period
Title:
Price Period -
_part_custom_field5:
number
Title:
Cost -
_part_custom_field8:
object Price Type
Title:
Price Type -
bomItemVariableName:
string
Title:
Default Bom Item Variable NameVariable name of the root BOM item. -
configurableFlag:
object Configurable Flag
Title:
Configurable FlagPart Configurable Flag -
dateAdded:
string
Title:
Date AddedSystem field indicating the date on which the Resource was created. -
dateModified:
string
Title:
Date ModifiedSystem field indicating the date on which the Resource was last modified. -
defaultUOMCode:
string
Title:
Default UOM CodeDefault Unit of Measure. -
description:
string
Title:
DescriptionDescription of the part -
directBuy:
object Direct Buy
Title:
Direct BuyDetermines how the part must be purchased. -
eligibleForService:
string
Title:
Eligible for ServiceEnable this option, when integrating with a service request application. -
eligibleToSell:
string
Title:
Eligible to SellCheck this if the part should be visible to a sales person (If the part is sellable or not). -
enableSelfService:
string
Title:
Enable Customer Self-ServiceWhen integrating with any customer self service application- enable this option to identify parts as self-service eligible. -
externalKey1:
string
Title:
External Key 1References for parts coming in from external third party system. -
externalKey2:
string
Title:
External Key 2References for parts coming in from external third party system. -
id:
integer
Title:
IdPrimary Key of the part resource. -
leadTime:
integer
Title:
Lead TimeTime taken in days for the part to be shipped. -
listPrice:
string
Title:
List PriceList Price of the Parts -
numberOfPricePeriods:
integer
Title:
Number of Price PeriodsDefault number of price periods for a part. -
partDisplayNumber:
string
Title:
Part Display NumberPart Number for display purpose. -
partNumber:
string
Title:
Part NumberPart Number used to identify a part. -
partNumberLower:
string
Title:
Part Number LowerUsed to store part number in lower case. -
pricePeriod:
string
Title:
Price PeriodDefault price period for the period. -
priceType:
string
Title:
Price TypeDefault price type applicable to the part- e.g. One-Time, Recurring or Usage-based. -
salesProductType:
string
Title:
Sales Product TypeCategorize the product by selecting a product type. -
serviceDuration:
integer
Title:
Service DurationService Duration of the part -
serviceDurationPeriodCode:
string
Title:
Service Duration PeriodService Duration Period of the part -
serviceDurationTypeCode:
string
Title:
Service Duration TypeService Duration Type of the part -
status:
object Product Status
Title:
Product StatusStatus of the product -
units:
string
Title:
UnitsNumber of units for the part number
objectPrice Period-
displayValue:
string
Title:
Display ValueTranslated display name of the type for which fixed list of values can be defined. -
id:
integer
Title:
IdPrimary Key of the fixed list of value resource. -
lookupCode:
string
Title:
Lookup CodeLanguage independent code of the fixed list of value.
objectPrice Type-
displayValue:
string
Title:
Display ValueTranslated display name of the type for which fixed list of values can be defined. -
id:
integer
Title:
IdPrimary Key of the fixed list of value resource. -
lookupCode:
string
Title:
Lookup CodeLanguage independent code of the fixed list of value.
objectConfigurable Flag-
displayValue:
string
Title:
Display ValueTranslated display name of the type for which fixed list of values can be defined. -
id:
integer
Title:
IdPrimary Key of the fixed list of value resource. -
lookupCode:
string
Title:
Lookup CodeLanguage independent code of the fixed list of value.
objectDirect Buy-
displayValue:
string
Title:
Display ValueTranslated display name of the type for which fixed list of values can be defined. -
id:
integer
Title:
IdPrimary Key of the fixed list of value resource. -
lookupCode:
string
Title:
Lookup CodeLanguage independent code of the fixed list of value.
objectProduct Status-
displayValue:
string
Title:
Display ValueTranslated display name of the type for which fixed list of values can be defined. -
id:
integer
Title:
IdPrimary Key of the fixed list of value resource. -
lookupCode:
string
Title:
Lookup CodeLanguage independent code of the fixed list of value.
Examples
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.
The following examples show how to search parts by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.
curl - X POST -H "Authorization: Bearer <token>" - H "Content-type: application/json" https://sitename.oracle.com/rest/v19/parts/actions/search
Request Body Samples
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"
}
}
}
}
}
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"
}
}
}
Commerce Quick Key Search
In a 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": "3KR11zuA1UZzhlH2ohStrgwgRrlrYa9YbrSIY2OofoRPBbluv12MCYfm40Ag33nGP"
}
},
"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.
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\" }} ] }"
}
}
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"
}
}
Keywords Parts Search
The Parts Search REST API now accepts keywords as part of the search query. Keywords can include indexed parts fields and Part Custom Fields that have the Search Page field enabled.
Parts Field Example
{
"criteria": {
"totalResults": true,
"offset": 0,
"limit": 10,
"keywords": ["part10007"]
},
"context": {
"pricebookVarName": "_default_price_book"
}
}
Part Custom Field Example
{
"criteria": {
"totalResults": true,
"offset": 0,
"limit": 10,
"keywords": ["Custom Field 25"]
},
"context": {
"pricebookVarName": "_default_price_book"
}
}