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

ClosedGet All Assets

Get All Assets GET Method

Description

This operation returns data for all assets.

URI Endpoint

/rest/v16/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.

  • Returns all attributes from the asset object in JSON format.
  • Returns Currency and Foreign Key (FK) attributes as complex attributes. Refer to the Create Asset REST API for a sample complex attribute.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets


ClosedGet Asset

Get Asset GET Method

Description

This returns asset data for a specific asset.

URI Endpoint

/rest/v16/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

  • Returns all attributes from the asset object in JSON format.
  • Returns Currency and Foreign Key (FK) attributes as complex attributes. Refer to the Create Asset REST API for a sample complex attribute.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/36562516


ClosedGet Child Assets

Get Child Assets GET Method

Description

This operation retrieves all direct child assets of the specified asset.

URI Endpoint

/rest/v16/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

  • Returns all attributes from the asset object in JSON format.
  • Returns Currency and Foreign Key (FK) attributes as complex attributes. Refer to the Create Asset REST API for a sample complex attribute.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/36562516/childAssets


ClosedGet Descendant Assets

Get Descendant Assets GET Method

Description

This operation retrieves all descendant assets of the specified asset.

URI Endpoint

/rest/v16/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

  • Returns all attributes from the asset object in JSON format.
  • Returns Currency and Foreign Key (FK) attributes as complex attributes. Refer to the Create Asset REST API for a sample complex attribute.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/36562516/descendantAssets


ClosedCreate Asset

Create AssetPOST method

Description

This operation creates a new asset.

ClosedAsset 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.

URI Endpoint

/rest/v16/assets

Endpoint Parameters

None

HTTP Method

POST

Response Body Parameters

JSON data for the new asset is created.

  • Returns all attributes from the asset object in JSON format.
  • Returns Currency and Foreign Key (FK) attributes as complex attributes. Refer to the Create Asset REST API for a sample complex attribute.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets


ClosedSample Request Body

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" } }


ClosedDelete Asset

ClosedModify Asset

Modify Asset POST method

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/v16/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 "_external_order"

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

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/36562516/actions/modify


ClosedRequest Sample

