# Vend202601\SerialNumbersApi



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 |
| ------------- | ------------- | ------------- |
| [**createSerialnumber()**](SerialNumbersApi.md#createSerialnumber) | **POST** /serialnumbers | Create a serial number |
| [**deleteSerialnumber()**](SerialNumbersApi.md#deleteSerialnumber) | **DELETE** /serialnumbers/{serialnumber_id} | Delete a serial number |
| [**getSerialnumber()**](SerialNumbersApi.md#getSerialnumber) | **GET** /serialnumbers/{serialnumber_id} | Get a single serial number |
| [**getSerialnumbers()**](SerialNumbersApi.md#getSerialnumbers) | **GET** /serialnumbers | List serial numbers |


## `createSerialnumber()`

```php
createSerialnumber($serial_number_request): \Vend202601\Model\SerialNumberResponse
```

Create a serial number

Creates a serial number.  🔒 Requires: `serial_numbers:write` 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\SerialNumbersApi(
    // 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
);
$serial_number_request = new \Vend202601\Model\SerialNumberRequest(); // \Vend202601\Model\SerialNumberRequest

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **serial_number_request** | [**\Vend202601\Model\SerialNumberRequest**](../Model/SerialNumberRequest.md)|  | |

### Return type

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

## `deleteSerialnumber()`

```php
deleteSerialnumber($serialnumber_id)
```

Delete a serial number

Deletes a serial number.  🔒 Requires: `serial_numbers:write` 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\SerialNumbersApi(
    // 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
);
$serialnumber_id = 'serialnumber_id_example'; // string | The serial number id

try {
    $apiInstance->deleteSerialnumber($serialnumber_id);
} catch (Exception $e) {
    echo 'Exception when calling SerialNumbersApi->deleteSerialnumber: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **serialnumber_id** | **string**| The serial number id | |

### Return type

void (empty response body)

### Authorization

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

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

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

## `getSerialnumber()`

```php
getSerialnumber($serialnumber_id): \Vend202601\Model\SerialNumberResponse
```

Get a single serial number

Returns a single serial number.  🔒 Requires: `serial_numbers: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\SerialNumbersApi(
    // 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
);
$serialnumber_id = 'serialnumber_id_example'; // string | The serial number id

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **serialnumber_id** | **string**| The serial number id | |

### Return type

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

## `getSerialnumbers()`

```php
getSerialnumbers($product_id, $outlet_id, $sale_id, $line_item_id, $after, $before, $page_size): \Vend202601\Model\SerialNumberCollection
```

List serial numbers

Returns a paginated list of serial numbers.  🔒 Requires: `serial_numbers: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\SerialNumbersApi(
    // 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 | A product ID. This filters the serial numbers to only include ones on this product.
$outlet_id = 'outlet_id_example'; // string | An outlet ID. This filters the serial numbers to only include ones on this outlet.
$sale_id = 'sale_id_example'; // string | A sale ID. This filters the serial numbers to only include ones that were sold in the specified sale.
$line_item_id = 'line_item_id_example'; // string | A line item ID. This filters the serial numbers to only include ones sold in the specified line item.
$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->getSerialnumbers($product_id, $outlet_id, $sale_id, $line_item_id, $after, $before, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SerialNumbersApi->getSerialnumbers: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**| A product ID. This filters the serial numbers to only include ones on this product. | [optional] |
| **outlet_id** | **string**| An outlet ID. This filters the serial numbers to only include ones on this outlet. | [optional] |
| **sale_id** | **string**| A sale ID. This filters the serial numbers to only include ones that were sold in the specified sale. | [optional] |
| **line_item_id** | **string**| A line item ID. This filters the serial numbers to only include ones sold in the specified line item. | [optional] |
| **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\SerialNumberCollection**](../Model/SerialNumberCollection.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)
