# Vend202601\ProductImagesApi



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 |
| ------------- | ------------- | ------------- |
| [**deleteProductImageByID()**](ProductImagesApi.md#deleteProductImageByID) | **DELETE** /product_images/{product_image_id} | Delete a product image |
| [**getProductImageDataByID()**](ProductImagesApi.md#getProductImageDataByID) | **GET** /product_images/{product_image_id} | Get a single product image data |
| [**setImagePosition()**](ProductImagesApi.md#setImagePosition) | **PUT** /product_images/{product_image_id} | Set image position |


## `deleteProductImageByID()`

```php
deleteProductImageByID($product_image_id)
```

Delete a product image

Deletes the product image with the requested ID.  🔒 Requires: `products: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\ProductImagesApi(
    // 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_image_id = 'product_image_id_example'; // string | The product image id

try {
    $apiInstance->deleteProductImageByID($product_image_id);
} catch (Exception $e) {
    echo 'Exception when calling ProductImagesApi->deleteProductImageByID: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_image_id** | **string**| The product image 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)

## `getProductImageDataByID()`

```php
getProductImageDataByID($product_image_id): \Vend202601\Model\ImageResponse
```

Get a single product image data

Returns the metadata for a single product image with a given ID. This method is useful for checking the status of an image after it was uploaded.  🔒 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\ProductImagesApi(
    // 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_image_id = 'product_image_id_example'; // string | The product image id

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_image_id** | **string**| The product image id | |

### Return type

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

## `setImagePosition()`

```php
setImagePosition($product_image_id, $image_position): \Vend202601\Model\ImageResponse
```

Set image position

Allows for changing the image position in the list  🔒 Requires: `products: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\ProductImagesApi(
    // 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_image_id = 'product_image_id_example'; // string | The product image id
$image_position = new \Vend202601\Model\ImagePosition(); // \Vend202601\Model\ImagePosition

try {
    $result = $apiInstance->setImagePosition($product_image_id, $image_position);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductImagesApi->setImagePosition: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_image_id** | **string**| The product image id | |
| **image_position** | [**\Vend202601\Model\ImagePosition**](../Model/ImagePosition.md)|  | |

### Return type

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