getParts Procedure
The getParts procedure returns all the information for a Parts Catalog item, that was added using the upload method of the Parts Catalog API.
Parameters
Here are the parameters of the getParts procedure:
Parameter Name | Mandatory | Type | Description |
---|---|---|---|
items | Yes | Array | Array of itemKey objects that identify the catalog items to get info for. |
itemKey Object Structure
Here is
the structure of the itemKey object:
Parameter Name | Mandatory | Type | Parts Catalog API Parameter for ‘item’ Element of ‘upload_catalog’ Request | Description |
---|---|---|---|---|
catalogId | Yes | Integer | None | A unique identifier of a catalog, which contains the item. Id can be retrieved using the getPartsCatalogsStructure procedure. |
label | Yes | String | label | A unique identifier of a part within a catalog. Can be changed after updating the catalog. |
Response for the getParts Procedure
Here are the fields that are returned:
Field Name | Type | Description |
---|---|---|
items | Array | Array of FoundItem objects. Each object represents one item whose data is available. |
notFoundItems | String | Array of itemKey objects. Each object contains the key fields of an item whose data is not available. |
foundItem Object Structure
Here
is the structure of the foundItem object:
Field Name | Type | Parts Catalog API Parameter for ‘item’ Element of ‘upload_catalog’ Request | Description |
---|---|---|---|
catalogId | Integer | None | A unique identifier of a catalog. |
itemId | Integer | None | A unique identifier of a part within a catalog. Can be changed after catalog update. |
label | String | label | A unique identifier of a part within a catalog. |
itemType | String | type | Item type |
inventoryType | String | None | Label of a corresponding inventory type in Oracle Field Service. Can be empty if the mapping of item types to inventory types isn’t configured in the catalog schema. Mapping between itemType and inventoryType can be found in the typeSchemas field of the getPartsCatalogStructure procedure result. |
fields | Object | fields | An object (dictionary) that contains the item's fields by it's labels. |
linkedItems | Array | linked_items | Array of LinkedItem objects. |
images | Array | images | An array of strings, where each string is a URL of an image. |
LinkedItem Object Structure
Here
is the structure of the linkedItem object:
Field Name | Type | Parts Catalog API Parameter for ‘LinkedItem’ Element of ‘upload_catalog’ Request | Description |
---|---|---|---|
id | Integer | None | A unique identifier of a linked part within a catalog. Can be changed after catalog update. |
label | String | label | A unique identifier of a linked part within a catalog. |
displayData | String | display_data | Text comments to the linked item to be displayed in GUI. |
Example of a Request
{
"apiVersion": 1,
"callId": "KnnXUxS7APzLBVIzY+8B0g==",
"method": "callProcedure",
"procedure": "getParts",
"params": {
"items": [
{
"catalogId": "2",
"label": "Switch_model_001"
},
{
"catalogId": "2",
"label": "Switch_009"
},
{
"catalogId": "4",
"label": "FM3-2048-007"
}
]
}
}
Example of a Response
{
"apiVersion": 1,
"method": "callProcedureResult",
"callId": "KnnXUxS7APzLBVIzY+8B0g==",
"resultData": {
"items": [
{
"catalogId": 2,
"itemId": 2,
"label": "Switch_001",
"itemType": "switch_type",
"inventoryType": "switch_general_eta",
"linkedItems": [
{
"id": 3,
"label": "Switch_002",
"displayData": "better"
}
],
"fields": {
"descr": "Automatic direction",
"model": "Switch_model_001",
"ports": "8 x Fast Ethernet (10/100 Mbit/s)",
"price": "25$",
"size": "151x81x33 mm,200 g",
"vendor": "Oracle"
},
"images": [
"https://example.com/switch_1.jpg"
]
},
{
"catalogId": 4,
"itemId": 3463,
"label": "FM3-2048-007",
"itemType": "parts",
"inventoryType": "",
"linkedItems": [
{
"id": 2350,
"label": "Z4603011",
"displayData": "5"
},
{
"id": 3160,
"label": "Z0293015",
"displayData": "7"
},
],
"fields": {
"cost": "54.2346747003",
"description": "NETWORK I/F BOARD PCB ASSY\nFirmware update 2",
"item_disposition": "Repairable",
"item_type": "BOARD",
"price": "174.85",
"vendor": "ORCL"
},
"images": [
"https://example.com/pictures/12.jpg",
"https://example.com/pictures/8.jpg",
"https://example.com/pictures/23.jpg",
"https://example.com/pictures/14.jpg"
]
}
],
"notFoundItems": [
{
"catalogId": 2,
"label": "Switch_009"
}
]
}
}