Create Enterprise Assets and Part List Components

You can use REST API to create and update customer and enterprise assets in the asset repository. You can create and update the assets, their associated structure, part list items, and charges details.

Let's discuss these scenarios:

  • Create an enterprise asset

  • Create a part list component

Here's a typical application processing flow for the scenarios:

  1. You create a simple enterprise asset with the attributes to populate in a work center location type

  2. You create a part list component and associate it to the enterprise asset

Create an Enterprise Asset

Example URL

Use this resource URL format.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/installedBaseAssets"

Example Request

This table shows the typical attributes to create an enterprise asset.

Value Description

AssetNumber

Number that uniquely identifies the asset. This attribute is optional. If you do not provide it, the application uses the asset identifier.

ItemNumber

Number that uniquely identifies the item that the asset references. This attribute is required to create the asset if the ItemRequiredFlag attribute is true.

LotNumber

Number that uniquely identifying the lot that that the asset references to control the item in inventory. This attribute is applicable when the item is lot controlled. If the lot number does not exist in the inventory, then the application creates a lot in the inventory application.

Serial

Number that uniquely identifies the serial that the asset references. This attribute is used when item is serial controlled. If the serial number does not exist in the inventory, then the application creates a serial in the inventory application.

Quantity

Quantity for the item that the asset references. This attribute is required to create the asset.

OperatingOrganizationCode

Abbreviation that uniquely identifies the organization that creates or operates the asset. This attribute is optional to create a customer asset if not provided the item master organization is used.

CurrentLocationContextCode

Abbreviation that uniquely identifies the location context where the asset currently resides. A list of accepted values is defined in the lookup type ORA_CSE_CURRENT_LOC_CONTEXT. For the case the expected value is ORA_WORK_CENTER

LocationOrganizationId

Value that uniquely identifies the organization where the asset currently resides. You can provide the location organization if the attribute CurrentLocationContextCode value is ORA_WORK CENTER.

WorkCenterId

Value that uniquely identifies the work center where the asset currently resides. You can provide the work center if the attribute CurrentLocationContextCode value is ORA_WORK CENTER.

DfltWoTypeCode

Abbreviation that uniquely identifies the work order type. A list of accepted values is defined in the lookup type ORA_MNT_WO_TYPE. The application uses this attribute to set the work order type when it creates a work order for the asset.

DfltWoSubTypeCode

Abbreviation that uniquely identifies the work order sub type. A list of accepted values is defined in the lookup type ORA_MNT_WO_SUB_TYPE. The application uses this attribute to set the work order subtype when it creates a work order for the asset.

MaintainableFlag

Contains one of the following values: Y or N. If Y, then enable the asset for a maintenance activity such as a maintenance program or maintenance work order. If N, then do not enable. The default value is Y for maintainable items.

NewWoAllowedFlag

Contains one of the following values: Y or N. If Y, then allow the application to create a work order for the asset. If N, then do not allow. The default value is Y for maintainable items.

Here's an example of the request body in JSON format.

Include any specific HTTP request headers to be used.

Example: Specify the date effective header Range: Effective-Of: RangeMode=CORRECT

{
"AssetNumber": "F/0554-3133",
"Description": "Professional combined Bench Grinder Fervi",
"Quantity": 1,
"OperatingOrganizationCode": "MNTALM",
"ItemNumber": "F/0554",
"SerialNumber" : "SR554-341",
"CurrentLocationContextCode":"ORA_WORK_CENTER",
"LocationOrganizationId": 300100113363336,
"WorkCenterId": 300100117993736,
"MaintainableFlag": true,
"NewWoAllowedFlag": true,
"DfltWoTypeCode": "CORRECTIVE",
"DfltWoSubTypeCode": "ORA_SAFETY",
}

Example Response

Here's an example of the response body in JSON format.

