Post VMI Analysts Using Batch
You can use REST API to create a new vendor-managed inventory (VMI) analyst. VMI analysts are Oracle Fusion users assigned a security context for access to order forecast data.
For the example in this topic, assume you need to create new VMI analysts for vendor-managed inventory. You create a solution 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:
-
Post a sample collection of VMI analysts:
-
One user will have access to all published order forecasts
-
One user will have access to one supplier
-
Post Collection of VMI Analysts
John wants to create VMI analysts using REST.
Here's a typical application processing flow for the scenario:
-
You use a REST API request to create two new VMI analysts.
-
The response payload includes details that describe the results of the request.
- Your partner application extracts the values
for these attributes from the response payload, and then displays
them in the client.
User Key Attribute Description Yes
vmiAnalysts.UserName
A unique identifier for the VMI analyst to authenticate with the service provider directly. This attribute is required.
vmiAnalysts.FullAccessFlag
Indicates whether the VMI analyst has access to all vendor-managed inventory data.
dataAccessSecurity.SupplierId
Value that uniquely identifies the supplier who ships the item. It is a primary key that the application generates when it creates the supplier.
Yes
dataAccessSecurity.SupplierName
Name of the supplier that ships the item.
Yes
dataAccessSecurity.ShipFromSupplierSiteName
Name of the supplier site that ships the item.
Yes
dataAccessSecurity.SecurityContext
Value that identifies the level of security applied. Options are either supplier or 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/vmiAnalysts"
Example Request
Here's an example of the request body in JSON format.
{ "parts": [ { "id" : "part1", "path" : "/vmiAnalysts", "operation" : "create", "payload" : { "UserName" : "vmiUser1", "FullAccessFlag" : "True" } }, { "id" : "part2", "path" : "/vmiAnalysts", "operation" : "create", "payload" : { "UserName" : "vmiUser1", "FullAccessFlag" : "False", "dataAccessSecurity": [ { "SecurityContext": "Supplier", "SupplierName": "Small Chips" } ] } } ] }
Example Response
Here's an example of the response body in JSON format.
{"parts":[{"id":"part1","path":"https://servername/fscmRestApi/resources/version/vmiAnalysts","operation":"create","payload" : { "PersonId" : 100010032752379, "UserName" : "MJones2", "FirstName" : "Mark", "LastName" : "Jones", "DisplayName" : "Jones,Mark", "Email" : "sendmail-test-discard@example.com", "Status" : "Active", "CreatedBy" : "ADMIN", "CreationDate" : "2018-04-19T16:25:01+00:00", "LastUpdatedBy" : "ADMIN", "LastUpdateDate" : "2018-04-19T16:25:01.081+00:00", "FullAccessFlag" : "true", "links" : [ { "rel" : "self", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/100010032752379", "name" : "vmiAnalysts", "kind" : "item", "properties" : { "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel" : "canonical", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/100010032752379", "name" : "vmiAnalysts", "kind" : "item" }, { "rel" : "child", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/100010032752379/child/dataAccessSecurity", "name" : "dataAccessSecurity", "kind" : "collection" } ] } }, { "id" : "part2", "path" : "https://servername/fscmRestApi/resources/version/vmiAnalysts", "operation" : "create", "payload" : { "PersonId" : 300100032232206, "UserName" : "Smith.Mark", "FirstName" : "Smith", "LastName" : "Mark", "DisplayName" : "Mark, Smith", "Email" : "Smith.Mark@example.com", "Status" : "Active", "CreatedBy" : "ADMIN", "CreationDate" : "2018-04-19T16:25:01.027+00:00", "LastUpdatedBy" : "ADMIN", "LastUpdateDate" : "2018-04-19T16:25:01.082+00:00", "FullAccessFlag" : "false", "dataAccessSecurity" : [ { "DataAccessId" : 300100127557399, "SecurityContext" : "Supplier Site", "ShipFromSupplierId" : 12, "ShipFromSupplierName" : "Tall Manufacturing", "ShipFromSupplierSiteId" : 2444, "ShipFromSupplierSiteName" : "Atlanta", "ProcurementBUId" : 204, "ProcurementBUName" : "Vision Operations", "CreatedBy" : "ADMIN", "CreationDate" : "2018-04-19T16:25:01.075+00:00", "LastUpdatedBy" : "ADMIN", "LastUpdateDate" : "2018-04-19T16:25:01.112+00:00", "links" : [ { "rel" : "self", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/300100032232206/child/dataAccessSecurity/300100127557399", "name" : "dataAccessSecurity", "kind" : "item", "properties" : { "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel" : "canonical", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/300100032232206/child/dataAccessSecurity/300100127557399", "name" : "dataAccessSecurity", "kind" : "item" }, { "rel" : "parent", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/300100032232206", "name" : "vmiAnalysts", "kind" : "item" } ] }, { "DataAccessId" : 300100127557400, "SecurityContext" : "Supplier Site", "ShipFromSupplierId" : 12, "ShipFromSupplierName" : "Tall Manufacturing", "ShipFromSupplierSiteId" : 16, "ShipFromSupplierSiteName" : "Dallas", "ProcurementBUId" : 204, "ProcurementBUName" : "Vision Operations", "CreatedBy" : "ADMIN", "CreationDate" : "2018-04-19T16:25:01.077+00:00", "LastUpdatedBy" : "ADMIN", "LastUpdateDate" : "2018-04-19T16:25:01.125+00:00", "links" : [ { "rel" : "self", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/300100032232206/child/dataAccessSecurity/300100127557400", "name" : "dataAccessSecurity", "kind" : "item", "properties" : { "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel" : "canonical", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/300100032232206/child/dataAccessSecurity/300100127557400", "name" : "dataAccessSecurity", "kind" : "item" }, { "rel" : "parent", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/300100032232206", "name" : "vmiAnalysts", "kind" : "item" } ] } ], "links" : [ { "rel" : "self", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/300100032232206", "name" : "vmiAnalysts", "kind" : "item", "properties" : { "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel" : "canonical", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/300100032232206", "name" : "vmiAnalysts", "kind" : "item" }, { "rel" : "child", "href" : "https://servername/fscmRestApi/resources/version/vmiAnalysts/300100032232206/child/dataAccessSecurity", "name" : "dataAccessSecurity", "kind" : "collection" } ] } } ] }