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:
string
Required:true
Id of the product to get the stock status
Query Parameters
- catalogId
-
Type:
string
Catalog Id of the product- skuId
Type:string
Id of the SKU of the product
Header Parameters
- X-CCAsset-Language
-
Type:
string
The 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:
string
Availability date of the product - backOrderableQuantity
-
Type:
integer
Quantity that can be backordered - catRefId
-
Type:
string
Sku reference id - inStockQuantity
-
Type:
integer
Quantity that is in stock - orderableQuantity
-
Type:
integer
Maximum quantity that can be ordered - preOrderableQuantity
-
Type:
integer
Quantity that can be preordered - productId
-
Type:
string
Id of the product - stockStatus
-
Type:
string
Stock 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:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The 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 }