Eligibility Rules REST APIs

Overview

Oracle CPQ exposes eligibility data through REST APIs. As described in this section, Eligibility APIs allow external applications to create, read, update, delete, and deploy eligibility data.

Administration

ClosedGet Eligibility Rule

Get Eligibility Rule GET Method

Description

This operation returns eligibility data for a specific Eligibility Rule.

URI Endpoint

/rest/v17/eligibilityRule/{id}?expand=all

Endpoint Parameters

 

id

The unique ID of the Eligibility Rule.

expand=all

Necessary to pull child conditions and selection rows in the GET request.

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

JSON data of the Eligibility Rule. Returns all attributes from the Eligibility Rule object in JSON format.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/eligibilityRule/20471574?expand=all


ClosedResponse Sample


ClosedGet Eligibility Rules

Get Eligibility Rules GET Method

Description

This operation returns all Eligibility Rule data.

URI Endpoint

/rest/v17/eligibilityRule/?expand=all

Endpoint Parameters

expand=all

Necessary to pull child conditions and selection rows in the GET request.

HTTP Method

GET

Request Body Parameters

None

Response Body Parameters

JSON data of all Eligibility Rules. Returns all attributes from the Eligibility Rule object in JSON format.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/eligibilityRule/?expand=all


ClosedResponse Sample


ClosedCreate Eligibility Rule

Create Eligibility Rule POST method

Description

This operation creates a new Eligibility Rule.

URI Endpoint

/rest/v17/eligibilityRule

Endpoint Parameters

None

HTTP Method

POST

Request Body Parameters

active

Used to specify whether the Eligibility Rule is active.

  • Yes = 1
  • No = 0

conditionRowGrouping

Holds the Eligibility Rule’s condition row grouping information.

conditonType

Used to specify whether the condition is Always True or Simple.

description

The description of the Eligibility Rule.

endDate

The Eligibility Rule end date.

name

The name of the Eligibility Rule.

ruleType

Used to indicate whether the Eligibility Rule is Available or Not Available.

selectionRowGrouping

Holds the Eligibility Rule’s selection row grouping.

selectionType

Used to specify whether the selection is All, None, or Simple.

startDate

The Eligibility Rule start date.

variableName

The variable name of the Eligibility Rule.

Response Body Parameters

Creation of the JSON data for the updated eligibility rule.

The following example shows the creation of an Eligibility Rule by an administrator or a Full access user when Parts are set to be unavailable.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/eligibilityRule


ClosedRequest Sample

{ "startDate": "2021-03-18", "variableName": "testEligibilityRule", "selectionRowGrouping": "1", "conditionType": { "lookupCode": "1" }, "endDate": "2017-08-01", "conditionRowGrouping": "1", "description": null, "name": "Test Eligibility Rule", "ruleType": { "lookupCode": "1" }, "selectionType": { "lookupCode": "2" }, "active": { "lookupCode": "1" }, "condition": { "items": [{ "attributeName": "/process/oraclecpqo/_main_doc/transaction/numOfRecords", "dataType": { "lookupCode": "3" }, "value": null, "operator": { "lookupCode": "1" }, "ruleConditionIndex": 1 } ] }, "selection": { "items": [{ "dataType": { "lookupCode": "2" }, "value": "1", "ruleSelectionIndex": 1, "partField": "/part/_custom_attr/field13", "operator": { "lookupCode": "1" } } ] } }


ClosedResponse Sample


ClosedUpdate Eligibility Rule

Update Eligibility Rule POST method

Description

This operation updates an existing Eligibility Rule.

URI Endpoint

/rest/v17/eligibilityRule/{id}

Endpoint Parameters

id

The unique ID of the Eligibility Rule to update.

HTTP Method

POST

Request Body Parameters

active

Used to specify whether the Eligibility Rule is active: Yes or No

conditionRowGrouping

Holds the Eligibility Rule’s condition row grouping information.

conditonType

Used to specify whether the condition is Always True or Simple.

description

The description of the Eligibility Rule.

endDate

The Eligibility Rule end date.

id

The primary key of the Eligibility Rule.

* During update, the id cannot be changed.

name

The name of the Eligibility Rule.

ruleType

Used to indicate whether the Eligibility Rule is Available or Not Available.

selectionRowGrouping

Holds the Eligibility Rule’s selection row grouping.

selectionType

Used to specify whether the selection is All, None, or Simple.

startDate

The Eligibility Rule start date.

variableName

The variable name of the Eligibility Rule.

* During update, the variableName cannot be changed.

Response Body Parameters

Creation of the JSON data for the updated Eligibility Rule.

The following example updates a specific Eligibility Rule from UnAvailable to Available (i.e. make parts eligible and available) and change the Simple Rule Condition to Always True.

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/eligibilityRule/20471574


ClosedRequest Sample

{ "conditionType": { "lookupCode": "0" }, "name": "Test Eligibility Rule", "ruleType": { "lookupCode": "0" } }


ClosedResponse Sample


ClosedDeploy Eligibility Rule

Deploy Eligibility Rule POST method

Description

This operation deploys an existing Eligibility Rule.

URI Endpoint

/rest/v17/eligibilityRule/{id}/actions/deploy

Endpoint Parameters

id

The unique ID of the Eligibility Rule to deploy.

HTTP Method

POST

Response Body Parameters

None

ClosedURI Endpoint Sample


ClosedDeploy Multiple Eligibility Rules

Deploy Multiple Eligibility Rules POST method

Description

This operation deploys multiple Eligibility Rules.

URI Endpoint

/rest/v17/eligibilityRule/actions/deploy

Endpoint Parameters

None

HTTP Method

POST

Request Body Parameters

selections

The object used to provide a string of Eligibility Rule IDs in an array format.

Response Body Parameters

None

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/eligibilityRule/actions/deploy


ClosedRequest Sample

{ "selections": ["36624477", "36624664"] }


ClosedDelete Eligibility Rule (POST)

Delete Eligibility Rule POST method

Description

This operation deletes an existing Eligibility Rule.

URI Endpoint

/rest/v17/eligibilityRule/{id}/actions/delete

Endpoint Parameters

id

The unique ID of the Eligibility Rule to delete.

HTTP Method

POST

Success Response

HTTP 200 OK

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/eligibilityRule/36624664/actions/deploy


ClosedDelete Eligibility Rule (DELETE)

Delete Eligibility Rule DELETE method

Description

This operation deletes an existing Eligibility Rule.

URI Endpoint

/rest/v17/eligibilityRule/{id}

Endpoint Parameters

id

The unique ID of the Eligibility Rule to delete.

HTTP Method

DELETE

Success Response

204 - Success

ClosedURI Endpoint Sample

https://sitename.oracle.com/rest/v17/eligibilityRule/36624664


Notes

For more information on the Interface Catalogs, see the topic Interface Catalog.

Related Topics

Related Topics Link IconSee Also