Update one taxonomy property
/fscmRestApi/resources/11.13.18.05/spendClassificationTaxonomies/{TaxonomyId}
Request
-
TaxonomyId(required): integer(int64)
Value that uniquely identifies the taxonomy.
-
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
-
CategoryDescriptionSeperator: string
Maximum Length:
1
Symbol used as a separator in the category description. -
CategoryLevels: integer
(int32)
Number of levels in the category hierarchy.
-
CategoryNameSeperator: string
Maximum Length:
30
Symbol used as a separator in the category name. -
DeleteCategoriesFlag: boolean
Contains one of the following values: true or false. If true, then all categories should be deleted for a taxonomy. If false, then do not delete all categories for a taxonomy. This attribute does not have a default value.
-
TaxonomyFileContent: string
Content of the file used to upload the categories.
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
-
CategoryDescriptionSeperator: string
Maximum Length:
1
Symbol used as a separator in the category description. -
CategoryLevels: integer
(int32)
Number of levels in the category hierarchy.
-
CategoryNameSeperator: string
Maximum Length:
30
Symbol used as a separator in the category name. -
DeleteCategoriesFlag: boolean
Contains one of the following values: true or false. If true, then all categories should be deleted for a taxonomy. If false, then do not delete all categories for a taxonomy. This attribute does not have a default value.
-
LastUpdatedDate: string
(date-time)
Read Only:
true
Date when the taxonomy was most recently updated. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
NumberOfCategories: integer
Read Only:
true
Number of categories in the taxonomy. -
TaxonomyCode: string
Read Only:
true
Maximum Length:90
Abbreviation that identifies the taxonomy. -
TaxonomyFileContent: string
Content of the file used to upload the categories.
-
TaxonomyId: integer
(int64)
Read Only:
true
Value that uniquely identifies the taxonomy. -
TaxonomyName: string
Read Only:
true
Maximum Length:90
Name of the taxonomy.
array
Links
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.
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Examples
Update a Taxonomy Property
This example describes how to update the properties of a taxonomy.
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/spendClassificationTaxonomies/{TaxonomyId}
Example Request Body
The following example includes the contents of the request body in JSON format.
"{ ""CategoryNameSeperator"": ""~"", ""CategoryDescriptionSeperator"": ""~"", ""CategoryLevels"": 2 }"
Example Response Body
The following example includes the contents of the response body in JSON format:
"{ ""TaxonomyId"": 50, ""TaxonomyCode"": ""ORA_POI_CUSTOM3"", ""TaxonomyName"": ""Custom taxonomy 3"", ""CategoryLevels"": 2, ""CategoryNameSeperator"": ""~"", ""CategoryDescriptionSeperator"": ""~"", ""NumberOfCategories"": 17, ""LastUpdatedDate"": ""2021-05-10T03:58:29+00:00"", ""TaxonomyFileContent"": null, ""DeleteCategoriesFlag"": null, ""links"" : [ { ... } ] }"
Delete Categories of a Taxonomy
This example describes how to delete the categories of a taxonomy.
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/spendClassificationTaxonomies/{TaxonomyId}
Example Request Body
{"DeleteCategoriesFlag": true}
Example Response Body
The following example includes the contents of the response body in JSON format:
"{ ""TaxonomyId"": 50, ""TaxonomyCode"": ""ORA_POI_CUSTOM3"", ""TaxonomyName"": ""Custom taxonomy 3"", ""CategoryLevels"": 2, ""CategoryNameSeperator"": ""~"", ""CategoryDescriptionSeperator"": ""~"", ""NumberOfCategories"": 17, ""LastUpdatedDate"": ""2021-05-10T03:58:29+00:00"", ""TaxonomyFileContent"": null, ""DeleteCategoriesFlag"": true ""links"" : [ { ... } ] }"
Upload Categories of a Taxonomy
This example describes how to upload the categories of a taxonomy.
Example cURL Command
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/spendClassificationTaxonomies/{TaxonomyId}
Example Request Body
"{ ""TaxonomyFileContent"": ""\""Taxonomy\"",\""Category Id\"",\""Category Name\"",\""Category Description\""\n\""ORA_POI_CUSTOM3\"",8000001,\""Hardware~laptop\"",\""Hardware~laptop\""\n\""ORA_POI_CUSTOM3\"",8000002,\""Hardware~Maintenance\"",\""Hardware~Maintenance\""\n\""ORA_POI_CUSTOM3\"",8000003,\""Hardware~Network\"",\""Hardware~Network\""\n\""ORA_POI_CUSTOM3\"",8000004,\""Hardware~Peripheral\"",\""Hardware~Peripheral\""\n\""ORA_POI_CUSTOM3\"",8000005,\""Office~Furniture\"",\""Office~Furniture\""\n\""ORA_POI_CUSTOM3\"",8000006,\""Office~PostageFreight\"",\""Office~Supplies\""\n\""ORA_POI_CUSTOM3\"",8000008,\""Services~Facilities\"",\""Services~Facilities\""\n\""ORA_POI_CUSTOM3\"",8000009,\""Services~Financial\"",\""Services~Financial\""\n\""ORA_POI_CUSTOM3\"",8000010,\""Services~Food\"",\""Services~Food\""\n\""ORA_POI_CUSTOM3\"",8000011,\""Services~IT\"",\""Services~IT\""\n\""ORA_POI_CUSTOM3\"",8000012,\""Services~Janitorial\"",\""Services~Janitorial\""\n\""ORA_POI_CUSTOM3\"",8000013,\""Services~Professional\"",\""Services~Professional\""\n\""ORA_POI_CUSTOM3\"",8000014,\""Services~Relocation\"",\""Services~Relocation\""\n\""ORA_POI_CUSTOM3\"",8000015,\""Services~Security\"",\""Services~Security\""\n\""ORA_POI_CUSTOM3\"",8000016,\""Services~TempLabor\"",\""Services~Travel\""\n\""ORA_POI_CUSTOM3\"",8000018,\""Software~Licenses\"",\""Software~Licenses\""\n\""ORA_POI_CUSTOM3\"",8000019,\""Software~Maintenance\"",\""Software~Maintenance\""\n"" }"
Example Response Body
The following example includes the contents of the response body in JSON format:
"{ ""TaxonomyId"": 50, ""TaxonomyCode"": ""ORA_POI_CUSTOM3"", ""TaxonomyName"": ""Custom taxonomy 3"", ""CategoryLevels"": 2, ""CategoryNameSeperator"": ""~"", ""CategoryDescriptionSeperator"": ""~"", ""NumberOfCategories"": 17, ""LastUpdatedDate"": ""2021-05-10T03:58:29+00:00"", ""TaxonomyFileContent"": null, ""DeleteCategoriesFlag"": null ""links"" : [ { ... } ] }"