# Vend\PriceBooksApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**addPriceBookProducts()**](PriceBooksApi.md#addPriceBookProducts) | **POST** /price_books/{price_book_id}/products | Add the products to a price book |
| [**createPriceBookV3()**](PriceBooksApi.md#createPriceBookV3) | **POST** /price_books | Create a single price book |
| [**deletePriceBookProducts()**](PriceBooksApi.md#deletePriceBookProducts) | **DELETE** /price_books/{price_book_id}/products | Delete some entries for a price book |
| [**getPriceBookByIDV3()**](PriceBooksApi.md#getPriceBookByIDV3) | **GET** /price_books/{id} | Get a single price book |
| [**getPriceBookProductsForPriceBook()**](PriceBooksApi.md#getPriceBookProductsForPriceBook) | **GET** /price_books/{price_book_id}/products | List price book products per price book |
| [**listPriceBookProducts()**](PriceBooksApi.md#listPriceBookProducts) | **GET** /price_book_products | List price book products |
| [**listPriceBooksV3()**](PriceBooksApi.md#listPriceBooksV3) | **GET** /price_books | List price books |
| [**updatePriceBookProducts()**](PriceBooksApi.md#updatePriceBookProducts) | **PATCH** /price_books/{price_book_id}/products | Update the products in a price book |
| [**updatePriceBookProductsWithPutOp()**](PriceBooksApi.md#updatePriceBookProductsWithPutOp) | **PUT** /price_books/{price_book_id}/products | Update the products in a price book |
| [**updatePriceBookV3()**](PriceBooksApi.md#updatePriceBookV3) | **PUT** /price_books/{id} | Update a single price book |


## `addPriceBookProducts()`

```php
addPriceBookProducts($price_book_id, $price_book_product_collection): \Vend\Model\PriceBookProductsUpdateResponse
```

Add the products to a price book

Create price book products.  > **Note**: When adding a product the retail price is the tax exclusive price of the product if your store is tax exclusive, and tax inclusive if your store is tax inclusive.  The returned value is always tax exclusive.  > **Note**: The request body may not contain more than 100 price book products.  🔒 Requires: `products:write:price_books` `products:read` scopes

### Example

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


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


$apiInstance = new Vend\Api\PriceBooksApi(
    // 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
);
$price_book_id = 'price_book_id_example'; // string | The price book id
$price_book_product_collection = new \Vend\Model\PriceBookProductCollection(); // \Vend\Model\PriceBookProductCollection

try {
    $result = $apiInstance->addPriceBookProducts($price_book_id, $price_book_product_collection);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PriceBooksApi->addPriceBookProducts: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **price_book_id** | **string**| The price book id | |
| **price_book_product_collection** | [**\Vend\Model\PriceBookProductCollection**](../Model/PriceBookProductCollection.md)|  | |

### Return type

[**\Vend\Model\PriceBookProductsUpdateResponse**](../Model/PriceBookProductsUpdateResponse.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/json`
- **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)

## `createPriceBookV3()`

```php
createPriceBookV3($price_book_create_request): \Vend\Model\PriceBookCreateResponse
```

Create a single price book

Create a price book  🔒 Requires: `products:write:price_books` `customers:read` scopes

### Example

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


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


$apiInstance = new Vend\Api\PriceBooksApi(
    // 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
);
$price_book_create_request = new \Vend\Model\PriceBookCreateRequest(); // \Vend\Model\PriceBookCreateRequest

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **price_book_create_request** | [**\Vend\Model\PriceBookCreateRequest**](../Model/PriceBookCreateRequest.md)|  | |

### Return type

[**\Vend\Model\PriceBookCreateResponse**](../Model/PriceBookCreateResponse.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/json`
- **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)

## `deletePriceBookProducts()`

```php
deletePriceBookProducts($price_book_id, $price_book_product_id_collection): \Vend\Model\PriceBookProductsUpdateResponse
```

Delete some entries for a price book

Delete price book product entries.  > **Note**: You may not delete more than 100 price book products at a time.  > **Note**: The request body params can be used within request headers. Header key name is `data`  🔒 Requires: `products:write:price_books` scope

### Example

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


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


$apiInstance = new Vend\Api\PriceBooksApi(
    // 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
);
$price_book_id = 'price_book_id_example'; // string | The price book id
$price_book_product_id_collection = new \Vend\Model\PriceBookProductIdCollection(); // \Vend\Model\PriceBookProductIdCollection

try {
    $result = $apiInstance->deletePriceBookProducts($price_book_id, $price_book_product_id_collection);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PriceBooksApi->deletePriceBookProducts: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **price_book_id** | **string**| The price book id | |
| **price_book_product_id_collection** | [**\Vend\Model\PriceBookProductIdCollection**](../Model/PriceBookProductIdCollection.md)|  | |

### Return type

[**\Vend\Model\PriceBookProductsUpdateResponse**](../Model/PriceBookProductsUpdateResponse.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/json`
- **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)

## `getPriceBookByIDV3()`

```php
getPriceBookByIDV3($id): \Vend\Model\PriceBookResponse
```

Get a single price book

Returns a single price book with a requested ID  🔒 Requires: `products:read:price_books` `customers:read` `outlets:read` scopes

### Example

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


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


$apiInstance = new Vend\Api\PriceBooksApi(
    // 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
);
$id = 'id_example'; // string | The price book id

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| The price book id | |

### Return type

[**\Vend\Model\PriceBookResponse**](../Model/PriceBookResponse.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)

## `getPriceBookProductsForPriceBook()`

```php
getPriceBookProductsForPriceBook($price_book_id, $product_ids): \Vend\Model\PriceBookProductCollection
```

List price book products per price book

Returns a list of price book products for a given price book.  > **Note**: The returned retail price is the tax exclusive price of the product.  🔒 Requires: `products:read:price_books` scope

### Example

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


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


$apiInstance = new Vend\Api\PriceBooksApi(
    // 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
);
$price_book_id = 'price_book_id_example'; // string | The price book id
$product_ids = 06326976-9d65-11ed-fa40-1347e4b4ae6d,16326976-9d65-11ed-fa40-1347e4b4ae6d; // string | The product ids

try {
    $result = $apiInstance->getPriceBookProductsForPriceBook($price_book_id, $product_ids);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PriceBooksApi->getPriceBookProductsForPriceBook: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **price_book_id** | **string**| The price book id | |
| **product_ids** | **string**| The product ids | [optional] |

### Return type

[**\Vend\Model\PriceBookProductCollection**](../Model/PriceBookProductCollection.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)

## `listPriceBookProducts()`

```php
listPriceBookProducts($after, $before, $page_size): \Vend\Model\PriceBookProductCollection
```

List price book products

Returns a paginated list of price book products.  🔒 Requires: `products:read:price_books` scope

### Example

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


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


$apiInstance = new Vend\Api\PriceBooksApi(
    // 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 = 56; // int | The maximum number of items to be returned in the response.

try {
    $result = $apiInstance->listPriceBookProducts($after, $before, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PriceBooksApi->listPriceBookProducts: ', $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] |

### Return type

[**\Vend\Model\PriceBookProductCollection**](../Model/PriceBookProductCollection.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)

## `listPriceBooksV3()`

```php
listPriceBooksV3($after, $before, $page_size, $order, $direction, $deleted, $customer_group_id): \Vend\Model\PriceBookCollection
```

List price books

Returns a paginated list of price books.  🔒 Requires: `products:read:price_books` `customers:read` `outlets:read` scopes

### Example

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


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


$apiInstance = new Vend\Api\PriceBooksApi(
    // 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 = 56; // int | The maximum number of items to be returned in the response.
$order = 'order_example'; // string | Field used to sort the results.
$direction = 'direction_example'; // string | Sort results direction. ASC or DESC.
$deleted = True; // bool | Include (true) or exclude (false) deleted price books. Default value is false.
$customer_group_id = 'customer_group_id_example'; // string | Filter the list and show only price books linked to the specified Customer Group.

try {
    $result = $apiInstance->listPriceBooksV3($after, $before, $page_size, $order, $direction, $deleted, $customer_group_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PriceBooksApi->listPriceBooksV3: ', $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] |
| **order** | **string**| Field used to sort the results. | [optional] |
| **direction** | **string**| Sort results direction. ASC or DESC. | [optional] |
| **deleted** | **bool**| Include (true) or exclude (false) deleted price books. Default value is false. | [optional] |
| **customer_group_id** | **string**| Filter the list and show only price books linked to the specified Customer Group. | [optional] |

### Return type

[**\Vend\Model\PriceBookCollection**](../Model/PriceBookCollection.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)

## `updatePriceBookProducts()`

```php
updatePriceBookProducts($price_book_id, $price_book_product_collection): \Vend\Model\PriceBookProductsUpdateResponse
```

Update the products in a price book

Update price book products.  > **Note**: When adding a product the retail price is the tax exclusive price of the product if your store is tax exclusive, and tax inclusive if your store is tax inclusive. The returned value is always tax exclusive.  > **Note**: The request body may not contain more than 100 price book products.  🔒 Requires: `products:write:price_books` `products:read` scopes

### Example

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


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


$apiInstance = new Vend\Api\PriceBooksApi(
    // 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
);
$price_book_id = 'price_book_id_example'; // string | The price book id
$price_book_product_collection = new \Vend\Model\PriceBookProductCollection(); // \Vend\Model\PriceBookProductCollection

try {
    $result = $apiInstance->updatePriceBookProducts($price_book_id, $price_book_product_collection);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PriceBooksApi->updatePriceBookProducts: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **price_book_id** | **string**| The price book id | |
| **price_book_product_collection** | [**\Vend\Model\PriceBookProductCollection**](../Model/PriceBookProductCollection.md)|  | |

### Return type

[**\Vend\Model\PriceBookProductsUpdateResponse**](../Model/PriceBookProductsUpdateResponse.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/json`
- **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)

## `updatePriceBookProductsWithPutOp()`

```php
updatePriceBookProductsWithPutOp($price_book_id, $price_book_product_collection): \Vend\Model\PriceBookProductsUpdateResponse
```

Update the products in a price book

Update price book products.  > **Note**: When adding a product the retail price is the tax exclusive price of the product if your store is tax exclusive, and tax inclusive if your store is tax inclusive. The returned value is always tax exclusive.  > **Note**: The request body may not contain more than 100 price book products.  🔒 Requires: `products:write:price_books` `products:read` scopes

### Example

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


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


$apiInstance = new Vend\Api\PriceBooksApi(
    // 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
);
$price_book_id = 'price_book_id_example'; // string | The price book id
$price_book_product_collection = new \Vend\Model\PriceBookProductCollection(); // \Vend\Model\PriceBookProductCollection

try {
    $result = $apiInstance->updatePriceBookProductsWithPutOp($price_book_id, $price_book_product_collection);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PriceBooksApi->updatePriceBookProductsWithPutOp: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **price_book_id** | **string**| The price book id | |
| **price_book_product_collection** | [**\Vend\Model\PriceBookProductCollection**](../Model/PriceBookProductCollection.md)|  | |

### Return type

[**\Vend\Model\PriceBookProductsUpdateResponse**](../Model/PriceBookProductsUpdateResponse.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/json`
- **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)

## `updatePriceBookV3()`

```php
updatePriceBookV3($id, $price_book_update_request): \Vend\Model\PriceBookCreateResponse
```

Update a single price book

Update a price book by ID  🔒 Requires: `products:write:price_books` `customers:read` scopes

### Example

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


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


$apiInstance = new Vend\Api\PriceBooksApi(
    // 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
);
$id = 'id_example'; // string | The price book id
$price_book_update_request = new \Vend\Model\PriceBookUpdateRequest(); // \Vend\Model\PriceBookUpdateRequest

try {
    $result = $apiInstance->updatePriceBookV3($id, $price_book_update_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PriceBooksApi->updatePriceBookV3: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| The price book id | |
| **price_book_update_request** | [**\Vend\Model\PriceBookUpdateRequest**](../Model/PriceBookUpdateRequest.md)|  | |

### Return type

[**\Vend\Model\PriceBookCreateResponse**](../Model/PriceBookCreateResponse.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/json`
- **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)
