Create rules
post
/fscmRestApi/resources/11.13.18.05/spendClassificationRules
Request
Header Parameters
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
-
Upsert-Mode:
Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
ActionOnAttributeCode: string
Maximum Length:
100
Abbreviation that indicates the attribute on which the action is taken. -
ActionType: string
Maximum Length:
30
Type of action taken on the rule. -
ApplicableDatasets: string
Maximum Length:
1000
List of data sets to which a rule is applicable. -
ApplicableKnowledgebases: string
Maximum Length:
1000
List of knowledge bases to which a rule is applicable. -
AssignmentTypeCode: string
Maximum Length:
100
Abbreviation that indicates the type of assignment. -
AssignToAttributeCode: string
Maximum Length:
100
Abbreviation that indicates the attribute whose value is assigned to another attribute. -
AssignToConstant: string
Maximum Length:
100
Value that indicates that a constant value is assigned to another attribute. -
DatasetsScope: string
Maximum Length:
30
Value that indicates if a rule is applicable to all or specific data sets. -
Description: string
Maximum Length:
2000
Description of the rule. -
EndDate: string
(date)
Date when the rule becomes inactive.
-
EntityId: integer
(int32)
Default Value:
1
Value that detemines if the rules are created for spend classification or another product. -
KnowledgebaseScope: string
Maximum Length:
30
Value that indicates if a rule is applicable to all or specific knowledge bases. -
LastUsedDate: string
(date-time)
Date when the rule was most recently applied to the classification process.
-
ruleConditions: array
Rule Conditions
Title:
Rule Conditions
The Rule Conditions resource manages the conditions for rules in Oracle Fusion Spend Classification Cloud. -
RuleConditionType: string
Maximum Length:
30
Type of the rule condition. -
RuleId(required): integer
(int64)
Value that uniquely identifies the rule.
-
RuleName(required): string
Maximum Length:
200
Name of the rule. -
RuleSequence(required): integer
(int64)
Number that indicates the sequence in which rules are applied to the classification process.
-
RuleType(required): string
Maximum Length:
30
Type of the rule. -
StartDate: string
(date)
Date when the rule becomes active.
-
StopRule: string
Maximum Length:
3
Value that determines if all applicable rules should be processed or if the classification process should stop after the first rule is applied.
Nested Schema : Rule Conditions
Type:
array
Title:
Rule Conditions
The Rule Conditions resource manages the conditions for rules in Oracle Fusion Spend Classification Cloud.
Show Source
Nested Schema : spendClassificationRules-ruleConditions-item-post-request
Type:
Show Source
object
-
AttributeCode: string
Maximum Length:
100
Abbreviation that indicates the attribute used to define a condition. -
OperatorCode: string
Maximum Length:
30
Abbreviation that indicates the operator used to define a condition. -
RuleConditionId: integer
Value that uniquely identifies the rule condition.
-
Value: string
Maximum Length:
2000
Value that indicates the string used to define the condition.
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Root Schema : spendClassificationRules-item-response
Type:
Show Source
object
-
ActionOnAttribute: string
Read Only:
true
Maximum Length:80
Value that indicates the attribute on which the action is taken. -
ActionOnAttributeCode: string
Maximum Length:
100
Abbreviation that indicates the attribute on which the action is taken. -
ActionType: string
Maximum Length:
30
Type of action taken on the rule. -
ActivityClassification: string
Read Only:
true
Maximum Length:2000
Category name that is used for invoice classification to calculate carbon emissions. -
ApplicableDatasets: string
Maximum Length:
1000
List of data sets to which a rule is applicable. -
ApplicableKnowledgebases: string
Maximum Length:
1000
List of knowledge bases to which a rule is applicable. -
AssignmentType: string
Read Only:
true
Maximum Length:80
Type of the assignment. -
AssignmentTypeCode: string
Maximum Length:
100
Abbreviation that indicates the type of assignment. -
AssignToAttribute: string
Read Only:
true
Maximum Length:80
Value that indicates the attribute whose value is assigned to another attribute. -
AssignToAttributeCode: string
Maximum Length:
100
Abbreviation that indicates the attribute whose value is assigned to another attribute. -
AssignToConstant: string
Maximum Length:
100
Value that indicates that a constant value is assigned to another attribute. -
DatasetsScope: string
Maximum Length:
30
Value that indicates if a rule is applicable to all or specific data sets. -
Description: string
Maximum Length:
2000
Description of the rule. -
EndDate: string
(date)
Date when the rule becomes inactive.
-
EntityId: integer
(int32)
Default Value:
1
Value that detemines if the rules are created for spend classification or another product. -
KnowledgebaseScope: string
Maximum Length:
30
Value that indicates if a rule is applicable to all or specific knowledge bases. -
LastUsedDate: string
(date-time)
Date when the rule was most recently applied to the classification process.
-
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
ruleConditions: array
Rule Conditions
Title:
Rule Conditions
The Rule Conditions resource manages the conditions for rules in Oracle Fusion Spend Classification Cloud. -
RuleConditionType: string
Maximum Length:
30
Type of the rule condition. -
RuleId: integer
(int64)
Value that uniquely identifies the rule.
-
RuleName: string
Maximum Length:
200
Name of the rule. -
RuleSequence: integer
(int64)
Number that indicates the sequence in which rules are applied to the classification process.
-
RuleType: string
Maximum Length:
30
Type of the rule. -
StartDate: string
(date)
Date when the rule becomes active.
-
Status: string
Read Only:
true
Maximum Length:1
Status of the rule. -
StopRule: string
Maximum Length:
3
Value that determines if all applicable rules should be processed or if the classification process should stop after the first rule is applied.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : Rule Conditions
Type:
array
Title:
Rule Conditions
The Rule Conditions resource manages the conditions for rules in Oracle Fusion Spend Classification Cloud.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Nested Schema : spendClassificationRules-ruleConditions-item-response
Type:
Show Source
object
-
AttributeCode: string
Maximum Length:
100
Abbreviation that indicates the attribute used to define a condition. -
AttributeValue: string
Read Only:
true
Maximum Length:80
Value that indicates the attribute used to define a condition. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
OperatorCode: string
Maximum Length:
30
Abbreviation that indicates the operator used to define a condition. -
OperatorValue: string
Read Only:
true
Maximum Length:80
Value that indicates the operator used to define a condition. -
RuleConditionId: integer
Value that uniquely identifies the rule condition.
-
Value: string
Maximum Length:
2000
Value that indicates the string used to define the condition.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Links
- ruleConditions
-
Operation: /fscmRestApi/resources/11.13.18.05/spendClassificationRules/{RuleId}/child/ruleConditionsParameters:
- RuleId:
$request.path.RuleId
The Rule Conditions resource manages the conditions for rules in Oracle Fusion Spend Classification Cloud. - RuleId:
Examples
This example describes how to create a rule.
Example cURL Command
Use the following cURL command to submit a request on the REST resource.
curl -u user:password -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -X POST -d 'request payload' https://servername/fscmRestApi/resources/11.13.18.05/spendClassificationRules
Example Request Body
The following example includes the contents of the request body in JSON format:
"{ ""RuleName"": ""RuleTATA1053"", ""Description"": ""RuleTATA10445"", ""RuleType"": ""POST"", ""StartDate"": ""2021-02-01"", ""EndDate"": ""2021-03-01"", ""LastUsedDate"": null, ""ActionType"": ""EXCLUDE"", ""ActionOnAttributeCode"": ""ORA_POI_ITEM_CODE"", ""AssignmentTypeCode"": ""CONSTANT"", ""AssignToAttributeCode"": null, ""AssignToConstant"": ""AS18940"", ""DatasetsScope"": ""LIST"", ""ApplicableDatasets"": ""TATAPOSET1"", ""KnowledgebaseScope"": ""LIST"", ""ApplicableKnowledgebases"": ""TATAKWP01"", ""RuleSequence"": 278, ""RuleConditionType"": ""ALL"", ""ruleConditions"": [ { ""AttributeCode"": ""ORA_POI_SUPPLIER_NAME"", ""OperatorCode"": ""LIKE"", ""Value"": ""SC_Supplier_02"" } ] }"
Example Response Body
The following example includes the contents of the response body in
JSON format:
{ "RuleId": 4006, "RuleName": "RuleTATA1053", "Description": "RuleTATA10445", "RuleType": "POST", "Status": null, "StartDate": "2021-02-01", "EndDate": "2021-03-01", "LastUsedDate": null, "ActionType": "EXCLUDE", "ActionOnAttributeCode": "ORA_POI_ITEM_CODE", "ActionOnAttribute": null, "AssignmentTypeCode": "CONSTANT", "AssignmentType": null, "AssignToAttributeCode": null, "AssignToAttribute": null, "AssignToConstant": "AS18940", "DatasetsScope": "LIST", "ApplicableDatasets": "TATAPOSET1", "KnowledgebaseScope": "LIST", "ApplicableKnowledgebases": "TATAKWP01", "RuleSequence": 278, "RuleConditionType": "ALL", "ruleConditions": [ { "AttributeCode": "ORA_POI_SUPPLIER_NAME", "AttributeValue": null, "OperatorCode": "LIKE", "OperatorValue": null, "Value": "SC_Supplier_02", "RuleConditionId": 6003, "links": [ { "rel": "self", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006/child/ruleConditions/6003", "name": "ruleConditions", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel": "canonical", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006/child/ruleConditions/6003", "name": "ruleConditions", "kind": "item" }, { "rel": "parent", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006", "name": "spendClassificationRules", "kind": "item" } ] } ], "links": [ { "rel": "self", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006", "name": "spendClassificationRules", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel": "canonical", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006", "name": "spendClassificationRules", "kind": "item" }, { "rel": "child", "href": "https://servername:443/fscmRestApi/resources/11.13.18.05/spendClassificationRules/4006/child/ruleConditions", "name": "ruleConditions", "kind": "collection" } ] }