getStockStatus
get
/ccstore/v1/stockStatus/{id}
Get Stock Status. Gets the stock status of a product against the quantity requested. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueId of the product to get the stock status
Query Parameters
- catalogId
-
Type:
stringCatalog Id of the product- skuId
Type:stringId of the SKU of the product
Header Parameters
- X-CCAsset-Language
-
Type:
stringThe asset language of the request
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getStockStatus_response
- availabilityDate
-
Type:
stringAvailability date of the product - backOrderableQuantity
-
Type:
integerQuantity that can be backordered - catRefId
-
Type:
stringSku reference id - inStockQuantity
-
Type:
integerQuantity that is in stock - orderableQuantity
-
Type:
integerMaximum quantity that can be ordered - preOrderableQuantity
-
Type:
integerQuantity that can be preordered - productId
-
Type:
stringId of the product - stockStatus
-
Type:
stringStock status of the product
Example application/json
{
"productId":"xprod2138",
"preOrderableQuantity":0,
"orderableQuantity":12,
"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|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Response Payload returned by endpoint:
{
"productId": "xprod2138",
"preOrderableQuantity": 0,
"orderableQuantity": 12,
"stockStatus": "IN_STOCK",
"availabilityDate": null,
"backOrderableQuantity": 0,
"catRefId": "xsku2138",
"inStockQuantity": 12
}