Create relationships

post

/fscmRestApi/resources/11.13.18.05/crossReferenceRelationships

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.
  • 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
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : DFF
Type: array
Show Source
Nested Schema : Translatable Attributes
Type: array
Title: Translatable Attributes
The Translatable Attributes resource manages the translatable attributes for item relationships.
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : crossReferenceRelationships-translatableAttributes-item-post-request
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 : crossReferenceRelationships-item-response
Type: object
Show Source
Nested Schema : DFF
Type: array
Show Source
Nested Schema : Translatable Attributes
Type: array
Title: Translatable Attributes
The Translatable Attributes resource manages the translatable attributes for item relationships.
Show Source
Nested Schema : crossReferenceRelationships-DFF-item-response
Type: object
Show Source
Nested Schema : crossReferenceRelationships-translatableAttributes-item-response
Type: object
Show Source
Back to Top

Examples

This example describes how to create relationships.

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/crossReferenceRelationships"

Example 1 Request Body

The following example includes the contents of the request body in JSON format to create a cross reference relationship applicable to all organizations. 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.

{
	"MasterOrganizationCode" : "V1",
	"Item" : "ABC",
	"CrossReferenceType" : "Old Part Number",
	"CrossReference" : "123",
	"ApplyToAllOrganizationFlag" : true,
	"RelationshipDescription" : "Legacy Part number"
}

Example 1 Response Body

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

{
	"ItemRelationshipId": 300100197102447,
	"MasterOrganizationId": 204,
	"MasterOrganizationCode": "V1",
	"InventoryItemId": 300100185399391,
	"Item": "ABC",
	"CrossReferenceType": "Old Part Number",
	"CrossReference": "123",
	"ApplyToAllOrganizationFlag": true,
	"ApplicableOrganizationId": null,
	"ApplicableOrganizationCode": null,
	"RelationshipDescription": "Legacy Part number",
	"CreationDateTime": "2020-07-10T10:43:51.023+00:00",
	"LastUpdateDateTime": "2020-07-10T10:43:51.301+00:00",
	"CreatedBy": "user",
	"LastUpdateLogin": "A9EBC4B5D3EA1384E0537AA8F00AF719",
	"LastUpdatedBy": "user",
	"links": [
	{
		"rel": "self",
		"href": "https://servername/fscmRestApi/resources/version/crossReferenceRelationships/00030000000EACED00057708000110F085A5336F0000000EACED00057708000110F084F2A05FFFFFFFFF",
		"name": "crossReferenceRelationships",
		"kind": "item",
		"properties": {
			"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
		}
	},
	{
		"rel": "canonical",
		"href": "https://xxx.oracle.com/fscmRestApi/resources/11.13.18.05/crossReferenceRelationships/00030000000EACED00057708000110F085A5336F0000000EACED00057708000110F084F2A05FFFFFFFFF",
		"name": "crossReferenceRelationships",
		"kind": "item"
	},
	{
		"rel": "child",
		"href": "https://xxx.oracle.com/fscmRestApi/resources/11.13.18.05/crossReferenceRelationships/00030000000EACED00057708000110F085A5336F0000000EACED00057708000110F084F2A05FFFFFFFFF/child/DFF",
		"name": "DFF",
		"kind": "collection"
	},
	{
		"rel": "child",
		"href": "https://xxx.oracle.com/fscmRestApi/resources/11.13.18.05/crossReferenceRelationships/00030000000EACED00057708000110F085A5336F0000000EACED00057708000110F084F2A05FFFFFFFFF/child/translatableAttributes",
		"name": "translatableAttributes",
		"kind": "collection"
	}
	]
}

Example 2 Request Body

The following example includes the contents of the request body in JSON format to create a cross reference relationship with DFF values. 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.

{
	"MasterOrganizationCode" : "V1",
	"Item" : "DemoItemJul10_1",
	"CrossReferenceType" : "Charge Master",
	"CrossReference" : "DemoXrefM1Jul10_1",
	"ApplyToAllOrganizationFlag" : false,
	"ApplicableOrganizationCode" : "M1",
	"RelationshipDescription" : "Test Item Xref",
	"DFF" : [

	{
		"char1" : "postXref1",
		"char2" : "Delhi"
	}

	]
}

