# Sylius\ShippingCategoryApi

Resource &#39;ShippingCategory&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminShippingCategoryDelete()**](ShippingCategoryApi.md#syliusApiAdminShippingCategoryDelete) | **DELETE** /api/v2/admin/shipping-categories/{code} | Removes the ShippingCategory resource. |
| [**syliusApiAdminShippingCategoryGet()**](ShippingCategoryApi.md#syliusApiAdminShippingCategoryGet) | **GET** /api/v2/admin/shipping-categories/{code} | Retrieves a ShippingCategory resource. |
| [**syliusApiAdminShippingCategoryGetCollection()**](ShippingCategoryApi.md#syliusApiAdminShippingCategoryGetCollection) | **GET** /api/v2/admin/shipping-categories | Retrieves the collection of ShippingCategory resources. |
| [**syliusApiAdminShippingCategoryPost()**](ShippingCategoryApi.md#syliusApiAdminShippingCategoryPost) | **POST** /api/v2/admin/shipping-categories | Creates a ShippingCategory resource. |
| [**syliusApiAdminShippingCategoryPut()**](ShippingCategoryApi.md#syliusApiAdminShippingCategoryPut) | **PUT** /api/v2/admin/shipping-categories/{code} | Replaces the ShippingCategory resource. |


## `syliusApiAdminShippingCategoryDelete()`

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

Removes the ShippingCategory resource.

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

### Parameters

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

## `syliusApiAdminShippingCategoryGet()`

```php
syliusApiAdminShippingCategoryGet($code, $accept_language): \Sylius\Model\ShippingCategoryJsonldSyliusAdminShippingCategoryShow
```

Retrieves a ShippingCategory resource.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ShippingCategory 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\ShippingCategoryJsonldSyliusAdminShippingCategoryShow**](../Model/ShippingCategoryJsonldSyliusAdminShippingCategoryShow.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)

## `syliusApiAdminShippingCategoryGetCollection()`

```php
syliusApiAdminShippingCategoryGetCollection($page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiAdminShippingCategoryGetCollection200Response
```

Retrieves the collection of ShippingCategory resources.

Retrieves the collection of ShippingCategory 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\ShippingCategoryApi(
    // 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
$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->syliusApiAdminShippingCategoryGetCollection($page, $items_per_page, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShippingCategoryApi->syliusApiAdminShippingCategoryGetCollection: ', $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] |
| **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\SyliusApiAdminShippingCategoryGetCollection200Response**](../Model/SyliusApiAdminShippingCategoryGetCollection200Response.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)

## `syliusApiAdminShippingCategoryPost()`

```php
syliusApiAdminShippingCategoryPost($shipping_category_sylius_admin_shipping_category_create, $accept_language): \Sylius\Model\ShippingCategoryJsonldSyliusAdminShippingCategoryShow
```

Creates a ShippingCategory resource.

Creates a ShippingCategory 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\ShippingCategoryApi(
    // 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
);
$shipping_category_sylius_admin_shipping_category_create = new \Sylius\Model\ShippingCategorySyliusAdminShippingCategoryCreate(); // \Sylius\Model\ShippingCategorySyliusAdminShippingCategoryCreate | The new ShippingCategory 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->syliusApiAdminShippingCategoryPost($shipping_category_sylius_admin_shipping_category_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShippingCategoryApi->syliusApiAdminShippingCategoryPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **shipping_category_sylius_admin_shipping_category_create** | [**\Sylius\Model\ShippingCategorySyliusAdminShippingCategoryCreate**](../Model/ShippingCategorySyliusAdminShippingCategoryCreate.md)| The new ShippingCategory 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\ShippingCategoryJsonldSyliusAdminShippingCategoryShow**](../Model/ShippingCategoryJsonldSyliusAdminShippingCategoryShow.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)

## `syliusApiAdminShippingCategoryPut()`

```php
syliusApiAdminShippingCategoryPut($code, $shipping_category_sylius_admin_shipping_category_update, $accept_language): \Sylius\Model\ShippingCategoryJsonldSyliusAdminShippingCategoryShow
```

Replaces the ShippingCategory resource.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ShippingCategory identifier | |
| **shipping_category_sylius_admin_shipping_category_update** | [**\Sylius\Model\ShippingCategorySyliusAdminShippingCategoryUpdate**](../Model/ShippingCategorySyliusAdminShippingCategoryUpdate.md)| The updated ShippingCategory 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\ShippingCategoryJsonldSyliusAdminShippingCategoryShow**](../Model/ShippingCategoryJsonldSyliusAdminShippingCategoryShow.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)
