Making or Updating Decisions for Process Projects Using the Supplier Data API with Pagination and the External Approval API for Sourcing and Supplier Management
This topic explains how to make decisions or update existing decisions for process projects in the external system by using the Supplier Data API with Pagination and External Approval API.
Prerequisites
Before starting this task, you must:
Obtain separate application keys for both the Supplier data API with Pagination and External Approval API for Sourcing and Supplier Management.
Complete prerequisites for use of these two APIs.
Context
Procedure
Using the External Approval API to get the SM vendor ID and workspace ID
Get the task ID of the process project approval task by using the GET /pendingApprovables endpoint.
Request task details by using the GET /Task/{entity_id} endpoint.
entity_id: specifies the task ID obtained using the GET /pendingApprovables endpoint.
Get the workspace ID of the process project from the task details.
The obtained workspaceId value might be WS17840.
Get the SM vendor ID by using the GET /{entity_type}/{entity_id} endpoint.
For example:
GET {{runtime_URL}}/Sourcing/v2/entity.svc/Workspace/WS17840?realm=mysitename
might retrieve smVendorID S1006001.
entity_type: specifies the type of entity you use.
entity_id: specifies the workspace ID obtained from the task details.
Using the Supplier Data API with Pagination headerFields endpoint to make or update a decision
Make a decision or update an existing decision status by using the /{vendorId}/workspaces/{workspaceId}/headerFields endpoint.
For example:
GET {{runtime_URL}}/SM/rest/supplierdatapagination/v4/prod/vendors/S1006001/workspaces/WS17840/headerFields?realm=mysitename
vendorId: specifies the SM vendor ID obtained by using the GET /{entity_type}/{entity_id} endpoint.
workspaceId: specifies the workspace ID obtained from the task details.
The following example shows the JSON request for making a decision or updating an existing decision status:
{
"regionIds": [],
"materialIds": [],
"decisionStatus": "Approved",
"decisionMadeBy": "eric",
"decisionComment": "Approved by Eric via API"
}