# Sylius\OrderItemApi

Resource &#39;OrderItem&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminOrderItemGet()**](OrderItemApi.md#syliusApiAdminOrderItemGet) | **GET** /api/v2/admin/order-items/{id} | Retrieves a OrderItem resource. |
| [**syliusApiShopOrderOrderItemGet()**](OrderItemApi.md#syliusApiShopOrderOrderItemGet) | **GET** /api/v2/shop/orders/{tokenValue}/items/{id} | Retrieves a OrderItem resource. |
| [**syliusApiShopOrderOrderItemGetCollection()**](OrderItemApi.md#syliusApiShopOrderOrderItemGetCollection) | **GET** /api/v2/shop/orders/{tokenValue}/items | Retrieves the collection of OrderItem resources. |


## `syliusApiAdminOrderItemGet()`

```php
syliusApiAdminOrderItemGet($id, $accept_language): \Sylius\Model\OrderItemJsonldSyliusAdminOrderItemShow
```

Retrieves a OrderItem resource.

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

### Parameters

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

## `syliusApiShopOrderOrderItemGet()`

```php
syliusApiShopOrderOrderItemGet($token_value, $id, $accept_language): \Sylius\Model\OrderItemJsonldSyliusShopOrderItemShow
```

Retrieves a OrderItem resource.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **token_value** | **string**| OrderItem identifier | |
| **id** | **string**| OrderItem 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\OrderItemJsonldSyliusShopOrderItemShow**](../Model/OrderItemJsonldSyliusShopOrderItemShow.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)

## `syliusApiShopOrderOrderItemGetCollection()`

```php
syliusApiShopOrderOrderItemGetCollection($token_value, $page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiShopOrderOrderItemGetCollection200Response
```

Retrieves the collection of OrderItem resources.

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

### Parameters

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