Create relationships
/fscmRestApi/resources/11.13.18.05/crossReferenceRelationships
Request
-
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.
-
Upsert-Mode:
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.
- application/json
object
-
ApplicableOrganizationCode: string
Maximum Length:
18
Abbreviation that identifies the organization. -
ApplicableOrganizationId(required): integer
(int64)
Value that uniquely identifies the organization.
-
ApplyToAllOrganizationFlag: boolean
Title:
Organization Independent
Maximum Length:1
Default Value:true
Contains one of the following values: true or false. If true, then the cross-reference is applicable to all the organizations. If false, then it's not. The default value is true. -
CrossReference(required): string
Title:
Value
Maximum Length:255
Value that identifies the cross-reference. -
CrossReferenceType: string
Maximum Length:
80
Type of the cross-reference. A list of accepted values is defined in the lookup type EGP_ITEM_XREF_TYPES. Review the value for this attribute using the Setup and Maintenance work area, and the Manage Standard Lookups task. There is no default value. -
DFF: array
DFF
-
InventoryItemId(required): integer
Value that uniquely identifies an item.
-
Item: string
Maximum Length:
300
Name or number of the part, item, product, or service. -
ItemRelationshipId: integer
(int64)
Value that uniquely identifies the cross-reference relationship.
-
MasterOrganizationCode: string
Maximum Length:
18
Abbreviation that identifies the master organization of the item for which the cross-reference relationship is defined. -
MasterOrganizationId: integer
Value that uniquely identifies the master organization of the item for which the cross-reference relationship is defined.
-
RelationshipDescription: string
Title:
Description
Maximum Length:240
Description of the cross-reference relationship. -
translatableAttributes: array
Translatable Attributes
Title:
Translatable Attributes
The Translatable Attributes resource manages the translatable attributes for item relationships.
array
Translatable Attributes
object
-
__FLEX_Context: string
Title:
Context
Maximum Length:150
-
__FLEX_Context_DisplayValue: string
Title:
Context
-
ItemRelationshipId: integer
(int64)
-
ItemRelationshipType: string
Title:
Type
Maximum Length:30
object
-
ItemRelationshipId: integer
Value that uniquely identifies the item relationship.
-
Language: string
Maximum Length:
4
Value that identifies the language used for the item relationship translatable attribute. -
RelationshipDescription: string
Maximum Length:
240
Description of the item relationship. -
SourceLanguage: string
Maximum Length:
4
Source language of the translation.
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
-
ApplicableOrganizationCode: string
Maximum Length:
18
Abbreviation that identifies the organization. -
ApplicableOrganizationId: integer
(int64)
Value that uniquely identifies the organization.
-
ApplyToAllOrganizationFlag: boolean
Title:
Organization Independent
Maximum Length:1
Default Value:true
Contains one of the following values: true or false. If true, then the cross-reference is applicable to all the organizations. If false, then it's not. The default value is true. -
CreatedBy: string
Read Only:
true
Maximum Length:64
User who created the cross-reference relationship. -
CreationDateTime: string
(date-time)
Read Only:
true
Date and time when the user created the cross-reference relationship. -
CrossReference: string
Title:
Value
Maximum Length:255
Value that identifies the cross-reference. -
CrossReferenceType: string
Maximum Length:
80
Type of the cross-reference. A list of accepted values is defined in the lookup type EGP_ITEM_XREF_TYPES. Review the value for this attribute using the Setup and Maintenance work area, and the Manage Standard Lookups task. There is no default value. -
DFF: array
DFF
-
InventoryItemId: integer
Value that uniquely identifies an item.
-
Item: string
Maximum Length:
300
Name or number of the part, item, product, or service. -
ItemRelationshipId: integer
(int64)
Value that uniquely identifies the cross-reference relationship.
-
LastUpdateDateTime: string
(date-time)
Read Only:
true
Date when the user most recently updated the cross-reference relationship. -
LastUpdatedBy: string
Read Only:
true
Maximum Length:64
User who most recently updated the cross-reference relationship. -
LastUpdateLogin: string
Read Only:
true
Maximum Length:32
Login that the user used when updating the cross-reference relationship. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
MasterOrganizationCode: string
Maximum Length:
18
Abbreviation that identifies the master organization of the item for which the cross-reference relationship is defined. -
MasterOrganizationId: integer
Value that uniquely identifies the master organization of the item for which the cross-reference relationship is defined.
-
RelationshipDescription: string
Title:
Description
Maximum Length:240
Description of the cross-reference relationship. -
translatableAttributes: array
Translatable Attributes
Title:
Translatable Attributes
The Translatable Attributes resource manages the translatable attributes for item relationships.
array
Links
array
Translatable Attributes
object
-
__FLEX_Context: string
Title:
Context
Maximum Length:150
-
__FLEX_Context_DisplayValue: string
Title:
Context
-
ItemRelationshipId: integer
(int64)
-
ItemRelationshipType: string
Title:
Type
Maximum Length:30
-
links: array
Links
Title:
Links
The link relations associated with the resource instance.
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.
object
-
CreatedBy: string
Read Only:
true
Maximum Length:64
User who first provided value for the item relationship translatable attribute. -
CreationDateTime: string
(date-time)
Read Only:
true
Date and time when the user first provided value for the item relationship translatable attribute. -
ItemRelationshipId: integer
Value that uniquely identifies the item relationship.
-
Language: string
Maximum Length:
4
Value that identifies the language used for the item relationship translatable attribute. -
LastUpdateDateTime: string
(date-time)
Read Only:
true
Date and time when the user most recently updated the item relationship translatable attribute. -
LastUpdatedBy: string
Read Only:
true
Maximum Length:64
User who most recently updated the item relationship translatable attribute. -
LastUpdateLogin: string
Read Only:
true
Maximum Length:32
Login that the user used when updating the item relationship translatable attribute. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
RelationshipDescription: string
Maximum Length:
240
Description of the item relationship. -
SourceLanguage: string
Maximum Length:
4
Source language of the translation.
array
Links
- CrossReferenceTypesLOV
-
Parameters:
- finder:
LookupTypeFinder%3BLookupType%3DEGP_ITEM_XREF_TYPES
The following properties are defined on the LOV link relation:- Source Attribute: CrossReferenceType; Target Attribute: Meaning
- Display Attribute: Meaning, LookupCode
- finder:
- DFF
-
Parameters:
- crossReferenceRelationshipsUniqID:
$request.path.crossReferenceRelationshipsUniqID
- crossReferenceRelationshipsUniqID:
- translatableAttributes
-
Parameters:
- crossReferenceRelationshipsUniqID:
$request.path.crossReferenceRelationshipsUniqID
The Translatable Attributes resource manages the translatable attributes for item relationships. - crossReferenceRelationshipsUniqID:
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" } ] }