---
schema_version: "1"
id: ab32545522fd89fa1f9ac0d7b6d7d71aef836ab842c8512d08e78b63cb1ef202
title: Data Inventory Lists (deprecated)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/references/generated-api-specs/ocapi-data-inventory-lists.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-data-inventory-lists
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6499c4775cbfe4f332d38741d5b049688da5e33fd0b8e722e7d3fe1acc54ae71
products:
  - B2C Commerce
  - Salesforce APIs
---
Data Inventory Lists (deprecated)

# Data Inventory Lists (deprecated)

Data API endpoints enable developers to build applications for merchants: Create, update, delete business objects, like products, customers, pricing and promotions or assignments. They typically provide read and write access and are designed for moderate usage.

**Version:** 25.6

## Servers

*   `https://{host}/s/-/dw/data/v25_6`

Protocols: https.

## Security

*   `oauth2_application` (oauth2) Authentication flow with client ID and password with account manager.
    *   OAuth flow application (tokenUrl: https://account.demandware.com:443/dwsso/oauth2/access\_token)
    *   Scope x-info: Scopes are NOT supported. This is just a dummy, because the 'scopes' field is required.
*   `client_id` (apiKey) Add client ID for application identification. Alternative as 'client\_id' query parameter.
    *   API key in header: x-dw-client-id

## Operations

### GET Get Inventory Lists

`GET /inventory_lists`

Operation ID: `Get Inventory Lists`. Tags: inventory\_lists. Security: oauth2\_application.

Action to get all the inventory lists with no filtering.

#### Parameters

*   `start` (query, integer (int32)) Optional start index for retrieving the items from a given index (default 0).
*   `count` (query, integer (int32)) Optional count for retrieving only a subset of the items (default is 25).
*   `select` (query, string) The property selector.

#### Responses

*   **default**
    
    Media type: `application/json, text/xml`. Schema: `inventory_lists`.
    

### GET Get Inventory List

`GET /inventory_lists/{id}`

Operation ID: `Get Inventory List`. Tags: inventory\_lists. Security: oauth2\_application.

Action to get inventory list information.

This endpoint may return the following faults:

*   404 - InventoryListNotFoundException - Thrown in case the inventory list does not exist matching the given id

#### Parameters

*   `id` (path, string, required) The id of the requested inventory list.  
    Minimum length: 1.

#### Responses

*   **404** `InventoryListNotFoundException` - Thrown in case the inventory list does not exist matching the given id
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `inventory_list`.
    

### PUT Create Inventory List

`PUT /inventory_lists/{id}`

Operation ID: `Create Inventory List`. Tags: inventory\_lists. Security: oauth2\_application.

Creates an inventory list using the information provided.

This endpoint may return the following faults:

*   400 - IdConflictException - if the Id in request is not the same as the ID in document.

#### Parameters

*   `id` (path, string, required) The id of the inventory list to create.  
    Minimum length: 1. Maximum length: 256.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `inventory_list`.

#### Responses

*   **400** `IdConflictException` - if the Id in request is not the same as the ID in document.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `inventory_list`.
    

### DELETE Delete Inventory List

`DELETE /inventory_lists/{id}`

Operation ID: `Delete Inventory List`. Tags: inventory\_lists. Security: oauth2\_application.

Deletes the inventory list by ID

#### Parameters

*   `id` (path, string, required) One inventory list id to remove

#### Responses

*   **204**

### PATCH Update Inventory List

`PATCH /inventory_lists/{id}`

Operation ID: `Update Inventory List`. Tags: inventory\_lists. Security: oauth2\_application.

Updates the inventory list with the specified information.

This endpoint may return the following faults:

*   404 - InventoryListNotFoundException - Thrown in case the inventory list does not exist matching the given id

#### Parameters

*   `id` (path, string, required) The id of the requested inventory list.  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `inventory_list`.

#### Responses

*   **404** `InventoryListNotFoundException` - Thrown in case the inventory list does not exist matching the given id
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `inventory_list`.
    

### GET Get Product Inventory Records

`GET /inventory_lists/{inventory_list_id}/product_inventory_records`

Operation ID: `Get Product Inventory Records`. Tags: inventory\_lists. Security: oauth2\_application.

Gets all product inventory records for an inventory list.

This endpoint may return the following faults:

*   404 - InventoryListNotFoundException - Indicates the inventory list does not exist.

#### Parameters

*   `inventory_list_id` (path, string, required) The inventory list ID  
    Minimum length: 1.
*   `start` (query, integer (int32)) Optional start index for retrieving the items from a given index (default 0).
*   `count` (query, integer (int32)) Optional count for retrieving only a subset of the items (default is 25).
*   `select` (query, string) The property selector.

#### Responses

*   **404** `InventoryListNotFoundException` - Indicates the inventory list does not exist.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `product_inventory_records`.
    

### GET Get Product Inventory Record

`GET /inventory_lists/{inventory_list_id}/product_inventory_records/{product_id}`

Operation ID: `Get Product Inventory Record`. Tags: inventory\_lists. Security: oauth2\_application.

Gets a product inventory record.

This endpoint may return the following faults:

*   404 - InventoryListNotFoundException - Indicates the inventory list does not exist.
*   404 - ProductInventoryRecordNotFoundException - Indicates the product inventory record does not exist.

#### Parameters

*   `inventory_list_id` (path, string, required) The inventory list ID  
    Minimum length: 1.
*   `product_id` (path, string, required) The product ID  
    Minimum length: 1.

#### Responses

*   **404** `InventoryListNotFoundException` - Indicates the inventory list does not exist. or `ProductInventoryRecordNotFoundException` - Indicates the product inventory record does not exist.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `product_inventory_record`.
    

### PUT Create Product Inventory Record

`PUT /inventory_lists/{inventory_list_id}/product_inventory_records/{product_id}`

Operation ID: `Create Product Inventory Record`. Tags: inventory\_lists. Security: oauth2\_application.

Creates a product inventory record using the information provided.

This endpoint may return the following faults:

*   404 - InventoryListNotFoundException - Indicates the inventory list does not exist.
*   409 - ConflictException - Indicates a concurrent update

#### Parameters

*   `inventory_list_id` (path, string, required) The inventory list ID  
    Minimum length: 1.
*   `product_id` (path, string, required) The product ID  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `product_inventory_record`.

#### Responses

*   **404** `InventoryListNotFoundException` - Indicates the inventory list does not exist.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **409** `ConflictException` - Indicates a concurrent update
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `product_inventory_record`.
    

### DELETE Delete Product Inventory Record

`DELETE /inventory_lists/{inventory_list_id}/product_inventory_records/{product_id}`

Operation ID: `Delete Product Inventory Record`. Tags: inventory\_lists. Security: oauth2\_application.

Deletes a product inventory record by ID.

This endpoint may return the following faults:

*   404 - InventoryListNotFoundException - Indicates the inventory list does not exist.
*   404 - ProductInventoryRecordNotFoundException - Indicates the product inventory record does not exist.

#### Parameters

*   `inventory_list_id` (path, string, required) The inventory list ID  
    Minimum length: 1.
*   `product_id` (path, string, required) The product ID  
    Minimum length: 1.

#### Responses

*   **204**
*   **404** `InventoryListNotFoundException` - Indicates the inventory list does not exist. or `ProductInventoryRecordNotFoundException` - Indicates the product inventory record does not exist.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PATCH Update Product Inventory Record

`PATCH /inventory_lists/{inventory_list_id}/product_inventory_records/{product_id}`

Operation ID: `Update Product Inventory Record`. Tags: inventory\_lists. Security: oauth2\_application.

Updates the product inventory record with the specified information.

This endpoint may return the following faults:

*   404 - InventoryListNotFoundException - Indicates the inventory list does not exist.
*   404 - ProductInventoryRecordNotFoundException - Indicates the product inventory record does not exist.
*   409 - ConflictException - Indicates a concurrent update

#### Parameters

*   `inventory_list_id` (path, string, required) The inventory list ID  
    Minimum length: 1.
*   `product_id` (path, string, required) The product ID  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `product_inventory_record`.

#### Responses

*   **404** `InventoryListNotFoundException` - Indicates the inventory list does not exist. or `ProductInventoryRecordNotFoundException` - Indicates the product inventory record does not exist.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **409** `ConflictException` - Indicates a concurrent update
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `product_inventory_record`.
    

## Schemas

### inventory\_lists

Document representing an unfiltered list of inventory lists.

*   `count` (_integer (int32)_) The number of returned documents.
*   `data` (_array of inventory\_list_)
*   `expand` (_array of string_) The list of expands set for the search request. Expands are optional.
*   `next` (_string_) The URL of the next result page.
*   `previous` (_string_) The URL of the previous result page.
*   `select` (_string_) The fields that you want to select.
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.  
    Minimum: 0.
*   `total` (_integer (int32)_) The total number of documents.

### fault

Document representing a fault message that is returned whenever the HTTP status code is greater than or equal to 400 (which indicates an error).

*   `arguments` (_object_)
    
    A map that provides fault arguments.
    
    Data can be used to provide error messages on the client side.
    
    Additional properties: `object`.
    
*   `cause` (_cause_)
*   `display_message_pattern` (_string_) The localized display message pattern, if the request parameter display\_locale was given
*   `message` (_string_) The message text of the java exception.
*   `stack_trace` (_string_)
*   `type` (_string_) The name of the java exception.

### inventory\_list

Document representing a inventorylist

*   `assigned_sites` (_array of string_) The list of sites this inventory list is assigned to. The assigned sites is a computed attribute, and cannot be directly modified.
*   `creation_date` (_string (date-time)_, read-only) Returns the value of attribute 'creationDate'.
*   `default_in_stock` (_boolean_) True if the default for the inventory list is to be in stock. THe default value is false if not specified.
*   `description` (_string_) The user supplied description of this instance.
*   `id` (_string_) The id for the inventory list, which is required and must be unique.
*   `last_modified` (_string (date-time)_, read-only) Returns the value of attribute 'lastModified'.
*   `link` (_string_) URL that is used to get this instance. The URL is a computed attribute, and cannot be modified.
*   `on_order_inventory_enabled` (_boolean_) True if the on order flag is enabled. The default value is false if not specified.
*   `use_bundle_inventory_only` (_boolean_) True if the inventory list is used in bundle inventory only. The default value is false if not specified.

_Example_

```
{
  "assigned_sites": [
    "SiteGenesis",
    "MyOtherSite"
  ],
  "default_in_stock": true,
  "description": "description for inventorylist",
  "id": "my-inventorylist",
  "link": "https://example.com/s/-/dw/data/{version}/inventory_lists/my-inventorylist",
  "on_order_inventory_enabled": false,
  "use_bundle_inventory_only": false
}
```

### product\_inventory\_records

Document representing an unfiltered list of inventory records.

*   `count` (_integer (int32)_) The number of returned documents.
*   `data` (_array of product\_inventory\_record_) The collection of product inventory records.
*   `expand` (_array of string_) The list of expands set for the search request. Expands are optional.
*   `next` (_string_) The URL of the next result page.
*   `previous` (_string_) The URL of the previous result page.
*   `select` (_string_) The fields that you want to select.
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.  
    Minimum: 0.
*   `total` (_integer (int32)_) The total number of documents.

_Example_

```
{
  "count": 4,
  "data": [
    {
      "link": "https://example.com/s/-/dw/data/{version}/inventory_lists/my-inventory-list/product_inventory_records/product-id-0",
      "product_id": "product-id-0"
    },
    {
      "link": "https://example.com/s/-/dw/data/{version}/inventory_lists/my-inventory-list/product_inventory_records/product-id-1",
      "product_id": "product-id-1"
    }
  ],
  "start": 0,
  "total": 4
}
```

### product\_inventory\_record

Document representing a product inventory record.

*   `allocation` (_product\_inventory\_record\_allocation_) The allocation quantity and reset date.
*   `ats` (_number (double)_) The quantity of items available to sell (ATS). This is calculated as the allocation plus the preorderBackorderAllocation minus the turnover.
*   `creation_date` (_string (date-time)_, read-only) Returns the value of attribute 'creationDate'.
*   `in_stock_date` (_string (date-time)_) The date that the item is expected to be in stock.
*   `inventory_list_id` (_string_) The user supplied ID of the inventory list.
*   `inventory_turnover` (_number (double)_) The sum of all inventory transactions (decrements and increments) that have been recorded subsequent to the allocation was reset date. The quantity value can be negative due to higher quantity of inventory decrements than increments.
*   `last_modified` (_string (date-time)_, read-only) Returns the value of attribute 'lastModified'.
*   `link` (_string_) The URL that is used to get this instance.
*   `perpetual_flag` (_boolean_) The flag that determines if the product is perpetually in stock.
*   `pre_order_back_order_allocation` (_number (double)_) The quantity of items that are allocated for sale, beyond the initial stock allocation.
*   `pre_order_back_order_handling` (_string_) The enum holding the records pre-backorder-handling configuration. Possible values are NONE, PREORDER and BACKORDER. Method returns NONE in case the record pre-backorder-handling-code is null or unknown.  
    Allowed values: `none`, `preorder`, `backorder`.
*   `product_id` (_string_) The user supplied ID of the product.  
    Minimum length: 1. Maximum length: 256.
*   `product_name` (_string_) The name of the product.
*   `quantity_on_order` (_number (double)_) The on order quantity, the quantity of all transactions for this record since the allocation reset date.
*   `stock_level` (_number (double)_) The current stock level. This is calculated as the allocation minus the turnover.

_Example_

```
{
  "allocation": {
    "amount": 10,
    "reset_date": "2013-04-18.74:00:22.000Z"
  },
  "ats": 10,
  "inventory_list_id": "my-inventory-list",
  "inventory_turnover": 0,
  "link": "https://example.com/s/-/dw/data/{version}/my-inventory-list/product_inventory_records/my-product",
  "perpetual_flag": false,
  "pre_order_back_order_handling": "none",
  "product_id": "my-product",
  "product_name": "my product name",
  "quantity_on_order": 0,
  "stock_level": 10
}
```

### cause

*   `cause` (_cause_)
*   `message` (_string_)
*   `type` (_string_)

### product\_inventory\_record\_allocation

Document representing a product inventory record allocation.

*   `amount` (_number (double)_) The allocation quantity that is currently set. The quantity unit is the same unit as the product itself.  
    Minimum: 0.
*   `reset_date` (_string (date-time)_) The date the allocation quantity was initialized or reset.