{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-14", "transactionId": "" }


ClosedResponse Sample

{ "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 } }


ClosedModify Assets

Modify Assets POST method

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/v16/assets/actions/modify

HTTP Method

POST

Request Body Parameters

sourceIdentifier

The identifier for the integration process.

  • "_external_order" for external orders. This is the default value when this parameter is not specified
  • "{processVarName}" for internal orders. The variable name of the Commerce process (e.g. oraclecpqo)

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 returnBom is set to "false" and only one asset key is passed, the API will return the Configurator URL. Upon navigating to the URL, the Configurator User Interface displays and changes to the configuration are supported.

When returnBom is set to "true" or more than one asset keys are passed, the API will not return the Configurator URL. Upon navigating to the URL, the Transaction Details page displays with BOM assets listed.

flattenHierarchy

  • "true" returns a flattened BOM structure, this is the default value.
  • "false" returns a hierarchical BOM structure

assetKeys

An array of asset keys selected for the specified operation. When "assetKeys" are used, do not use "selections".

selections

An array of asset ids selected for the specified operation. When "selections" are used, do not use "assetKeys".

Response Body Parameters

resultTransactionId

The Commerce Transaction ID, if the Transaction ID is not provided, a new Transaction is created.

navigationURL

  • For assets that were created via CPQ, a successful response includes a navigation URL to the Transaction UI.
  • For assets that were created via an external order, a successful response is empty and does not contain a URL.

processedList

When the request is successful, the output contains the processed list of assets.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/actions/modify


Internal Order Using Asset Keys

ClosedRequest Sample

{
   "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"] }


ClosedResponse Sample

{
   "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

ClosedRequest Sample

{ "sourceIdentifier": "_external_order", "transactionId": "", "transactionDate": "2019-05-20", "returnBom": false, "selections": ["21652013", "21652080"] }


ClosedResponse Sample

{    "resultTransactionId": "",    "navigationURL": "",    "processedList": [{       "lineId": "21652103",       "assetKey": "abo_778bf926-cb08-4eae-8907-e7efa388ad8f"    }, {       "lineId": "21652111",       "assetKey": "abo_53a62368-b9e1-4e91-86e2-09dfc87f66b4"       }    ] }


ClosedRenew Asset

Note: Renewed Assets cannot be reconfigured.
Renew AssetPOST method

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/v16/assets/{id}/actions/renew

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 "_external_order"

Response Parameters

lineId

The Configuration ID for the Configuration BOM Instance

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/36562516/actions/renew


ClosedSample Request Body

{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-14", "transactionId": "" }


ClosedSample Response Body


ClosedRenew Assets

Renew Assets POST method

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/v16/assets/actions/renew

HTTP Method

POST

Request Body Parameters

sourceIdentifier

The identifier for the integration process.

  • "_external_order" for external orders. This is the default value when this parameter is not specified
  • "{processVarName}" for internal orders. The variable name of the Commerce process (e.g. oraclecpqo)

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

  • "true" returns a flattened BOM structure, this is the default value.
  • "false" returns a hierarchical BOM structure

assetKeys

An array of asset keys selected for the specified operation. When "assetKeys" are used, do not use "selections".

selections

An array of asset ids selected for the specified operation. When "selections" are used, do not use "assetKeys".

Response Body Parameters

resultTransactionId

The Commerce Transaction ID, if the Transaction ID is not provided, a new Transaction is created.

navigationURL

  • For assets that were created via CPQ, a successful response includes a navigation URL to the Transaction UI.
  • For assets that were created via an external order, a successful response is empty and does not contain a URL.

processedList

When the request is successful, the output contains the lineId and assetKey for the processed assets.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/actions/renew


Internal Order Using Asset Keys

ClosedRequest Sample

{

   "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"] }


ClosedResponse Sample

{

   "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

ClosedRequest Sample

{ "sourceIdentifier": "_external_order", "transactionId": "", "transactionDate": "2019-05-20", "returnBom": false, "selections": ["21652013", "21652080"] }


ClosedResponse Sample

{    "resultTransactionId": "",    "navigationURL": "",    "processedList": [{       "lineId": "21652103",       "assetKey": "abo_778bf926-cb08-4eae-8907-e7efa388ad8f"    }, {       "lineId": "21652111",       "assetKey": "abo_53a62368-b9e1-4e91-86e2-09dfc87f66b4"       }    ] }


ClosedResume Asset

Note: Resume Asset cannot be performed on active or terminated assets.
Resume AssetPOST method

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/v16/assets/{id}/actions/resume

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 "_external_order"

Response Parameters

lineId

The Configuration ID for the Configuration BOM Instance

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/36562516/actions/resume


ClosedSample Request Body

{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-14", "transactionId": "" }


ClosedSample Response Body


ClosedResume Assets

Resume Assets POST method

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/v16/assets/actions/resume

HTTP Method

POST

Request Body Parameters

sourceIdentifier

The identifier for the integration process.

  • "_external_order" for external orders. This is the default value when this parameter is not specified
  • "{processVarName}" for internal orders. The variable name of the Commerce process (e.g. oraclecpqo)

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

  • "true" returns a flattened BOM structure, this is the default value.
  • "false" returns a hierarchical BOM structure

assetKeys

An array of asset keys selected for the specified operation. When "assetKeys" are used, do not use "selections".

selections

An array of asset ids selected for the specified operation. When "selections" are used, do not use "assetKeys".

Response Body Parameters

resultTransactionId

The Commerce Transaction ID, if the Transaction ID is not provided, a new Transaction is created.

navigationURL

  • For assets that were created via CPQ, a successful response includes a navigation URL to the Transaction UI.
  • For assets that were created via an external order, a successful response is empty and does not contain a URL.

processedList

When the request is successful, the output contains the lineId and assetKey for the processed assets.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/actions/resume


Internal Order Using Asset Keys

ClosedRequest Sample

{

   "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"] }


ClosedResponse Sample

{

   "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

ClosedRequest Sample

{ "sourceIdentifier": "_external_order", "transactionId": "", "transactionDate": "2019-05-20", "returnBom": false, "selections": ["21652013", "21652080"] }


ClosedResponse Sample

{    "resultTransactionId": "",    "navigationURL": "",    "processedList": [{       "lineId": "21652103",       "assetKey": "abo_778bf926-cb08-4eae-8907-e7efa388ad8f"    }, {       "lineId": "21652111",       "assetKey": "abo_53a62368-b9e1-4e91-86e2-09dfc87f66b4"       }    ] }


ClosedSuspend Asset

Note: Modify, reconfigure, follow-on actions cannot be performed on suspended assets.

Suspend AssetPOST method

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/v16/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
"_external_order"

Response Parameters

lineId

The Configuration ID for the Configuration BOM Instance

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/36562516/actions/suspend


ClosedSample Request Body

{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-14", "transactionId": "" }


ClosedSample Response Body


ClosedSuspend Assets

Suspend Assets POST method

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/v16/assets/actions/suspend

HTTP Method

POST

Request Body Parameters

sourceIdentifier

The identifier for the integration process.

  • "_external_order" for external orders. This is the default value when this parameter is not specified
  • "{processVarName}" for internal orders. The variable name of the Commerce process (e.g. oraclecpqo)

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

  • "true" returns a flattened BOM structure, this is the default value.
  • "false" returns a hierarchical BOM structure

assetKeys

An array of asset keys selected for the specified operation. When "assetKeys" are used, do not use "selections".

selections

An array of asset ids selected for the specified operation. When "selections" are used, do not use "assetKeys".

Response Body Parameters

resultTransactionId

The Commerce Transaction ID, if the Transaction ID is not provided, a new Transaction is created.

navigationURL

  • For assets that were created via CPQ, a successful response includes a navigation URL to the Transaction UI.
  • For assets that were created via an external order, a successful response is empty and does not contain a URL.

processedList

When the request is successful, the output contains the lineId and assetKey for the processed assets.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/actions/suspend


Internal Order Using Asset Keys

ClosedRequest Sample

{

   "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"] }


ClosedResponse Sample

{

   "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

ClosedRequest Sample

{ "sourceIdentifier": "_external_order", "transactionId": "", "transactionDate": "2019-05-20", "returnBom": false, "selections": ["21652013", "21652080"] }


ClosedResponse Sample

{    "resultTransactionId": "",    "navigationURL": "",    "processedList": [{       "lineId": "21652103",       "assetKey": "abo_778bf926-cb08-4eae-8907-e7efa388ad8f"    }, {       "lineId": "21652111",       "assetKey": "abo_53a62368-b9e1-4e91-86e2-09dfc87f66b4"       }    ] }


ClosedSynchronize Asset

Synchronize AssetPOST method

Description

This operation invokes a Synchronize action to edit the contents of an asset.

ClosedAsset 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.

URI Endpoint

/rest/v16/assets/{id}/actions/synchronize

Endpoint Parameters

{id}

The unique ID of the Asset to delete

Request Body Parameters

documents

  • Type: JSON
  • Holds a row or collection. Each row can include an optional _sync_action operation parameter.

_client_driven_action

  • Type: Boolean
  • Enables apply changes instead of replacing the target asset object. Currently this parameter must be set to "true".

Response Body Parameters

documents

  • Type: JSON
  • Holds a row or collection. Each row can include an optional _sync_status operation parameter.

HTTP Method

POST

Success Response

The JSON data for the asset object that was updated

  • When updating a collection, utilize the user key to refer to the target asset row.
  • The _sync_action parameter supports add, modify, and delete values.
  • The _sync_status parameter values include created and updated.
  • The optional _proxy_id parameter, added to each row in the input payload, enables parameter cross references. When present, the value for each row must be unique. When the _proxy_id parameter is present in the row inserted, the corresponding row data in the response will have the same _proxy_id value. The _proxy_id parameter is typically used when the caller of the Synchronize API wants to keep track of the real Asset ID created and use it for further processing at a later time.
  • The response payload does not include deleted objects.

ClosedSynchronize Assets

Synchronize AssetsPOST method

Description

This operation invokes a Synchronize action using the payload to edit the hierarchy contents.

ClosedAsset 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.

URI Endpoint

/rest/v16/assets/actions/synchronize

Request Body Parameters

documents

  • Type: JSON
  • Holds a row or collection. Each row can include an optional _sync_action operation parameter.

_client_driven_action

  • Type: Boolean
  • Enables apply changes instead of replacing the target asset object. Currently this parameter must be set to "true".

Response Body Parameters

documents

  • Type: JSON
  • Holds a row or collection. Each row can include an optional _sync_status operation parameter.

HTTP Method

POST

Success Response

The JSON data for the asset object that was updated

  • When updating a collection, utilize the user key to refer to the target asset row.
  • The _sync_action parameter supports add, modify, and delete values.
  • The _sync_status parameter values include created and updated.
  • The optional _proxy_id parameter, added to each row in the input payload, enables parameter cross references. When present, the value for each row must be unique. When the _proxy_id parameter is present in the row inserted, the corresponding row data in the response will have the same _proxy_id value. The _proxy_id parameter is typically used when the caller of the Synchronize API wants to keep track of the real Asset ID created and use it for further processing at a later time.
  • The response payload does not include deleted objects.

ClosedSample Request Body

{ "_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" } } } ] } } ] } }


