getStockStatus
get
/ccagent/v1/stockStatus/{id}
Get Stock Status. Gets the stock status of a product against the quantity requested. If multiple inventories are defined optionally pass in the inventory location you wish to view. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
Id of the product to get the stock status
Query Parameters
-
actualStockStatus(optional): string
When this parameter is true, the actual stock status of the product / sku will be returned to the client. By default, we show all products / skus as in stock when the stock level is 0.
-
catalogId(optional): string
Catalog Id of the product
-
locationId(optional): string
When multiple inventories are defined specify the individual inventory location to use. If you wish to explicitly query the default inventory (no location id set) then use the 'NULL' id. If locationId is not specified then the query will default to use the site's inventory location id if set, otherwise the query will use the default inventory (no location id set).
-
skuId(optional): string
Id of the SKU of the product
Header Parameters
-
X-CCAsset-Language(optional): string
The asset language of the request
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getStockStatus_response
Type:
Show Source
object
-
availabilityDate(optional):
string
Availability date of the product
-
backOrderableQuantity(optional):
integer
Quantity that can be backordered
-
catRefId(optional):
string
Sku reference id
-
inStockQuantity(optional):
integer
Quantity that is in stock
-
locationId(optional):
string
Inventory location id of the product
-
orderableQuantity(optional):
integer
Maximum quantity that can be ordered
-
preOrderableQuantity(optional):
integer
Quantity that can be preordered
-
productId(optional):
string
ID of the product
-
stockStatus(optional):
string
Stock status of the product
Example Response (application/json)
{
"productId":"xprod2138",
"preOrderableQuantity":0,
"orderableQuantity":12,
"locationId":"CRSHome-GlenAllen186",
"stockStatus":"IN_STOCK",
"availabilityDate":null,
"backOrderableQuantity":0,
"catRefId":"xsku2138",
"inStockQuantity":12
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|20030|If some internal error|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code