# Sylius\ProductAssociationTypeApi

Resource &#39;ProductAssociationType&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminProductAssociationTypeDelete()**](ProductAssociationTypeApi.md#syliusApiAdminProductAssociationTypeDelete) | **DELETE** /api/v2/admin/product-association-types/{code} | Removes the ProductAssociationType resource. |
| [**syliusApiAdminProductAssociationTypeGet()**](ProductAssociationTypeApi.md#syliusApiAdminProductAssociationTypeGet) | **GET** /api/v2/admin/product-association-types/{code} | Retrieves a ProductAssociationType resource. |
| [**syliusApiAdminProductAssociationTypeGetCollection()**](ProductAssociationTypeApi.md#syliusApiAdminProductAssociationTypeGetCollection) | **GET** /api/v2/admin/product-association-types | Retrieves the collection of ProductAssociationType resources. |
| [**syliusApiAdminProductAssociationTypePost()**](ProductAssociationTypeApi.md#syliusApiAdminProductAssociationTypePost) | **POST** /api/v2/admin/product-association-types | Creates a ProductAssociationType resource. |
| [**syliusApiAdminProductAssociationTypePut()**](ProductAssociationTypeApi.md#syliusApiAdminProductAssociationTypePut) | **PUT** /api/v2/admin/product-association-types/{code} | Replaces the ProductAssociationType resource. |
| [**syliusApiShopProductAssociationTypeGet()**](ProductAssociationTypeApi.md#syliusApiShopProductAssociationTypeGet) | **GET** /api/v2/shop/product-association-types/{code} | Retrieves a ProductAssociationType resource. |
| [**syliusApiShopProductAssociationTypeGetCollection()**](ProductAssociationTypeApi.md#syliusApiShopProductAssociationTypeGetCollection) | **GET** /api/v2/shop/product-association-types | Retrieves the collection of ProductAssociationType resources. |


## `syliusApiAdminProductAssociationTypeDelete()`

```php
syliusApiAdminProductAssociationTypeDelete($code, $accept_language)
```

Removes the ProductAssociationType resource.

Removes the ProductAssociationType 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\ProductAssociationTypeApi(
    // 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 | ProductAssociationType 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->syliusApiAdminProductAssociationTypeDelete($code, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling ProductAssociationTypeApi->syliusApiAdminProductAssociationTypeDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductAssociationType 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)

## `syliusApiAdminProductAssociationTypeGet()`

```php
syliusApiAdminProductAssociationTypeGet($code, $accept_language): \Sylius\Model\ProductAssociationTypeJsonldSyliusAdminProductAssociationTypeShow
```

Retrieves a ProductAssociationType resource.

Retrieves a ProductAssociationType 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\ProductAssociationTypeApi(
    // 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 | ProductAssociationType 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 {
    $result = $apiInstance->syliusApiAdminProductAssociationTypeGet($code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductAssociationTypeApi->syliusApiAdminProductAssociationTypeGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductAssociationType 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

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

## `syliusApiAdminProductAssociationTypeGetCollection()`

```php
syliusApiAdminProductAssociationTypeGetCollection($page, $items_per_page, $order_code, $translations_name, $code, $accept_language): \Sylius\Model\SyliusApiAdminProductAssociationTypeGetCollection200Response
```

Retrieves the collection of ProductAssociationType resources.

Retrieves the collection of ProductAssociationType 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\ProductAssociationTypeApi(
    // 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
);
$page = 1; // int | The collection page number
$items_per_page = 30; // int | The number of items per page
$order_code = ''; // string | 
$translations_name = 'translations_name_example'; // string | 
$code = 'code_example'; // string | 
$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->syliusApiAdminProductAssociationTypeGetCollection($page, $items_per_page, $order_code, $translations_name, $code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductAssociationTypeApi->syliusApiAdminProductAssociationTypeGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **page** | **int**| The collection page number | [optional] [default to 1] |
| **items_per_page** | **int**| The number of items per page | [optional] [default to 30] |
| **order_code** | **string**|  | [optional] [default to &#39;&#39;] |
| **translations_name** | **string**|  | [optional] |
| **code** | **string**|  | [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\SyliusApiAdminProductAssociationTypeGetCollection200Response**](../Model/SyliusApiAdminProductAssociationTypeGetCollection200Response.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)

## `syliusApiAdminProductAssociationTypePost()`

```php
syliusApiAdminProductAssociationTypePost($product_association_type_sylius_admin_product_association_type_create, $accept_language): \Sylius\Model\ProductAssociationTypeJsonldSyliusAdminProductAssociationTypeShow
```

Creates a ProductAssociationType resource.

Creates a ProductAssociationType 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\ProductAssociationTypeApi(
    // 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_association_type_sylius_admin_product_association_type_create = new \Sylius\Model\ProductAssociationTypeSyliusAdminProductAssociationTypeCreate(); // \Sylius\Model\ProductAssociationTypeSyliusAdminProductAssociationTypeCreate | The new ProductAssociationType 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->syliusApiAdminProductAssociationTypePost($product_association_type_sylius_admin_product_association_type_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductAssociationTypeApi->syliusApiAdminProductAssociationTypePost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_association_type_sylius_admin_product_association_type_create** | [**\Sylius\Model\ProductAssociationTypeSyliusAdminProductAssociationTypeCreate**](../Model/ProductAssociationTypeSyliusAdminProductAssociationTypeCreate.md)| The new ProductAssociationType 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\ProductAssociationTypeJsonldSyliusAdminProductAssociationTypeShow**](../Model/ProductAssociationTypeJsonldSyliusAdminProductAssociationTypeShow.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)

## `syliusApiAdminProductAssociationTypePut()`

```php
syliusApiAdminProductAssociationTypePut($code, $product_association_type_sylius_admin_product_association_type_update, $accept_language): \Sylius\Model\ProductAssociationTypeJsonldSyliusAdminProductAssociationTypeShow
```

Replaces the ProductAssociationType resource.

Replaces the ProductAssociationType 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\ProductAssociationTypeApi(
    // 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 | ProductAssociationType identifier
$product_association_type_sylius_admin_product_association_type_update = new \Sylius\Model\ProductAssociationTypeSyliusAdminProductAssociationTypeUpdate(); // \Sylius\Model\ProductAssociationTypeSyliusAdminProductAssociationTypeUpdate | The updated ProductAssociationType 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->syliusApiAdminProductAssociationTypePut($code, $product_association_type_sylius_admin_product_association_type_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductAssociationTypeApi->syliusApiAdminProductAssociationTypePut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductAssociationType identifier | |
| **product_association_type_sylius_admin_product_association_type_update** | [**\Sylius\Model\ProductAssociationTypeSyliusAdminProductAssociationTypeUpdate**](../Model/ProductAssociationTypeSyliusAdminProductAssociationTypeUpdate.md)| The updated ProductAssociationType 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\ProductAssociationTypeJsonldSyliusAdminProductAssociationTypeShow**](../Model/ProductAssociationTypeJsonldSyliusAdminProductAssociationTypeShow.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)

## `syliusApiShopProductAssociationTypeGet()`

```php
syliusApiShopProductAssociationTypeGet($code, $accept_language): \Sylius\Model\ProductAssociationTypeJsonldSyliusShopProductAssociationTypeShow
```

Retrieves a ProductAssociationType resource.

Retrieves a ProductAssociationType 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\ProductAssociationTypeApi(
    // 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 | ProductAssociationType 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 {
    $result = $apiInstance->syliusApiShopProductAssociationTypeGet($code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductAssociationTypeApi->syliusApiShopProductAssociationTypeGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductAssociationType 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

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

## `syliusApiShopProductAssociationTypeGetCollection()`

```php
syliusApiShopProductAssociationTypeGetCollection($page, $items_per_page, $product_code, $accept_language): \Sylius\Model\SyliusApiShopProductAssociationTypeGetCollection200Response
```

Retrieves the collection of ProductAssociationType resources.

Retrieves the collection of ProductAssociationType 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\ProductAssociationTypeApi(
    // 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
);
$page = 1; // int | The collection page number
$items_per_page = 30; // int | The number of items per page
$product_code = 'product_code_example'; // string | 
$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->syliusApiShopProductAssociationTypeGetCollection($page, $items_per_page, $product_code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductAssociationTypeApi->syliusApiShopProductAssociationTypeGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **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_code** | **string**|  | [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\SyliusApiShopProductAssociationTypeGetCollection200Response**](../Model/SyliusApiShopProductAssociationTypeGetCollection200Response.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)
