Update a category
patch
/crmRestApi/resources/11.13.18.05/categories/{CategoryId}
Request
Path Parameters
-
CategoryId(required): integer(int64)
The unique identifier of the category.
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.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
BUOrgId: integer
(int64)
Title:
Business Unit
The unique identifier of the business unit associated with the category. -
BusinessUnitName: string
Title:
Business Unit Name
Maximum Length:255
The name of the business unit associated with the category. -
CategoryName: string
Title:
Category Name
Maximum Length:400
The name of the category. -
CSSFlag: boolean
Title:
Visible in Customer Self-Service
Maximum Length:1
Default Value:true
Indicates if the category is visible in the customer self-service portal. -
EnabledFlag: boolean
Title:
Enabled
Maximum Length:1
Default Value:true
Indicates whether the category is enabled. If enabled, the value is Y, else the value is N. -
OriginalSystemReference: string
Title:
Original System
Maximum Length:255
The reference to the original system from which the category was imported (if imported). -
ParentCategoryCode: string
Title:
Parent Category Code
Maximum Length:290
The public unique identifier of the parent category. -
ParentCategoryId: integer
(int64)
Title:
Parent Category ID
The unique identifier of the parent category. The value is NULL, if the category is the root category.
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 : categories-item-response
Type:
Show Source
object
-
BUOrgId: integer
(int64)
Title:
Business Unit
The unique identifier of the business unit associated with the category. -
BusinessUnitName: string
Title:
Business Unit Name
Maximum Length:255
The name of the business unit associated with the category. -
CategoryCode: string
Title:
Category Code
Maximum Length:290
The public unique identifier of the category. -
CategoryId: integer
(int64)
Title:
Category
Read Only:true
The unique identifier of the category. -
CategoryIdHierarchy: string
Title:
Category ID Hierarchy
Read Only:true
Maximum Length:4000
The hierarchy of the category identifiers in string format. For example: 132787 > 567754. -
CategoryName: string
Title:
Category Name
Maximum Length:400
The name of the category. -
CategoryShortName: string
Title:
Category Short Name
Maximum Length:240
The short name of the category. This value is auto-generated from CategoryName. However, you can edit the name to make it a unique value, if required. -
CreatedBy: string
Title:
Created By
Read Only:true
Maximum Length:64
The user who created the category. -
CreationDate: string
(date-time)
Title:
Creation Date
Read Only:true
The date and time when the category was created. -
CSSFlag: boolean
Title:
Visible in Customer Self-Service
Maximum Length:1
Default Value:true
Indicates if the category is visible in the customer self-service portal. -
DeleteFlag: boolean
Title:
Can Delete
Read Only:true
Indicates if the category has been deleted. The default value is false. -
Depth: integer
(int64)
Title:
Depth
Read Only:true
The depth at which the service category occurs in the category hierarchy. -
EnabledFlag: boolean
Title:
Enabled
Maximum Length:1
Default Value:true
Indicates whether the category is enabled. If enabled, the value is Y, else the value is N. -
Hierarchy: string
Title:
Hierarchy
Read Only:true
Maximum Length:4000
The hierarchy of the category in a string format. For example Roaming > Technical Issue. -
LastUpdateDate: string
(date-time)
Title:
Last Updated Date
Read Only:true
The date and time when the category was last updated. -
LastUpdatedBy: string
Title:
Last Updated By
Read Only:true
Maximum Length:64
The user who last updated the category. -
LastUpdateLogin: string
Title:
Last Update Login
Read Only:true
Maximum Length:32
The session login associated with the user who last updated the row. -
LeafNodeFlag: boolean
Title:
Leaf Node
Read Only:true
Maximum Length:12
Indicates whether the current category has any children. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
OriginalSystemReference: string
Title:
Original System
Maximum Length:255
The reference to the original system from which the category was imported (if imported). -
ParentCategoryCode: string
Title:
Parent Category Code
Maximum Length:290
The public unique identifier of the parent category. -
ParentCategoryId: integer
(int64)
Title:
Parent Category ID
The unique identifier of the parent category. The value is NULL, if the category is the root category. -
RootCategoryCode: string
Title:
Root Category Code
Read Only:true
Maximum Length:4000
Root Category Code -
StripeCd: string
Title:
Stripe Code
Maximum Length:30
The code indicating the application stripe of the service request category. A list of accepted values is defined in the lookup ORA_SVC_STRIPE_CD. -
UpdateFlag: boolean
Title:
Can Update
Read Only:true
Indicates if the category has been updated. The default value is false.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
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.
Links
- BusinessUnitLOV
-
The list of values indicating the business units associated with the logged in user.
The following properties are defined on the LOV link relation:- Source Attribute: BUOrgId; Target Attribute: BusinessUnitId
- Display Attribute: Name, BusinessUnitId
- StripeCdLOV
-
Parameters:
- finder:
LookupTypeFinder%3BLookupType%3DORA_SVC_STRIPE_CD
The following properties are defined on the LOV link relation:- Source Attribute: StripeCd; Target Attribute: LookupCode
- Display Attribute: Meaning
- finder:
- YesNoLookupPVO
-
Parameters:
- finder:
LookupTypeFinder%3BLookupType%3DYES_NO
The list of values indicating the enabled status of the category.
The following properties are defined on the LOV link relation:- Source Attribute: CSSFlag; Target Attribute: LookupCode
- Display Attribute: Meaning
- finder:
Examples
The following example shows how to update a category by submitting a PATCH request on the REST resource.
cURL Command
curl -u <username:password> \ -X PATCH https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100558464163 \ -H 'Content-Type: application/vnd.oracle.adf.resourceitem+json' | json_pp
Example of Request Body
The following example shows the contents of the request body in JSON format.
{ "CategoryName": "66966478" }
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 Created Date: Fri, 12 Aug 2016 13:02:50 GMT Server: Oracle-HTTP-Server-11g Content-Type: application/vnd.oracle.adf.resourceitem+json Content-Language: en
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "CategoryId": 300100558464163, "ParentCategoryId": 300100558461305, "CategoryName": "66966478", "CategoryShortName": "ADULT", "CategoryCode": "ADULT-ORA_SVC_CRM-204", "ParentCategoryCode": "WELFARE-ORA_SVC_CRM-204", "EnabledFlag": true, "CreatedBy": "chris.warner", "CreationDate": "2022-06-07T14:05:29.149+00:00", "LastUpdatedBy": "SALES_ADMIN", "LastUpdateDate": "2022-08-09T08:27:26+00:00", "LastUpdateLogin": "E5B2B43EEACE7A09E0531C5CF00A8A06", "OriginalSystemReference": "300100558464163", "StripeCd": "ORA_SVC_CRM", "CSSFlag": true, "UpdateFlag": true, "DeleteFlag": true, "BUOrgId": 204, "BusinessUnitName": "Vision Operations", "Depth": 2, "Hierarchy": "Cases > Welfare > Adult", "LeafNodeFlag": true, "CategoryIdHierarchy": "300100543373684 > 300100558461305 > 300100558464163", "links": [ { "rel": "self", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100558464163", "name": "categories", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278" } }, { "rel": "canonical", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100558464163", "name": "categories", "kind": "item" }, { "rel": "lov", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100558464163/lov/BusinessUnitLOV", "name": "BusinessUnitLOV", "kind": "collection" }, { "rel": "lov", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100558464163/lov/StripeCdLOV", "name": "StripeCdLOV", "kind": "collection" }, { "rel": "lov", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100558464163/lov/YesNoLookupPVO", "name": "YesNoLookupPVO", "kind": "collection" } ] }