ClosedSample Response Body


ClosedTerminate Asset

Terminate AssetPOST method

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/v16/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
"_external_order"

Response Parameters

lineId

The Configuration ID for the Configuration BOM Instance

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/36562516/actions/terminate


ClosedRequest Sample

{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-14", "transactionId": "" }


ClosedResponse Sample


ClosedTerminate Assets

Terminate Assets POST method

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/v16/assets/actions/terminate

HTTP Method

POST

Request Body Parameters

sourceIdentifier

The identifier for the integration process.

  • "_external_order" for external orders. This is the default value when this parameter is not specified
  • "{processVarName}" for internal orders. The variable name of the Commerce process (e.g. oraclecpqo)

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

  • "true" returns a flattened BOM structure, this is the default value.
  • "false" returns a hierarchical BOM structure

assetKeys

An array of asset keys selected for the specified operation. When "assetKeys" are used, do not use "selections".

selections

An array of asset ids selected for the specified operation. When "selections" are used, do not use "assetKeys".

Response Body Parameters

resultTransactionId

The Commerce Transaction ID, if the Transaction ID is not provided, a new Transaction is created.

navigationURL

  • For assets that were created via CPQ, a successful response includes a navigation URL to the Transaction UI.
  • For assets that were created via an external order, a successful response is empty and does not contain a URL.

processedList

When the request is successful, the output contains the lineId and assetKey for the processed assets.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/actions/terminate


Internal Order Using Asset Keys

ClosedRequest Sample

{

   "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"] }


