# Sylius\ProvinceApi

Resource &#39;Province&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminCountryProvinceGet()**](ProvinceApi.md#syliusApiAdminCountryProvinceGet) | **GET** /api/v2/admin/countries/{countryCode}/provinces/{provinceCode} | Retrieves a Province resource. |
| [**syliusApiAdminCountryProvinceGetCollection()**](ProvinceApi.md#syliusApiAdminCountryProvinceGetCollection) | **GET** /api/v2/admin/countries/{code}/provinces | Retrieves the collection of Province resources. |
| [**syliusApiAdminCountryProvincePut()**](ProvinceApi.md#syliusApiAdminCountryProvincePut) | **PUT** /api/v2/admin/countries/{countryCode}/provinces/{provinceCode} | Replaces the Province resource. |
| [**syliusApiShopCountryProvinceGet()**](ProvinceApi.md#syliusApiShopCountryProvinceGet) | **GET** /api/v2/shop/countries/{countryCode}/provinces/{provinceCode} | Retrieves a Province resource. |


## `syliusApiAdminCountryProvinceGet()`

```php
syliusApiAdminCountryProvinceGet($country_code, $province_code, $accept_language): \Sylius\Model\ProvinceJsonldSyliusAdminProvinceShow
```

Retrieves a Province resource.

Retrieves a Province 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\ProvinceApi(
    // 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
);
$country_code = 'country_code_example'; // string | Province identifier
$province_code = 'province_code_example'; // string | Province 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->syliusApiAdminCountryProvinceGet($country_code, $province_code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProvinceApi->syliusApiAdminCountryProvinceGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **country_code** | **string**| Province identifier | |
| **province_code** | **string**| Province 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\ProvinceJsonldSyliusAdminProvinceShow**](../Model/ProvinceJsonldSyliusAdminProvinceShow.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)

## `syliusApiAdminCountryProvinceGetCollection()`

```php
syliusApiAdminCountryProvinceGetCollection($code, $page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiAdminCountryProvinceGetCollection200Response
```

Retrieves the collection of Province resources.

Retrieves the collection of Province 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\ProvinceApi(
    // 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 | Province identifier
$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->syliusApiAdminCountryProvinceGetCollection($code, $page, $items_per_page, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProvinceApi->syliusApiAdminCountryProvinceGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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

## `syliusApiAdminCountryProvincePut()`

```php
syliusApiAdminCountryProvincePut($country_code, $province_code, $province_sylius_admin_province_update, $accept_language): \Sylius\Model\ProvinceJsonldSyliusAdminProvinceShow
```

Replaces the Province resource.

Replaces the Province 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\ProvinceApi(
    // 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
);
$country_code = 'country_code_example'; // string | Province identifier
$province_code = 'province_code_example'; // string | Province identifier
$province_sylius_admin_province_update = new \Sylius\Model\ProvinceSyliusAdminProvinceUpdate(); // \Sylius\Model\ProvinceSyliusAdminProvinceUpdate | The updated Province 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->syliusApiAdminCountryProvincePut($country_code, $province_code, $province_sylius_admin_province_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProvinceApi->syliusApiAdminCountryProvincePut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **country_code** | **string**| Province identifier | |
| **province_code** | **string**| Province identifier | |
| **province_sylius_admin_province_update** | [**\Sylius\Model\ProvinceSyliusAdminProvinceUpdate**](../Model/ProvinceSyliusAdminProvinceUpdate.md)| The updated Province 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\ProvinceJsonldSyliusAdminProvinceShow**](../Model/ProvinceJsonldSyliusAdminProvinceShow.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)

## `syliusApiShopCountryProvinceGet()`

```php
syliusApiShopCountryProvinceGet($country_code, $province_code, $accept_language): \Sylius\Model\ProvinceJsonldSyliusShopProvinceShow
```

Retrieves a Province resource.

Retrieves a Province 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\ProvinceApi(
    // 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
);
$country_code = 'country_code_example'; // string | Province identifier
$province_code = 'province_code_example'; // string | Province 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->syliusApiShopCountryProvinceGet($country_code, $province_code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProvinceApi->syliusApiShopCountryProvinceGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **country_code** | **string**| Province identifier | |
| **province_code** | **string**| Province 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\ProvinceJsonldSyliusShopProvinceShow**](../Model/ProvinceJsonldSyliusShopProvinceShow.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)
