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
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. |
https://sitename.oracle.com/rest/v17/eligibilityRule/20471574?expand=all
{ "startDate": "2031-03-21", "dateModified": "2021-03-18T10:56:11.655Z", "variableName": "testEligibilityRule", "selectionRowGrouping": "1", "conditionType": { "lookupCode": "1", "displayValue": "Simple", "id": 20471574, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_COND_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.co/rest/v17/lookupValues/20471574" } ] }, "processName": "oraclecpqo", "dateAdded": "2021-03-18T10:56:11.655Z", "endDate": "2021-03-18", "id": 20510770, "conditionRowGrouping": "1", "isRuleChanged": true, "description": null, "name": "Test Eligibility Rule", "isRuleInvalid": false, "ruleType": { "lookupCode": "1", "displayValue": "Not Available", "id": 20383423, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20383423" } ] }, "lastDeployedDate": null, "selectionType": { "lookupCode": "2", "displayValue": "Simple", "id": 20471577, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_SEL_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20471577" } ] }, "active": { "lookupCode": "1", "displayValue": "Yes", "id": 20383422, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com//rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_ACTIVE_CODE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20383422" } ] }, "condition": { "hasMore": false, "items": [{ "dateModified": "2021-03-18T10:56:11.657Z", "dateAdded": "2021-03-18T10:56:11.657Z", "operator": { "lookupCode": "1", "displayValue": "Equal", "id": 20471586, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_OPERATOR_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20471586" } ] }, "attributeName": "/process/oraclecpqo/_main_doc/transaction/numOfRecords", "id": 20510771, "dataType": { "lookupCode": "3", "displayValue": "Single Select Menu", "id": 20471581, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_DATA_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20471581" } ] }, "ruleId": { "id": 20510770, "variableName": "testEligibilityRule", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770" } ] }, "value": null, "ruleConditionIndex": 1, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770/condition/20510771" }, { "rel": "parent", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule/20510770" } ] } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770/condition" } ] }, "selection": { "hasMore": false, "items": [{ "dateModified": "2021-03-18T10:56:11.658Z", "dateAdded": "2021-03-18T10:56:11.658Z", "partField": "/part/_custom_attr/field13", "operator": { "lookupCode": "1", "displayValue": "Equal", "id": 20471586, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_OPERATOR_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20471586" } ] }, "id": 20510772, "dataType": { "lookupCode": "2", "displayValue": "Text", "id": 20471580, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_DATA_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20471580" } ] }, "ruleId": { "id": 20510770, "variableName": "testEligibilityRule", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770" } ] }, "value": "1", "ruleSelectionIndex": 1, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770/selection/20510772" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770" } ] } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770/selection" } ] }, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770" } ] }
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. |
https://sitename.oracle.com/rest/v17/eligibilityRule/?expand=all
{ "hasMore": false, "totalResults": 2, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule" } ] }
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.
|
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.
https://sitename.oracle.com/rest/v17/eligibilityRule
{ "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" } } ] } }
{ "startDate": "2021-03-18", "dateModified": "2021-03-16T10:56:11.655Z", "variableName": "testEligibilityRule", "selectionRowGrouping": "1", "conditionType": { "lookupCode": "1", "displayValue": "Simple", "id": 20471574, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_COND_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com//rest/v17/lookupValues/20471574" } ] }, "processName": "oraclecpqo", "dateAdded": "2013-03-18T10:56:11.655Z", "endDate": "2021-08-01", "id": 20510770, "conditionRowGrouping": "1", "isRuleChanged": true, "description": null, "name": "Test Eligibility Rule", "isRuleInvalid": false, "ruleType": { "lookupCode": "1", "displayValue": "Not Available", "id": 20383423, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com//rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com//rest/v17/lookupValues/20383423" } ] }, "lastDeployedDate": null, "selectionType": { "lookupCode": "2", "displayValue": "Simple", "id": 20471577, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com//rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_SEL_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com//rest/v17/lookupValues/20471577" } ] }, "active": { "lookupCode": "1", "displayValue": "Yes", "id": 20383422, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com//rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_ACTIVE_CODE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com//rest/v17/lookupValues/20383422" } ] }, "condition": { "hasMore": false, "items": [{ "dateModified": "2018-03-18T10:56:11.657Z", "dateAdded": "2018-03-18T10:56:11.657Z", "operator": { "lookupCode": "1", "displayValue": "Equal", "id": 20471586, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com//rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_OPERATOR_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com//rest/v17/lookupValues/20471586" } ] }, "attributeName": "/process/oraclecpqo/_main_doc/transaction/numOfRecords", "id": 20510771, "dataType": { "lookupCode": "3", "displayValue": "Single Select Menu", "id": 20471581, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com//rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_DATA_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com//rest/v17/lookupValues/20471581" } ] }, "ruleId": { "id": 20510770, "variableName": "testEligibilityRule", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule" }, { "rel": "canonical", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule/20510770" } ] }, "value": null, "ruleConditionIndex": 1, "links": [{ "rel": "self", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule/20510770/condition/20510771" }, { "rel": "parent", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule/20510770" } ] } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule/20510770/condition" } ] }, "selection": { "hasMore": false, "items": [{ "dateModified": "2021-03-18T10:56:11.658Z", "dateAdded": "2021-03-18T10:56:11.658Z", "partField": "/part/_custom_attr/field13", "operator": { "lookupCode": "1", "displayValue": "Equal", "id": 20471586, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com//rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_OPERATOR_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com//rest/v17/lookupValues/20471586" } ] }, "id": 20510772, "dataType": { "lookupCode": "2", "displayValue": "Text", "id": 20471580, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com//rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_DATA_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com//rest/v17/lookupValues/20471580" } ] }, "ruleId": { "id": 20510770, "variableName": "test", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule" }, { "rel": "canonical", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule/20510770" } ] }, "value": "1", "ruleSelectionIndex": 1, "links": [{ "rel": "self", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule/20510770/selection/20510772" }, { "rel": "parent", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule/20510770" } ] } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule/20510770/selection" } ] }, "links": [{ "rel": "self", "href": "https://sitename.oracle.com//rest/v17/eligibilityRule/20510770" } ] }
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.
https://sitename.oracle.com/rest/v17/eligibilityRule/20471574
{ "conditionType": { "lookupCode": "0" }, "name": "Test Eligibility Rule", "ruleType": { "lookupCode": "0" } }
{ "startDate": "2021-03-18", "dateModified": "2021-03-18T10:56:11.655Z", "variableName": "testEligibilityRule", "selectionRowGrouping": "1", "conditionType": { "lookupCode": "0", "displayValue": "Always True", "id": 20471574, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_COND_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20471574" } ] }, "processName": "Quotes", "dateAdded": "2021-03-18T10:56:11.655Z", "endDate": "2021-08-21", "id": 20510770, "conditionRowGrouping": "1", "isRuleChanged": true, "description": null, "name": "Test Eligibility Rule", "isRuleInvalid": false, "ruleType": { "lookupCode": "0", "displayValue": "Available", "id": 20383423, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20383423" } ] }, "lastDeployedDate": null, "selectionType": { "lookupCode": "2", "displayValue": "Simple", "id": 20471577, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_SEL_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20471577" } ] }, "active": { "lookupCode": "1", "displayValue": "Yes", "id": 20383422, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_ACTIVE_CODE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20383422" } ] }, "condition": {}, "selection": { "hasMore": false, "items": [{ "dateModified": "2021-03-21T10:56:11.658Z", "dateAdded": "2021-03-18T10:56:11.658Z", "partField": "/part/_custom_attr/field13", "operator": { "lookupCode": "1", "displayValue": "Equal", "id": 20471586, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_OPERATOR_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20471586" } ] }, "id": 20510772, "dataType": { "lookupCode": "2", "displayValue": "Text", "id": 20471580, "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/lookupValues?q=%7B%22lookupType%22%3A%7B%22%24eq%22%3A%22ELIGIBILITY_RULE_DATA_TYPE%22%7D%7D" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/lookupValues/20471580" } ] }, "ruleId": { "id": 20510770, "variableName": "testEligibilityRule", "links": [{ "rel": "domain", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule" }, { "rel": "canonical", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770" } ] }, "value": "1", "ruleSelectionIndex": 1, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770/selection/20510772" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770" } ] } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770/selection" } ] }, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/eligibilityRule/20510770" } ] }
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 |
https://sitename.oracle.com/rest/v17/eligibilityRule/36624477/actions/deploy
Deploy Multiple Eligibility Rules
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 |
https://sitename.oracle.com/rest/v17/eligibilityRule/actions/deploy
{ "selections": ["36624477", "36624664"] }
Delete Eligibility Rule (POST)
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 |
https://sitename.oracle.com/rest/v17/eligibilityRule/36624664/actions/deploy
Delete Eligibility Rule (DELETE)
Description |
This operation deletes an existing Eligibility Rule. |
|
---|---|---|
URI Endpoint |
|
|
Endpoint Parameters |
|
The unique ID of the Eligibility Rule to delete. |
HTTP Method |
DELETE |
|
Success Response |
204 - Success |
https://sitename.oracle.com/rest/v17/eligibilityRule/36624664
Notes
For more information on the Interface Catalogs, see the topic Interface Catalog.