{
	"ActiveEndDate" : null,
	"AssetId" : 300100176686291,
	"AssetNumber" : "F/0554-3133",
	"BOMExplosionFlag" : null,
	"CompetitorAssetFlag" : false,
	"CurrentLocationContextCode" : "ORA_WORK_CENTER",
	"CurrentLocationId" : null,
	"CustomerAccountId" : null,
	"CustomerAccountSiteId" : null,
	"CustomerAccountSiteUseId" : null,
	"CustomerAssetEndDate" : null,
	"CustomerAssetStartDate" : null,
	"CustomerBillingPartyId" : null,
	"CustomerBillingPartySiteId" : null,
	"CustomerId" : null,
	"CustomerSiteId" : null,
	"CustomerSitePartyId" : null,
	"Description" : "Professional combined Bench Grinder Fervi",
	"DfltWoSubTypeCode" : "ORA_SAFETY",
	"DfltWoTypeCode" : "CORRECTIVE",
	"InServiceDate" : null,
	"InstalledDate" : null,
	"LocatorId" : null,
	"IotEnabledFlag" : null,
	"ItemId" : 300100114215977,
	"OperatingOrganizationId" : 300100113363336,
	"ItemRevision" : null,
	"LocationOrganizationId" : 300100113363336,
	"LotNumber" : null,
	"MaintainableFlag" : true,
	"NewWoAllowedFlag" : true,
	"PurchaseDate" : null,
	"Quantity" : 1,
	"RegistrationDate" : null,
	"SalesOrderId" : null,
	"SalesOrderLineId" : null,
	"SalesOrderLineNumber" : null,
	"SalesOrderNumber" : null,
	"SalesOrderSourceSystem" : null,
	"SalesOrderSourceSystemType" : null,
	"SerialNumber" : "SR554-3133",
	"ShipmentDate" : null,
	"SoldByBusinessUnitId" : null,
	"SubinventoryCode" : null,
	"UOMCode" : "Ea",
	"UpdateContractFlag" : null,
	"WorkCenterId" : 300100117993736,
	"WorkCenterName" : "Mechanical Maintenance",
	"LocationOrganizationCode" : null,
	"SoldByBusinessUnitName" : null,
	"CustomerSitePartyName" : null,
	"CustomerSitePartyNumber" : null,
	"CustomerSiteName" : null,
	"CustomerSiteNumber" : null,
	"CustomerAccountName" : null,
	"CustomerAccountNumber" : null,
	"CustomerAccountSiteName" : null,
	"CustomerAccountSiteNumber" : null,
	"CustomerAccountSiteUseCode" : null,
	"OperatingOrganizationCode" : null,
	"ManageAssetPrivilege" : "M",
	"ItemNumber" : null,
	"CustomerName" : null,
	"CustomerNumber" : null,
	"ItemRequiredFlag" : false,
	"Country" : null,
	"City" : null,
	"PostalCode" : null,
	"State" : null,
	"Address1" : null,
	"Address2" : null,
	"Address3" : null,
	"Address4" : null,
	"Province" : null,
	"County" : null,
	"OperatingOrganizationName" : null,
	"CurrentLocationContext" : null,
	"WorkCenterCode" : "Mechanical Maintenance",
	"LocatorName" : null,
	"CurrentLocationName" : null,
	"links" : [ {
		"rel" : "self",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100176686291",
		"name" : "installedBaseAssets",
		"kind" : "item",
		"properties" : {
			"changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
		}
	}, {
		"rel" : "canonical",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100176686291",
		"name" : "installedBaseAssets",
		"kind" : "item"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100176686291/child/charges",
		"name" : "charges",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100176686291/child/meters",
		"name" : "meters",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100176686291/child/assetDFF",
		"name" : "assetDFF",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100176686291/child/partsListComponents",
		"name" : "partsListComponents",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100176686291/child/relationships",
		"name" : "relationships",
		"kind" : "collection"
	} ]
}

Create a Part List Component

Example URL

Use this resource URL format.

Specify asset identifier to which the part list item needs to be added; for example, 300100179249436.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/installedBaseAssets/00100179249436/child/partsListComponents"

Example Request

This table shows the typical attributes to create a part list component:

Value Description

ItemOrganizationId

Value that uniquely identifies the organization to which the part list item is assigned to. This is a required attribute.

ItemId

Number that uniquely identifies the item that the asset references. This attribute is required to create the asset if the ItemRequiredFlag attribute is true.

ComponentQuantity

Number that uniquely identifying the lot that that the asset references to control the item in inventory. This attribute is applicable when the item is lot controlled. If the lot number does not exist in the inventory, then the application creates a lot in the inventory application.

Here's an example of the request body in JSON format.

{
"ItemOrganizationId":"300100113363336",
"ComponentQuantity":"1",
"ItemId":"300100013645842"
}

Example Response

Here's an example of the response body in JSON format.

{
	"RelationshipId" : 300100176686313,
	"AssetId" : 300100176686307,
	"AssetNumber" : "F/0554-3134_CHILD",
	"SerialNumber" : "SR554-3134",
	"ItemNumber" : null,
	"links" : [ {
		"rel" : "self",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100176686291/child/relationships/300100176686313",
		"name" : "relationships",
		"kind" : "item",
		"properties" : {
			"changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
		}
	}, {
		"rel" : "canonical",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100176686291/child/relationships/300100176686313",
		"name" : "relationships",
		"kind" : "item"
	}, {
		"rel" : "parent",
		"href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100176686291",
		"name" : "installedBaseAssets",
		"kind" : "item"
	} ]
}