ClosedResponse Sample

{

   "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

ClosedRequest Sample

{ "sourceIdentifier": "_external_order", "transactionId": "", "transactionDate": "2019-05-20", "returnBom": false, "selections": ["21652013", "21652080"] }


ClosedResponse Sample

{    "resultTransactionId": "",    "navigationURL": "",    "processedList": [{       "lineId": "21652103",       "assetKey": "abo_778bf926-cb08-4eae-8907-e7efa388ad8f"    }, {       "lineId": "21652111",       "assetKey": "abo_53a62368-b9e1-4e91-86e2-09dfc87f66b4"       }    ] }


ClosedUpdate Asset

Update AssetPOST method

Description

This operation updates an existing asset.

ClosedAsset 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.

URI Endpoint

/rest/v16/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.

ClosedSample Request Body


ClosedUpdate Configuration

Note: Prior to performing the Update Configuration operation, BOM items must be synchronized using the Synchronize Assets operation.

Update ConfigurationPOST method

Description

This operation gathers a projection of all involved configuration attributes from open order lines related to an asset and updates the internal configuration on the root asset.

URI Endpoint

/rest/v16/assets/actions/updateConfiguration

Endpoint Parameters

None

HTTP Method

POST

Request Body Parameters

 

 

 

 

 

 

 

assetList

An array of assets to update.

  • assetKey

Asset key value

  • orderLines

An array of order lines to update

Notes:

  • Oracle CPQ recommends grouping all Order Lines related to same asset under single entry in Asset List
  • The order of entries in "orderLines" array dictates the order projections are made and attribute deltas will be applied in this order.

   ™ type

Order type identifier: (internalOrder or externalOrder)

   ™ _bs_id

The Oracle CPQ transaction ID.

Required for internal orders ("type": "internalOrder")

   ™ _document_number

 

The main document or sub-document number. For Transaction Lines, this represents the numerical order in which each line item was created.

Required for internal orders ("type": "internalOrder")

   ™ configId

The Configuration Id for the Configuration BOM Instance

Required for external orders ("type": "externalOrder")

Response Body Parameters

For successful updates, nothing is returned in the response body.

If an error occurs, none of the assets are updated and an error message is returned. The error message contains information for the first asset causing the failure.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/assets/actions/updateConfiguration


ClosedSample Request Body


ClosedSearch Projected Assets by Customer

Search Projected Assets by CustomerPOST method

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/v16/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. oraclecpqo)

criteria

(Optional) Administrators can provide criteria parameters in the request body to retrieve specific content and limit the size of the response. For example:

  • enableHierarchy – true/false (default is false for root only query)
  • offset – default is 0

  • limit – default is 1000

  • fields – resource fields (assetKey, rootAssetKey and id are always returned)

  • state – true (false is not valid)

  • orderby - attributes supported are id, assetKey, partNumber, lineId, serviceId, and transactionId (string based)

