Create Asset
/rest/v16/assets
Request
- application/json
object
Assets
-
assetDescription:
string
Title:
Asset Description
Description of the asset. -
assetKey:
string
Title:
Asset Key
An invariant key that uniquely identifies the asset/component for the lifetime of the asset. It will be unique across all asset repositories. -
attributes:
object Attributes
Title:
Attributes
A JSON collection of key/value pair attributes that define the configuration of this asset/component. -
billingAccount:
string
Title:
Billing Account
The billing account associated with this asset. -
billingProfile:
string
Title:
Billing Profile
The billing profile associated with this asset. -
bomItemId:
string
Title:
BOM Item Id
The BOM item identifier -
contractReference:
string
Title:
Contract Reference
Contract associated with this asset. -
currency:
object Currency
Title:
Currency
The currency code for the asset. -
customer:
string
Title:
Customer
The customer that owns the product. This is the value stored in the main document XML attribute _customer_id. -
dateAdded:
string
Title:
Date Added
System field indicating the date that the resource was created. -
dateModified:
string
Title:
Date Modified
System field indicating the date that the resource was last modified. -
discountAmount:
object Discount Amount
Title:
Discount Amount
The amount of discount received. -
discountPercent:
number
Title:
Discount Percent
The percent of discount received. -
displayKey:
string
Title:
Display Key
The public, non-unique key for the product instance. For example, phone number or serial number. -
endDate:
string
Title:
End Date
The date that the service contract ends. -
fixedRecurringAmount:
object Fixed Recurring Amount
Title:
Fixed Recurring Amount
The recurring charge for the product. For example, $10 per month. -
fixedRecurringPeriod:
string
Title:
Fixed Recurring Period
The period for the fixed recurring charge. For example, Per Month. -
id:
integer
Title:
Id
The primary key of the asset resource. -
installDate:
string
Title:
Install Date
The date that the asset was installed. -
modelPath:
string
Title:
BOM Model Path
The path to a model in the BOM hierarchy. -
oneTimeNetAmount:
object One Time Net Amount
Title:
One Time Net Amount
The price paid to purchase the product. -
origTransactionId:
string
Title:
Original Transaction Id
The Id of the original transaction used to create the asset. -
parentAsset:
object Parent Asset Id
Title:
Parent Asset Id
The parent component of the asset tree. -
parentBomItemId:
string
Title:
Parent BOM Item Id
The BOM item identifier of the parent asset. -
parentDisplay:
string
Title:
Parent Display
The display key of the parent asset. -
parentPartNumber:
string
Title:
Parent Part Number
The part number of the parent asset. -
partNumber:
string
Title:
Part Number
Part Number of the referenced product instance. -
paymentTerm:
string
Title:
Payment Term
The payment terms. For example, Net 30. -
purchaseDate:
string
Title:
Purchase Date
The date that the product or service was purchased. -
quantity:
number
Title:
Quantity
The quantity of the asset. -
registeredDate:
string
Title:
Registered Date
The date that the product was registered. -
resumeDate:
string
Title:
Resumed Date
The date that the service contract was resumed. -
rootAsset:
object Root Asset Id
Title:
Root Asset Id
The root component in the asset tree. -
rootDisplay:
string
Title:
Root Display
The display key of the root asset. -
rootPartNumber:
string
Title:
Root Part Number
The part number of the root asset. -
serialNumber:
string
Title:
Serial Number
The serial Number of the asset. -
serviceAccount:
string
Title:
Service Account
The service account associated with this asset. -
serviceAddress:
string
Title:
Service Address
The service address associated with this asset. -
startDate:
string
Title:
Starts Date
The date that the service contract starts. -
status:
object Status
Title:
Status
The status of the asset. -
suspendDate:
string
Title:
Suspend Date
The date that the service contract was suspended. -
usageNetAmount:
object Usage Net Amount
Title:
Usage Net Amount
The variable, usage price for the product. For example, $0.10 per Copy. -
usageUnitOfMeasure:
string
Title:
Usage Unit of Measure
The unit of measure for the usage charges. For example, Per Copy or Per Minute. -
warrantyEndDate:
string
Title:
Warranty End Date
The date that the warranty ends. -
warrantyStartDate:
string
Title:
Warranty Start Date
The date that the warranty starts.
object
Attributes
object
Currency
-
currencyCode:
string
Title:
Currency Code
Unique currency code for the currency.
object
Discount Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
object
Fixed Recurring Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
object
One Time Net Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
object
Parent Asset Id
-
assetKey:
string
Title:
Asset Key
An invariant key that uniquely identifies the asset / component for the lifetime of the asset. It will be unique across all asset repositories. -
id:
integer
Title:
Id
Primary Key of Asset Resource.
object
Root Asset Id
-
assetKey:
string
Title:
Asset Key
An invariant key that uniquely identifies the asset / component for the lifetime of the asset. It will be unique across all asset repositories. -
id:
integer
Title:
Id
Primary Key of Asset Resource.
object
Status
-
displayValue:
string
Title:
Display Value
Translated display name of the type for which fixed list of values can be defined. -
id:
integer
Title:
Id
Primary Key of the fixed list of value resource. -
lookupCode:
string
Title:
Lookup Code
Language independent code of the fixed list of value.
object
Usage Net Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
Response
- application/json
Default Response
object
Assets
-
assetDescription:
string
Title:
Asset Description
Description of the asset. -
assetKey:
string
Title:
Asset Key
An invariant key that uniquely identifies the asset/component for the lifetime of the asset. It will be unique across all asset repositories. -
attributes:
object Attributes
Title:
Attributes
A JSON collection of key/value pair attributes that define the configuration of this asset/component. -
billingAccount:
string
Title:
Billing Account
The billing account associated with this asset. -
billingProfile:
string
Title:
Billing Profile
The billing profile associated with this asset. -
bomItemId:
string
Title:
BOM Item Id
The BOM item identifier. -
contractReference:
string
Title:
Contract Reference
The contract associated with this asset. -
currency:
object Currency
Title:
Currency
Currency Code for the asset -
customer:
string
Title:
Customer
The customer that owns the product. This is the value stored in the main document XML attribute _customer_id. -
dateAdded:
string
Title:
Date Added
System field indicating the date on that the resource was created. -
dateModified:
string
Title:
Date Modified
System field indicating the date that the resource was last modified. -
descendantAssets:
object descendantAssets-collection
Title:
descendantAssets-collection
-
discountAmount:
object Discount Amount
Title:
Discount Amount
The amount of discount received. -
discountPercent:
number
Title:
Discount Percent
The percent of discount received. -
displayKey:
string
Title:
Display Key
The public, non-unique key for the product instance. For example, phone number or serial number. -
endDate:
string
Title:
End Date
The date the the service contract ends. -
fixedRecurringAmount:
object Fixed Recurring Amount
Title:
Fixed Recurring Amount
The recurring charge for the product. For example, $10 per month. -
fixedRecurringPeriod:
string
Title:
Fixed Recurring Period
The period for the fixed recurring charge. For example, Per Month. -
id:
integer
Title:
Id
The Primary key of the asset resource. -
installDate:
string
Title:
Install Date
The date that the asset was installed. -
modelPath:
string
Title:
BOM Model Path
The path to a model in the BOM hierarchy. -
oneTimeNetAmount:
object One Time Net Amount
Title:
One Time Net Amount
The price paid to purchase the product. -
origTransactionId:
string
Title:
Original Transaction Id
The Id of the original transaction used to create the asset. -
parentAsset:
object Parent Asset Id
Title:
Parent Asset Id
The parent component of the asset tree. -
parentBomItemId:
string
Title:
Parent BOM Item Id
The BOM item identifier of the parent asset. -
parentDisplay:
string
Title:
Parent Display
The display key of the parent asset. -
parentPartNumber:
string
Title:
Parent Part Number
The part number of the parent asset. -
partDescription:
string
Title:
Part Description
The description of the part. -
partNumber:
string
Title:
Part Number
Part Number of the referenced product instance. -
paymentTerm:
string
Title:
Payment Term
The payment terms. For example, Net 30. -
purchaseDate:
string
Title:
Purchase Date
The date that the product or service was purchased. -
quantity:
number
Title:
Quantity
The quantity of the asset. -
registeredDate:
string
Title:
Registered Date
The date that the product was registered. -
resumeDate:
string
Title:
Resume Date
The date that the the service contract was resumed. -
rootAsset:
object Root Asset Id
Title:
Root Asset Id
The root component in the asset tree. -
rootDisplay:
string
Title:
Root Display
The display key of the root asset. -
rootPartNumber:
string
Title:
Root Part Number
The part number of the root asset. -
serialNumber:
string
Title:
Serial Number
The serial number of the asset. -
serviceAccount:
string
Title:
Service Account
The service account associated with this asset. -
serviceAddress:
string
Title:
Service Address
The service address associated with this asset. -
startDate:
string
Title:
Start Date
The date that the service contract starts. -
status:
object Status
Title:
Status
The status of the asset. -
suspendDate:
string
Title:
Suspend Date
The date that the service contract was suspended. -
usageNetAmount:
object Usage Net Amount
Title:
Usage Net Amount
The variable, usage price for the product. For example, $0.10 per Copy. -
usageUnitOfMeasure:
string
Title:
Usage Unit of Measure
The unit of measure for the usage charges. For example, Per Copy or Per Minute. -
warrantyEndDate:
string
Title:
Warranty End Date
The date that the warranty ends. -
warrantyStartDate:
string
Title:
Warranty Start Date
The date that the warranty starts.
object
Attributes
object
Currency
-
currencyCode:
string
Title:
Currency Code
Unique currency code for the currency.
object
descendantAssets-collection
-
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.
object
Discount Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
object
Fixed Recurring Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
object
One Time Net Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
object
Parent Asset Id
-
assetKey:
string
Title:
Asset Key
An invariant key that uniquely identifies the asset / component for the lifetime of the asset. It will be unique across all asset repositories. -
id:
integer
Title:
Id
Primary Key of Asset Resource.
object
Root Asset Id
-
assetKey:
string
Title:
Asset Key
An invariant key that uniquely identifies the asset / component for the lifetime of the asset. It will be unique across all asset repositories. -
id:
integer
Title:
Id
Primary Key of Asset Resource.
object
Status
-
displayValue:
string
Title:
Display Value
The translated display name of the type for which fixed list of values can be defined. -
id:
integer
Title:
Id
The primary key of the fixed list of value resource. -
lookupCode:
string
Title:
Lookup Code
Language independent code of the fixed list of value.
object
Usage Net Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
array
-
Array of:
object descendantAssetsDef
Title:
descendantAssetsDef
object
descendantAssetsDef
-
assetDescription:
string
Title:
Asset Description
The description of the asset. -
assetKey:
string
Title:
Asset Key
An invariant key that uniquely identifies the asset/component for the lifetime of the asset. It will be unique across all asset repositories. -
attributes:
object Attributes
Title:
Attributes
A JSON collection of key/value pair attributes that define the configuration of this asset/component. -
billingAccount:
string
Title:
Billing Account
The billing account associated with this asset. -
billingProfile:
string
Title:
Billing Profile
The billing profile associated with this asset. -
bomItemId:
string
Title:
BOM Item Id
The BOM item identifier. -
contractReference:
string
Title:
Contract Reference
The contract associated with this asset. -
currency:
object Currency
Title:
Currency
Currency Code for the asset -
customer:
string
Title:
Customer
The customer that owns the product. This is the value stored in the main document XML attribute _customer_id. -
dateAdded:
string
Title:
Date Added
System field indicating the date that the resource was created. -
dateModified:
string
Title:
Date Modified
System field indicating the date that the resource was last modified. -
discountAmount:
object Discount Amount
Title:
Discount Amount
The amount of discount received. -
discountPercent:
number
Title:
Discount Percent
The percent of discount received. -
displayKey:
string
Title:
Display Key
The public, non-unique key for the product instance. For example, phone number or serial number. -
endDate:
string
Title:
End Date
The date that the service contract ends. -
fixedRecurringAmount:
object Fixed Recurring Amount
Title:
Fixed Recurring Amount
The recurring charge for the product. For example, $10 per month. -
fixedRecurringPeriod:
string
Title:
Fixed Recurring Period
The period for the fixed recurring charge. For example, Per Month. -
id:
integer
Title:
Id
The primary key of the asset resource. -
installDate:
string
Title:
Install Date
The date that the asset was installed. -
modelPath:
string
Title:
BOM Model Path
The path to a model in the BOM hierarchy. -
oneTimeNetAmount:
object One Time Net Amount
Title:
One Time Net Amount
The price paid to purchase the product. -
origTransactionId:
string
Title:
Original Transaction Id
The Id of the original transaction used to create the asset. -
parentAsset:
object Parent Asset Id
Title:
Parent Asset Id
The parent component of the asset tree. -
parentBomItemId:
string
Title:
Parent BOM Item Id
The BOM item identifier of the parent asset. -
parentDisplay:
string
Title:
Parent Display
The display key of the parent asset. -
parentPartNumber:
string
Title:
Parent Part Number
The part number of the parent asset. -
partDescription:
string
Title:
Part Description
The description of the part. -
partNumber:
string
Title:
Part Number
Part Number of the referenced product instance. -
paymentTerm:
string
Title:
Payment Term
The payment terms. For example, Net 30. -
purchaseDate:
string
Title:
Purchase Date
The date that the product or service was purchased. -
quantity:
number
Title:
Quantity
The quantity of the asset. -
registeredDate:
string
Title:
Registered Date
The date that the product was registered. -
resumeDate:
string
Title:
Resume Date
The date that the service contract was resumed. -
rootAsset:
object Root Asset Id
Title:
Root Asset Id
The root component in the asset tree. -
rootDisplay:
string
Title:
Root Display
The display key of the root asset. -
rootPartNumber:
string
Title:
Root Part Number
The part number of the root asset. -
serialNumber:
string
Title:
Serial Number
The serial number of the asset. -
serviceAccount:
string
Title:
Service Account
The service account associated with this asset. -
serviceAddress:
string
Title:
Service Address
The service address associated with this asset. -
startDate:
string
Title:
Start Date
The date that the service contract starts. -
status:
object Status
Title:
Status
The status of the asset -
suspendDate:
string
Title:
Suspend Date
The date that the service contract was suspended. -
usageNetAmount:
object Usage Net Amount
Title:
Usage Net Amount
The variable, usage price for the product. For example, $0.10 per Copy. -
usageUnitOfMeasure:
string
Title:
Usage Unit of Measure
The unit of measure for the usage charges. For example, Per Copy or Per Minute. -
warrantyEndDate:
string
Title:
Warranty End Date
The date that the warranty ends. -
warrantyStartDate:
string
Title:
Warranty Start Date
The date that the warranty starts.
object
Attributes
object
Currency
-
currencyCode:
string
Title:
Currency Code
Unique currency code for the currency.
object
Discount Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
object
Fixed Recurring Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
object
One Time Net Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
object
Parent Asset Id
-
assetKey:
string
Title:
Asset Key
An invariant key that uniquely identifies the asset / component for the lifetime of the asset. It will be unique across all asset repositories. -
id:
integer
Title:
Id
Primary Key of Asset Resource.
object
Root Asset Id
-
assetKey:
string
Title:
Asset Key
An invariant key that uniquely identifies the asset / component for the lifetime of the asset. It will be unique across all asset repositories. -
id:
integer
Title:
Id
Primary Key of Asset Resource.
object
Status
-
displayValue:
string
Title:
Display Value
Translated display name of the type for which fixed list of values can be defined. -
id:
integer
Title:
Id
The primary key of the fixed list of value resource. -
lookupCode:
string
Title:
Lookup Code
Language independent code of the fixed list of value.
object
Usage Net Amount
-
currency:
string
Title:
Currency
-
value:
number
Title:
Value
Examples
The following examples show how to create an asset by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.
curl - X POST - i - H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQg" - H "Content-type: application/json" https://sitename.oracle.com/rest/v16/assets
Request Body Sample
The following example is used to create and asset.
Note:
The"status": {"lookupCode": "ACTIVE"}
parameter will activate the newly created asset.
{ "partNumber": "part1", "quantity": "1.0", "displayKey": "display-100-2-1234", "customer": "SpecialAccount100", "assetKey": "abo_6da32e86-02be-487b-8e41-c4494a46e34c", "rootAsset": { "assetKey": "abo_6da32e86-02be-487b-8e41-c4494a46e34c", } "discountPercent": "5.0", "discountAmount": { "currency": "USD", "value": 15.0 }, "currency": { "currencyCode": "USD" }, "fixedRecurringAmount": { "currency": "USD", "value": 50.00 }, "oneTimeNetAmount": { "currency": "USD", "value": 300.00 }, "status": { "lookupCode": "ACTIVE" } }
Asset Schema and Data Integrity
You should adhere to the following guidelines to ensure proper asset population. These guidelines are applicable to the following REST API endpoints: Create Asset, Update Asset, Synchronize Asset, Synchronize Assets, and Import Assets CSV File. This does not include the BOM projection approach in the sample update asset script.
- The REST API schema definitions specify the basic attribute type (e.g. string, integer, number). The following guidelines describe additional requirements:
- The acceptable length for string type attributes is 255, with the exception of the following attributes:
- The acceptable length for the following attributes is 100: assetKey, displayKey, serialNumber
- The acceptable length for the following attributes is 30: status, usageUnitOfMeasure, fixedRecurringPeriod.
- The acceptable length for the "currency" attribute is 20.
- The acceptable length for the "assetDescription" attribute is 1000.
- The default format for the following of timestamp type attributes is ISO to eliminate any time zone ambiguity issues: startDate, endDate, suspendDate, resumeDate, purchaseDate.
- Unless noted otherwise, number type attributes allow 22 digits with a precision or 7.
- The following attributes are mandatory fields that should be populated with valid data: "Customer", "DisplayKey", "Part", and "Quantity".
- Populate the "rootAsset" and "parentAsset" fields based on hierarchy.
- Both fields should reference a valid asset.
-
The parent asset should be null for the root asset record.
For example, assume A2 has A1 as a parent and A1 has A3 as a parent, therefore A2 would have A3 as a grandparent. It would be invalid for A3 to have A2 as a parent, because it would create a cycle in the hierarchy where A3 has A1 as a grandparent and A3 has A3 as a great grandparent.
- Use the "assetKey" component fields to update the "rootAsset" and "parentAsset" fields.
- The parent asset cannot be its own ancestor.
- All amount attributes should have the same currency code.
- The "attributes" field should contain a JSON object which typically stores a BOM attribute.
- The parent asset cannot be its own ancestor.
- If an order line is marked as deleted, use the asset repository to delete or end-date the asset.
- With the exception of the action code available in the transaction_line_bom_attribute, the Attributes field should contain the same information as the transaction_line_bom_attribute.
- The abo_updateAsset function available in the 18D and later ABO package supports the ability to copy information from a Commerce order line and paste it into an asset.
- If ABO implementation package from 18D or later release is being used and abo_updateAsset is not being used to create/update assets, then Update Configuration REST API action should be invoked explicitly after asset creation or update.