# Sylius\ShipmentApi

Resource &#39;Shipment&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminOrderShipmentGetCollection()**](ShipmentApi.md#syliusApiAdminOrderShipmentGetCollection) | **GET** /api/v2/admin/orders/{tokenValue}/shipments | Retrieves the collection of Shipment resources. |
| [**syliusApiAdminShipmentGet()**](ShipmentApi.md#syliusApiAdminShipmentGet) | **GET** /api/v2/admin/shipments/{id} | Retrieves a Shipment resource. |
| [**syliusApiAdminShipmentGetCollection()**](ShipmentApi.md#syliusApiAdminShipmentGetCollection) | **GET** /api/v2/admin/shipments | Retrieves the collection of Shipment resources. |
| [**syliusApiAdminShipmentPatchShip()**](ShipmentApi.md#syliusApiAdminShipmentPatchShip) | **PATCH** /api/v2/admin/shipments/{id}/ship | Updates the Shipment resource. |
| [**syliusApiAdminShipmentPostResendConfirmationEmail()**](ShipmentApi.md#syliusApiAdminShipmentPostResendConfirmationEmail) | **POST** /api/v2/admin/shipments/{id}/resend-confirmation-email | Creates a Shipment resource. |
| [**syliusApiShopOrderShipmentGet()**](ShipmentApi.md#syliusApiShopOrderShipmentGet) | **GET** /api/v2/shop/orders/{tokenValue}/shipments/{shipmentId} | Retrieves a Shipment resource. |


## `syliusApiAdminOrderShipmentGetCollection()`

```php
syliusApiAdminOrderShipmentGetCollection($token_value, $page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiAdminOrderShipmentGetCollection200Response
```

Retrieves the collection of Shipment resources.

Retrieves the collection of Shipment 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\ShipmentApi(
    // 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
);
$token_value = 'token_value_example'; // string | Shipment 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->syliusApiAdminOrderShipmentGetCollection($token_value, $page, $items_per_page, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShipmentApi->syliusApiAdminOrderShipmentGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **token_value** | **string**| Shipment 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\SyliusApiAdminOrderShipmentGetCollection200Response**](../Model/SyliusApiAdminOrderShipmentGetCollection200Response.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)

## `syliusApiAdminShipmentGet()`

```php
syliusApiAdminShipmentGet($id, $accept_language): \Sylius\Model\ShipmentJsonldSyliusAdminShipmentShow
```

Retrieves a Shipment resource.

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

### Parameters

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

## `syliusApiAdminShipmentGetCollection()`

```php
syliusApiAdminShipmentGetCollection($page, $items_per_page, $state, $state2, $order_channel_code, $order_channel_code2, $method_code, $method_code2, $accept_language): \Sylius\Model\SyliusApiAdminShipmentGetCollection200Response
```

Retrieves the collection of Shipment resources.

Retrieves the collection of Shipment 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\ShipmentApi(
    // 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
$state = 'state_example'; // string | 
$state2 = array('state_example'); // string[] | 
$order_channel_code = 'order_channel_code_example'; // string | 
$order_channel_code2 = array('order_channel_code_example'); // string[] | 
$method_code = 'method_code_example'; // string | 
$method_code2 = array('method_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->syliusApiAdminShipmentGetCollection($page, $items_per_page, $state, $state2, $order_channel_code, $order_channel_code2, $method_code, $method_code2, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShipmentApi->syliusApiAdminShipmentGetCollection: ', $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] |
| **state** | **string**|  | [optional] |
| **state2** | [**string[]**](../Model/string.md)|  | [optional] |
| **order_channel_code** | **string**|  | [optional] |
| **order_channel_code2** | [**string[]**](../Model/string.md)|  | [optional] |
| **method_code** | **string**|  | [optional] |
| **method_code2** | [**string[]**](../Model/string.md)|  | [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\SyliusApiAdminShipmentGetCollection200Response**](../Model/SyliusApiAdminShipmentGetCollection200Response.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)

## `syliusApiAdminShipmentPatchShip()`

```php
syliusApiAdminShipmentPatchShip($id, $shipment_ship_shipment_sylius_admin_shipment_update_json_merge_patch, $accept_language)
```

Updates the Shipment resource.

Updates the Shipment 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\ShipmentApi(
    // 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 | Shipment identifier
$shipment_ship_shipment_sylius_admin_shipment_update_json_merge_patch = new \Sylius\Model\ShipmentShipShipmentSyliusAdminShipmentUpdateJsonMergePatch(); // \Sylius\Model\ShipmentShipShipmentSyliusAdminShipmentUpdateJsonMergePatch | The updated Shipment 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 {
    $apiInstance->syliusApiAdminShipmentPatchShip($id, $shipment_ship_shipment_sylius_admin_shipment_update_json_merge_patch, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling ShipmentApi->syliusApiAdminShipmentPatchShip: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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

void (empty response body)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/merge-patch+json`
- **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)

## `syliusApiAdminShipmentPostResendConfirmationEmail()`

```php
syliusApiAdminShipmentPostResendConfirmationEmail($id, $shipment_resend_shipment_confirmation_email, $accept_language)
```

Creates a Shipment resource.

Creates a Shipment 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\ShipmentApi(
    // 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 | Shipment identifier
$shipment_resend_shipment_confirmation_email = new \Sylius\Model\ShipmentResendShipmentConfirmationEmail(); // \Sylius\Model\ShipmentResendShipmentConfirmationEmail | The new Shipment 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 {
    $apiInstance->syliusApiAdminShipmentPostResendConfirmationEmail($id, $shipment_resend_shipment_confirmation_email, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling ShipmentApi->syliusApiAdminShipmentPostResendConfirmationEmail: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| Shipment identifier | |
| **shipment_resend_shipment_confirmation_email** | [**\Sylius\Model\ShipmentResendShipmentConfirmationEmail**](../Model/ShipmentResendShipmentConfirmationEmail.md)| The new Shipment 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

void (empty response body)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/ld+json`, `application/json`
- **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)

## `syliusApiShopOrderShipmentGet()`

```php
syliusApiShopOrderShipmentGet($token_value, $shipment_id, $accept_language): \Sylius\Model\ShipmentJsonldSyliusShopShipmentShow
```

Retrieves a Shipment resource.

Retrieves a Shipment 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\ShipmentApi(
    // 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
);
$token_value = 'token_value_example'; // string | Shipment identifier
$shipment_id = 'shipment_id_example'; // string | Shipment 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->syliusApiShopOrderShipmentGet($token_value, $shipment_id, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShipmentApi->syliusApiShopOrderShipmentGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **token_value** | **string**| Shipment identifier | |
| **shipment_id** | **string**| Shipment 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\ShipmentJsonldSyliusShopShipmentShow**](../Model/ShipmentJsonldSyliusShopShipmentShow.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)
