# Vend202601\SuppliersApi

Supplier 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 |
| ------------- | ------------- | ------------- |
| [**createSupplier()**](SuppliersApi.md#createSupplier) | **POST** /suppliers | Create new supplier |
| [**deleteSupplierById()**](SuppliersApi.md#deleteSupplierById) | **DELETE** /suppliers/{supplier_id} | Delete a single supplier |
| [**getSupplierByID()**](SuppliersApi.md#getSupplierByID) | **GET** /suppliers/{supplier_id} | Get a single supplier |
| [**listSuppliers()**](SuppliersApi.md#listSuppliers) | **GET** /suppliers | List suppliers |
| [**updateSupplierByID()**](SuppliersApi.md#updateSupplierByID) | **PUT** /suppliers/{supplier_id} | Update a supplier |


## `createSupplier()`

```php
createSupplier($create_supplier_request): \Vend202601\Model\CreateSupplier200Response
```

Create new supplier

Creates a new supplier.  🔒 Requires: `suppliers: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\SuppliersApi(
    // 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
);
$create_supplier_request = new \Vend202601\Model\CreateSupplierRequest(); // \Vend202601\Model\CreateSupplierRequest

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **create_supplier_request** | [**\Vend202601\Model\CreateSupplierRequest**](../Model/CreateSupplierRequest.md)|  | [optional] |

### Return type

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

## `deleteSupplierById()`

```php
deleteSupplierById($supplier_id): \Vend202601\Model\DeleteSupplierById200Response
```

Delete a single supplier

Deletes a supplier. If there are products associated with the supplier, the products will be disassociated from the supplier.  🔒 Requires: `suppliers: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\SuppliersApi(
    // 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
);
$supplier_id = 'supplier_id_example'; // string | The supplier id.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **supplier_id** | **string**| The supplier id. | |

### Return type

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

## `getSupplierByID()`

```php
getSupplierByID($supplier_id): \Vend202601\Model\SupplierResponse
```

Get a single supplier

Returns a single supplier with a given ID.  🔒 Requires: `suppliers: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\SuppliersApi(
    // 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
);
$supplier_id = 'supplier_id_example'; // string | The supplier id

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **supplier_id** | **string**| The supplier id | |

### Return type

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

## `listSuppliers()`

```php
listSuppliers($after, $before, $page_size): \Vend202601\Model\SupplierCollection
```

List suppliers

Returns a paginated list of suppliers.  🔒 Requires: `suppliers: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\SuppliersApi(
    // 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->listSuppliers($after, $before, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SuppliersApi->listSuppliers: ', $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\SupplierCollection**](../Model/SupplierCollection.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)

## `updateSupplierByID()`

```php
updateSupplierByID($supplier_id, $create_supplier_request): \Vend202601\Model\UpdateSupplierByID200Response
```

Update a supplier

Updates a supplier.  🔒 Requires: `suppliers: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\SuppliersApi(
    // 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
);
$supplier_id = 'supplier_id_example'; // string | The supplier id
$create_supplier_request = new \Vend202601\Model\CreateSupplierRequest(); // \Vend202601\Model\CreateSupplierRequest

try {
    $result = $apiInstance->updateSupplierByID($supplier_id, $create_supplier_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SuppliersApi->updateSupplierByID: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **supplier_id** | **string**| The supplier id | |
| **create_supplier_request** | [**\Vend202601\Model\CreateSupplierRequest**](../Model/CreateSupplierRequest.md)|  | [optional] |

### Return type

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