Update or Upsert an Item in a Single Operation

You can use REST API to create or update an item in a single operation, without having to perform a GET operation first. To do this, you need to set the Upsert mode to Yes. Upsert refreshes existing records and inserts new records if it doesn't find a match.

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

Example Request 1: Update

This operation updates the description of the item XYZ_100 to Pulse Device XYZ Series.

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

{
"OrganizationCode": "MST_O",
"ItemNumber": "XYZ_100",
"ItemDescription" : "Pulse Device XYZ Series",
}

Example Request 2: Update or Create New

This operation updates item number ABC_988. If the item doesn't exist, it creates a new item.

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

{
"OrganizationCode": "MST_O",
"ItemNumber": "ABC_988",
"ItemDescription" : "VDU Device ABC Type",
"ItemClass": "Electronics"
}