Create inventories

post

/rest/ofscCore/v1/inventories

This operation creates inventories.

Request

Body ()
Root Schema : Create Inventory Request
Type: object
Title: Create Inventory Request
The schema of the request body parameters.
Show Source
  • Title: Activity ID
    The unique identifier of the activity in Oracle Field Service Cloud.
  • Title: Inventory Type
    The type of the inventory as defined in Oracle Field Service Cloud. The inventory type can be serialized or non-serialized. If serialized, then it has a serial number. If non-serialized, then it does not have a serial number.
  • Title: Quantity
    The quantity of the inventory.
  • Title: Resource ID
    The unique identifier of the resource in Oracle Field Service Cloud.
  • Title: Serial Number
    The unique serial number of the inventory.
  • Title: Status
    Allowed Values: [ "customer", "resource", "installed", "deinstalled" ]
    The status of the inventory. For example, if 'customer' is returned, then it indicates that the inventory is at the customer's site.
Back to Top

Response

Supported Media Types

201 Response

This section describes the 201 status response for this operation.
Body ()
Root Schema : Inventory
Type: object
Title: Inventory
The inventory that is installed or deinstalled at the customer's site during an activity.
Show Source

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

Examples

The following example shows how to create inventory by submitting a POST request on the REST resource.

Example of Request Header

The following shows an example of the request header.

POST /rest/ofscCore/v1/inventories HTTP/1.0
Authorization: Basic c29hcEB5YW1hdG86MQ==
Host: etadev1f
Accept: */*

Example of Request Body

The following shows an example of the request body.

{
  "inventoryType": "NORMAL",
  "resourceId": "44001"
}

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 201 Created
Server: nginx/1.6.2
Date: Fri, 24 Jul 2015 08:35:48 GMT
ContentType:
application/json?? charset=utf8
Connection: close

Example of Response Body

The following example shows the contents of the response body in JSON format:

{
"inventoryId": 21258546,
"status": "provider",
"inventoryType": "NORMAL",
"quantity": 1,
"resourceId": "44001",
"links": [
{
"rel": "canonical",
"href": "https://etadev1f/rest/ofscCore/v1/inventories/21258546"
},
{
"rel": "describedby",
"href": "https://etadev1f/rest/ofscCore/v1/metadatacatalog/inventories"
}
]
}
Back to Top