# Sylius\ProductImageApi

Resource &#39;ProductImage&#39; operations.

All URIs are relative to http://localhost, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminProductProductImageDelete()**](ProductImageApi.md#syliusApiAdminProductProductImageDelete) | **DELETE** /api/v2/admin/products/{code}/images/{id} | Removes the ProductImage resource. |
| [**syliusApiAdminProductProductImageGet()**](ProductImageApi.md#syliusApiAdminProductProductImageGet) | **GET** /api/v2/admin/products/{code}/images/{id} | Retrieves a ProductImage resource. |
| [**syliusApiAdminProductProductImageGetCollection()**](ProductImageApi.md#syliusApiAdminProductProductImageGetCollection) | **GET** /api/v2/admin/products/{code}/images | Retrieves the collection of ProductImage resources. |
| [**syliusApiAdminProductProductImagePut()**](ProductImageApi.md#syliusApiAdminProductProductImagePut) | **PUT** /api/v2/admin/products/{code}/images/{id} | Replaces the ProductImage resource. |
| [**syliusApiShopProductProductImageGet()**](ProductImageApi.md#syliusApiShopProductProductImageGet) | **GET** /api/v2/shop/products/{code}/images/{id} | Retrieves a ProductImage resource. |
| [**syliusApiShopProductProductImageGetCollection()**](ProductImageApi.md#syliusApiShopProductProductImageGetCollection) | **GET** /api/v2/shop/products/{code}/images | Retrieves the collection of ProductImage resources. |


## `syliusApiAdminProductProductImageDelete()`

```php
syliusApiAdminProductProductImageDelete($code, $id, $accept_language)
```

Removes the ProductImage resource.

Removes the ProductImage resource.

### Example

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


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


$apiInstance = new Sylius\Api\ProductImageApi(
    // 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
);
$code = 'code_example'; // string | ProductImage identifier
$id = 'id_example'; // string | ProductImage identifier
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $apiInstance->syliusApiAdminProductProductImageDelete($code, $id, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling ProductImageApi->syliusApiAdminProductProductImageDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductImage identifier | |
| **id** | **string**| ProductImage identifier | |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

void (empty response body)

### Authorization

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

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/ld+json`, `application/problem+json`, `application/json`

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

## `syliusApiAdminProductProductImageGet()`

```php
syliusApiAdminProductProductImageGet($code, $id, $image_filter, $accept_language): \Sylius\Model\ProductImageJsonldSyliusAdminProductImageShow
```

Retrieves a ProductImage resource.

Retrieves a ProductImage resource.

### Example

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


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


$apiInstance = new Sylius\Api\ProductImageApi(
    // 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
);
$code = 'code_example'; // string | ProductImage identifier
$id = 'id_example'; // string | ProductImage identifier
$image_filter = 'image_filter_example'; // string | Image filter to be applied on image resources.
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $result = $apiInstance->syliusApiAdminProductProductImageGet($code, $id, $image_filter, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductImageApi->syliusApiAdminProductProductImageGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductImage identifier | |
| **id** | **string**| ProductImage identifier | |
| **image_filter** | **string**| Image filter to be applied on image resources. | [optional] |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

[**\Sylius\Model\ProductImageJsonldSyliusAdminProductImageShow**](../Model/ProductImageJsonldSyliusAdminProductImageShow.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/ld+json`, `application/json`, `application/problem+json`

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

## `syliusApiAdminProductProductImageGetCollection()`

```php
syliusApiAdminProductProductImageGetCollection($code, $page, $items_per_page, $product_variants, $product_variants2, $product_variants_code, $product_variants_code2, $image_filter, $accept_language): \Sylius\Model\SyliusApiAdminProductProductImageGetCollection200Response
```

Retrieves the collection of ProductImage resources.

Retrieves the collection of ProductImage resources.

### Example

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


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


$apiInstance = new Sylius\Api\ProductImageApi(
    // 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
);
$code = 'code_example'; // string | ProductImage identifier
$page = 1; // int | The collection page number
$items_per_page = 30; // int | The number of items per page
$product_variants = 'product_variants_example'; // string | 
$product_variants2 = array('product_variants_example'); // string[] | 
$product_variants_code = 'product_variants_code_example'; // string | 
$product_variants_code2 = array('product_variants_code_example'); // string[] | 
$image_filter = 'image_filter_example'; // string | Image filter to be applied on image resources.
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $result = $apiInstance->syliusApiAdminProductProductImageGetCollection($code, $page, $items_per_page, $product_variants, $product_variants2, $product_variants_code, $product_variants_code2, $image_filter, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductImageApi->syliusApiAdminProductProductImageGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductImage identifier | |
| **page** | **int**| The collection page number | [optional] [default to 1] |
| **items_per_page** | **int**| The number of items per page | [optional] [default to 30] |
| **product_variants** | **string**|  | [optional] |
| **product_variants2** | [**string[]**](../Model/string.md)|  | [optional] |
| **product_variants_code** | **string**|  | [optional] |
| **product_variants_code2** | [**string[]**](../Model/string.md)|  | [optional] |
| **image_filter** | **string**| Image filter to be applied on image resources. | [optional] |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

[**\Sylius\Model\SyliusApiAdminProductProductImageGetCollection200Response**](../Model/SyliusApiAdminProductProductImageGetCollection200Response.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/ld+json`, `application/json`

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

## `syliusApiAdminProductProductImagePut()`

```php
syliusApiAdminProductProductImagePut($code, $id, $product_image_sylius_admin_product_image_update, $accept_language): \Sylius\Model\ProductImageJsonldSyliusAdminProductImageShow
```

Replaces the ProductImage resource.

Replaces the ProductImage resource.

### Example

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


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


$apiInstance = new Sylius\Api\ProductImageApi(
    // 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
);
$code = 'code_example'; // string | ProductImage identifier
$id = 'id_example'; // string | ProductImage identifier
$product_image_sylius_admin_product_image_update = new \Sylius\Model\ProductImageSyliusAdminProductImageUpdate(); // \Sylius\Model\ProductImageSyliusAdminProductImageUpdate | The updated ProductImage resource
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $result = $apiInstance->syliusApiAdminProductProductImagePut($code, $id, $product_image_sylius_admin_product_image_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductImageApi->syliusApiAdminProductProductImagePut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductImage identifier | |
| **id** | **string**| ProductImage identifier | |
| **product_image_sylius_admin_product_image_update** | [**\Sylius\Model\ProductImageSyliusAdminProductImageUpdate**](../Model/ProductImageSyliusAdminProductImageUpdate.md)| The updated ProductImage resource | |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

[**\Sylius\Model\ProductImageJsonldSyliusAdminProductImageShow**](../Model/ProductImageJsonldSyliusAdminProductImageShow.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/ld+json`, `application/json`
- **Accept**: `application/ld+json`, `application/json`, `application/problem+json`

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

## `syliusApiShopProductProductImageGet()`

```php
syliusApiShopProductProductImageGet($code, $id, $image_filter, $accept_language): \Sylius\Model\ProductImageJsonldSyliusShopProductImageShow
```

Retrieves a ProductImage resource.

Retrieves a ProductImage resource.

### Example

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


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


$apiInstance = new Sylius\Api\ProductImageApi(
    // 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
);
$code = 'code_example'; // string | ProductImage identifier
$id = 'id_example'; // string | ProductImage identifier
$image_filter = 'image_filter_example'; // string | Image filter to be applied on image resources.
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $result = $apiInstance->syliusApiShopProductProductImageGet($code, $id, $image_filter, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductImageApi->syliusApiShopProductProductImageGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductImage identifier | |
| **id** | **string**| ProductImage identifier | |
| **image_filter** | **string**| Image filter to be applied on image resources. | [optional] |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

[**\Sylius\Model\ProductImageJsonldSyliusShopProductImageShow**](../Model/ProductImageJsonldSyliusShopProductImageShow.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/ld+json`, `application/json`, `application/problem+json`

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

## `syliusApiShopProductProductImageGetCollection()`

```php
syliusApiShopProductProductImageGetCollection($code, $page, $items_per_page, $type, $type2, $image_filter, $accept_language): \Sylius\Model\SyliusApiShopProductProductImageGetCollection200Response
```

Retrieves the collection of ProductImage resources.

Retrieves the collection of ProductImage resources.

### Example

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


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


$apiInstance = new Sylius\Api\ProductImageApi(
    // 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
);
$code = 'code_example'; // string | ProductImage identifier
$page = 1; // int | The collection page number
$items_per_page = 30; // int | The number of items per page
$type = 'type_example'; // string | 
$type2 = array('type_example'); // string[] | 
$image_filter = 'image_filter_example'; // string | Image filter to be applied on image resources.
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $result = $apiInstance->syliusApiShopProductProductImageGetCollection($code, $page, $items_per_page, $type, $type2, $image_filter, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductImageApi->syliusApiShopProductProductImageGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductImage identifier | |
| **page** | **int**| The collection page number | [optional] [default to 1] |
| **items_per_page** | **int**| The number of items per page | [optional] [default to 30] |
| **type** | **string**|  | [optional] |
| **type2** | [**string[]**](../Model/string.md)|  | [optional] |
| **image_filter** | **string**| Image filter to be applied on image resources. | [optional] |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

[**\Sylius\Model\SyliusApiShopProductProductImageGetCollection200Response**](../Model/SyliusApiShopProductProductImageGetCollection200Response.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/ld+json`, `application/json`

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