# Sylius\AddressApi

Resource &#39;Address&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminAddressGet()**](AddressApi.md#syliusApiAdminAddressGet) | **GET** /api/v2/admin/addresses/{id} | Retrieves a Address resource. |
| [**syliusApiAdminAddressPut()**](AddressApi.md#syliusApiAdminAddressPut) | **PUT** /api/v2/admin/addresses/{id} | Replaces the Address resource. |
| [**syliusApiShopAddressDelete()**](AddressApi.md#syliusApiShopAddressDelete) | **DELETE** /api/v2/shop/addresses/{id} | Removes the Address resource. |
| [**syliusApiShopAddressGet()**](AddressApi.md#syliusApiShopAddressGet) | **GET** /api/v2/shop/addresses/{id} | Retrieves a Address resource. |
| [**syliusApiShopAddressGetCollection()**](AddressApi.md#syliusApiShopAddressGetCollection) | **GET** /api/v2/shop/addresses | Retrieves the collection of Address resources. |
| [**syliusApiShopAddressPost()**](AddressApi.md#syliusApiShopAddressPost) | **POST** /api/v2/shop/addresses | Creates a Address resource. |
| [**syliusApiShopAddressPut()**](AddressApi.md#syliusApiShopAddressPut) | **PUT** /api/v2/shop/addresses/{id} | Replaces the Address resource. |


## `syliusApiAdminAddressGet()`

```php
syliusApiAdminAddressGet($id, $accept_language): \Sylius\Model\AddressJsonldSyliusAdminAddressShow
```

Retrieves a Address resource.

Retrieves a Address 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\AddressApi(
    // 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
);
$id = 'id_example'; // string | Address 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->syliusApiAdminAddressGet($id, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->syliusApiAdminAddressGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Address 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\AddressJsonldSyliusAdminAddressShow**](../Model/AddressJsonldSyliusAdminAddressShow.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)

## `syliusApiAdminAddressPut()`

```php
syliusApiAdminAddressPut($id, $address_sylius_admin_address_update, $accept_language): \Sylius\Model\AddressJsonldSyliusAdminAddressShow
```

Replaces the Address resource.

Replaces the Address 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\AddressApi(
    // 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
);
$id = 'id_example'; // string | Address identifier
$address_sylius_admin_address_update = new \Sylius\Model\AddressSyliusAdminAddressUpdate(); // \Sylius\Model\AddressSyliusAdminAddressUpdate | The updated Address 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->syliusApiAdminAddressPut($id, $address_sylius_admin_address_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->syliusApiAdminAddressPut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Address identifier | |
| **address_sylius_admin_address_update** | [**\Sylius\Model\AddressSyliusAdminAddressUpdate**](../Model/AddressSyliusAdminAddressUpdate.md)| The updated Address 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\AddressJsonldSyliusAdminAddressShow**](../Model/AddressJsonldSyliusAdminAddressShow.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)

## `syliusApiShopAddressDelete()`

```php
syliusApiShopAddressDelete($id, $accept_language)
```

Removes the Address resource.

Removes the Address 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\AddressApi(
    // 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
);
$id = 'id_example'; // string | Address 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->syliusApiShopAddressDelete($id, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->syliusApiShopAddressDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Address 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)

## `syliusApiShopAddressGet()`

```php
syliusApiShopAddressGet($id, $accept_language): \Sylius\Model\AddressJsonldSyliusShopAddressShow
```

Retrieves a Address resource.

Retrieves a Address 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\AddressApi(
    // 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
);
$id = 'id_example'; // string | Address 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->syliusApiShopAddressGet($id, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->syliusApiShopAddressGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Address 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\AddressJsonldSyliusShopAddressShow**](../Model/AddressJsonldSyliusShopAddressShow.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)

## `syliusApiShopAddressGetCollection()`

```php
syliusApiShopAddressGetCollection($page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiShopAddressGetCollection200Response
```

Retrieves the collection of Address resources.

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

## `syliusApiShopAddressPost()`

```php
syliusApiShopAddressPost($address_sylius_shop_address_create, $accept_language): \Sylius\Model\AddressJsonldSyliusShopAddressShow
```

Creates a Address resource.

Creates a Address 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\AddressApi(
    // 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
);
$address_sylius_shop_address_create = new \Sylius\Model\AddressSyliusShopAddressCreate(); // \Sylius\Model\AddressSyliusShopAddressCreate | The new Address 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->syliusApiShopAddressPost($address_sylius_shop_address_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->syliusApiShopAddressPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **address_sylius_shop_address_create** | [**\Sylius\Model\AddressSyliusShopAddressCreate**](../Model/AddressSyliusShopAddressCreate.md)| The new Address 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\AddressJsonldSyliusShopAddressShow**](../Model/AddressJsonldSyliusShopAddressShow.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)

## `syliusApiShopAddressPut()`

```php
syliusApiShopAddressPut($id, $address_sylius_shop_address_update, $accept_language): \Sylius\Model\AddressJsonldSyliusShopAddressShow
```

Replaces the Address resource.

Replaces the Address 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\AddressApi(
    // 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
);
$id = 'id_example'; // string | Address identifier
$address_sylius_shop_address_update = new \Sylius\Model\AddressSyliusShopAddressUpdate(); // \Sylius\Model\AddressSyliusShopAddressUpdate | The updated Address 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->syliusApiShopAddressPut($id, $address_sylius_shop_address_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->syliusApiShopAddressPut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Address identifier | |
| **address_sylius_shop_address_update** | [**\Sylius\Model\AddressSyliusShopAddressUpdate**](../Model/AddressSyliusShopAddressUpdate.md)| The updated Address 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\AddressJsonldSyliusShopAddressShow**](../Model/AddressJsonldSyliusShopAddressShow.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)
