Share or copy categories

post

/fscmRestApi/resources/11.13.18.05/itemCategories/action/shareCategory

Shares or copies item catalog categories from a source catalog to a destination catalog.

Request

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/vnd.oracle.adf.action+json ()
Root Schema : schema
Type: object
Show Source
  • Contains one of the following values: True or False. If True, then categories are copied. If False, then categories are shared.
  • Contains one of the following values: True or False. If True, then assigned items are copied. If False, then assigned items aren't copied.
  • Contains one of the following values: True or False. If True, then child categories are copied. If False, then child categories aren't copied.
  • Abbreviation that identifies the item catalog from which the item categories are shared or copied.
  • Abbreviation that identifies the item category which is shared or copied.
  • Abbreviation that identifies the item catalog to which the item categories are shared or copied.
  • Abbreviation that identifies the item category to which the item categories are shared or copied.
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Body ()
Root Schema : schema
Type: object
Show Source
Back to Top

Examples

This example describes how to share categories.

Example cURL Command

Use the following cURL command to submit a request on the REST resource.

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/itemCategories"

Example 1 Request Body

The following example includes the contents of the request body in JSON format to share categories. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it creates.

{
	"name": "shareCategory",
	"parameters": [
	{
		"sourceCatalogCode": "Woolen_Wear"
	},
	{
		"sourceCategoryCode": "Children_Sweaters"
	},
	{
		"targetCatalogCode": "Winter_Catalog"
	},
	{
		"targetCategoryCode": "Kids_Wear" 
	}
	]
}

Example 1 Response Body

The following example includes the contents of the response body in JSON format:

{
	"result": "You have successfully shared the catalog Woolen_Wear and the category hierarchy Children_Sweaters with the catalog Winter_Catalog."
}

Example 2 Request Body

The following example includes the contents of the request body in JSON format to copy categories. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it updates.

{
	"name": "shareCategory",
	"parameters": [
	{
		"sourceCatalogCode": "Mens_Wear"
	},
	{
		"sourceCategoryCode": "Pants"
	},
	{
		"targetCatalogCode": "Mens_Catalog"
	},
	{
		"targetCategoryCode": "Trousers" 
	},
	{
		"copyFlag" : true
	},
	{
		"includeChildrenFlag" : true
	}
	]
}

Example 2 Response Body

The following example includes the contents of the response body in JSON format:

{
	"result": "You have successfully copied the catalog Mens_Wear and the category Pants into the catalog Mens_Catalog."
}
Back to Top