Asset REST APIs
Overview
Oracle CPQ exposes asset data through REST APIs. Asset REST APIs support create, read, update, delete, and synchronize (CRUD) operations. They also provide import and export operations, and operations for external orders.
Administration
Assets REST APIs
Get All Assets | |
---|---|
Description |
This operation returns data for all assets. |
URI Endpoint |
/rest/v17/assets |
Endpoint Parameters |
None |
This endpoint supports query specifications that follow Oracle CPQ query and pagination parameters syntax. Query specifications follow a subset of MongoDB syntax and can be used to organize or narrow return data. For more information, see Manage Collections. Asset "attributes" can not be used as a parameter in search or sort query specifications.
|
|
HTTP Method |
GET |
Request Body Parameters |
None (nothing should be in the request body) |
Response Body Parameters |
A collection of asset items.
|
https://sitename.oracle.com/rest/v17/assets
Get Asset | ||
---|---|---|
Description |
This returns asset data for a specific asset. |
|
URI Endpoint |
/rest/v17/assets/{id} |
|
Endpoint Parameters |
{id} |
The unique ID of the Asset |
expand |
Allows expansion of relationships. |
|
This endpoint supports query specifications that follow Oracle CPQ query and pagination parameters syntax. Query specifications follow a subset of MongoDB syntax and can be used to organize or narrow return data. For more information, see Manage Collections. |
||
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
JSON data of the asset
|
https://sitename.oracle.com/rest/v17/assets/36562516
Get Child Assets | ||
---|---|---|
Description |
This operation retrieves all direct child assets of the specified asset. |
|
URI Endpoint |
/rest/v17/assets/{id}/childAssets |
|
Endpoint Parameters |
{id} |
The unique ID of the Asset |
This endpoint supports query specifications that follow Oracle CPQ query and pagination parameters syntax. Query specifications follow a subset of MongoDB syntax and can be used to organize or narrow return data. For more information, see Manage Collections. Asset "attributes" can not be used as a parameter in search or sort query specifications.
|
||
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
JSON data of the child assets
|
https://sitename.oracle.com/rest/v17/assets/36562516/childAssets
Get Descendant Assets | ||
---|---|---|
Description |
This operation retrieves all descendant assets of the specified asset. |
|
URI Endpoint |
/rest/v17/assets/{id}/descendantAssets |
|
Endpoint Parameters |
{id} |
The unique ID of the Asset |
This endpoint supports query specifications that follow Oracle CPQ query and pagination parameters syntax. Query specifications follow a subset of MongoDB syntax and can be used to organize or narrow return data. For more information, see Manage Collections. Asset "attributes" can not be used as a parameter in search or sort query specifications.
|
||
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
JSON data of the descendant assets
|
https://sitename.oracle.com/rest/v17/assets/36562516/descendantAssets
Create Asset | |
---|---|
Description |
This operation creates a new asset. 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.
|
URI Endpoint |
/rest/v17/assets |
Endpoint Parameters |
None |
HTTP Method |
POST |
Response Body Parameters |
JSON data for the new asset is created.
|
https://sitename.oracle.com/rest/v17/assets
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" } }
Description |
This operation calculates the projected state of the asset for the requested date and returns a configuration URL that can be used to launch the model configurator page reflecting the projected state. |
|
---|---|---|
URI Endpoint |
/rest/v17/assets/{id}/actions/modify |
|
Endpoint Parameters |
id |
The asset ID |
HTTP Method |
POST |
|
Request Parameters |
sourceIdentifier |
The identifier for the integration process When this parameter is not
specified, the default value is " |
transactionDate |
The date and time that the service request needs to be processed or fulfilled. |
|
TransactionId |
Optional, The current Transaction identifier for external process integrations |
|
Response Parameters |
configurationURL |
The URL to launch the model configurator page |
https://sitename.oracle.com/rest/v17/assets/36562516/actions/modify
{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-14", "transactionId": "" }
{ "result": { "product_line": "laptop", "model": "laptopModel", "configContextKey": "be2c0b20-49e4-4642-adfc-a207b529b282", "segment": "computer", "bomkey": "abo_98228aac-867e-43a7-9823-76dc7c444dca", "configuratorURL": https://sitename.oracle.com/commerce/new_equipment/products/model_configs.jsp?_from_partner=true&product_line=laptop&model=laptopModel&segment=computer&bm_sales_root_bom_item_id=abo_98228aac-867e-43a7-9823-76dc7c444dca&configContextKey=be2c0b20-49e4-4642-adfc-a207b529b282 } }
Description |
This operation calculates the projected state of the designated assets for the requested date.For modify requests the action codes are set to "-" for No Update. |
|
---|---|---|
URI Endpoint |
/rest/v17/assets/actions/modify |
|
HTTP Method |
POST |
|
Request Body Parameters |
sourceIdentifier |
The identifier for the integration process.
|
transactionId |
The Commerce Transaction ID associated with the asset(s). When the Transaction ID is not provided, a new Transaction is created and associated with the requested operation. |
|
transactionDate |
The date and time that the service request needs to be processed or fulfilled. |
|
returnBom |
Optional, set this item is set to "true" to return the BOM structure for the requested assets in the response body. The default value is "false". When When |
|
flattenHierarchy |
|
|
assetKeys |
An
array of asset keys selected for the specified operation. When " |
|
selections |
An array of asset ids
selected for the specified operation. When " |
|
Response Body Parameters |
resultTransactionId |
The Commerce Transaction ID, if the Transaction ID is not provided, a new Transaction is created. |
navigationURL |
|
|
processedList |
When the request is successful, the output contains the processed list of assets. |
https://sitename.oracle.com/rest/v17/assets/actions/modify
Internal Order Using Asset Keys
{
"sourceIdentifier": "oraclecpqo",
"transactionId": "21275813",
"transactionDate": "2019-01-27 00:00:00",
"returnBom": false,
"flattenHierarchy": false,
"assetKeys": ["abo_05b05644-82de-4240-86eb-8feee4aa90d6", "abo_d60556a9-8639-403b-aea0-d0fbd3d73c29"]
}
{
"resultTransactionId": "21275813",
"navigationURL": "https://sitename.oracle.com/commerce/buyside/document.jsp?formaction=cancelAddFromCatalogCookie&bs_id=21479248&actionVarName=_open_transaction&commerceProcess=oraclecpqo&process=oraclecpqo&txnDate=2019-01-27 00:00:00&transactionId=21275813",
"processedList": [{
"lineId": "8",
"assetKey": "abo_05b05644-82de-4240-86eb-8feee4aa90d6"
}, {
"lineId": "11",
"assetKey": "abo_d60556a9-8639-403b-aea0-d0fbd3d73c29"
}
]
}
External Order using Selections
{ "sourceIdentifier": "_external_order", "transactionId": "", "transactionDate": "2019-05-20", "returnBom": false, "selections": ["21652013", "21652080"] }
{ "resultTransactionId": "", "navigationURL": "", "processedList": [{ "lineId": "21652103", "assetKey": "abo_778bf926-cb08-4eae-8907-e7efa388ad8f" }, { "lineId": "21652111", "assetKey": "abo_53a62368-b9e1-4e91-86e2-09dfc87f66b4" } ] }
https://sitename.oracle.com/rest/v17/assets/36562516/actions/renew
{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-14", "transactionId": "" }
{ "result": { "lineId": "36562570" } }
Description |
This operation merges a renew request with the projected asset for the requested date, and then stores the results to a Configuration BOM Instance. For renew requests, the root and subordinate action codes are set to Renew. |
|
---|---|---|
URI Endpoint |
/rest/v17/assets/actions/renew |
|
HTTP Method |
POST |
|
Request Body Parameters |
sourceIdentifier |
The identifier for the integration process.
|
transactionId |
The Commerce Transaction ID associated with the asset(s). When the Transaction ID is not provided, a new Transaction is created and associated with the requested operation. |
|
transactionDate |
The date and time that the service request needs to be processed or fulfilled. |
|
returnBom |
Optional, set this item is set to "true" to return the BOM structure for the requested assets in the response body. The default value is "false". |
|
flattenHierarchy |
|
|
assetKeys |
An
array of asset keys selected for the specified operation. When " |
|
selections |
An array of asset ids
selected for the specified operation. When " |
|
Response Body Parameters |
resultTransactionId |
The Commerce Transaction ID, if the Transaction ID is not provided, a new Transaction is created. |
navigationURL |
|
|
processedList |
When the request is successful, the output contains the lineId and assetKey for the processed assets. |
https://sitename.oracle.com/rest/v17/assets/actions/renew
Internal Order Using Asset Keys
{
"sourceIdentifier": "oraclecpqo",
"transactionId": "21275813",
"transactionDate": "2019-01-27 00:00:00",
"returnBom": false,
"flattenHierarchy": false,
"assetKeys": ["abo_05b05644-82de-4240-86eb-8feee4aa90d6", "abo_d60556a9-8639-403b-aea0-d0fbd3d73c29"]
}
{
"resultTransactionId": "21275813",
"navigationURL": "https://sitename.oracle.com/commerce/buyside/document.jsp?formaction=cancelAddFromCatalogCookie&bs_id=21479248&actionVarName=_open_transaction&commerceProcess=oraclecpqo&process=oraclecpqo&txnDate=2019-01-27 00:00:00&transactionId=21275813",
"processedList": [{
"lineId": "8",
"assetKey": "abo_05b05644-82de-4240-86eb-8feee4aa90d6"
}, {
"lineId": "11",
"assetKey": "abo_d60556a9-8639-403b-aea0-d0fbd3d73c29"
}
]
}
External Order using Selections
{ "sourceIdentifier": "_external_order", "transactionId": "", "transactionDate": "2019-05-20", "returnBom": false, "selections": ["21652013", "21652080"] }
{ "resultTransactionId": "", "navigationURL": "", "processedList": [{ "lineId": "21652103", "assetKey": "abo_778bf926-cb08-4eae-8907-e7efa388ad8f" }, { "lineId": "21652111", "assetKey": "abo_53a62368-b9e1-4e91-86e2-09dfc87f66b4" } ] }
https://sitename.oracle.com/rest/v17/assets/36562516/actions/resume
{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-14", "transactionId": "" }
{ "result": { "lineId": "36562557" } }
Description |
This operation merges a resume request with the projected asset for the requested date, and then stores the results to a Configuration BOM Instance. For resume requests, the root and subordinate action codes are set to Resume. |
|
---|---|---|
URI Endpoint |
/rest/v17/assets/actions/resume |
|
HTTP Method |
POST |
|
Request Body Parameters |
sourceIdentifier |
The identifier for the integration process.
|
transactionId |
The Commerce Transaction ID associated with the asset(s). When the Transaction ID is not provided, a new Transaction is created and associated with the requested operation. |
|
transactionDate |
The date and time that the service request needs to be processed or fulfilled. |
|
returnBom |
Optional, set this item is set to "true" to return the BOM structure for the requested assets in the response body. The default value is "false". |
|
flattenHierarchy |
|
|
assetKeys |
An
array of asset keys selected for the specified operation. When " |
|
selections |
An array of asset ids
selected for the specified operation. When " |
|
Response Body Parameters |
resultTransactionId |
The Commerce Transaction ID, if the Transaction ID is not provided, a new Transaction is created. |
navigationURL |
|
|
processedList |
When the request is successful, the output contains the lineId and assetKey for the processed assets. |
https://sitename.oracle.com/rest/v17/assets/actions/resume
Internal Order Using Asset Keys
{
"sourceIdentifier": "oraclecpqo",
"transactionId": "21275813",
"transactionDate": "2019-01-27 00:00:00",
"returnBom": false,
"flattenHierarchy": false,
"assetKeys": ["abo_05b05644-82de-4240-86eb-8feee4aa90d6", "abo_d60556a9-8639-403b-aea0-d0fbd3d73c29"]
}
{
"resultTransactionId": "21275813",
"navigationURL": "https://sitename.oracle.com/commerce/buyside/document.jsp?formaction=cancelAddFromCatalogCookie&bs_id=21479248&actionVarName=_open_transaction&commerceProcess=oraclecpqo&process=oraclecpqo&txnDate=2019-01-27 00:00:00&transactionId=21275813",
"processedList": [{
"lineId": "8",
"assetKey": "abo_05b05644-82de-4240-86eb-8feee4aa90d6"
}, {
"lineId": "11",
"assetKey": "abo_d60556a9-8639-403b-aea0-d0fbd3d73c29"
}
]
}
External Order using Selections
{ "sourceIdentifier": "_external_order", "transactionId": "", "transactionDate": "2019-05-20", "returnBom": false, "selections": ["21652013", "21652080"] }
{ "resultTransactionId": "", "navigationURL": "", "processedList": [{ "lineId": "21652103", "assetKey": "abo_778bf926-cb08-4eae-8907-e7efa388ad8f" }, { "lineId": "21652111", "assetKey": "abo_53a62368-b9e1-4e91-86e2-09dfc87f66b4" } ] }
Description |
This operation merges a suspend request with the projected asset for the requested date, and then stores the results to a Configuration BOM Instance. For suspend requests, the root and subordinate action codes are set to Suspend. |
|
---|---|---|
URI Endpoint |
/rest/v17/assets/{id}/actions/suspend |
|
Endpoint Parameters |
id |
The asset ID |
HTTP Method |
POST |
|
Request Parameters |
transactionId |
Optional, used for external process integrations The current Transaction identifier |
transactionDate |
The date and time that the service request needs to be processed or fulfilled. |
|
sourceIdentifier |
The identifier for the integration process When this parameter is not
specified, the default value is |
|
Response Parameters |
lineId |
The Configuration ID for the Configuration BOM Instance |
https://sitename.oracle.com/rest/v17/assets/36562516/actions/suspend
{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-14", "transactionId": "" }
{ "result": { "lineId": "36562556" } }
Description |
This operation merges a suspend request with the projected assets for the requested date, and then stores the results to a Configuration BOM Instance. For suspend requests, the root and subordinate action codes are set to Suspend. |
|
---|---|---|
URI Endpoint |
/rest/v17/assets/actions/suspend |
|
HTTP Method |
POST |
|
Request Body Parameters |
sourceIdentifier |
The identifier for the integration process.
|
transactionId |
The Commerce Transaction ID associated with the asset(s). When the Transaction ID is not provided, a new Transaction is created and associated with the requested operation. |
|
transactionDate |
The date and time that the service request needs to be processed or fulfilled. |
|
returnBom |
Optional, set this item is set to "true" to return the BOM structure for the requested assets in the response body. The default value is "false". |
|
flattenHierarchy |
|
|
assetKeys |
An
array of asset keys selected for the specified operation. When " |
|
selections |
An array of asset ids
selected for the specified operation. When " |
|
Response Body Parameters |
resultTransactionId |
The Commerce Transaction ID, if the Transaction ID is not provided, a new Transaction is created. |
navigationURL |
|
|
processedList |
When the request is successful, the output contains the lineId and assetKey for the processed assets. |
https://sitename.oracle.com/rest/v17/assets/actions/suspend
Internal Order Using Asset Keys
{
"sourceIdentifier": "oraclecpqo",
"transactionId": "21275813",
"transactionDate": "2019-01-27 00:00:00",
"returnBom": false,
"flattenHierarchy": false,
"assetKeys": ["abo_05b05644-82de-4240-86eb-8feee4aa90d6", "abo_d60556a9-8639-403b-aea0-d0fbd3d73c29"]
}
{
"resultTransactionId": "21275813",
"navigationURL": "https://sitename.oracle.com/commerce/buyside/document.jsp?formaction=cancelAddFromCatalogCookie&bs_id=21479248&actionVarName=_open_transaction&commerceProcess=oraclecpqo&process=oraclecpqo&txnDate=2019-01-27 00:00:00&transactionId=21275813",
"processedList": [{
"lineId": "8",
"assetKey": "abo_05b05644-82de-4240-86eb-8feee4aa90d6"
}, {
"lineId": "11",
"assetKey": "abo_d60556a9-8639-403b-aea0-d0fbd3d73c29"
}
]
}
External Order using Selections
{ "sourceIdentifier": "_external_order", "transactionId": "", "transactionDate": "2019-05-20", "returnBom": false, "selections": ["21652013", "21652080"] }
{ "resultTransactionId": "", "navigationURL": "", "processedList": [{ "lineId": "21652103", "assetKey": "abo_778bf926-cb08-4eae-8907-e7efa388ad8f" }, { "lineId": "21652111", "assetKey": "abo_53a62368-b9e1-4e91-86e2-09dfc87f66b4" } ] }
Synchronize Asset | ||
---|---|---|
Description |
This operation invokes a Synchronize action to edit the contents of an asset. 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.
|
|
URI Endpoint |
/rest/v17/assets/{id}/actions/synchronize |
|
Endpoint Parameters |
{id} |
The unique ID of the Asset to delete |
Request Body Parameters |
documents |
|
_client_driven_action |
|
|
Response Body Parameters |
documents |
|
HTTP Method |
POST |
|
Success Response |
The JSON data for the asset object that was updated
|
Synchronize Assets | ||
---|---|---|
Description |
This operation invokes a Synchronize action using the payload to edit the hierarchy contents. 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.
|
|
URI Endpoint |
/rest/v17/assets/actions/synchronize |
|
Request Body Parameters |
documents |
|
_client_driven_action |
|
|
Response Body Parameters |
documents |
|
HTTP Method |
POST |
|
Success Response |
The JSON data for the asset object that was updated
|
{ "_client_driven_action": true, "documents": { "items": [{ "assetKey": "abo_821aded1-d789-4ec6-8364-9a59e9db33ed", "customer": "account112", "partNumber": "SysConfigRoot", "quantity": "1", "bomItemId": "BOM_SysConfigRoot", "modelPath": "testbed:systemConfiguration:rootSystem", "rootAsset": { "assetKey": "abo_821aded1-d789-4ec6-8364-9a59e9db33ed" }, "startDate": "2022-10-25T00:00:00Z", "_sync_action": "add", "status": { "lookupCode": "ACTIVE" }, "displayKey": "testbed:systemConfiguration:rootSystem-3023084779-1", "currency": { "currencyCode": "USD" }, "paymentTerm": "", "oneTimeNetAmount": { "currency": "USD", "value": "0" }, "discountAmount": { "currency": "USD", "value": "0" }, "discountPercent": 0, "attributes": {}, "descendantAssets": { "items": [{ "assetKey": "abo_d0193e89-1fc5-48eb-9e5c-37b64006136d", "customer": "account112", "partNumber": "SCNestRoot", "quantity": "1", "bomItemId": "BOM_SCNestPrime", "parentAsset": { "assetKey": "abo_821aded1-d789-4ec6-8364-9a59e9db33ed" }, "_sync_action": "add", "displayKey": "SCNestRoot-3023084779-2", "currency": { "currencyCode": "USD" }, "paymentTerm": "", "oneTimeNetAmount": { "currency": "USD", "value": "10" }, "discountAmount": { "currency": "USD", "value": "0" }, "discountPercent": 0, "attributes": {} }, { "assetKey": "abo_68f4601d-efe4-4212-9c2a-5d1a5349a919", "customer": "account112", "partNumber": "DiffConfigRoot", "quantity": "3", "bomItemId": "BOM_diffConfigRoot", "parentAsset": { "assetKey": "abo_d0193e89-1fc5-48eb-9e5c-37b64006136d" }, "_sync_action": "add", "displayKey": "DiffConfigRoot-3023084779-3", "currency": { "currencyCode": "USD" }, "paymentTerm": "", "oneTimeNetAmount": { "currency": "USD", "value": "0" }, "discountAmount": { "currency": "USD", "value": "0" }, "discountPercent": 0, "attributes": { "Rate": { "value": "Only" }, "Persistent": { "value": "false" } } }, { "assetKey": "abo_eac2ec1f-cdcf-4832-b560-5125577a9de5", "customer": "account112", "partNumber": "SCNestReplaceKid1", "quantity": "1", "bomItemId": "BOM_diffConfigKid1", "parentAsset": { "assetKey": "abo_68f4601d-efe4-4212-9c2a-5d1a5349a919" }, "_sync_action": "add", "displayKey": "SCNestReplaceKid1-3023084779-4", "currency": { "currencyCode": "USD" }, "paymentTerm": "", "oneTimeNetAmount": { "currency": "USD", "value": "300" }, "discountAmount": { "currency": "USD", "value": "0" }, "discountPercent": 0, "attributes": { "Rate": { "value": "Only" }, "Persistent": { "value": "false" } } } ] } } ] } }
{ "documents": { "hasMore": false, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/assets" } ], "items": [{ "_sync_status": "created", "fixedRecurringAmount": null, "endDate": null, "rootAsset": { "id": 3022895555, "assetKey": "abo_821aded1-d789-4ec6-8364-9a59e9db33ed", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/assets" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555" } ] }, "discountAmount": { "value": 0, "currency": "USD" }, "warrantyEndDate": null, "billingAccount": null, "dateAdded": "2022-10-27T18:51:36.713Z", "assetKey": "abo_821aded1-d789-4ec6-8364-9a59e9db33ed", "parentBomItemId": null, "warrantyStartDate": null, "lastUserUpdateDate": "2022-10-27T18:51:36.713Z", "id": 3022895555, "oneTimeNetAmount": { "value": 0, "currency": "USD" }, "usageNetAmount": null, "serialNumber": null, "lastSyncDate": null, "assetDescription": null, "usageUnitOfMeasure": null, "suspendDate": null, "contractReference": null, "parentAsset": null, "paymentTerm": "", "syncStatus": null, "startDate": "2022-10-25T00:00:00.000Z", "resumeDate": null, "status": { "lookupCode": "ACTIVE", "displayValue": "Active", "id": 18325665, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22BM_ASSET_STATUS_CODE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/18325665" } ] }, "displayKey": "testbed:systemConfiguration:rootSystem-3023084779-1", "rootDisplay": null, "purchaseDate": null, "registeredDate": null, "fixedRecurringPeriod": null, "modelPath": "testbed:systemConfiguration:rootSystem", "installDate": null, "billingProfile": null, "currency": { "currencyCode": "USD", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/currencies" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/currencies/USD" } ] }, "discountPercent": 0, "quantity": 1, "serviceAddress": null, "dateModified": "2022-10-27T18:51:36.713Z", "serviceAccount": null, "totalAssetAmount": null, "rootPartNumber": null, "bomItemId": "BOM_SysConfigRoot", "parentPartNumber": null, "origTransactionId": null, "partDescription": null, "parentDisplay": null, "partNumber": "SysConfigRoot", "attributes": {}, "customer": "account112", "descendantAssets": { "hasMore": false, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/descendantAssets" } ], "items": [{ "_sync_status": "created", "fixedRecurringAmount": null, "endDate": null, "rootAsset": { "id": 3022895555, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/assets" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555" } ] }, "discountAmount": { "value": 0, "currency": "USD" }, "warrantyEndDate": null, "billingAccount": null, "dateAdded": "2022-10-27T18:51:36.906Z", "assetKey": "abo_d0193e89-1fc5-48eb-9e5c-37b64006136d", "parentBomItemId": null, "warrantyStartDate": null, "lastUserUpdateDate": "2022-10-27T18:51:36.906Z", "id": 3022895556, "oneTimeNetAmount": { "value": 10, "currency": "USD" }, "usageNetAmount": null, "serialNumber": null, "lastSyncDate": null, "assetDescription": null, "usageUnitOfMeasure": null, "suspendDate": null, "contractReference": null, "parentAsset": { "assetKey": "abo_821aded1-d789-4ec6-8364-9a59e9db33ed", "id": 3022895555, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/assets" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555" } ] }, "paymentTerm": "", "syncStatus": null, "startDate": null, "resumeDate": null, "status": null, "displayKey": "SCNestRoot-3023084779-2", "rootDisplay": null, "purchaseDate": null, "registeredDate": null, "fixedRecurringPeriod": null, "modelPath": null, "installDate": null, "billingProfile": null, "currency": { "currencyCode": "USD", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/currencies" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/currencies/USD" } ] }, "discountPercent": 0, "quantity": 1, "serviceAddress": null, "dateModified": "2022-10-27T18:51:36.906Z", "serviceAccount": null, "totalAssetAmount": null, "rootPartNumber": null, "bomItemId": "BOM_SCNestPrime", "parentPartNumber": null, "origTransactionId": null, "partDescription": null, "parentDisplay": null, "partNumber": "SCNestRoot", "attributes": {}, "customer": "account112", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/descendantAssets/3022895556" }, { "kind": "", "rel": "child", "name": "childAssets", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/descendantAssets/3022895556/childAssets" }, { "kind": "", "rel": "child", "name": "descendantAssets", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/descendantAssets/3022895556/descendantAssets" } ] }, { "_sync_status": "created", "fixedRecurringAmount": null, "endDate": null, "rootAsset": { "id": 3022895555, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/assets" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555" } ] }, "discountAmount": { "value": 0, "currency": "USD" }, "warrantyEndDate": null, "billingAccount": null, "dateAdded": "2022-10-27T18:51:36.938Z", "assetKey": "abo_68f4601d-efe4-4212-9c2a-5d1a5349a919", "parentBomItemId": null, "warrantyStartDate": null, "lastUserUpdateDate": "2022-10-27T18:51:36.938Z", "id": 3022895557, "oneTimeNetAmount": { "value": 0, "currency": "USD" }, "usageNetAmount": null, "serialNumber": null, "lastSyncDate": null, "assetDescription": null, "usageUnitOfMeasure": null, "suspendDate": null, "contractReference": null, "parentAsset": { "assetKey": "abo_d0193e89-1fc5-48eb-9e5c-37b64006136d", "id": 3022895556, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/assets" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/assets/3022895556" } ] }, "paymentTerm": "", "syncStatus": null, "startDate": null, "resumeDate": null, "status": null, "displayKey": "DiffConfigRoot-3023084779-3", "rootDisplay": null, "purchaseDate": null, "registeredDate": null, "fixedRecurringPeriod": null, "modelPath": null, "installDate": null, "billingProfile": null, "currency": { "currencyCode": "USD", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/currencies" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/currencies/USD" } ] }, "discountPercent": 0, "quantity": 3, "serviceAddress": null, "dateModified": "2022-10-27T18:51:36.938Z", "serviceAccount": null, "totalAssetAmount": null, "rootPartNumber": null, "bomItemId": "BOM_diffConfigRoot", "parentPartNumber": null, "origTransactionId": null, "partDescription": null, "parentDisplay": null, "partNumber": "DiffConfigRoot", "attributes": { "Rate": { "value": "Only" }, "Persistent": { "value": "false" } }, "customer": "account112", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/descendantAssets/3022895557" }, { "kind": "", "rel": "child", "name": "childAssets", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/descendantAssets/3022895557/childAssets" }, { "kind": "", "rel": "child", "name": "descendantAssets", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/descendantAssets/3022895557/descendantAssets" } ] }, { "_sync_status": "created", "fixedRecurringAmount": null, "endDate": null, "rootAsset": { "id": 3022895555, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/assets" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555" } ] }, "discountAmount": { "value": 0, "currency": "USD" }, "warrantyEndDate": null, "billingAccount": null, "dateAdded": "2022-10-27T18:51:36.966Z", "assetKey": "abo_eac2ec1f-cdcf-4832-b560-5125577a9de5", "parentBomItemId": null, "warrantyStartDate": null, "lastUserUpdateDate": "2022-10-27T18:51:36.966Z", "id": 3022895558, "oneTimeNetAmount": { "value": 300, "currency": "USD" }, "usageNetAmount": null, "serialNumber": null, "lastSyncDate": null, "assetDescription": null, "usageUnitOfMeasure": null, "suspendDate": null, "contractReference": null, "parentAsset": { "assetKey": "abo_68f4601d-efe4-4212-9c2a-5d1a5349a919", "id": 3022895557, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/assets" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/assets/3022895557" } ] }, "paymentTerm": "", "syncStatus": null, "startDate": null, "resumeDate": null, "status": null, "displayKey": "SCNestReplaceKid1-3023084779-4", "rootDisplay": null, "purchaseDate": null, "registeredDate": null, "fixedRecurringPeriod": null, "modelPath": null, "installDate": null, "billingProfile": null, "currency": { "currencyCode": "USD", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/currencies" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/currencies/USD" } ] }, "discountPercent": 0, "quantity": 1, "serviceAddress": null, "dateModified": "2022-10-27T18:51:36.966Z", "serviceAccount": null, "totalAssetAmount": null, "rootPartNumber": null, "bomItemId": "BOM_diffConfigKid1", "parentPartNumber": null, "origTransactionId": null, "partDescription": null, "parentDisplay": null, "partNumber": "SCNestReplaceKid1", "attributes": { "Rate": { "value": "Only" }, "Persistent": { "value": "false" } }, "customer": "account112", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/descendantAssets/3022895558" }, { "kind": "", "rel": "child", "name": "childAssets", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/descendantAssets/3022895558/childAssets" }, { "kind": "", "rel": "child", "name": "descendantAssets", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/descendantAssets/3022895558/descendantAssets" } ] } ] }, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555" }, { "kind": "", "rel": "child", "name": "childAssets", "href": "https://sitename.oracle.com/rest/v17/assets/3022895555/childAssets" } ] } ] } }
Description |
This operation merges a termination request with the projected asset for the requested date, and then stores the results to a Configuration BOM Instance. For termination requests, the root item action code is set to Terminate and subordinate asset action codes are set to Delete. |
|
---|---|---|
URI Endpoint |
/rest/v17/assets/{id}/actions/terminate |
|
Endpoint Parameters |
id |
The asset ID |
HTTP Method |
POST |
|
Request Parameters |
transactionId |
Optional, used for external process integrations The current Transaction identifier |
transactionDate |
The date and time that the service request needs to be processed or fulfilled. |
|
sourceIdentifier |
The identifier for the integration process When this parameter is not
specified, the default value is |
|
Response Parameters |
lineId |
The Configuration ID for the Configuration BOM Instance |
https://sitename.oracle.com/rest/v17/assets/36562516/actions/terminate
{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-14", "transactionId": "" }
{ "result": { "lineId": "36562556" } }
Description |
This operation merges a termination request with the projected asset for the requested date, and then stores the results to a Configuration BOM Instance. For termination requests, the root item action code is set to Terminate and subordinate asset action codes are set to Delete. |
|
---|---|---|
URI Endpoint |
/rest/v17/assets/actions/terminate |
|
HTTP Method |
POST |
|
Request Body Parameters |
sourceIdentifier |
The identifier for the integration process.
|
transactionId |
The Commerce Transaction ID associated with the asset(s). When the Transaction ID is not provided, a new Transaction is created and associated with the requested operation. |
|
transactionDate |
The date and time that the service request needs to be processed or fulfilled. |
|
returnBom |
Optional, set this item is set to "true" to return the BOM structure for the requested assets in the response body. The default value is "false". |
|
flattenHierarchy |
|
|
assetKeys |
An
array of asset keys selected for the specified operation. When " |
|
selections |
An array of asset ids
selected for the specified operation. When " |
|
Response Body Parameters |
resultTransactionId |
The Commerce Transaction ID, if the Transaction ID is not provided, a new Transaction is created. |
navigationURL |
|
|
processedList |
When the request is successful, the output contains the lineId and assetKey for the processed assets. |
https://sitename.oracle.com/rest/v17/assets/actions/terminate
Internal Order Using Asset Keys
{
"sourceIdentifier": "oraclecpqo",
"transactionId": "21275813",
"transactionDate": "2019-01-27 00:00:00",
"returnBom": false,
"flattenHierarchy": false,
"assetKeys": ["abo_05b05644-82de-4240-86eb-8feee4aa90d6", "abo_d60556a9-8639-403b-aea0-d0fbd3d73c29"]
}
{
"resultTransactionId": "21275813",
"navigationURL": "https://sitename.oracle.com/commerce/buyside/document.jsp?formaction=cancelAddFromCatalogCookie&bs_id=21479248&actionVarName=_open_transaction&commerceProcess=oraclecpqo&process=oraclecpqo&txnDate=2019-01-27 00:00:00&transactionId=21275813",
"processedList": [{
"lineId": "8",
"assetKey": "abo_05b05644-82de-4240-86eb-8feee4aa90d6"
}, {
"lineId": "11",
"assetKey": "abo_d60556a9-8639-403b-aea0-d0fbd3d73c29"
}
]
}
External Order using Selections
{ "sourceIdentifier": "_external_order", "transactionId": "", "transactionDate": "2019-05-20", "returnBom": false, "selections": ["21652013", "21652080"] }
{ "resultTransactionId": "", "navigationURL": "", "processedList": [{ "lineId": "21652103", "assetKey": "abo_778bf926-cb08-4eae-8907-e7efa388ad8f" }, { "lineId": "21652111", "assetKey": "abo_53a62368-b9e1-4e91-86e2-09dfc87f66b4" } ] }
Update Asset | ||
---|---|---|
Description |
This operation updates an existing asset. 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.
|
|
URI Endpoint |
/rest/v17/assets/{id} |
|
Endpoint Parameters |
{id} |
The unique ID of the Asset to update |
HTTP Method |
POST |
|
Response Body Parameters |
Creation of the JSON data for the updated asset. |
{ "partNumber": "part1", "quantity": "1.0", "displayKey": "display-100-2-1234", "customer": "SpecialAccount100", "assetKey": "abo_ae100", "discountPercent": "5.0", "discountAmount": { "currency": "USD", "value": 15.0 }, "currency": { "currencyCode": "USD" }, "fixedRecurringAmount": { "currency": "USD", "value": 50.00 }, "oneTimeNetAmount": { "currency": "USD", "value": 300.00 } }
Note: Prior to performing the Update Configuration operation, BOM items must be synchronized using the Synchronize Assets operation.
https://sitename.oracle.com/rest/v17/assets/actions/updateConfiguration
{ "assetList": [{ "assetKey": "abo_c2874186-3714-4eb3-a339-c9fe696d471d", "orderLines": [{ "type": "internalOrder", "_bs_id": 19621776, "_document_number": 10 }, { "type": "internalOrder", "_bs_id": 19621776, "_document_number": 21 }, ..., { "type": "internalOrder", "_bs_id": 19621776, "_document_number": 25 } ] }, ...{ "assetKey": "abo_c2874186-3714-4eb3-a339-c9fe696d4712", "orderLines": [{ "type": "externalOrder", "configId": 20972643 }, { "type": "externalOrder", "configId": 20973645 }, ..., { "type": "externalOrder", "configId": 20972848 } ] }, ...] }
Search Projected Assets by Customer
Search Projected Assets by Customer | ||
---|---|---|
Description |
This REST API call provides a consolidated list of fulfilled and pending order asset lines in a hierarchical list for a specific customer. In addition, users can perform search and sort operations on the consolidated list of projected assets. |
|
URI Endpoint |
/rest/v17/projectedAssets/actions/search |
|
HTTP Method |
POST |
|
Request Body Parameters
|
customerId |
The variable name for the account or customer ID number |
sourceIdentifier |
The identifier for the Commerce process. The variable name of the Commerce process (e.g. |
|
criteria |
(Optional) Administrators can provide criteria parameters in the request body to retrieve specific content and limit the size of the response. For example:
Notes:
|
|
This endpoint supports the standard query specification expression, except for the totalResults and expand/collapse. For more information, see Query Specification Syntax. Note: This endpoint does not support the following query parameter attributes:
|
||
Response Body Parameters |
The JSON data for the specified customer projected assets. |
https://sitename.oracle.com/rest/v17/projectedAssets/actions/search
{ "customerId": "pal_customer", "sourceIdentifier": "oraclecpqo", "criteria": { "enableHierarchy": false, "orderby": [ "assetKey:DESC", "partNumber:DESC", "serviceId:DESC", "id:DESC", "transactionId:DESC", "lineId:DESC" ], "q": "{$or:[{'assetKey':{$eq:'kgAsset1'}},{'rootAssetKey':{$eq:'kgAsset1'}},{'serviceId':{$eq:null}},{'partNumber':{$eq:'part11'}}]}" } }
{ "result": { "hasMore": false, "items": [ { "sourceIdentifier": "oraclecpqo", "dateAdded": "2021-07-26T23:15:52.000Z", "assetKey": "kgNewAsset1", "fulfillmentStatus": { "displayValue": "Being Fulfilled", "lookupCode": "BEING_FULFILLED" }, "customerId": "pal_customer", "actionCode": { "displayValue": "Add", "lookupCode": "ADD" }, "id": 3022499483, "serviceId": null, "quantity": 10.0, "lineId": 5, "dateModified": "2021-07-26T23:15:53.000Z", "rootAssetKey": "kgNewAsset1", "transactionId": "3022499443", "numberOfOpenOrders": 1, "partNumber": "part11", "status": null }, { "sourceIdentifier": "oraclecpqo", "dateAdded": "2021-07-26T23:15:26.180Z", "assetKey": "kgAsset1", "fulfillmentStatus": { "displayValue": "Being Fulfilled", "lookupCode": "BEING_FULFILLED" }, "customerId": "pal_customer", "actionCode": { "displayValue": "Add", "lookupCode": "ADD" }, "id": 3022499447, "serviceId": null, "quantity": 10.0, "lineId": 8, "dateModified": "2021-07-26T23:15:55.000Z", "rootAssetKey": "kgAsset1", "transactionId": "3022499443", "numberOfOpenOrders": null, "partNumber": "part11", "status": { "lookupCode": "ACTIVE", "displayValue": "Active" } } ] } }
NOTES:
- This service can be used to return root asset only (
enableHierarchy=false
) or asset tree (enableHierarchy=true
). By default the server processes a maximum of 100,000 rows for all assets and in addition a maximum of 100 root rows for the tree search. When the results exceed the server limits, the state parameter includes a warning in the response. -
The Commerce process assetkey (
instanceid_l
) data column must be indexed. - If upgrading to 21D and an ABO Commerce process is already implemented, you must repopulate the data column if there are any pending fulfilled transaction lines already in the Commerce process.
- The search and sort behavior when
enableHierarchy=true
is very similar to the Transaction Line hierarchical search and sort. The result line returns in a flat list with children following their parent. Only results that match the specified criteria are returned and non-matching results for those parent/child items are not provided in the result. The sort feature takes into account parent/child relationship but does not sort between children of different parents. - The search results take into account the information available in the database and from a memory search of merged data of the projected assets. With this in mind, the child component of the search/sort will always match the specified criteria; however, a root line search/sort can only guarantee to match the criteria from the database query.
Due to the nature of combination of database search and in-memory search, there could be differences in the search results based on the user-specified criteria for multiple changeable attributes. For example:
Quantity Date Added Asset (database query) 10 Oct 1 Pending Fulfilled Orders (database query) 20 Nov 1 Projected Asset (merged data) 20 Oct 1 - If the user searches on the projected asset, the result would indicate a Quantity of 20 with the Date Added of Oct 1.
- If the user searches for Quantity less than 10 and Date added is less than Oct 15, the asset would not return a result because the criteria was filtered out in the database query prior to the merged projected asset query.
In general, avoid a combination multiple attributes for a search when those attributes may change the result from the pending fulfillment order query.
- When there are multiple pending fulfilled order lines for the same asset, the projected asset info will come from the pending fulfilled line of latest request date. Therefore if the first pending fulfilled order line is asset creation order with action code of Add, even if the asset doesn't exist, the action in the final projected asset will still show as updated based on the second pending fulfilled line.
-
If the response includes
hasMore=true
, this indicates that more results can be retrieved via pagination without changing search criteria. You could still get a warning of too much result data even if the response ishasMore=false
. In this case, you should apply more restrictive search criteria. -
If you get a warning that there are too many results from the root asset search of the database, try to apply more restrictive criteria. You won't be able to limit the number of results from the database by adding restrictive criteria using fulfillmentstatus, action code, creation date, or modification date attributes as those are only being applied in memory.
-
For flat mode,
partNumber
is the only attribute that can for more restrictive search results. -
For tree search mode, try to apply criteria with
partNumber
,assetkey
,lineId
, ortransactionId
attributes.
-
-
The 21C and earlier ABO package sample Update Asset script incorporates all the pending fulfilled lines information to update the asset. This script logic assumes the pending fulfilled order will always update the asset in the order of request date. If this logic does not fit your business case, the Update Asset script will need to be customized to your needs.
-
The 21C and earlier ABO package includes an Update Asset sample script which needs to be updated for this feature to populate the
origTransactionid
attribute for the asset. Modify theabo_convertDeltaBomToAsset
function by adding the following line to the asset payload:jsonput(assetPayload, "origTransactionId", transactionId);
- The 21D Search Projected Assets by Customer REST API includes two endpoints that are for future use. You will receive an error message if you attempt to use the unreleased endpoints.
Configuration BOM Instance REST APIs
https://sitename.oracle.com/rest/v17/configBomInstance/36503159/actions/followOnOrder
{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-17", "transactionId": "36563805" }
{ "result": { "product_line": "integrationProductLine", "model": "integrationModel", "configContextKey": "3bdd9731-bc89-483b-85d5-09e02515c6d0", "segment": "integration", "bomkey": "abo_3cf6636c-9119-4960-b185-d13daee2631d", "configuratorURL": "https://sitename.oracle.com/commerce/new_equipment/products/model_configs.jsp?_from_partner=true&product_line=integrationProductLine&model=integrationModel&segment=integration&bm_sales_root_bom_item_id=abo_3cf6636c-9119-4960-b185-d13daee2631d&configContextKey=3bdd9731-bc89-483b-85d5-09e02515c6d0" } }
https://sitename.oracle.com/rest/v17/configBomInstance/36503159/actions/getConfigBom
{ "flattenHierarchy": "true" }
{ "configBom": { "partNumber": "part1", "quantity": 3, "explodedQuantity": 3, "category": "sales", "id": "abo_3cf6636c-9119-4960-b185-d13daee2631d", "fields": { "_price_unit_price_each": "3.0", "oRCL_ABO_ActionCode_l": "NO_UPDATE", "fulfillmentStatus_l": "CREATED", "_is_line_item_mandatory": true, "itemInstanceName_l": "part1-36503087-1", "itemInstanceId_l": "abo_3cf6636c-9119-4960-b185-d13daee2631d" }, "parentId": "", "children": [ { "partNumber": "part22", "quantity": 1, "explodedQuantity": 6, "id": "abo_cdfd49b4-b500-4e11-84e7-3739d1f2625f", "fields": { "_price_unit_price_each": "US Dollar price not defined.", "oRCL_ABO_ActionCode_l": "NO_UPDATE", "_is_line_item_mandatory": true, "itemInstanceName_l": "part22-36503087-13", "itemInstanceId_l": "abo_cdfd49b4-b500-4e11-84e7-3739d1f2625f" }, "parentId": "abo_d37e0168-c455-4748-af6c-da3fa2c0996c" }, { "partNumber": "part222", "quantity": 1, "explodedQuantity": 6, "id": "abo_e3ddd440-6928-4231-88b2-3c6d3ed1c09f", "fields": { "_price_unit_price_each": "US Dollar price not defined.", "oRCL_ABO_ActionCode_l": "NO_UPDATE", "_is_line_item_mandatory": true, "itemInstanceName_l": "part222-36503087-12", "itemInstanceId_l": "abo_e3ddd440-6928-4231-88b2-3c6d3ed1c09f" }, "parentId": "abo_d37e0168-c455-4748-af6c-da3fa2c0996c" } ] } }
https://sitename.oracle.com/rest/v17/configBomInstance/36503159/actions/reconfig
{ "result": { "product_line": "integrationProductLine", "model": "integrationModel", "configContextKey": "11461f91-91c7-4978-a8d6-c9c3d43e97f4", "segment": "integration", "bomkey": "abo_3cf6636c-9119-4960-b185-d13daee2631d", "configuratorURL": https://sitename.oracle.com/commerce/new_equipment/products/external_reconfig.jsp?_config_id=36503159&bm_sales_root_bom_item_id=abo_3cf6636c-9119-4960-b185-d13daee2631d&configContextKey=11461f91-91c7-4978-a8d6-c9c3d43e97f4 } }
File Operations
/rest/v17/files/assets_1464387178004
-
/rest/v17/assets/actions/export
-
/rest/v17/assets/{$asset_id}/actions/export
{ "criteria":{ "fields":["assetKey","displayKey"], "orderby":["assetKey:desc"], "q":"{assetKey:{$eq: 'asdfgh'}}" } }
CSV Fields
- _sync_action - new column
- assetKey
- attributes
- currency.currencyCode
- customer
- dateAdded
- dateModified
- discountAmount.value
- discountAmount.currency
- discountPercent
- displayKey
- endDate
- fixedRecurringAmount.value
- fixedRecurringAmount.currency
- fixedRecurringPeriod
- id
- oneTimeNetAmount.value
- oneTimeNetAmount.currency
- parentAsset.id
- parentAsset.assetKey
- parentDisplay
- parentPartNumber
- partNumber
- paymentTerm
- quantity
- resumeDate - new column
- rootAsset.id
- rootAsset.assetKey
- rootDisplay
- rootPartNumber
- startDate
- status.lookupCode
- status.displayValue
- suspendDate - new column
- usageNetAmount.value
- usageNetAmount.currency
- usageUnitOfMeasure
Import Assets CSV File | ||
---|---|---|
Description |
This operation invokes an Import action to process the uploaded CSV to import data. It supports create, update, and delete operations. 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.
|
|
URI Endpoint |
/rest/v17/assets/actions/import |
|
Request Header (optional) |
Prefer: respond-async |
If you are importing a large amount of data, we recommend requesting an asynchronous response to prevent the import from timing out. See Asynchronous Import Mode Examples for more details. |
Request Body Parameters |
fileName |
File name extracted from the response rest link in the previous call. |
Response Body Parameters |
importLogFileName |
This parameter contains the absolute path to the control file, which contains user Information and the absolute path to the log file. |
HTTP Method |
POST |
|
Success Response |
The absolute path to the control file, which contains user Information and the absolute path to the log file. |
/rest/v17/assets/actions/import
{ "fileName":"upload_1465847155416" }
{ "importLogFileName": " https://sitename.oracle.com/rest/v17/files/assets_output_1465848183346" }
Asynchronous Import Mode Examples
Sample URI Endpoint - Asynchronous Import Mode
-
Curl Sample
-
curl -L -X POST ' https://sitename.oracle.com/rest/v17/assets/actions/import' -H 'Prefer: respond-async' -H 'Authorization: Basic c3VwZXJ1c2VyOlFhcGFzc0AxMjM=' -H 'Content-Type: application/json' -H 'Cookie: JSESSIONID=5e19618bd50d467388f856fbc56582b94a41ad701e9dd4ef2b27!1191495071'
-
Postman Sample
Sample Request Body - Asynchronous Import Mode
{ "fileName":"upload_1465847155416" }
Sample Response Body Payloads - Asynchronous Import Mode
In Progress Sample
{ "progress": "processing", "links": [{ "rel": "self", "href": " https://sitename.oracle.com/rest/v17/asyncTasks/3022782546/status" } ], "completed": false, "requestStatus": "202" }
Successful Response
{ "progress": "succeeded", "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v17/asyncTasks/3022782559/response" }, { "rel": "self", "href": "https://sitename.oracle.com/rest/v17/asyncTasks/3022782559/status" } ], "completed": true, "requestStatus": 200 }
Failed Response
{ "progress": "failed", "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v17/asyncTasks/3022782539/response" }, { "rel": "self", "href": "https://sitename.oracle.com/rest/v17/asyncTasks/3022782539/status" } ], "completed": true, "requestStatus": "500" }
Asynchronous Import Task Details
After asynchronous asset import finishes successfully or with errors, additional import details can be retrieved using the asyncTasks
links in the response. Sample asyncTasks
outputs are listed below:
Successful Response Details
{ "importLogFileName": "https://sitename.oracle.com/rest/v17/files/assets_output_1654830465679" }
Failed Response Details
{ "Instance": "assets", "o:errorDetails": [{ "title": "Field _asset_custom_status doesn't exist or is not accessible in resource assets for current user." } ], "type": "HTTP://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Action import on resource assets failed." }
/rest/v17/files/
/rest/v17/files/upload_1465847155416
/rest/v17/files/assets_output_1465848183346