Example 2 Response Body

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

{
	"ItemRelationshipId": 300100197102399,
	"MasterOrganizationId": 204,
	"MasterOrganizationCode": "V1",
	"InventoryItemId": 300100185399391,
	"Item": "DemoItemJul10_1",
	"CrossReferenceType": "Charge Master",
	"CrossReference": "DemoXrefM1Jul10_1",
	"ApplyToAllOrganizationFlag": false,
	"ApplicableOrganizationId": 207,
	"ApplicableOrganizationCode": "M1",
	"RelationshipDescription": "Test Item Xref",
	"CreationDateTime": "2020-07-10T10:41:50.001+00:00",
	"LastUpdateDateTime": "2020-07-10T10:41:51.336+00:00",
	"CreatedBy": "user",
	"LastUpdateLogin": "A9EBC4B5D3EA1384E0537AA8F00AF719",
	"LastUpdatedBy": "user",
	"DFF": [
	{
		"ItemRelationshipId": 300100197102399,
		"ItemRelationshipType": "ITEM_XREF",
		"char1": "postXref1",
		"numb1": null,
		"date1": null,
		"datetime1": null,
		"char2": "Delhi",
		"RELGlobSegChar1": null,
		"zbiaitemreldff": null,
		"__FLEX_Context": null,
		"__FLEX_Context_DisplayValue": null,
		"links": [
		{
			"rel": "self",
			"href": "https://servername/fscmRestApi/resources/version/crossReferenceRelationships/00030000000EACED00057708000110F085A5333F0000000EACED00057708000110F084F2A05F0000000EACED0005770800000000000000CF/child/DFF/300100197102399",
			"name": "DFF",
			"kind": "item",
			"properties": {
				"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
			}
		},
		{
			"rel": "canonical",
			"href": "https://servername/fscmRestApi/resources/version/crossReferenceRelationships/00030000000EACED00057708000110F085A5333F0000000EACED00057708000110F084F2A05F0000000EACED0005770800000000000000CF/child/DFF/300100197102399",
			"name": "DFF",
			"kind": "item"
		},
		{
			"rel": "parent",
			"href": "https://servername/fscmRestApi/resources/version/crossReferenceRelationships/00030000000EACED00057708000110F085A5333F0000000EACED00057708000110F084F2A05F0000000EACED0005770800000000000000CF",
			"name": "crossReferenceRelationships",
			"kind": "item"
		}
		]
	}
	],
	"links": [
	{
		"rel": "self",
		"href": "https://servername/fscmRestApi/resources/version/crossReferenceRelationships/00030000000EACED00057708000110F085A5333F0000000EACED00057708000110F084F2A05F0000000EACED0005770800000000000000CF",
		"name": "crossReferenceRelationships",
		"kind": "item",
		"properties": {
			"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
		}
	},
	{
		"rel": "canonical",
		"href": "https://servername/fscmRestApi/resources/version/crossReferenceRelationships/00030000000EACED00057708000110F085A5333F0000000EACED00057708000110F084F2A05F0000000EACED0005770800000000000000CF",
		"name": "crossReferenceRelationships",
		"kind": "item"
	},
	{
		"rel": "child",
		"href": "https://servername/fscmRestApi/resources/version/crossReferenceRelationships/00030000000EACED00057708000110F085A5333F0000000EACED00057708000110F084F2A05F0000000EACED0005770800000000000000CF/child/DFF",
		"name": "DFF",
		"kind": "collection"
	},
	{
		"rel": "child",
		"href": "https://servername/fscmRestApi/resources/version/crossReferenceRelationships/00030000000EACED00057708000110F085A5333F0000000EACED00057708000110F084F2A05F0000000EACED0005770800000000000000CF/child/translatableAttributes",
		"name": "translatableAttributes",
		"kind": "collection"
	}
	]
}
Back to Top