Post VMI Relationships

You can use REST API to create one or more vendor-managed inventory (VMI) relationships.

For this example, assume you create an application that allows John Brown, your customer, to use a client to connect to your partner application, and then use REST API for additional tasks.

Let's discuss these scenarios:

  1. Post a new VMI relationship with a scope of organization

  2. Post a new VMI relationship with a scope of subinventory

  3. Post a new subinventory to an existing VMI relationship

Post a New VMI relationship with a Scope of Organization

Assume John wants to create a new VMI relationship in Oracle Fusion Supply Chain Collaboration from another application with scope Organization.

Here's a typical application processing flow for the scenario:

  1. You use a REST request to create a new VMI relationship with scope Organization.

  2. The response payload includes details that describe the results of the request.

  3. Your partner application extracts the values for the following attributes from the response payload, and then displays them in fields in the client.

    Attribute Description

    vmiRelationships.RelationshipNumber

    Number that identifies the relationship.

    vmiRelationships.Scope

    Value that indicates the level at which the replenishment process is managed. Values include Organization and Subinventory.

    vmiRelationships.Status

    Value that identifies the current state of the vendor-managed inventory relationship. Values include Active or Inactive.

    vmiRelationships.MinMaxQuantitySource

    Value that indicates the source of the minimum and maximum quantities used to manage vendor-managed inventory replenishments. Valid values include Enterprise and Supplier. This attribute is used to define the Min-Max Quantity Source when scope is organization.

    vmiRelationships.RequisitionRequesterUserName

    Login that the user used when requesting the requisition for the relationship. This attribute is used to define the Requisition Requester when scope is organization.

Example URL

Use this resource URL format.

POST

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

Example Request

Here's an example of the request body in JSON format.

{
	"SupplierName": "CV_SuppD05",
	"OrganizationCode": "VMIMFG3", 
	"ItemNumber": "VMI-P300",
	"ScopeCode": "ORA_VCS_SCOPE_SHIP_TO_ORG", 
	"MinMaxQuantitySourceCode": "ORA_VCS_MIN_MAX_ORIGIN_SUP", 
	"RequisitionRequesterUserName": "VMI_MANAGER"
}

Example Response

Here's an example of the response body in JSON format.

Note:

Several attributes are not returned in the response payload; for example, SupplierName, OrganizationCode, ItemNumber, and Status.

{
    "RelationshipId": 300100176280328,
    "RelationshipNumber": "44002",
    "SupplierId": 100000012050255,
    "SupplierName": null,
    "SupplierNumber": null,
    "SupplierDUNS": null,
    "SupplierAlternateName": null,
    "OrganizationId": 300100152267719,
    "OrganizationCode": null,
    "OrganizationName": null,
    "InventoryItemId": 300100173318060,
    "ItemNumber": null,
    "ItemDescription": null,
    "ItemCategory": null,
    "Scope": "Organization",
    "ScopeCode": "ORA_VCS_SCOPE_SHIP_TO_ORG",
    "Status": null,
    "StatusCode": "ORA_VCS_STATUS_VMI_RL_ACTIVE",
    "InventoryPlanningOwner": null,
    "InventoryPlanningOwnerCode": null,
    "MinMaxQuantitySource": "Supplier",
    "MinMaxQuantitySourceCode": "ORA_VCS_MIN_MAX_ORIGIN_SUP",
    "RequisitionRequesterPersonId": 300100073936640,
    "RequisitionRequesterUserName": "VMI_MANAGER",
    "CreatedBy": "SCC_MANAGER",
    "CreationDate": "2018-10-24T17:17:02+00:00",
    "LastUpdatedBy": "SCC_MANAGER",
    "LastUpdateDate": "2018-10-24T17:17:03.357+00:00",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/44002",
            "name": "vmiRelationships",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/44002",
            "name": "vmiRelationships",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/44002/child/vmiSubinventories",
            "name": "vmiSubinventories",
            "kind": "collection"
        }
    ]
}

Post a New VMI relationship with a Scope of Subinventory

Assume John wants to create a new VMI relationship in Supply Chain Collaboration from another application with scope Subinventory.

