getPartsCatalogStructure Procedure
The getPartsCatalogStructure procedure returns the field type and schema for the available Parts Catalogs through the callProcedureResult method. This is the same data that you have configured using the create method of the Parts Catalog API.
Parameters
The getPartsCatalogStructure procedure doesn’t accept any parameters.
Response for the getPartsCatalogStructure Procedure
Here are the fields
that are returned for every Parts Catalog:
Field Name | Type | Parts Catalog API Parameter | Description |
---|---|---|---|
catalogId | Number | None | None |
label | String | label | None |
language | String | language | None |
name | String | name | Name of the catalog to be displayed in the user-interface. |
fieldSchemas | Array | field_schemas | Array of fieldSchema items, each of which contains one of the fields to be set for the catalog. |
typeSchemas | Array | type_schemas | Array of typeSchema items, each of which contains an item type and may also contain the inventory type corresponding to the item type. |
cacheLoadingState | Object | None | Status of loading the Parts Catalog contents to the device storage to be available in offline. Can be used to visualize the progress of loading. |
fieldSchema Item Structure
Here
is the structure of the fieldSchema item:
Field Name | Type | Parts Catalog API ‘typeSchema’ Element Parameter | Description |
---|---|---|---|
label | String | label | Field identifier |
name | String | name | Name of the field to be displayed in the user-interface. |
propertyLabel | String | property_label | Label of the corresponding inventory property in Oracle Fusion Field Service. |
searchable | Boolean | searchable | Whether the field is used for search. |
preview | Boolean | preview | Whether the field is cached in offline mode and displayed in the offline search results. |
typeSchema Item Structure
Here
is the structure of the typeSchema item:
Field Name | Type | Parts Catalog API ‘typeSchema’ Element Parameter | Description |
---|---|---|---|
itemType | String | item_type | Item type according to the catalog. |
inventoryType | String | inventory_type | Inventory type according to Oracle Fusion Field Service settings. |
cacheLoadingState Item Structure
Here is the structure of the cacheLoadingState item:
Field Name | Type | Description |
---|---|---|
isLoaded | String | Whether the all needed data of Parts catalog is loaded and is available offline |
loadedItemsNumber | Number | Number of catalog items that are loaded to the device |
totalItemsNumber | Number | Total number of catalog items to be loaded to the device |
loadedSize | Number | Amount of data that's loaded to the device (bytes) |
Example of a Request
{
"apiVersion": 1,
"callId": "CMFYN5AKpc9Yg1POv6773g==",
"method": "callProcedure",
"procedure": "getPartsCatalogsStructure"
}
Example of a Response
{
"apiVersion": 1,
"method": "callProcedureResult",
"callId": "CMFYN5AKpc9Yg1POv6773g==",
"resultData": [
{
"catalogId": 2,
"label": "network",
"language": "en",
"name": "Network devices",
"fieldSchemas": [
{
"label": "model",
"name": "Model",
"propertyLabel": "switch_model",
"searchable": true,
"preview": true
},
{
"label": "ports",
"name": "Ports",
"propertyLabel": false,
"searchable": true,
"preview": false
},
{
"label": "price",
"name": "Price",
"propertyLabel": "switch_price",
"searchable": false,
"preview": false
},
{
"label": "vendor",
"name": "Vendor",
"propertyLabel": false,
"searchable": false,
"preview": true
}
],
"typeSchemas": [
{
"itemType": "switch_type",
"inventoryType": "switch_general"
},
{
"itemType": "router_type",
"inventoryType": "router_general"
}
],
"cacheLoadingState": {
"isLoaded": true,
"loadedItemsNumber": 2,
"loadedSize": 1138,
"totalItemsNumber": 2
}
},
{
"catalogId": 4,
"label": "misc",
"language": "en",
"name": "Miscellaneous parts",
"fieldSchemas": [
{
"label": "item_type",
"name": "Item Type",
"propertyLabel": false,
"searchable": false,
"preview": false
},
{
"label": "description",
"name": "Item description",
"propertyLabel": false,
"searchable": true,
"preview": true
},
],
"typeSchemas": [
{
"itemType": "parts",
"inventoryType": "PART"
}
],
"cacheLoadingState": {
"isLoaded": true,
"loadedItemsNumber": 3558,
"loadedSize": 2793309,
"totalItemsNumber": 3558
}
}
]
}