Create a category
post
/crmRestApi/resources/11.13.18.05/categories
Request
Header Parameters
-
Metadata-Context: string
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: string
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: string
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-
BUOrgId: integer
(int64)
Title:
Business UnitThe unique identifier of the business unit associated with the category. -
BusinessUnitName: string
Title:
Business Unit NameMaximum Length:255The name of the business unit associated with the category. -
CategoryCode: string
Title:
Category CodeMaximum Length:290The public unique identifier of the category. -
CategoryDescription: string
Title:
Category DescriptionMaximum Length:1000The description of the category. -
CategoryName: string
Title:
Category NameMaximum Length:400The name of the category. -
CategoryShortName: string
Title:
Category Short NameMaximum Length:240The 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. -
CSSFlag: boolean
Title:
Visible in Customer Self-ServiceMaximum Length:1Default Value:trueIndicates if the category is visible in the customer self-service portal. -
EnabledFlag: boolean
Title:
EnabledMaximum Length:1Default Value:trueIndicates whether the category is enabled. If enabled, the value is Y, else the value is N. -
OriginalSystemReference: string
Title:
Original SystemMaximum Length:255The reference to the original system from which the category was imported (if imported). -
ParentCategoryCode: string
Title:
Parent Category CodeMaximum Length:290The public unique identifier of the parent category. -
ParentCategoryId: integer
(int64)
Title:
Parent Category IDThe unique identifier of the parent category. The value is NULL, if the category is the root category. -
StripeCd: string
Title:
Stripe CodeMaximum Length:30The code indicating the application stripe of the service request category. A list of accepted values is defined in the lookup ORA_SVC_STRIPE_CD.
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 UnitThe unique identifier of the business unit associated with the category. -
BusinessUnitName: string
Title:
Business Unit NameMaximum Length:255The name of the business unit associated with the category. -
CategoryCode: string
Title:
Category CodeMaximum Length:290The public unique identifier of the category. -
CategoryDescription: string
Title:
Category DescriptionMaximum Length:1000The description of the category. -
CategoryId: integer
(int64)
Title:
CategoryRead Only:trueThe unique identifier of the category. -
CategoryIdHierarchy: string
Title:
Category ID HierarchyRead Only:trueMaximum Length:4000The hierarchy of the category identifiers in string format. For example: 132787 > 567754. -
CategoryName: string
Title:
Category NameMaximum Length:400The name of the category. -
CategoryShortName: string
Title:
Category Short NameMaximum Length:240The 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 ByRead Only:trueMaximum Length:64The user who created the category. -
CreationDate: string
(date-time)
Title:
Creation DateRead Only:trueThe date and time when the category was created. -
CSSFlag: boolean
Title:
Visible in Customer Self-ServiceMaximum Length:1Default Value:trueIndicates if the category is visible in the customer self-service portal. -
DeleteFlag: boolean
Title:
Can DeleteRead Only:trueIndicates if the category has been deleted. The default value is false. -
Depth: integer
(int64)
Title:
DepthRead Only:trueThe depth at which the service category occurs in the category hierarchy. -
EnabledFlag: boolean
Title:
EnabledMaximum Length:1Default Value:trueIndicates whether the category is enabled. If enabled, the value is Y, else the value is N. -
Hierarchy: string
Title:
HierarchyRead Only:trueMaximum Length:4000The hierarchy of the category in a string format. For example Roaming > Technical Issue. -
LastUpdateDate: string
(date-time)
Title:
Last Updated DateRead Only:trueThe date and time when the category was last updated. -
LastUpdatedBy: string
Title:
Last Updated ByRead Only:trueMaximum Length:64The user who last updated the category. -
LastUpdateLogin: string
Title:
Last Update LoginRead Only:trueMaximum Length:32The session login associated with the user who last updated the row. -
LeafNodeFlag: boolean
Title:
Leaf NodeRead Only:trueMaximum Length:12Indicates whether the current category has any children. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
OriginalSystemReference: string
Title:
Original SystemMaximum Length:255The reference to the original system from which the category was imported (if imported). -
ParentCategoryCode: string
Title:
Parent Category CodeMaximum Length:290The public unique identifier of the parent category. -
ParentCategoryId: integer
(int64)
Title:
Parent Category IDThe unique identifier of the parent category. The value is NULL, if the category is the root category. -
RootCategoryCode: string
Title:
Root Category CodeRead Only:trueMaximum Length:4000Root Category Code -
StripeCd: string
Title:
Stripe CodeMaximum Length:30The 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 UpdateRead Only:trueIndicates if the category has been updated. The default value is false.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : link
Type:
Show Source
object-
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.
Nested Schema : properties
Type:
Show Source
object-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Links
- AllStripeCdLOV
-
Parameters:
- finder:
LookupTypeFinder%3BLookupType%3DORA_SVC_ALL_STRIPE_CD
The following properties are defined on the LOV link relation:- Source Attribute: StripeCd; Target Attribute: LookupCode
- Display Attribute: Meaning
- finder:
- 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
- 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 create a category by submitting a POST request on the REST resource.
cURL Command
curl -u <username:password> \ -X POST https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories \ -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":"Category-RLW",
"CategoryCode":"RLW"
}
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 201 OK Date: Fri, 12 Aug 2016 09: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": 300100559072867,
"ParentCategoryId": null,
"CategoryName": "Category-RLW",
"CategoryShortName": "RLW",
"CategoryCode": "RLW",
"ParentCategoryCode": null,
"EnabledFlag": true,
"CreatedBy": "SALES_ADMIN",
"CreationDate": "2022-08-09T07:24:33+00:00",
"LastUpdatedBy": "SALES_ADMIN",
"LastUpdateDate": "2022-08-09T07:24:33.140+00:00",
"LastUpdateLogin": "E5B2BD2625F67A21E0531C5CF00A59CE",
"OriginalSystemReference": "300100559072867",
"StripeCd": "ORA_SVC_CRM",
"CSSFlag": true,
"UpdateFlag": true,
"DeleteFlag": true,
"BUOrgId": 204,
"BusinessUnitName": "Vision Operations",
"Depth": null,
"Hierarchy": null,
"LeafNodeFlag": null,
"CategoryIdHierarchy": null,
"links": [
{
"rel": "self",
"href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100559072867",
"name": "categories",
"kind": "item",
"properties": {
"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
}
},
{
"rel": "canonical",
"href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100559072867",
"name": "categories",
"kind": "item"
},
{
"rel": "lov",
"href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100559072867/lov/BusinessUnitLOV",
"name": "BusinessUnitLOV",
"kind": "collection"
},
{
"rel": "lov",
"href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100559072867/lov/StripeCdLOV",
"name": "StripeCdLOV",
"kind": "collection"
},
{
"rel": "lov",
"href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/categories/300100559072867/lov/YesNoLookupPVO",
"name": "YesNoLookupPVO",
"kind": "collection"
}
]
}