Notes:

  • Oracle CPQ recommends grouping all Order Lines related to same asset under single entry in Asset List
  • The order of entries in "orderLines" array dictates the order projections are made and attribute deltas will be applied in this order.

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:

  • quantity
  • sourceIdentifier
  • customerId
  • numberOfOpenOrders

Response Body Parameters

The JSON data for the specified customer projected assets.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/projectedAssets/actions/search


ClosedSample Request Body

{ "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'}}]}" } }


ClosedSample Response Body

{ "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:

     QuantityDate Added
    Asset (database query)10Oct 1
    Pending Fulfilled Orders (database query) 20Nov 1
    Projected Asset (merged data)20Oct 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 is hasMore=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, or transactionId 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 the abo_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

ClosedFollow-On Order

Follow-on Order POST method

Description

This operation is used to make changes to an existing order that has not yet been fulfilled. When a follow-on order is created, the projected state of an existing unfulfilled order is calculated and a new configuration URL is returned. The configuration URL can be used to launch the model configurator page, which will reflect the user intended net changes to the subscription.

URI Endpoint

/rest/v16/configBomInstance/{configId}/actions/followOnOrder

Endpoint Parameters

config_id

The Configuration Id for the Configuration BOM Instance

HTTP Method

POST

Request Parameters

sourceIdentifier

The identifier for the integration process When this parameter is not specified, the default value is "_external_order"

transactionDate

The date and time that the service request needs to be processed or fulfilled.

transactionId

The current Transaction identifier

Response Parameters

configurationURL

The URL to launch the model configurator page

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/configBomInstance/36503159/actions/followOnOrder


ClosedSample Request Body

{ "sourceIdentifier": "_external_order", "transactionDate": "2017-04-17", "transactionId": "36563805" }


ClosedSample Response Body


ClosedGet Configuration Instance

Get Configuration Instance POST method

Description

This operation will use one of the following identifiers to retrieve a saved Configuration BOM Instance:

  • The lineId returned from a Terminate, Suspend, Resume, or Renew service
  • The config_id returned by client side JSON object for client integration case.
Note: Get Configuration Instance is only available for external integrations.

URI Endpoint

/rest/v16/configBomInstance/{config_Id}/actions/getConfigBom

Endpoint Parameters

config_Id

The Configuration BOM Instance Id

HTTP Method

POST

Request Parameters

flattenHierachy

True

Returns a flattened BOM structure True is the default value.

False

Returns a hierarchical BOM structure

Response Parameters

JSON data containing the saved Configuration BOM instance

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/configBomInstance/36503159/actions/getConfigBom


ClosedSample Request Body

{ "flattenHierarchy": "true" }


ClosedSample Response Body


ClosedReconfigure from Assets

Note: Reconfigure cannot be performed on individual or fulfilled assets.
Reconfigure from AssetsPOST method

Description

This operation can be used to update a Transaction prior to fulfillment and will internally calculate the projected state of the configuration instance. It returns a new configuration URL that can be used to launch the model configurator page that will reflect the user-intended net changes to the subscription.

URI Endpoint

/rest/v16/configBomInstance/{configId}/actions/reconfig

Endpoint Parameters

config_id

The Configuration BOM Instance Id

HTTP Method

POST

Request Parameters

None

Response Parameters

configuratorURL

The URL to launch the model configurator page

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v16/configBomInstance/36503159/actions/reconfig


ClosedSample Response Body


File Operations

ClosedGet Exported File

Get Exported File GET Method

Description

This operation invokes a GET call to retrieve the file downloaded on the browser.

URI Endpoint

/rest/v16/files/fileName

Endpoint Parameter

fileName

This parameter contains the control file name from the export call response.

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

Refer to the exported Asset CSV data file.

Success Response

The CSV file with the data.

Notes

These calls perform user access validation, so the same user must perform the export and get file calls.

ClosedSample URI Endpoint


ClosedExport Assets CSV File

Export Assets CSV FilePOST method

Description

This operation invokes an Export action to export an asset collection or single instance to a CSV file. It exports the object attributes as column headers and the key attributes with the dotted notation.

URI Endpoint

/rest/v16/assets/actions/export

Request Body Parameters

criteria

Type: JSON

Requirements for the asset collection or single instance row export.

Asset "attributes" can not be used as a parameter in search or sort query specifications.

Response Body Parameters

exportedFileName

Type: JSON

This parameter contains the absolute path to the JSON control file used in the consecutive call to retrieve the CSV file.

HTTP Method

POST

Success Response

The JSON data of the absolute path of the control file.

ClosedSample URI Endpoints

  • /rest/v16/assets/actions/export

  • /rest/v16/assets/{$asset_id}/actions/export


ClosedSample Request

{ "criteria":{ "fields":["assetKey","displayKey"], "orderby":["assetKey:desc"], "q":"{assetKey:{$eq: 'asdfgh'}}" } }


ClosedCSV Export

Excel iconSample Export CSV File

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

ClosedImport Assets CSV File

Import Assets CSV FilePOST method

Description

This operation invokes an Import action to process the uploaded CSV to import data. It supports create, update, and delete operations.

ClosedAsset 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.

URI Endpoint

/rest/v16/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.

ClosedSample URI Endpoint

/rest/v16/assets/actions/import


ClosedSample Request Body

{ "fileName":"upload_1465847155416" }


ClosedSample Response Body Payload

{ "importLogFileName": " https://sitename.oracle.com/rest/v16/files/assets_output_1465848183346" }


Asynchronous Import Mode Examples

ClosedSample URI Endpoint - Asynchronous Import Mode

  • Curl Sample

  • curl -L -X POST ' https://sitename.oracle.com/rest/v16/assets/actions/import' -H 'Prefer: respond-async' -H 'Authorization: Basic c3VwZXJ1c2VyOlFhcGFzc0AxMjM=' -H 'Content-Type: application/json' -H 'Cookie: JSESSIONID=5e19618bd50d467388f856fbc56582b94a41ad701e9dd4ef2b27!1191495071'

  • Postman Sample

    Postman Asynchronous Import Mode


ClosedSample Request Body - Asynchronous Import Mode

{ "fileName":"upload_1465847155416" }


ClosedSample Response Body Payloads - Asynchronous Import Mode

In Progress Sample

{ "progress": "processing", "links": [{ "rel": "self", "href": " https://sitename.oracle.com/rest/v16/asyncTasks/3022782546/status" } ], "completed": false, "requestStatus": "202" }

Successful Response

{ "progress": "succeeded", "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v16/asyncTasks/3022782559/response" }, { "rel": "self", "href": "https://sitename.oracle.com/rest/v16/asyncTasks/3022782559/status" } ], "completed": true, "requestStatus": 200 }