Here's a typical application processing flow for the scenario:

  1. You use a REST request to create a new VMI relationship with scope Subinventory.

  2. The response payload includes details that describe the results of the request.

  3. Your partner application extracts the values for these attributes from the response payload, and then displays them in fields in the client.

    Attribute Description

    vmiRelationships.RelationshipNumber

    Number that identifies the relationship.

    vmiRelationships.Scope

    Value that indicates the level at which the replenishment process is managed. Values include Organization and Subinventory.

    vmiRelationships.Status

    Value that identifies the current state of the vendor-managed inventory relationship. Values include Active or Inactive.

    vmiSubinventores.Subinventory

    Value that uniquely identifies the subinventory of an organization in the relationship. This subinventory is the final destination for the item in the relenishment request.

    vmiSubinventores.MinMaxQuantitySource

    Value that indicates the source of the minimum and maximum quantities used to manage vendor-managed inventory replenishments. Valid values include Enterprise and Supplier. This attribute is used to define the Min-Max Quantity Source when scope is subinventory.

    vmiSubinventores.RequisitionRequesterUserName

    Login that the user used when requesting the requisition for the relationship. This attribute is used to define the Requisition Requester when scope is subinventory.

Example URL

Use this resource URL format.

POST

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

Example Request

Here's an example of the request body in JSON format.

{
	"SupplierName": "CV_SuppD05", 
	"OrganizationCode": "VMIMFG3", 
	"ItemNumber": "VMI-P1300", 
	"ScopeCode":  "ORA_VCS_SCOPE_SHIP_TO_SUB", 
	"vmiSubinventories": 
	[
	{
		"Subinventory": "VMIMFG3-01", 
		"MinMaxQuantitySourceCode": "ORA_VCS_MIN_MAX_ORIGIN_SUP", 
		"RequisitionRequesterUserName": "VMI_MANAGER"
	},
	{
		"Subinventory": "VMIMFG3-02", 
		"MinMaxQuantitySourceCode": "ORA_VCS_MIN_MAX_ORIGIN_SUP", 
		"RequisitionRequesterUserName": "VMI_MANAGER"
	}
	]
}

Example Response

Here's an example of the response body in JSON format.

Note:

Several attributes are not returned in the response payload; for examaple SupplierName, OrganizationCode, ItemNumber, and Status.

{
    "RelationshipId": 300100176429657,
    "RelationshipNumber": "46001",
    "SupplierId": 100000012050255,
    "SupplierName": null,
    "SupplierNumber": null,
    "SupplierDUNS": null,
    "SupplierAlternateName": null,
    "OrganizationId": 300100152267719,
    "OrganizationCode": null,
    "OrganizationName": null,
    "InventoryItemId": 300100173318105,
    "ItemNumber": null,
    "ItemDescription": null,
    "ItemCategory": null,
    "Scope": "Subinventory",
    "ScopeCode": "ORA_VCS_SCOPE_SHIP_TO_SUB",
    "Status": null,
    "StatusCode": "ORA_VCS_STATUS_VMI_RL_ACTIVE",
    "InventoryPlanningOwner": null,
    "InventoryPlanningOwnerCode": null,
    "MinMaxQuantitySource": null,
    "MinMaxQuantitySourceCode": null,
    "RequisitionRequesterPersonId": null,
    "RequisitionRequesterUserName": null,
    "CreatedBy": "SCC_MANAGER",
    "CreationDate": "2018-10-24T22:10:25+00:00",
    "LastUpdatedBy": "SCC_MANAGER",
    "LastUpdateDate": "2018-10-24T22:10:26.157+00:00",
    "vmiSubinventories": [
        {
            "RelationshipId": 300100176429657,
            "RelationshipNumber": "46001",
            "SubinventoryRelationshipId": 300100176429658,
            "SubinventoryId": null,
            "Subinventory": "VMIMFG3-01",
            "SubinventoryDescription": null,
            "InventoryPlanningOwner": null,
            "InventoryPlanningOwnerCode": null,
            "MinMaxQuantitySource": "Supplier",
            "MinMaxQuantitySourceCode": "ORA_VCS_MIN_MAX_ORIGIN_SUP",
            "RequisitionRequesterPersonId": 300100073936640,
            "RequisitionRequesterUserName": "VMI_MANAGER",
            "CreatedBy": "SCC_MANAGER",
            "CreationDate": "2018-10-24T22:10:25.994+00:00",
            "LastUpdatedBy": "SCC_MANAGER",
            "LastUpdateDate": "2018-10-24T22:10:26.142+00:00",
            "links": [
                {
                    "rel": "self",
                    "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/46001/child/vmiSubinventories/300100176429658",
                    "name": "vmiSubinventories",
                    "kind": "item",
                    "properties": {
                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
                    }
                },
                {
                    "rel": "canonical",
                    "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/46001/child/vmiSubinventories/300100176429658",
                    "name": "vmiSubinventories",
                    "kind": "item"
                },
                {
                    "rel": "parent",
                    "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/46001",
                    "name": "vmiRelationships",
                    "kind": "item"
                }
            ]
        },
        {
            "RelationshipId": 300100176429657,
            "RelationshipNumber": "46001",
            "SubinventoryRelationshipId": 300100176429659,
            "SubinventoryId": null,
            "Subinventory": "VMIMFG3-02",
            "SubinventoryDescription": null,
            "InventoryPlanningOwner": null,
            "InventoryPlanningOwnerCode": null,
            "MinMaxQuantitySource": "Supplier",
            "MinMaxQuantitySourceCode": "ORA_VCS_MIN_MAX_ORIGIN_SUP",
            "RequisitionRequesterPersonId": 300100073936640,
            "RequisitionRequesterUserName": "VMI_MANAGER",
            "CreatedBy": "SCC_MANAGER",
            "CreationDate": "2018-10-24T22:10:26.077+00:00",
            "LastUpdatedBy": "SCC_MANAGER",
            "LastUpdateDate": "2018-10-24T22:10:26.147+00:00",
            "links": [
                {
                    "rel": "self",
                    "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/46001/child/vmiSubinventories/300100176429659",
                    "name": "vmiSubinventories",
                    "kind": "item",
                    "properties": {
                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
                    }
                },
                {
                    "rel": "canonical",
                    "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/46001/child/vmiSubinventories/300100176429659",
                    "name": "vmiSubinventories",
                    "kind": "item"
                },
                {
                    "rel": "parent",
                    "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/46001",
                    "name": "vmiRelationships",
                    "kind": "item"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/46001",
            "name": "vmiRelationships",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/46001",
            "name": "vmiRelationships",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/46001/child/vmiSubinventories",
            "name": "vmiSubinventories",
            "kind": "collection"
        }
    ]
}
            "name": "vmiRelationships",
            "kind": "item"
        }
    ]
}

