Update a batch

patch

/fscmRestApi/resources/11.13.18.05/spendClassificationBatches/{BatchNumber}

Request

Path Parameters
Header Parameters
  • 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".
  • 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.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • 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".
  • 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.
Body ()
Root Schema : spendClassificationBatches-item-response
Type: object
Show Source
Back to Top

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"" : {
  ...
  }
}"
Back to Top