Create Assets Using Location Types
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 creating an enterprise asset using various location types.
-
You can create an enterprise asset using unknown location type. This table shows the values that are required to create an asset with an unknown location type:
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. You need the item to create an asset if the ItemRequiredFlag is true.
Quantity
Quantity for the item that the asset references. This attribute is required to create the asset.
OperatingOrganizationCode
Value that uniquely identifies the organization that creates or operates the asset.
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. To create an asset with an unknown location type the value of this attribute is ORA_UNKNOWN.
-
You can create an enterprise asset using work center location type. This table shows the values that are required to create an asset with a work center location type:
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. You need the item to create an asset if the ItemRequiredFlag is true.
Quantity
Quantity for the item that the asset references. This attribute is required to create the asset.
OperatingOrganizationCode
Organization in which the asset is operated or is created.
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. To create an asset with a work center location type the value of this attribute is ORA_WORK_CENTER.
LocationOrganizationId
Value that uniquely identifies the organization where the asset currently resides.
WorkCenterId
Value that uniquely identifies the work center where the asset currently resides.
-
You can create an enterprise asset using internal address location type. This table shows the values that are required to create an asset with an internal address location type:
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. You need the item to create an asset if the ItemRequiredFlag is true.
Quantity
Quantity for the item that the asset references. This attribute is required to create the asset.
OperatingOrganizationCode
Organization in which the asset is operated or is created.
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. To create an asset with an internal address location type the value of this attribute is ORA_INTERNAL_LOCATION.
CurrentLocationId
Value that uniquely identifies the location where the asset currently resides.
-
You can create an enterprise asset using external address location type. This table shows the values that are required to create an asset with an external address location type:
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. You need the item to create an asset if the ItemRequiredFlag is true.
Quantity
Quantity for the item that the asset references. This attribute is required to create the asset.
OperatingOrganizationCode
Organization in which the asset is operated or is created.
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. To create an asset with an external address location type the value of this attribute is ORA_EXTERNAL_LOCATION.
Address1
First line of the address where the asset is located.
Address2
Second line of the address where the asset is located.
Address3
Third line of the address where the asset is located.
Address4
Fourth line of the address where the asset is located.
City
City of the external address where the asset is located.
Country
Country where the asset is located.
County
County where the asset is located.
Postal Code
Abbreviation that identifies the postal area where the asset resides.
Province
Province where the asset resides.
-
You can create an enterprise asset using customer address location type. This table shows the values that are required to create an asset with a customer address location type:
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. You need the item to create an asset if the ItemRequiredFlag is true.
Quantity
Quantity for the item that the asset references. This attribute is required to create the asset.
OperatingOrganizationCode
Organization in which the asset is operated or is created.
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. To create an asset with a customer address location type the value of this attribute is ORA_CUSTOMER.
CustomerSiteId
Value that uniquely identifies the customer site where the asset currently resides.
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
Specify the current location context code.
"CurrentLocationContextCode":"ORA_UNKNOWN"
Here's an example of the request body in JSON format.
{ "AssetNumber": "F/0554-327", "Description": "Professional combined Bench Grinder Fervi", "ItemNumber": "F/0554", "Quantity": 1, "OperatingOrganizationCode": "V1", "CurrentLocationContextCode":"ORA_UNKNOWN" }
Example Response
Here's an example of the response body in JSON format.
{ "ActiveEndDate" : null, "AssetId" : 300100181427632, "AssetNumber" : "F/0554-327", "BOMExplosionFlag" : null, "CompetitorAssetFlag" : false, "CurrentLocationContextCode" : "ORA_UNKNOWN", "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" : null, "DfltWoTypeCode" : null, "InServiceDate" : null, "InstalledDate" : null, "LocatorId" : null, "IotEnabledFlag" : null, "ItemId" : 300100114215977, "OperatingOrganizationId" : 204, "ItemRevision" : null, "LocationOrganizationId" : null, "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" : null, "ShipmentDate" : null, "SoldByBusinessUnitId" : null, "SubinventoryCode" : null, "UOMCode" : "Ea", "UpdateContractFlag" : null, "WorkCenterId" : null, "WorkCenterName" : null, "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" : null, "LocatorName" : null, "CurrentLocationName" : null, "links" : [ { "rel" : "self", "href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181427632", "name" : "installedBaseAssets", "kind" : "item", "properties" : { "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel" : "canonical", "href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181427632", "name" : "installedBaseAssets", "kind" : "item" }, { "rel" : "child", "href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181427632/child/charges", "name" : "charges", "kind" : "collection" }, { "rel" : "child", "href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181427632/child/meters", "name" : "meters", "kind" : "collection" }, { "rel" : "child", "href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181427632/child/assetDFF", "name" : "assetDFF", "kind" : "collection" }, { "rel" : "child", "href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181427632/child/partsListComponents", "name" : "partsListComponents", "kind" : "collection" }, { "rel" : "child", "href" : "https://servername/fscmRestApi/resources/version/installedBaseAssets/300100181427632/child/relationships", "name" : "relationships", "kind" : "collection" } ] }