Set required inventories for an activity
put
/rest/ofscCore/v1/activities/{activityId}/requiredInventories
This operation updates the required inventories for the specified activity.
If the specified activity already has the required inventories, then this operation updates the required inventories with the information specified in the request.
Request
Path Parameters
-
activityId(required): string
The unique identifier of the activity in Oracle Field Service.
Root Schema : Required Inventories of Activity
Type:
objectTitle:
Required Inventories of ActivityThe schema of the request body object for this operation.
Show Source
-
items:
array Items
Title:
ItemsThe collection of required inventories for the specified activity.
Nested Schema : Items
Type:
arrayTitle:
ItemsThe collection of required inventories for the specified activity.
Show Source
-
Array of:
object Required Inventory
Title:
Required InventoryThe array of required inventory item objects assigned to the specified activity.
Nested Schema : Required Inventory
Type:
objectTitle:
Required InventoryThe array of required inventory item objects assigned to the specified activity.
Show Source
-
inventoryType(required):
string
Title:
Required Inventory TypeThe required inventory type for the specified activity. -
model(required):
string
Title:
Required Inventory ModelThe required inventory model for the specified activity. -
quantity(required):
number
Title:
Required Inventory QuantityThe required quantity of inventory for the specified activity.
Response
Supported Media Types
- application/json
204 Response
This section describes the 204 status response for this operation.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to set required inventories of an activity by submitting a PUT request on the REST resource using cURL.
curl -X 'PUT' \
-u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \
-H 'Content-Type: application/json' \
--data-binary '{
"items": [
{
"quantity": 3,
"inventoryType": "EC",
"model": "supercable-X200"
}
]
}' \
'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/4225269/requiredInventories'Example of Response Header
The following shows an example of the response header.
HTTP/1.1 204 No Content Server: nginx/1.2.7 Date: Fri, 18 Mar 2016 02:20:10 GMT Content-Type: application/json; charset=utf-8 Connection: close