# Faire\ProductsApi

Products

All URIs are relative to https://www.faire.com/external-api/v2, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**productPricesByProductVariantIdsPatch()**](ProductsApi.md#productPricesByProductVariantIdsPatch) | **PATCH** /product-prices/by-product-variant-ids | PATCH /product-prices/by-product-variant-ids |
| [**productPricesBySkusPatch()**](ProductsApi.md#productPricesBySkusPatch) | **PATCH** /product-prices/by-skus | PATCH /product-prices/by-skus |
| [**productsGet()**](ProductsApi.md#productsGet) | **GET** /products | GET /products |
| [**productsPost()**](ProductsApi.md#productsPost) | **POST** /products | POST /products |
| [**productsProductIdDelete()**](ProductsApi.md#productsProductIdDelete) | **DELETE** /products/{product_id} | DELETE /products/{product_id} |
| [**productsProductIdGet()**](ProductsApi.md#productsProductIdGet) | **GET** /products/{product_id} | GET /products/{product_id} |
| [**productsProductIdImagesImageIdDelete()**](ProductsApi.md#productsProductIdImagesImageIdDelete) | **DELETE** /products/{product_id}/images/{image_id} | DELETE /products/{product_id}/images/{image_id} |
| [**productsProductIdPatch()**](ProductsApi.md#productsProductIdPatch) | **PATCH** /products/{product_id} | PATCH /products/{product_id} |
| [**productsProductIdPrepacksBatchPost()**](ProductsApi.md#productsProductIdPrepacksBatchPost) | **POST** /products/{product_id}/prepacks/batch | POST /products/{product_id}/prepacks/batch |
| [**productsProductIdPrepacksGet()**](ProductsApi.md#productsProductIdPrepacksGet) | **GET** /products/{product_id}/prepacks | GET /products/{product_id}/prepacks |
| [**productsProductIdPrepacksPost()**](ProductsApi.md#productsProductIdPrepacksPost) | **POST** /products/{product_id}/prepacks | POST /products/{product_id}/prepacks |
| [**productsProductIdPrepacksPrepackIdDelete()**](ProductsApi.md#productsProductIdPrepacksPrepackIdDelete) | **DELETE** /products/{product_id}/prepacks/{prepack_id} | DELETE /products/{product_id}/prepacks/{prepack_id} |
| [**productsProductIdPrepacksPrepackIdGet()**](ProductsApi.md#productsProductIdPrepacksPrepackIdGet) | **GET** /products/{product_id}/prepacks/{prepack_id} | GET /products/{product_id}/prepacks/{prepack_id} |
| [**productsProductIdVariantOptionSetsPatch()**](ProductsApi.md#productsProductIdVariantOptionSetsPatch) | **PATCH** /products/{product_id}/variant-option-sets | PATCH /products/{product_id}/variant-option-sets |
| [**productsProductIdVariantsPost()**](ProductsApi.md#productsProductIdVariantsPost) | **POST** /products/{product_id}/variants | POST /products/{product_id}/variants |
| [**productsProductIdVariantsVariantIdDelete()**](ProductsApi.md#productsProductIdVariantsVariantIdDelete) | **DELETE** /products/{product_id}/variants/{variant_id} | DELETE /products/{product_id}/variants/{variant_id} |
| [**productsProductIdVariantsVariantIdImagesImageIdDelete()**](ProductsApi.md#productsProductIdVariantsVariantIdImagesImageIdDelete) | **DELETE** /products/{product_id}/variants/{variant_id}/images/{image_id} | DELETE /products/{product_id}/variants/{variant_id}/images/{image_id} |
| [**productsProductIdVariantsVariantIdPatch()**](ProductsApi.md#productsProductIdVariantsVariantIdPatch) | **PATCH** /products/{product_id}/variants/{variant_id} | PATCH /products/{product_id}/variants/{variant_id} |
| [**productsReviewsGet()**](ProductsApi.md#productsReviewsGet) | **GET** /products/reviews | GET /products/reviews |
| [**productsTypesGet()**](ProductsApi.md#productsTypesGet) | **GET** /products/types | GET /products/types |
| [**productsUploadImagePost()**](ProductsApi.md#productsUploadImagePost) | **POST** /products/upload-image | POST /products/upload-image |
| [**productsVariantsInventoryLevelsByProductVariantIdsPatch()**](ProductsApi.md#productsVariantsInventoryLevelsByProductVariantIdsPatch) | **PATCH** /products/variants/inventory-levels-by-product-variant-ids | PATCH /products/variants/inventory-levels-by-product-variant-ids |
| [**productsVariantsInventoryLevelsBySkusPatch()**](ProductsApi.md#productsVariantsInventoryLevelsBySkusPatch) | **PATCH** /products/variants/inventory-levels-by-skus | PATCH /products/variants/inventory-levels-by-skus |


## `productPricesByProductVariantIdsPatch()`

```php
productPricesByProductVariantIdsPatch($update_product_prices_by_product_variant_ids_request_v2): \Faire\Model\UpdateProductPricesResponseV2
```

PATCH /product-prices/by-product-variant-ids

This endpoint updates prices for multiple product variants in a single request, identified by their product variant IDs.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$update_product_prices_by_product_variant_ids_request_v2 = new \Faire\Model\UpdateProductPricesByProductVariantIdsRequestV2(); // \Faire\Model\UpdateProductPricesByProductVariantIdsRequestV2

try {
    $result = $apiInstance->productPricesByProductVariantIdsPatch($update_product_prices_by_product_variant_ids_request_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productPricesByProductVariantIdsPatch: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **update_product_prices_by_product_variant_ids_request_v2** | [**\Faire\Model\UpdateProductPricesByProductVariantIdsRequestV2**](../Model/UpdateProductPricesByProductVariantIdsRequestV2.md)|  | |

### Return type

[**\Faire\Model\UpdateProductPricesResponseV2**](../Model/UpdateProductPricesResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productPricesBySkusPatch()`

```php
productPricesBySkusPatch($update_product_prices_by_skus_request_v2): \Faire\Model\UpdateProductPricesResponseV2
```

PATCH /product-prices/by-skus

This endpoint updates prices for multiple product variants in a single request, identified by their SKUs.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$update_product_prices_by_skus_request_v2 = new \Faire\Model\UpdateProductPricesBySkusRequestV2(); // \Faire\Model\UpdateProductPricesBySkusRequestV2

try {
    $result = $apiInstance->productPricesBySkusPatch($update_product_prices_by_skus_request_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productPricesBySkusPatch: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **update_product_prices_by_skus_request_v2** | [**\Faire\Model\UpdateProductPricesBySkusRequestV2**](../Model/UpdateProductPricesBySkusRequestV2.md)|  | |

### Return type

[**\Faire\Model\UpdateProductPricesResponseV2**](../Model/UpdateProductPricesResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsGet()`

```php
productsGet($limit, $page, $updated_at_min, $sku, $include_deleted, $cursor): \Faire\Model\GetExternalProductsResponseV2
```

GET /products

This endpoint retrieves a list of products, ordered ascending by *updated_at*. By default, it only returns products that are not deleted.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$limit = 56; // int
$page = 56; // int
$updated_at_min = 'updated_at_min_example'; // string
$sku = 'sku_example'; // string
$include_deleted = True; // bool
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->productsGet($limit, $page, $updated_at_min, $sku, $include_deleted, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **limit** | **int**|  | [optional] |
| **page** | **int**|  | [optional] |
| **updated_at_min** | **string**|  | [optional] |
| **sku** | **string**|  | [optional] |
| **include_deleted** | **bool**|  | [optional] |
| **cursor** | **string**|  | [optional] |

### Return type

[**\Faire\Model\GetExternalProductsResponseV2**](../Model/GetExternalProductsResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsPost()`

```php
productsPost($external_product_v2): \Faire\Model\ExternalProductV2
```

POST /products

This creates a single product in the specified lifecycle_state, with a sale_state of FOR_SALE that is preorderable.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$external_product_v2 = new \Faire\Model\ExternalProductV2(); // \Faire\Model\ExternalProductV2

try {
    $result = $apiInstance->productsPost($external_product_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **external_product_v2** | [**\Faire\Model\ExternalProductV2**](../Model/ExternalProductV2.md)|  | |

### Return type

[**\Faire\Model\ExternalProductV2**](../Model/ExternalProductV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdDelete()`

```php
productsProductIdDelete($product_id)
```

DELETE /products/{product_id}

This endpoint deletes a single product given an ID. This means that the product will have its lifecycle_state set to DELETED and will no longer be visible on Faire.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string

try {
    $apiInstance->productsProductIdDelete($product_id);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |

### Return type

void (empty response body)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdGet()`

```php
productsProductIdGet($product_id): \Faire\Model\ExternalProductV2
```

GET /products/{product_id}

This endpoint retrieves a single product given an ID, regardless of state (active or deleted).

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string

try {
    $result = $apiInstance->productsProductIdGet($product_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |

### Return type

[**\Faire\Model\ExternalProductV2**](../Model/ExternalProductV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdImagesImageIdDelete()`

```php
productsProductIdImagesImageIdDelete($product_id, $image_id)
```

DELETE /products/{product_id}/images/{image_id}

Removes an image from a product. To remove images from a variant, see Delete image from variant. Published products need at least one image. If you try to remove the last image, this endpoint returns 400 Bad Request.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$image_id = 'image_id_example'; // string

try {
    $apiInstance->productsProductIdImagesImageIdDelete($product_id, $image_id);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdImagesImageIdDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **image_id** | **string**|  | |

### Return type

void (empty response body)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdPatch()`

```php
productsProductIdPatch($product_id, $external_product_v2): \Faire\Model\ExternalProductV2
```

PATCH /products/{product_id}

This updates a single product. Variants can be updated/created with this endpoint, but prepacks must use the prepack APIs.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$external_product_v2 = new \Faire\Model\ExternalProductV2(); // \Faire\Model\ExternalProductV2

try {
    $result = $apiInstance->productsProductIdPatch($product_id, $external_product_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdPatch: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **external_product_v2** | [**\Faire\Model\ExternalProductV2**](../Model/ExternalProductV2.md)|  | |

### Return type

[**\Faire\Model\ExternalProductV2**](../Model/ExternalProductV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdPrepacksBatchPost()`

```php
productsProductIdPrepacksBatchPost($product_id, $create_external_prepacks_request_v2): \Faire\Model\CreateExternalPrepacksResponseV2
```

POST /products/{product_id}/prepacks/batch

Creates multiple prepacks for a product in a single request.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$create_external_prepacks_request_v2 = new \Faire\Model\CreateExternalPrepacksRequestV2(); // \Faire\Model\CreateExternalPrepacksRequestV2

try {
    $result = $apiInstance->productsProductIdPrepacksBatchPost($product_id, $create_external_prepacks_request_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdPrepacksBatchPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **create_external_prepacks_request_v2** | [**\Faire\Model\CreateExternalPrepacksRequestV2**](../Model/CreateExternalPrepacksRequestV2.md)|  | |

### Return type

[**\Faire\Model\CreateExternalPrepacksResponseV2**](../Model/CreateExternalPrepacksResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdPrepacksGet()`

```php
productsProductIdPrepacksGet($product_id): \Faire\Model\GetExternalPrepacksResponseV2
```

GET /products/{product_id}/prepacks

This endpoint gets all active prepacks of the product specified in the URL path.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string

try {
    $result = $apiInstance->productsProductIdPrepacksGet($product_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdPrepacksGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |

### Return type

[**\Faire\Model\GetExternalPrepacksResponseV2**](../Model/GetExternalPrepacksResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdPrepacksPost()`

```php
productsProductIdPrepacksPost($product_id, $external_prepack_v2): \Faire\Model\ExternalPrepackV2
```

POST /products/{product_id}/prepacks

Creates a prepack for a product.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$external_prepack_v2 = new \Faire\Model\ExternalPrepackV2(); // \Faire\Model\ExternalPrepackV2

try {
    $result = $apiInstance->productsProductIdPrepacksPost($product_id, $external_prepack_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdPrepacksPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **external_prepack_v2** | [**\Faire\Model\ExternalPrepackV2**](../Model/ExternalPrepackV2.md)|  | |

### Return type

[**\Faire\Model\ExternalPrepackV2**](../Model/ExternalPrepackV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdPrepacksPrepackIdDelete()`

```php
productsProductIdPrepacksPrepackIdDelete($product_id, $prepack_id)
```

DELETE /products/{product_id}/prepacks/{prepack_id}

This endpoint deletes a specified prepack. Deleted prepacks cannot be re-activated.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$prepack_id = 'prepack_id_example'; // string

try {
    $apiInstance->productsProductIdPrepacksPrepackIdDelete($product_id, $prepack_id);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdPrepacksPrepackIdDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **prepack_id** | **string**|  | |

### Return type

void (empty response body)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdPrepacksPrepackIdGet()`

```php
productsProductIdPrepacksPrepackIdGet($product_id, $prepack_id): \Faire\Model\ExternalPrepackV2
```

GET /products/{product_id}/prepacks/{prepack_id}

This endpoint gets a single prepack specified in the URL path.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$prepack_id = 'prepack_id_example'; // string

try {
    $result = $apiInstance->productsProductIdPrepacksPrepackIdGet($product_id, $prepack_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdPrepacksPrepackIdGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **prepack_id** | **string**|  | |

### Return type

[**\Faire\Model\ExternalPrepackV2**](../Model/ExternalPrepackV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdVariantOptionSetsPatch()`

```php
productsProductIdVariantOptionSetsPatch($product_id, $patch_variant_option_sets_request_v2): \Faire\Model\PatchVariantOptionSetsResponseV2
```

PATCH /products/{product_id}/variant-option-sets

This endpoint replaces the current variant option sets of a product by the given new variant option sets. Options currently in use by variants cannot be removed. If the product is sold in prepacks, size options cannot be reorganized and new values cannot be inserted into the middle of the size options.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$patch_variant_option_sets_request_v2 = new \Faire\Model\PatchVariantOptionSetsRequestV2(); // \Faire\Model\PatchVariantOptionSetsRequestV2

try {
    $result = $apiInstance->productsProductIdVariantOptionSetsPatch($product_id, $patch_variant_option_sets_request_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdVariantOptionSetsPatch: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **patch_variant_option_sets_request_v2** | [**\Faire\Model\PatchVariantOptionSetsRequestV2**](../Model/PatchVariantOptionSetsRequestV2.md)|  | |

### Return type

[**\Faire\Model\PatchVariantOptionSetsResponseV2**](../Model/PatchVariantOptionSetsResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdVariantsPost()`

```php
productsProductIdVariantsPost($product_id, $external_product_variant_v2): \Faire\Model\ExternalProductVariantV2
```

POST /products/{product_id}/variants

Creates a new variant for a product.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$external_product_variant_v2 = new \Faire\Model\ExternalProductVariantV2(); // \Faire\Model\ExternalProductVariantV2

try {
    $result = $apiInstance->productsProductIdVariantsPost($product_id, $external_product_variant_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdVariantsPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **external_product_variant_v2** | [**\Faire\Model\ExternalProductVariantV2**](../Model/ExternalProductVariantV2.md)|  | |

### Return type

[**\Faire\Model\ExternalProductVariantV2**](../Model/ExternalProductVariantV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdVariantsVariantIdDelete()`

```php
productsProductIdVariantsVariantIdDelete($product_id, $variant_id)
```

DELETE /products/{product_id}/variants/{variant_id}

This endpoint deletes a single variant given a product ID and a variant ID. This means that the product variant will have its lifecycle_state set to DELETED and will no longer be visible on Faire. A product must have at least one non-deleted variant. To delete the last variant of product, need to delete the product instead.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$variant_id = 'variant_id_example'; // string

try {
    $apiInstance->productsProductIdVariantsVariantIdDelete($product_id, $variant_id);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdVariantsVariantIdDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **variant_id** | **string**|  | |

### Return type

void (empty response body)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdVariantsVariantIdImagesImageIdDelete()`

```php
productsProductIdVariantsVariantIdImagesImageIdDelete($product_id, $variant_id, $image_id)
```

DELETE /products/{product_id}/variants/{variant_id}/images/{image_id}

Removes an image from a variant.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$variant_id = 'variant_id_example'; // string
$image_id = 'image_id_example'; // string

try {
    $apiInstance->productsProductIdVariantsVariantIdImagesImageIdDelete($product_id, $variant_id, $image_id);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdVariantsVariantIdImagesImageIdDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **variant_id** | **string**|  | |
| **image_id** | **string**|  | |

### Return type

void (empty response body)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsProductIdVariantsVariantIdPatch()`

```php
productsProductIdVariantsVariantIdPatch($product_id, $variant_id, $external_product_variant_v2): \Faire\Model\ExternalProductVariantV2
```

PATCH /products/{product_id}/variants/{variant_id}

This endpoint accepts a variant with only the fields populated that you want to modify. A variant's options cannot be updated. If you want to change the options, delete the existing variant and create a new variant with new options.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$product_id = 'product_id_example'; // string
$variant_id = 'variant_id_example'; // string
$external_product_variant_v2 = new \Faire\Model\ExternalProductVariantV2(); // \Faire\Model\ExternalProductVariantV2

try {
    $result = $apiInstance->productsProductIdVariantsVariantIdPatch($product_id, $variant_id, $external_product_variant_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsProductIdVariantsVariantIdPatch: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_id** | **string**|  | |
| **variant_id** | **string**|  | |
| **external_product_variant_v2** | [**\Faire\Model\ExternalProductVariantV2**](../Model/ExternalProductVariantV2.md)|  | |

### Return type

[**\Faire\Model\ExternalProductVariantV2**](../Model/ExternalProductVariantV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsReviewsGet()`

```php
productsReviewsGet($limit, $cursor): \Faire\Model\GetExternalProductReviewsResponseV2
```

GET /products/reviews



### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$limit = 56; // int
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->productsReviewsGet($limit, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsReviewsGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **limit** | **int**|  | [optional] |
| **cursor** | **string**|  | [optional] |

### Return type

[**\Faire\Model\GetExternalProductReviewsResponseV2**](../Model/GetExternalProductReviewsResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsTypesGet()`

```php
productsTypesGet(): \Faire\Model\GetExternalTaxonomyTypesResponseV2
```

GET /products/types

This endpoint retrieves all the Faire taxonomy types. Taxonomy types are often referred to as \"product types\" in our user-facing terminology. The two terms can be used interchangeably. Faire will use taxonomy type information to determine the categories in which brands and products are surfaced in our marketplace. You only need to provide the ID when creating or updating a product. When you retrieve a product, both the ID and name will be returned.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);

try {
    $result = $apiInstance->productsTypesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsTypesGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**\Faire\Model\GetExternalTaxonomyTypesResponseV2**](../Model/GetExternalTaxonomyTypesResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsUploadImagePost()`

```php
productsUploadImagePost($upload_image_request_v2): \Faire\Model\UploadImageResponseV2
```

POST /products/upload-image

We recommend uploading images to Faire before attempting to use them for a product or variant. This provides you with immediate feedback on whether the image is valid and accessible.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$upload_image_request_v2 = new \Faire\Model\UploadImageRequestV2(); // \Faire\Model\UploadImageRequestV2

try {
    $result = $apiInstance->productsUploadImagePost($upload_image_request_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsUploadImagePost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **upload_image_request_v2** | [**\Faire\Model\UploadImageRequestV2**](../Model/UploadImageRequestV2.md)|  | |

### Return type

[**\Faire\Model\UploadImageResponseV2**](../Model/UploadImageResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsVariantsInventoryLevelsByProductVariantIdsPatch()`

```php
productsVariantsInventoryLevelsByProductVariantIdsPatch($update_inventory_levels_request_v2): \Faire\Model\UpdateInventoryLevelsResponseV2
```

PATCH /products/variants/inventory-levels-by-product-variant-ids

This endpoint is deprecated. Please use the endpoints in the product variant inventory section to update inventory instead.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$update_inventory_levels_request_v2 = new \Faire\Model\UpdateInventoryLevelsRequestV2(); // \Faire\Model\UpdateInventoryLevelsRequestV2

try {
    $result = $apiInstance->productsVariantsInventoryLevelsByProductVariantIdsPatch($update_inventory_levels_request_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsVariantsInventoryLevelsByProductVariantIdsPatch: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **update_inventory_levels_request_v2** | [**\Faire\Model\UpdateInventoryLevelsRequestV2**](../Model/UpdateInventoryLevelsRequestV2.md)|  | |

### Return type

[**\Faire\Model\UpdateInventoryLevelsResponseV2**](../Model/UpdateInventoryLevelsResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `productsVariantsInventoryLevelsBySkusPatch()`

```php
productsVariantsInventoryLevelsBySkusPatch($update_inventory_levels_request_v2): \Faire\Model\UpdateInventoryLevelsResponseV2
```

PATCH /products/variants/inventory-levels-by-skus

This endpoint is deprecated. Please use the endpoints in the product variant inventory section to update inventory instead.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: AppCredentials
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-APP-CREDENTIALS', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-APP-CREDENTIALS', 'Bearer');

// Configure API key authorization: OAuth
$config = Faire\Configuration::getDefaultConfiguration()->setApiKey('X-FAIRE-OAUTH-ACCESS-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Faire\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-FAIRE-OAUTH-ACCESS-TOKEN', 'Bearer');


$apiInstance = new Faire\Api\ProductsApi(
    // 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
);
$update_inventory_levels_request_v2 = new \Faire\Model\UpdateInventoryLevelsRequestV2(); // \Faire\Model\UpdateInventoryLevelsRequestV2

try {
    $result = $apiInstance->productsVariantsInventoryLevelsBySkusPatch($update_inventory_levels_request_v2);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->productsVariantsInventoryLevelsBySkusPatch: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **update_inventory_levels_request_v2** | [**\Faire\Model\UpdateInventoryLevelsRequestV2**](../Model/UpdateInventoryLevelsRequestV2.md)|  | |

### Return type

[**\Faire\Model\UpdateInventoryLevelsResponseV2**](../Model/UpdateInventoryLevelsResponseV2.md)

### Authorization

[AppCredentials](../../README.md#AppCredentials), [OAuth](../../README.md#OAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