Post a New Subinventory to an Existing VMI Relationship

Assume John wants to add a subinventory to an existing VMI relationship in Supply Chain Collaboration.

Here's a typical application processing flow for the scenario:

  1. You use a REST request to create a new VMI relationship with scope Subinventory.

  2. The response payload includes details that describe the results of the request.

  3. Your partner application extracts the values for these attributes from the response payload, and then displays them in fields in the client.

    Attribute Description

    vmiSubinventores.RelationshipNumber

    Number that identifies the relationship.

    vmiSubinventores.Subinventory

    Value that uniquely identifies the subinventory of an organization in the relationship. This subinventory is the final destination for the item in the relenishment request.

    vmiSubinventores.MinMaxQuantitySource

    Value that indicates the source of the minimum and maximum quantities used to manage vendor-managed inventory replenishments. Valid values include Enterprise and Supplier. This attribute is used to define the Min-Max Quantity Source when scope is subinventory.

    vmiSubinventores.RequisitionRequesterUserName

    Login that the user used when requesting the requisition for the relationship. This attribute is used to define the Requisition Requester when scope is subinventory.

Example URL

Use this resource URL format.

POST

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

Example Request

Here's an example of the request body in JSON format.

{
	"Subinventory": "VMIMFG3-03", 
	"MinMaxQuantitySourceCode": "ORA_VCS_MIN_MAX_ORIGIN_SUP", 
	"RequisitionRequesterUserName": "VMI_MANAGER"
}

Example Response

Here's an example of the response body in JSON format.

Note:

Several attributes are not returned in the response payload; for example, SupplierName, OrganizationCode, ItemNumber, and Status.

{
    "RelationshipId": 300100176385880,
    "RelationshipNumber": "45002",
    "SubinventoryRelationshipId": 300100176393231,
    "SubinventoryId": null,
    "Subinventory": "VMIMFG3-03",
    "SubinventoryDescription": null,
    "InventoryPlanningOwner": null,
    "InventoryPlanningOwnerCode": null,
    "MinMaxQuantitySource": "Supplier",
    "MinMaxQuantitySourceCode": "ORA_VCS_MIN_MAX_ORIGIN_SUP",
    "RequisitionRequesterPersonId": 300100073936640,
    "RequisitionRequesterUserName": "VMI_MANAGER",
    "CreatedBy": "SCC_MANAGER",
    "CreationDate": "2018-10-24T20:11:22+00:00",
    "LastUpdatedBy": "SCC_MANAGER",
    "LastUpdateDate": "2018-10-24T20:11:22.039+00:00",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/45002/child/vmiSubinventories/300100176393231",
            "name": "vmiSubinventories",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/vmiRelationships/45002/child/vmiSubinventories/300100176393231",
            "name": "vmiSubinventories",
            "kind": "item"
        },
        {
            "rel": "parent",
            "href": "https://servername/fscmRestApi/resources/version/ vmiRelationships/45002",
            "name": "vmiRelationships",
            "kind": "item"
        }
    ]
}