Get and Patch VMI Items

As an enterprise user or a supplier, you can use REST API to retrieve a list of vendor-managed inventory replenishment items to determine the current replenishment status of items managed and replenished by your suppliers.

You can then take this data and use the vmiReplenishmentRequests REST API to create replenishment requests for your items that are less than the minimum quantity threshold.

As a supplier, you can update the minimum and maximum quantities for replenishment items with supplier as the min-max quantity source. You can also review historical minimum and maximum quantities using the minimumMaximumHistory child resource.

For the example in this topic, assume John Brown is a supplier who needs to view all replenishment items that are either out of stock or less than the minimum threshold. John can use this information to create new replenishment requests using the vmiReplenishmentRequests REST service.

Additionally, as a supplier, John has new items that he is managing and needs to set the minimum and maximum thresholds.

You create a solution that allows John to use a client to connect to your partner application, and then use REST API for additional tasks.

Let's discuss these scenarios:

  1. Get VMI items according to replenishment status

  2. Get VMI items missing minimum and maximum thresholds

  3. Patch a VMI item missing minimum and maximum thresholds

Get VMI Items According to Replenishment Status

Your supplier wants to retrieve a list of all replenishment items that are less than the minimum quantity threshold and are not out of stock.

  1. You use a REST API request to get VMI items for the supplier named Big Computers:

  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 the client.

    Attribute Description

    VmiItemId

    Value that uniquely identifies the vendor-managed inventory item.

    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.

Example URL

Use this resource URL format.

GET

curl -u username:password  "https://servername/fscmRestApi/resources/version/vmiItems?fields=VmiItemId,RequiringReplenishment,ItemNumber,ItemDescription,MinMaxQuantitySource,MinimumQuantity,MaximumQuantity&onlyData=true&q=RequiringReplenishment='Missing min-max quantities' AND MinMaxQuantitySource='Supplier'" -H 'cache-control: no-cache'

Example Response

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

{
    "items": [
        {
            "VmiItemId": 21002,
            "ItemNumber": "SCC-CNTRML-05",
            "ItemDescription": "ML Controller",
            "MinMaxQuantitySource": "Supplier",
            "MinimumQuantity": null,
            "MaximumQuantity": null,
            "RequiringReplenishment": "Missing min-max quantities"
        },
		...
        {
            "VmiItemId": 1019,
            "ItemNumber": "VMI-P1000",
            "ItemDescription": "VMI Product 1000 VMIMFG2",
            "MinMaxQuantitySource": "Supplier",
            "MinimumQuantity": null,
            "MaximumQuantity": null,
            "RequiringReplenishment": "Missing min-max quantities"
        }
    ],
    "count": 8,
    "hasMore": false,
    "limit": 25,
    "offset": 0,
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/vmiItems",
            "name": "vmiItems",
            "kind": "collection"
        }
    ]
}

Patch a VMI Item Missing Minimum and Maximum Thresholds

Your customer wants to update all VMI Items for a specified supplier.

  1. You use a REST API request to update the minimum and maximum quantities for VMI items for the supplier named Big Computers.

  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 the client.

    Attribute Description

    MinimumQuantity

    Value that indicates the minimum quantity of the item that must be maintained in inventory.

    MaximumQuantity

    Value that indicates the maximum quantity of the item that cannot be exceeded in inventory.

Example URL

Use this resource URL format.

PATCH

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

Example Request

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

{
	"MinimumQuantity":1000, 
	"MaximumQuantity":2000
}

Example Response

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

{
    "VmiItemId": 1033,
    "InventoryItemId": 300100120329007,
    "ItemNumber": "SCC-1TB",
    "ItemDescription": "SCC-1TB",
    "StatusCode": "ORA_VCS_VMI_OOS",
    "Status": "Out of stock",
    "SupplierItemId": null,
    "SupplierItemName": null,
    "ItemCategory": "Miscellaneous_1",
    "UnitOfMeasure": "Each",
    "UOMCode": "Ea",
    "SupplierId": 230,
    "SupplierName": "CV_SuppA00",
    "OrganizationId": 207,
    "OrganizationCode": "M1",
    "OrganizationName": "VMI Manufacturing 1",
    "ShipToLocationId": 207,
    "ShipToLocationName": "VMIMFG1 - VMI Manufacturing 1",
    "SubinventoryId": null,
    "SubinventoryName": null,
    "SubinventoryDescription": null,
    "Scope": "Organization",
    "ScopeCode": "ORA_VCS_SCOPE_SHIP_TO_ORG",
    "DelivertoLocationId": null,
    "DeliverToLocationName": "",
    "ProcurementBUId": 204,
    "ProcurementBU": "Company Operations",
    "MinMaxQuantitySource": "Supplier",
    "MinMaxQuantitySourceCode": "ORA_VCS_MIN_MAX_ORIGIN_SUP",
    "OnHandQuantity": 0,
    "OnOrderQuantity": 0,
    "PurchaseOrderQuantity": 0,
    "InTransitQuantity": 0,
    "ReceivedQuantity": 0,
    "ReplenishmentQuantity": 0,
    "PendingAcknowledgmentQuantity": 0,
    "ItemPlanner": null,
    "BuyerId": null,
    "Buyer": null,
    "InventoryPlanningOwnerCode": "ORA_VCS_INV_OWNER_SUP",
    "InventoryPlanningOwner": "Supplier",
    "MinimumQuantity": 1000,
    "MaximumQuantity": 2000,
    "RequiringReplenishment": "Yes",
    "RequiringReplenishmentCode": "ORA_VCS_VMI_REQ_REPL_YES",
    "CreatedBy": "COLLABPLANNER08",
    "CreationDate": "2018-09-25T08:40:31.320+00:00",
    "LastUpdateDate": "2018-10-25T19:10:24+00:00",
    "LastUpdatedBy": "CVSUPPA00",
    "LastRefreshDate": null,
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/vmiItems/1033",
            "name": "vmiItems",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/vmiItems/1033",
            "name": "vmiItems",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/vmiItems/1033/child/minimumMaximumHistory",
            "name": "minimumMaximumHistory",
            "kind": "collection"
        }
    ]
}