Manage Stocking Locations
Stocking locations in service logistics are extensions to the subinventories defined in Oracle Inventory Cloud. You can use the stockingLocations REST API to view, create, update, and delete service logistics stocking locations.
Service Logistics uses these additional attributes:
-
Condition, indicates if stocking location stores usable or defective parts.
-
Location Type, indicates the type of stocking location. Valid values include Technician, Unmanned Warehouse, Manned Warehouse, and Site Dedicated Warehouse.
Here's a typical application processing flow for the scenarios:
-
You can create a stocking location
-
You may update a stocking location
-
You can query for an existing stocking location
-
You may choose to delete a stocking location
Create a Stocking Location
In this scenario, you create a new stocking location of type Technician.
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/stockingLocations"
Example Request
Here's an example of the request body in JSON format.
{ "OrganizationId": 5702, "Subinventory": "FS_AXDDNN", "Condition": "GOOD", "LocationType": "TECHNICIAN" }
Example Response
Here's an example of the response body in JSON format.
{ "StockLocationId": 300100182866241, "OrganizationId": 5702, "OrganizationCode": "FST", "Subinventory": "FS_AXDDNN", "Condition": "GOOD", "LocationType": "TECHNICIAN", "LocationTypeMeaning": "Technician", "ConditionMeaning": "Usable", "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/stockingLocations/300100182866241", "name": "stockingLocations", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/stockingLocations/300100182866241", "name": "stockingLocations", "kind": "item" }, { "rel": "child", "href": "https://servername/fscmRestApi/resources/version/stockingLocations/300100182866241/child/siteDedicatedLocations", "name": "siteDedicatedLocations", "kind": "collection" } ] }
Update a Stocking Location
In this scenario, you update an existing stocking location.
Example URL
Use this resource URL format.
PATCH
curl -X PATCH -u "username:password" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/stockingLocations/300100180771393"
Example Request
Here's an example of the request body in JSON format.
{ "Condition" : "DEFECTIVE" }
Example Response
Here's an example of the response body in JSON format.
{ "StockLocationId" : 300100180771393, "OrganizationId" : 5702, "OrganizationCode" : "FST", "Subinventory" : "FS_AJOFXT", "Condition" : "DEFECTIVE", "LocationType" : "TECHNICIAN", "LocationTypeMeaning" : "Technician", "ConditionMeaning" : "Defective", "links" : [ { "rel" : "self", "href" : "https://servername/fscmRestApi/resources/version/stockingLocations/300100180771393", "name" : "stockingLocations", "kind" : "item", "properties" : { "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel" : "canonical", "href" : "https://servername/fscmRestApi/resources/version/stockingLocations/300100180771393", "name" : "stockingLocations", "kind" : "item" }, { "rel" : "lov", "href" : "https://servername/fscmRestApi/resources/version/stockingLocations/300100180771393/lov/StockLocationTypeLOV", "name" : "StockLocationTypeLOV", "kind" : "collection" }, { "rel" : "lov", "href" : "https://servername/fscmRestApi/resources/version/stockingLocations/300100180771393/lov/StockLocationConditionLOV", "name" : "StockLocationConditionLOV", "kind" : "collection" }, { "rel" : "lov", "href" : "https://servername/fscmRestApi/resources/version/stockingLocations/300100180771393/lov/OrganizationIdLOV", "name" : "OrganizationIdLOV", "kind" : "collection" }, { "rel" : "lov", "href" : "https://servername/fscmRestApi/resources/version/stockingLocations/300100180771393/lov/SubinventoryLOV", "name" : "SubinventoryLOV", "kind" : "collection" }, { "rel" : "child", "href" : "https://servername/fscmRestApi/resources/version/stockingLocations/300100180771393/child/siteDedicatedLocations", "name" : "siteDedicatedLocations", "kind" : "collection" } ] }
Query for Stocking Location
In this scenario, you can query for an existing stocking location.
Example URL
Use this resource URL format.
GET
curl -u username:password "https://servername/fscmRestApi/resources/version/stockingLocations/300100182866241"
Example Response
Here's an example of the response body in JSON format.
{ "StockLocationId": 300100182866241, "OrganizationId": 5702, "OrganizationCode": "FST", "Subinventory": "FS_AXDDNN", "Condition": "GOOD", "LocationType": "TECHNICIAN", "LocationTypeMeaning": "Technician", "ConditionMeaning": "Usable", "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/stockingLocations/300100182866241", "name": "stockingLocations", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178" } }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/stockingLocations/300100182866241", "name": "stockingLocations", "kind": "item" }, { "rel": "child", "href": "https://servername/fscmRestApi/resources/version/stockingLocations/300100182866241/child/siteDedicatedLocations", "name": "siteDedicatedLocations", "kind": "collection" } ] }
Delete a Stocking Location
In this scenario, you can delete an existing stocking location.
Example URL
Use this resource URL format.
DELETE
curl -u username:password -X DELETE "https://servername/fscmRestApi/resources/version/stockingLocations/300100182866241"