getInventory

get

/ccadmin/v1/inventories/{id}

Get Inventory. Get variant or product inventory information based on ID. 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 variant or product.
Query Parameters
includeDefaultLocationInventory
Type: boolean
flag indicating whether to include the non-geographic default location inventory
locationIds
Type: string
a comma-separated list of location ids
type
Type: string
inventory type, either variant or product. defaults to variant
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 : getInventory_response
Nested Schema : example with locationIds
Type: object
Result object with locationIds.
Nested Schema : example without locationIds
Type: object
Result object without locationIds.
Nested Schema : If the selected case was a product.
Type: object
Result object if type is product.
Nested Schema : If the selected case was a variant.
Type: object
Result object if type is variant.
Nested Schema : childSKUs
Type: array
List of SKU's for the product.
Nested Schema : items
Type: object
Nested Schema : locationInventoryInfo
Type: array
Location specific inventory information
Nested Schema : items
Type: object
Nested Schema : locationInventoryInfo
Type: array
Location specific inventory information
Nested Schema : items
Type: object
Nested Schema : If the selected case was a product.
Type: object
Result object if type is product.
Nested Schema : If the selected case was a variant.
Type: object
Result object if type is variant.
Nested Schema : childSKUs
Type: array
List of SKU's for the product.
Nested Schema : items
Type: object
Example application/json

{
    "preorderThreshold":0,
    "backorderLevel":0,
    "displayName":"Cargo Pants",
    "availabilityDate":null,
    "stockThreshold":5,
    "availabilityStatusMsg":"inStock",
    "stockLevel":12,
    "availableToPromise":null,
    "skuNumber":"sku40015",
    "preorderLevel":0,
    "locationId":null,
    "inventoryId":null,
    "backorderThreshold":0,
    "links":[
        {
            "rel":"self",
            "href":"http://www.example.com/v1/inventories/sku40015?locationId=wa-seattle"
        }
    ],
    "availabilityStatus":1000,
    "locationInventoryInfo":null,
    "skuId":"sku40015"
}
Default Response
The error response
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Response Payload returned by endpoint:

{
  "preorderThreshold": 0,
  "backorderLevel": 0,
  "displayName": "Cargo Pants",
  "availabilityDate": null,
  "stockThreshold": 5,
  "availabilityStatusMsg": "inStock",
  "stockLevel": 12,
  "availableToPromise": null,
  "skuNumber": "sku40015",
  "preorderLevel": 0,
  "locationId": null,
  "inventoryId": null,
  "backorderThreshold": 0,
  "links": [{
    "rel": "self",
    "href": "http://www.example.com/v1/inventories/sku40015?locationId=wa-seattle"
  }],
  "availabilityStatus": 1000,
  "locationInventoryInfo": null,
  "skuId": "sku40015"
}