# Vend202601\InventoryApi

Inventory operations

All URIs are relative to https://example.retail.lightspeed.app/api/2026-01, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**listInventoryLevels()**](InventoryApi.md#listInventoryLevels) | **GET** /inventory_levels | List inventory levels |
| [**listInventoryRecords()**](InventoryApi.md#listInventoryRecords) | **GET** /inventory | List inventory records |
| [**listProductInventoryLevels()**](InventoryApi.md#listProductInventoryLevels) | **GET** /inventory_levels/{product_id} | List inventory levels for a single product. |
| [**listProductInventoryRecords()**](InventoryApi.md#listProductInventoryRecords) | **GET** /inventory/{product_id} | List inventory records for a single product |


## `listInventoryLevels()`

```php
listInventoryLevels($options): \Vend202601\Model\ListInventoryLevels200Response
```

List inventory levels

** DEPRECATED ** Please use POST /api/2026-04/inventory_levels instead.  Returns a paginated list of inventory levels.  🔒 Requires: `inventory:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\InventoryApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$options = new \Vend202601\Model\\Vend202601\Model\InventoryLevelsRequest(); // \Vend202601\Model\InventoryLevelsRequest | A JSON-encoded object containing filter, sort, and pagination options.

try {
    $result = $apiInstance->listInventoryLevels($options);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->listInventoryLevels: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **options** | [**\Vend202601\Model\InventoryLevelsRequest**](../Model/.md)| A JSON-encoded object containing filter, sort, and pagination options. | [optional] |

### Return type

[**\Vend202601\Model\ListInventoryLevels200Response**](../Model/ListInventoryLevels200Response.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `listInventoryRecords()`

```php
listInventoryRecords($after, $before, $page_size, $variants, $include_deleted, $order_direction): \Vend202601\Model\InventoryCollection
```

List inventory records

** DEPRECATED ** Please use POST /api/2026-04/inventory instead.  Returns a paginated list of inventory records.  🔒 Requires: `inventory:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\InventoryApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$after = 56; // int | The lower limit for the version numbers to be included in the response.
$before = 56; // int | The upper limit for the version numbers to be included in the response.
$page_size = 1000; // int | The maximum number of items to be returned in the response.
$variants = false; // bool | Whether to include products which have product_id as their root product in the response.
$include_deleted = false; // bool | Whether to include inventory records for deleted products.
$order_direction = 'asc'; // string | Whether to order the results ascending or descending by version.

try {
    $result = $apiInstance->listInventoryRecords($after, $before, $page_size, $variants, $include_deleted, $order_direction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->listInventoryRecords: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **after** | **int**| The lower limit for the version numbers to be included in the response. | [optional] |
| **before** | **int**| The upper limit for the version numbers to be included in the response. | [optional] |
| **page_size** | **int**| The maximum number of items to be returned in the response. | [optional] [default to 1000] |
| **variants** | **bool**| Whether to include products which have product_id as their root product in the response. | [optional] [default to false] |
| **include_deleted** | **bool**| Whether to include inventory records for deleted products. | [optional] [default to false] |
| **order_direction** | **string**| Whether to order the results ascending or descending by version. | [optional] [default to &#39;asc&#39;] |

### Return type

[**\Vend202601\Model\InventoryCollection**](../Model/InventoryCollection.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `listProductInventoryLevels()`

```php
listProductInventoryLevels($product_id, $inactive): \Vend202601\Model\ListProductInventoryLevels200Response
```

List inventory levels for a single product.

** DEPRECATED ** Please use GET /api/2026-04/inventory_levels/{product_id} instead.  Returns a paginated list of inventory levels for a single product.  🔒 Requires: `inventory:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\InventoryApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$product_id = 'product_id_example'; // string | The product to fetch inventory levels for.
$inactive = 56; // int | Whether to include inactive products in the response. **Deprecated**: Renamed to `include_inactive` (boolean) in 2026-04.

try {
    $result = $apiInstance->listProductInventoryLevels($product_id, $inactive);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->listProductInventoryLevels: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**| The product to fetch inventory levels for. | |
| **inactive** | **int**| Whether to include inactive products in the response. **Deprecated**: Renamed to &#x60;include_inactive&#x60; (boolean) in 2026-04. | [optional] |

### Return type

[**\Vend202601\Model\ListProductInventoryLevels200Response**](../Model/ListProductInventoryLevels200Response.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `listProductInventoryRecords()`

```php
listProductInventoryRecords($product_id, $after, $before, $page_size, $variants, $include_deleted, $order_direction): \Vend202601\Model\InventoryCollection
```

List inventory records for a single product

** DEPRECATED ** Please use GET /api/2026-04/inventory/{product_id} instead.  Returns inventory records for a single product at all outlets.  🔒 Requires: `inventory:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\InventoryApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$product_id = 'product_id_example'; // string | The product id
$after = 56; // int | The lower limit for the version numbers to be included in the response.
$before = 56; // int | The upper limit for the version numbers to be included in the response.
$page_size = 1000; // int | The maximum number of items to be returned in the response.
$variants = false; // bool | Whether to include variant children of product_id in the response.
$include_deleted = false; // bool | Whether to include inventory records for deleted products.
$order_direction = 'asc'; // string | Whether to order the results ascending or descending by version.

try {
    $result = $apiInstance->listProductInventoryRecords($product_id, $after, $before, $page_size, $variants, $include_deleted, $order_direction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->listProductInventoryRecords: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**| The product id | |
| **after** | **int**| The lower limit for the version numbers to be included in the response. | [optional] |
| **before** | **int**| The upper limit for the version numbers to be included in the response. | [optional] |
| **page_size** | **int**| The maximum number of items to be returned in the response. | [optional] [default to 1000] |
| **variants** | **bool**| Whether to include variant children of product_id in the response. | [optional] [default to false] |
| **include_deleted** | **bool**| Whether to include inventory records for deleted products. | [optional] [default to false] |
| **order_direction** | **string**| Whether to order the results ascending or descending by version. | [optional] [default to &#39;asc&#39;] |

### Return type

[**\Vend202601\Model\InventoryCollection**](../Model/InventoryCollection.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
