# Vend202601\ProductTypesApi



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 |
| ------------- | ------------- | ------------- |
| [**getProductTypeByID()**](ProductTypesApi.md#getProductTypeByID) | **GET** /product_types/{product_type_id} | Get a single product type |
| [**listProductTypes()**](ProductTypesApi.md#listProductTypes) | **GET** /product_types | List product types |


## `getProductTypeByID()`

```php
getProductTypeByID($product_type_id): \Vend202601\Model\ProductTypeResponse
```

Get a single product type

Returns a single product type with a given ID.  🔒 Requires: `products: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\ProductTypesApi(
    // 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_type_id = 'product_type_id_example'; // string | The product type id

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_type_id** | **string**| The product type id | |

### Return type

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

## `listProductTypes()`

```php
listProductTypes($after, $before, $page_size): \Vend202601\Model\ProductTypeCollection
```

List product types

**DEPRECATED**  We recommend using the product_categories endpoint instead.  Returns a paginated list of product types.  🔒 Requires: `products: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\ProductTypesApi(
    // 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->listProductTypes($after, $before, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductTypesApi->listProductTypes: ', $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

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