Update a batch
/fscmRestApi/resources/11.13.18.05/spendClassificationBatches/{BatchNumber}
Request
-
BatchNumber(required): integer(int64)
Number that uniquely identifies the batch.
-
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.
- application/json
object-
BatchFileContent: string
Value that contains the transaction details in a batch.
-
CategoryId: string
Value that uniquely identifies the category.
-
ClassificationCompletionPercentage: number
Percentage indicating the batch's classification progress.
-
ClassificationStep: string
Maximum Length:
30Name of different steps within the classification process. -
CorrectionsDataSet: string
Name of the data set created using manually classified transactions.
-
DataSet: string
Maximum Length:
2000Abbreviation that identifies the data set. -
OperationName: string
Name of the operation performed on a batch.
-
TransactionId: string
Value that uniquely identifies the transaction.
-
TransactionsEndDate: string
(date-time)
Maximum transaction date available in the transactions within a batch.
-
TransactionsStartDate: string
(date-time)
Minimum transaction date available in the transactions within a batch.
Response
- application/json
Default Response
-
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.
object-
BatchFileContent: string
Value that contains the transaction details in a batch.
-
BatchName: string
Read Only:
trueMaximum Length:255Name of the batch. -
BatchNumber: integer
(int64)
Read Only:
trueNumber that uniquely identifies the batch. -
CategoryId: string
Value that uniquely identifies the category.
-
ClassificationCompletedOn: string
(date-time)
Read Only:
trueDate and time when the classification process completed for the batch. -
ClassificationCompletionPercentage: number
Percentage indicating the batch's classification progress.
-
ClassificationInitiatedOn: string
(date-time)
Read Only:
trueDate and time when the classification process started for the batch. -
ClassificationStep: string
Maximum Length:
30Name of different steps within the classification process. -
CorrectionsDataSet: string
Name of the data set created using manually classified transactions.
-
CurrencyCode: string
Read Only:
trueMaximum Length:15Abbreviation that identifies the currency for the transaction amount in a batch. -
DataSet: string
Maximum Length:
2000Abbreviation that identifies the data set. -
DataSetName: string
Read Only:
trueMaximum Length:255Name of the data set. -
KnowledgeBase: string
Read Only:
trueMaximum Length:30Pattern or knowledge within the data set. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
NumberOfTransactions: number
Read Only:
trueCount of the number of transactions in a batch. -
OperationName: string
Name of the operation performed on a batch.
-
Status: string
Read Only:
trueMaximum Length:80Status of the batch. -
StatusCode: string
Read Only:
trueMaximum Length:20Abbreviation that identifies the status of a batch. -
TaxonomyCode: string
Read Only:
trueMaximum Length:90Abbreviation that identifies the taxonomy. -
TaxonomyName: string
Read Only:
trueMaximum Length:80Name of the taxonomy. -
TotalSpendAmount: number
Read Only:
trueTotal of all the transaction amounts in a batch. -
TransactionId: string
Value that uniquely identifies the transaction.
-
TransactionsEndDate: string
(date-time)
Maximum transaction date available in the transactions within a batch.
-
TransactionsStartDate: string
(date-time)
Minimum transaction date available in the transactions within a batch.
arrayLinksobject-
href: string
Title:
hyperlink referenceThe URI to the related resource. -
kind: string
Title:
kindAllowed Values:[ "collection", "item", "describe", "other" ]The kind of the related resource. -
name: string
Title:
nameThe name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relationAllowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]The name of the relation to the resource instance. Example: self.
object-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Examples
Reset a Batch
This example describes how to reset a batch.
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 PATCH -d 'request payload' https://servername/fscmRestApi/resources/11.13.18.05/spendClassificationBatches/{BatchNumber}
Example Request Body
The following example includes the contents of the request body in JSON format.
{"OperationName":"RESET"}
Example Response Body
The following example includes the contents of the response body in JSON format:
"{
""BatchNumber"" : 1,
""StatusCode"" : ""ORA_POI_APPROVED"",
""Status"" : ""Approved"",
""BatchName"" : ""demo batch 1"",
""KnowledgeBase"" : ""DEMO_KB_1"",
""TaxonomyCode"" : ""ORA_POI_CUSTOM1"",
""TaxonomyName"" : ""Custom taxonomy 1"",
""ClassificationInitiatedOn"" : ""2021-04-16T09:50:11+00:00"",
""ClassificationCompletedOn"" : ""2021-04-16T09:50:55+00:00"",
""NumberOfTransactions"" : 2098,
""TotalSpendAmount"" : 11348965.7246,
""CurrencyCode"" : ""USD"",
""OperationName"" : null,
""DataSetName"" : ""DEMO-INVOICES-Q4"",
""CorrectionsDataSet"" : null,
""BatchFileContent"" : null,
""TransactionId"" : null,
""CategoryId"" : null,
""links"" : [ {
...
} ]
}"
Approve a Batch
This example describes how to approve a batch.
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 PATCH -d 'request payload' https://servername/fscmRestApi/resources/11.13.18.05/spendClassificationBatches/{BatchNumber}
Example Request Body
The following example includes the contents of the request body in JSON format.
{"OperationName":"APPROVE"}
Example Response Body
The following example includes the contents of the response body in JSON format:
"{
""BatchNumber"" : 1,
""StatusCode"" : ""ORA_POI_APPROVED"",
""Status"" : ""Approved"",
""BatchName"" : ""demo batch 1"",
""KnowledgeBase"" : ""DEMO_KB_1"",
""TaxonomyCode"" : ""ORA_POI_CUSTOM1"",
""TaxonomyName"" : ""Custom taxonomy 1"",
""ClassificationInitiatedOn"" : ""2021-04-16T09:50:11+00:00"",
""ClassificationCompletedOn"" : ""2021-04-16T09:50:55+00:00"",
""NumberOfTransactions"" : 2098,
""TotalSpendAmount"" : 11348965.7246,
""CurrencyCode"" : ""USD"",
""OperationName"" : null,
""DataSetName"" : ""DEMO-INVOICES-Q4"",
""CorrectionsDataSet"" : null,
""BatchFileContent"" : null,
""TransactionId"" : null,
""CategoryId"" : null,
""links"" : [ {
...
} ]
}"
Classify an Existing Batch
This example describes how to classify an existing batch.
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 PATCH -d 'request payload' https://servername/fscmRestApi/resources/11.13.18.05/spendClassificationBatches/{BatchNumber}
Example Request Body
The following example includes the contents of the request body in JSON format.
{"OperationName":"RECLASSIFY"}
Example Response Body
The following example includes the contents of the response body in JSON format.
"{
""BatchNumber"" : 1,
""StatusCode"" : ""ORA_POI_APPROVED"",
""Status"" : ""Approved"",
""BatchName"" : ""demo batch 1"",
""KnowledgeBase"" : ""DEMO_KB_1"",
""TaxonomyCode"" : ""ORA_POI_CUSTOM1"",
""TaxonomyName"" : ""Custom taxonomy 1"",
""ClassificationInitiatedOn"" : ""2021-04-16T09:50:11+00:00"",
""ClassificationCompletedOn"" : ""2021-04-16T09:50:55+00:00"",
""NumberOfTransactions"" : 2098,
""TotalSpendAmount"" : 11348965.7246,
""CurrencyCode"" : ""USD"",
""OperationName"" : null,
""DataSetName"" : ""DEMO-INVOICES-Q4"",
""CorrectionsDataSet"" : null,
""BatchFileContent"" : null,
""TransactionId"" : null,
""CategoryId"" : null,
""links"" : [ {
...
} ]
}"
Create a Training Set Using Maually Updated Transaction Records
This example describes how to create a training set using maually updated transaction records.
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 PATCH -d 'request payload' https://servername/fscmRestApi/resources/11.13.18.05/spendClassificationBatches/{BatchNumber}
Example Request Body
The following example includes the contents of the request body in JSON format.
"{
""CorrectionsDataSet"": ""Q1manualCorr""
""OperationName"":""CREATETRAININGSET""
}"
Example Response Body
The following example includes the contents of the response body in JSON format.
"{
""BatchNumber"" : 1,
""StatusCode"" : ""ORA_POI_APPROVED"",
""Status"" : ""Approved"",
""BatchName"" : ""demo batch 1"",
""KnowledgeBase"" : ""DEMO_KB_1"",
""TaxonomyCode"" : ""ORA_POI_CUSTOM1"",
""TaxonomyName"" : ""Custom taxonomy 1"",
""ClassificationInitiatedOn"" : ""2021-04-16T09:50:11+00:00"",
""ClassificationCompletedOn"" : ""2021-04-16T09:50:55+00:00"",
""NumberOfTransactions"" : 2098,
""TotalSpendAmount"" : 11348965.7246,
""CurrencyCode"" : ""USD"",
""OperationName"" : null,
""DataSetName"" : ""DEMO-INVOICES-Q4"",
""CorrectionsDataSet"" : null,
""BatchFileContent"" : null,
""TransactionId"" : null,
""CategoryId"" : null,
""links"" : [ {
...
} ]
}"
Correct Transaction Records
This example describes how to manually correct transaction records.
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 PATCH -d 'request payload' https://servername/fscmRestApi/resources/11.13.18.05/spendClassificationBatches/{BatchNumber}
Example Request Body
The following example includes the contents of the request body in JSON format.
"{
""TransactionId"":""166091,166092"",
""CategoryId"":""8000006,8000008"",
""OperationName"":""MANUALCORRECTION""
}"
Example Response Body
The following example includes the contents of the response body in JSON format.
"{
""BatchNumber"" : 9010,
""StatusCode"" : ""ORA_POI_COMPLETED"",
""Status"" : ""Complete"",
""BatchName"" : ""BATCHAUTOTESTE2E"",
""KnowledgeBase"" : ""DATASETAUTOKNWBASEE2E"",
""TaxonomyCode"" : ""ORA_POI_CUSTOM3"",
""TaxonomyName"" : ""Custom taxonomy 3"",
""ClassificationInitiatedOn"" : ""2021-05-17T15:35:41+00:00"",
""ClassificationCompletedOn"" : ""2021-05-17T15:36:22+00:00"",
""NumberOfTransactions"" : 50,
""TotalSpendAmount"" : 174041.823,
""CurrencyCode"" : ""USD"",
""OperationName"" : null,
""DataSetName"" : ""DATASETCLASIFYAUTOE2E"",
""CorrectionsDataSet"" : null,
""BatchFileContent"" : null,
""TransactionId"" : ""166091,166092"",
""CategoryId"" : ""8000006,8000008"",
""@context"" : {
...
}
}"