Failed Response

{ "progress": "failed", "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v16/asyncTasks/3022782539/response" }, { "rel": "self", "href": "https://sitename.oracle.com/rest/v16/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/v16/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." }


ClosedUpload File

Upload FilePOST method

Description

This operation invokes a POST call to upload a file from the user's file system. It returns a control file used for the import action.

URI Endpoint

/rest/v16/files

File Parameters

attachment

The CSV file

Header

content-disposition

Media-type

application-JSON/octet-stream

HTTP Method

POST

Request Body Parameters

CSV file

Response Body Parameters

The response provides the absolute path to the control file, which contains user Information and the absolute path to the CSV to be imported.

  • The import CSV file should contain a column called _sync_action to specify actions to perform. If the CSV file does not contain this column, the default upsert action is used.
  • Use dot notation to represent Foreign Key (FK) attributes. For example, an asset object has an FK attribute called rootAsset. The import operation should import these attributes as rootAsset.id,rootAsset.assetKey.
  •  Use dot notation to represent Currency attributes. For example, an asset has a Currency attribute called discountAmount.  The import operation needs to import these attributes as discountAmount.value,discountAmount.currency.
  • Use dot notation to represent LOVs.

ClosedSample URI Endpoint

/rest/v16/files/


ClosedSample Response Body


ClosedGet Import Log

Get Import Log GET Method

Description

Invokes a GET call to retrieve the actual import log file.

URI Endpoint

/rest/v16/files/fileName

Endpoint Parameter

fileName

The name of the import log file from the import call response

HTTP Method

GET

Request Body Parameters

None

Response Body Parameter

CSV file

Success Response

The CSV file with the object data as the status (CSV column) of the import for each row and if the import failed for the row the error message (CSV column).

User access is validated, so both the import and get log file calls should be performed by the same user.

ClosedSample URI Endpoint


Related Topics

Related Topics Link IconSee Also