# OpenAPIClient-php

The Faire External API allows brands and integration partners to programmatically access
and manage their data on Faire, including products, orders, inventory, and more.

## Authentication

OAuth 2.0 is the recommended authorization method for accessing the Faire External API,
especially for integration partners working with multiple brands. OAuth uses an
Authorization Code Grant flow that allows applications to obtain an access token on
behalf of a Faire user without requiring them to share credentials.

To use OAuth, you'll need to:
1. Register your application in the Faire Developer Portal to get an applicationId and applicationSecret
2. Redirect users to Faire's authorization page to grant specific permissions (scopes)
3. Exchange the authorization code for an OAuth access token
4. Include both X-FAIRE-APP-CREDENTIALS (Base64-encoded applicationId:applicationSecret) and
   X-FAIRE-OAUTH-ACCESS-TOKEN headers in API requests

---

# Key Definitions

### Product Definition

A **product** is a category of similar physical items that are differentiated by their **options**. An example product
could be a Faire-branded sweatshirt. The sweatshirt may come in different sizes and colors. The **product** itself
represents the kind of **product**, but not a specific **variant**.

### Option Definition

An **option** is a variable attribute that a **product** has. An example might be size or color. **Options** are
defined with an **option name** and several **option values**. A \"color\" **option** could have \"red\", \"blue\", and
\"yellow\", for example. In this example, the **option name** is \"color\" and the **option values** are \"red\", \"blue\", and
\"yellow\".

### Variant Definition

A **variant** is a specific combination of **option values**. For example, for a Faire-branded sweatshirt **product**
with \"size\" and \"color\" options, a large, red Faire-branded sweatshirt would be a **variant**. Variants represent an
actual physical item and have pricing, unique skus, and inventory.


---

# Using OAuth

OAuth is the recommended authorization process for accessing Faire's External API. However, if you are a single brand seeking access to Faire's APIs, we suggest generating the access token yourself in the Brand Portal. For integration partners with multiple brands, we recommend utilizing OAuth for authorization.

# OAuth

_OAuth_ (in this case OAuth 2.0) which stands for “Open Authorization”, is a standard designed to allow a website or application to access resources hosted by other web apps on behalf of a user.  
The Faire OAuth API lets applications request and obtain permissions from a Faire account to make API calls on behalf of that account. By using OAuth, applications are able to receive an access token without relying on the Faire user to provide it to them.

## Authorization Code

Faire uses an [\"Authorization Code Grant\"](https://www.oauth.com/oauth2-servers/server-side-apps/authorization-code/) flow where external partner applications obtain an authorization code that is then redeemed to get an access token. This token can then be used for authorization when calling Faire APIs.

To start the flow, navigate the Faire user to the OAuth authorization page. On this page, the user is able to view a list of permissions that your application is trying to obtain. If the user decides to authorize the application, an authorization code is returned. If the user does not authorize the application, the user is redirected back to your website.

### OAuth permission URL

To access the authorization page, the user needs to be redirected to a URL of the following format:
`https://faire.com/oauth2/authorize?applicationId={YOUR_APP_ID}&scope=SPECIFIC_PERMISSION&state=82201dd8d83d23cc8a48caf52&redirectUrl=https://example.com.`

### Query String Parameters

All the required parameters are provided in the form of a query string. Below, you can find a detailed description of all the parameters that you need to build the OAuth permission URL:

| Field                     | Description                                                                                                                                                                                                                 | Required |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `applicationId`<br>string | The identifier that is assigned to your application. You can find it in the Developer Portal.                                                                                                                               | Yes      |
| `scope`<br>string[]       | A list of the permissions that your application requests. For more information on permissions, refer to the section below.                                                                                                  | Yes      |
| `state`<br>string         | This parameter serves as a [CSRF](https://developer.mozilla.org/en-US/docs/Glossary/CSRF) protection mechanism. When the user gets redirected back, you can verify that the state value matches what it was set originally. | Yes      |
| `redirectUrl`<br>string   | This is the URL to which the Faire user will be redirected to after the authorization is complete.                                                                                                                          | Yes      |

### Permissions

Applications must provide a list of specific permissions that they want to access from Faire user.
Below you can find the list of different permissions that you can specify:

| State               | Description                                   |
| ------------------- | --------------------------------------------- |
| `READ_PRODUCTS`     | Fetch product information.                    |
| `WRITE_PRODUCTS`    | Add, update, or delete product information.   |
| `READ_ORDERS`       | Fetch order information.                      |
| `WRITE_ORDERS`      | Add, update, or delete order information.     |
| `READ_BRAND`        | Fetch brand information.                      |
| `READ_RETAILER`     | Fetch retailer information.                   |
| `READ_INVENTORIES`  | Fetch inventory information.                  |
| `WRITE_INVENTORIES` | Add, update, or delete inventory information. |
| `READ_SHIPMENTS`    | Fetch shipments information.                  |
| `READ_REVIEWS`      | Fetch product review information.             |

### Response

Once the Faire user authorizes the application, the _authorizationCode_ and _state_ are passed in as query parameters in the provided _redirectUrl_.

**_Keep in mind that the _**authorization code expires within 10 minutes**_. If you do not exchange it for the token within the allotted time, you will need to start the flow over again._**

## Access Token

As mentioned above, once you receive an authorization code you can exchange it for an OAuth access token. Use the access token to make authorized requests on behalf of the Faire user.

> Sample request:

```json
{
  \"application_token\": \"YOUR_APP_ID\",
  \"application_secret\": \"YOUR_APP_SECRET\",
  \"redirect_url\": \"YOUR_REDIRECT_URL\",
  \"scope\": [\"PERMISSION_1\", \"PERMISSION_2\"],
  \"grant_type\": \"AUTHORIZATION_CODE\",
  \"authorization_code\": \"YOUR_CODE\"
}
```

### HTTP Request

`POST https://www.faire.com/api/external-api-oauth2/token`

### Request Parameters

| Field               | Description                                                                                                                                                                                   | Required |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `applicationId`     | The identifier that is assigned to your application. You can access it in the Developer Portal.                                                                                               | Yes      |
| `applicationSecret` | The secret identifier that is assigned to your application. You can access it in the Developer Portal. **Please make sure to keep this data private and do not share it with other parties**. | Yes      |
| `scope`             | A list of the permissions that your application requests. _This list must match the previously provided scope parameter_.                                                                     | Yes      |
| `grantType`         | The grant identifier. In this iteration of OAuth, you would need to set it to _AUTHORIZATION_CODE_.                                                                                           | Yes      |
| `redirectUrl`       | This is the URL which you provided earlier. _This url must match the previously provided redirect url_.                                                                                       | Yes      |
| `authorizationCode` | This is the authorization code which you were able to receive earlier.                                                                                                                        | Yes      |

### Response

> Sample response

```json
{
  \"access_token\": \"OAUTH_ACCESS_TOKEN\",
  \"token_type\": \"BEARER\"
}
```

## Using OAuth Access Token

A major difference between OAuth tokens and the access tokens used for V1 and V2 of the Faire External Api is that _OAuth access tokens are used only for authorization, not authentication_.
In order to make requests you would need to use the following headers:

| Header                       | Description                                                         | Required |
| ---------------------------- | ------------------------------------------------------------------- | -------- |
| `X-FAIRE-APP-CREDENTIALS`    | The _applicationId:applicationSecret_ encoded in the Base64 format. | Yes      |
| `X-FAIRE-OAUTH-ACCESS-TOKEN` | The OAuth access token.                                             | Yes      |

Only by using these two headers together, you are able to make requests and access resources at Faire.

**_Please note that OAuth is only enabled for External Api V2+ - you cannot send External V1 requests using OAuth access tokens._**

## Revoking OAuth Access Token

If by any chance you lose any confidential information about the application, you can easily revoke the OAuth access token to prevent it from being used by some other party. To do this you can make the POST request to the following endpoint **\\revoke**

> Sample request:

```json
{
  \"application_token\": \"YOUR_APP_ID\",
  \"application_secret\": \"YOUR_APP_SECRET\",
  \"access_token_o_auth\": \"YOUR_TOKEN\"
}
```

### HTTP Request

`POST https://www.faire.com/api/external-api-oauth2/revoke`

### Request Parameters

| Field               | Description                                                                                                                                                                                   | Required |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `applicationToken`  | The identifier that is assigned to your application. You can access it in the Developer Portal.                                                                                               | Yes      |
| `applicationSecret` | The secret identifier that is assigned to your application. You can access it in the Developer Portal. **Please make sure to keep this data private and do not share it with other parties**. | Yes      |
| `accessTokenOAuth`  | This is the OAuth token that you want to get revoked.                                                                                                                                         | Yes      |

### Response

> Sample response

```json
{
  \"success\": \"true\"
}
```


---

# Idempotency

An idempotent operation can be applied multiple times without changing the result. Many of Faire's APIs have a
mechanism to allow for idempotent operations.

Imagine you are trying to create a product and then the network connection fails after we create the product in Faire,
but before we can return the results to you. You see it as a failure and might try to create the product again. Without
idempotent operations, there are now 2 duplicate products in Faire!

The Faire APIs require an `idempotency_token` when creating new objects in our system. This token can be any string of
characters and should be unique to the object you are creating. With the idempotency token, you can retry failed
requests without risk of duplicating data in our system.


---

# Changelog

## 2025-11

- Added [Update Product Prices by Product Variant IDs](#/paths/product-prices-by-product-variant-ids/patch) endpoint to update product variant prices in batch
- Added [Update Product Prices by SKUs](#/paths/product-prices-by-skus/patch) endpoint to update product variant prices by SKU in batch
- Added `has_pending_retailer_cancellation_request` to [orders](#/schemas/ExternalOrderV2)
- Added `shipping_label_url` to [shipments](#/schemas/ExternalShipmentV2)
- Added [View Packing Slip PDF](#/paths/orders-order_id--packing-slip-pdf/get) endpoint to retrieve PDF packing slips for brand orders
- Added `made_in_country` to [products](#/schemas/ExternalProductV2)
- Added `case_measurements` to [product variants](#/schemas/ExternalProductVariantV2)

## 2025-10

- Added `original_order_id` query parameter to filter orders by original order ID in the [Get all Orders](#/paths/orders/get) endpoint
- Added `notes` to [orders](#/schemas/ExternalOrderV2)
- Added `is_insider` to [retailers](#/schemas/GetExternalRetailerProfileResponseV2)

## 2025-09

- Added `purchase_order_number` to [orders](#/schemas/ExternalOrderV2)

## 2025-06

- Added `estimated_payout_at` to [orders](#/schemas/ExternalOrderV2)

## 2024-11

- Added `is_free_shipping`, `free_shipping_reason` and `faire_covered_shipping_cost` to [orders](#/schemas/ExternalOrderV2)
- Added `shipping_type` to [shipments](#/schemas/ExternalShipmentV2)

## 2024-09

- Added `total_brand_discounts` and `subtotal_after_brand_discounts` to [payout costs](#/schemas/ExternalPayoutCostsV2)

## 2024-05

- Add `address_type` field to [addresses](#/schemas/ExternalAddressV2)

## 2024-03

- Added new page for new [product variant inventory](#/schemas/ExternalProductVariantInventory) endpoints and deprecated old endpoints

## 2023-06

- Added `payout_flat_fee` and `commission_flat_fee`, updated `payout_fee` and `commission` to [payout costs](#/schemas/ExternalPayoutCostsV2)

## 2023-05

- Added OAuth flow documentation including how to create authorization codes, create access tokens and revoke access tokens.
- Added support for cursor pagination on [get all orders](#/paths/orders/get) and [get all products](#/paths/products/get) endpoints

## 2023-04

- Added endpoints for [removing an image from a product](#/paths/products-product_id--images--image_id/delete) and [removing an image from a variant](#/paths/products-product_id--variants--variant_id--images--image_id/delete).

## 2023-03

- Documented the `PENDING_RETAILER_CONFIRMATION` state for [orders](#/schemas/ExternalOrderV2.State) and [order items](#/schemas/ExternalOrderItemV2.State). Orders in this state are now returned from the [Get all Orders](#/paths/orders/get) endpoint.
- Added support for creating [prepacks](#/schemas/ExternalPrepackV2) in batches using the [Add Multiple Prepacks to a Product](#/paths/products-product_id--prepacks-batch/post) endpoint.
- Added documentation for canceling an [order](#/schemas/ExternalOrderV2) using the [Cancel an Order](#/paths/orders-order_id--cancel/put) endpoint.
- Added support for [uploading images](#/paths/products-upload-image/post) to be used by products/variants.

## 2023-02

- Added `state` field to [order items](#/schemas/ExternalOrderItemV2) and [documented the possible states](#/schemas/ExternalOrderItemV2.State).
- Added support for measurements for product variants.

## 2023-01

- Added several fields to [payout costs](#/schemas/ExternalPayoutCostsV2)

## 2022-11

- Added `brand_discounts` field to [orders](#/schemas/ExternalOrderV2) and `discounts` to [order items](#/schemas/ExternalOrderItemV2)

## 2022-10-14

- Update product variant pricing geo constraint `country` and `country_group` restraints

## 2021-04-26

- Added support for open pack [products](#/schemas/ExternalProductV2) via `per_style_minimum_order_quantity`

## 2021-04-14

- Added support for geographic pricing for product variants.
- Deprecated `retailer_price_cents` and `wholesale_price_cents`

## 2021-04-07

- Adjusted the maximum length of product short_description and description to match with brand portal

## 2021-03-17

- Fixed incorrect `unit_multiplier` and `minimum_order_quantity` values in sample requests and responses under [product](#/schemas/ExternalProductV2) endpoints
- Added missing request parameter `minimum_order_quantity` to create and patch [product](#/schemas/ExternalProductV2) endpoints

## 2021-03-15

- Added preorder details in create and patch [product](#/schemas/ExternalProductV2) endpoints

## 2021-03-10

- We noticed [prepacks](#/schemas/ExternalPrepackV2) shouldn't have any images, and we removed the field
  `image` from all requests and responses under that section.

## 2021-03-01

- External API V2 was released



## Installation & Usage

### Requirements

PHP 8.1 and later.

### Composer

To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:

```json
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/talisman/faire.git"
    }
  ],
  "require": {
    "talisman/faire": "*@dev"
  }
}
```

Then run `composer install`

### Manual Installation

Download the files and include `autoload.php`:

```php
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```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\BrandsApi(
    // 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->brandsProfileGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BrandsApi->brandsProfileGet: ', $e->getMessage(), PHP_EOL;
}

```

## API Endpoints

All URIs are relative to *https://www.faire.com/external-api/v2*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BrandsApi* | [**brandsProfileGet**](docs/Api/BrandsApi.md#brandsprofileget) | **GET** /brands/profile | GET /brands/profile
*InventoryApi* | [**productInventoryByProductVariantIdsGet**](docs/Api/InventoryApi.md#productinventorybyproductvariantidsget) | **GET** /product-inventory/by-product-variant-ids | GET /product-inventory/by-product-variant-ids
*InventoryApi* | [**productInventoryByProductVariantIdsPatch**](docs/Api/InventoryApi.md#productinventorybyproductvariantidspatch) | **PATCH** /product-inventory/by-product-variant-ids | PATCH /product-inventory/by-product-variant-ids
*InventoryApi* | [**productInventoryBySkusGet**](docs/Api/InventoryApi.md#productinventorybyskusget) | **GET** /product-inventory/by-skus | GET /product-inventory/by-skus
*InventoryApi* | [**productInventoryBySkusPatch**](docs/Api/InventoryApi.md#productinventorybyskuspatch) | **PATCH** /product-inventory/by-skus | PATCH /product-inventory/by-skus
*InventoryApi* | [**productsVariantsInventoryLevelsByProductVariantIdsPatch**](docs/Api/InventoryApi.md#productsvariantsinventorylevelsbyproductvariantidspatch) | **PATCH** /products/variants/inventory-levels-by-product-variant-ids | PATCH /products/variants/inventory-levels-by-product-variant-ids
*InventoryApi* | [**productsVariantsInventoryLevelsBySkusPatch**](docs/Api/InventoryApi.md#productsvariantsinventorylevelsbyskuspatch) | **PATCH** /products/variants/inventory-levels-by-skus | PATCH /products/variants/inventory-levels-by-skus
*OrdersApi* | [**ordersGet**](docs/Api/OrdersApi.md#ordersget) | **GET** /orders | GET /orders
*OrdersApi* | [**ordersOrderIdCancelPut**](docs/Api/OrdersApi.md#ordersorderidcancelput) | **PUT** /orders/{order_id}/cancel | PUT /orders/{order_id}/cancel
*OrdersApi* | [**ordersOrderIdGet**](docs/Api/OrdersApi.md#ordersorderidget) | **GET** /orders/{order_id} | GET /orders/{order_id}
*OrdersApi* | [**ordersOrderIdItemsAvailabilityPost**](docs/Api/OrdersApi.md#ordersorderiditemsavailabilitypost) | **POST** /orders/{order_id}/items/availability | POST /orders/{order_id}/items/availability
*OrdersApi* | [**ordersOrderIdPackingSlipPdfGet**](docs/Api/OrdersApi.md#ordersorderidpackingslippdfget) | **GET** /orders/{order_id}/packing-slip-pdf | GET /orders/{order_id}/packing-slip-pdf
*OrdersApi* | [**ordersOrderIdProcessingPut**](docs/Api/OrdersApi.md#ordersorderidprocessingput) | **PUT** /orders/{order_id}/processing | PUT /orders/{order_id}/processing
*OrdersApi* | [**ordersOrderIdShipmentsPost**](docs/Api/OrdersApi.md#ordersorderidshipmentspost) | **POST** /orders/{order_id}/shipments | POST /orders/{order_id}/shipments
*PrepacksApi* | [**productsProductIdPrepacksBatchPost**](docs/Api/PrepacksApi.md#productsproductidprepacksbatchpost) | **POST** /products/{product_id}/prepacks/batch | POST /products/{product_id}/prepacks/batch
*PrepacksApi* | [**productsProductIdPrepacksGet**](docs/Api/PrepacksApi.md#productsproductidprepacksget) | **GET** /products/{product_id}/prepacks | GET /products/{product_id}/prepacks
*PrepacksApi* | [**productsProductIdPrepacksPost**](docs/Api/PrepacksApi.md#productsproductidprepackspost) | **POST** /products/{product_id}/prepacks | POST /products/{product_id}/prepacks
*PrepacksApi* | [**productsProductIdPrepacksPrepackIdDelete**](docs/Api/PrepacksApi.md#productsproductidprepacksprepackiddelete) | **DELETE** /products/{product_id}/prepacks/{prepack_id} | DELETE /products/{product_id}/prepacks/{prepack_id}
*PrepacksApi* | [**productsProductIdPrepacksPrepackIdGet**](docs/Api/PrepacksApi.md#productsproductidprepacksprepackidget) | **GET** /products/{product_id}/prepacks/{prepack_id} | GET /products/{product_id}/prepacks/{prepack_id}
*ProductVariantsApi* | [**productsProductIdVariantOptionSetsPatch**](docs/Api/ProductVariantsApi.md#productsproductidvariantoptionsetspatch) | **PATCH** /products/{product_id}/variant-option-sets | PATCH /products/{product_id}/variant-option-sets
*ProductVariantsApi* | [**productsProductIdVariantsPost**](docs/Api/ProductVariantsApi.md#productsproductidvariantspost) | **POST** /products/{product_id}/variants | POST /products/{product_id}/variants
*ProductVariantsApi* | [**productsProductIdVariantsVariantIdDelete**](docs/Api/ProductVariantsApi.md#productsproductidvariantsvariantiddelete) | **DELETE** /products/{product_id}/variants/{variant_id} | DELETE /products/{product_id}/variants/{variant_id}
*ProductVariantsApi* | [**productsProductIdVariantsVariantIdImagesImageIdDelete**](docs/Api/ProductVariantsApi.md#productsproductidvariantsvariantidimagesimageiddelete) | **DELETE** /products/{product_id}/variants/{variant_id}/images/{image_id} | DELETE /products/{product_id}/variants/{variant_id}/images/{image_id}
*ProductVariantsApi* | [**productsProductIdVariantsVariantIdPatch**](docs/Api/ProductVariantsApi.md#productsproductidvariantsvariantidpatch) | **PATCH** /products/{product_id}/variants/{variant_id} | PATCH /products/{product_id}/variants/{variant_id}
*ProductsApi* | [**productPricesByProductVariantIdsPatch**](docs/Api/ProductsApi.md#productpricesbyproductvariantidspatch) | **PATCH** /product-prices/by-product-variant-ids | PATCH /product-prices/by-product-variant-ids
*ProductsApi* | [**productPricesBySkusPatch**](docs/Api/ProductsApi.md#productpricesbyskuspatch) | **PATCH** /product-prices/by-skus | PATCH /product-prices/by-skus
*ProductsApi* | [**productsGet**](docs/Api/ProductsApi.md#productsget) | **GET** /products | GET /products
*ProductsApi* | [**productsPost**](docs/Api/ProductsApi.md#productspost) | **POST** /products | POST /products
*ProductsApi* | [**productsProductIdDelete**](docs/Api/ProductsApi.md#productsproductiddelete) | **DELETE** /products/{product_id} | DELETE /products/{product_id}
*ProductsApi* | [**productsProductIdGet**](docs/Api/ProductsApi.md#productsproductidget) | **GET** /products/{product_id} | GET /products/{product_id}
*ProductsApi* | [**productsProductIdImagesImageIdDelete**](docs/Api/ProductsApi.md#productsproductidimagesimageiddelete) | **DELETE** /products/{product_id}/images/{image_id} | DELETE /products/{product_id}/images/{image_id}
*ProductsApi* | [**productsProductIdPatch**](docs/Api/ProductsApi.md#productsproductidpatch) | **PATCH** /products/{product_id} | PATCH /products/{product_id}
*ProductsApi* | [**productsProductIdPrepacksBatchPost**](docs/Api/ProductsApi.md#productsproductidprepacksbatchpost) | **POST** /products/{product_id}/prepacks/batch | POST /products/{product_id}/prepacks/batch
*ProductsApi* | [**productsProductIdPrepacksGet**](docs/Api/ProductsApi.md#productsproductidprepacksget) | **GET** /products/{product_id}/prepacks | GET /products/{product_id}/prepacks
*ProductsApi* | [**productsProductIdPrepacksPost**](docs/Api/ProductsApi.md#productsproductidprepackspost) | **POST** /products/{product_id}/prepacks | POST /products/{product_id}/prepacks
*ProductsApi* | [**productsProductIdPrepacksPrepackIdDelete**](docs/Api/ProductsApi.md#productsproductidprepacksprepackiddelete) | **DELETE** /products/{product_id}/prepacks/{prepack_id} | DELETE /products/{product_id}/prepacks/{prepack_id}
*ProductsApi* | [**productsProductIdPrepacksPrepackIdGet**](docs/Api/ProductsApi.md#productsproductidprepacksprepackidget) | **GET** /products/{product_id}/prepacks/{prepack_id} | GET /products/{product_id}/prepacks/{prepack_id}
*ProductsApi* | [**productsProductIdVariantOptionSetsPatch**](docs/Api/ProductsApi.md#productsproductidvariantoptionsetspatch) | **PATCH** /products/{product_id}/variant-option-sets | PATCH /products/{product_id}/variant-option-sets
*ProductsApi* | [**productsProductIdVariantsPost**](docs/Api/ProductsApi.md#productsproductidvariantspost) | **POST** /products/{product_id}/variants | POST /products/{product_id}/variants
*ProductsApi* | [**productsProductIdVariantsVariantIdDelete**](docs/Api/ProductsApi.md#productsproductidvariantsvariantiddelete) | **DELETE** /products/{product_id}/variants/{variant_id} | DELETE /products/{product_id}/variants/{variant_id}
*ProductsApi* | [**productsProductIdVariantsVariantIdImagesImageIdDelete**](docs/Api/ProductsApi.md#productsproductidvariantsvariantidimagesimageiddelete) | **DELETE** /products/{product_id}/variants/{variant_id}/images/{image_id} | DELETE /products/{product_id}/variants/{variant_id}/images/{image_id}
*ProductsApi* | [**productsProductIdVariantsVariantIdPatch**](docs/Api/ProductsApi.md#productsproductidvariantsvariantidpatch) | **PATCH** /products/{product_id}/variants/{variant_id} | PATCH /products/{product_id}/variants/{variant_id}
*ProductsApi* | [**productsReviewsGet**](docs/Api/ProductsApi.md#productsreviewsget) | **GET** /products/reviews | GET /products/reviews
*ProductsApi* | [**productsTypesGet**](docs/Api/ProductsApi.md#productstypesget) | **GET** /products/types | GET /products/types
*ProductsApi* | [**productsUploadImagePost**](docs/Api/ProductsApi.md#productsuploadimagepost) | **POST** /products/upload-image | POST /products/upload-image
*ProductsApi* | [**productsVariantsInventoryLevelsByProductVariantIdsPatch**](docs/Api/ProductsApi.md#productsvariantsinventorylevelsbyproductvariantidspatch) | **PATCH** /products/variants/inventory-levels-by-product-variant-ids | PATCH /products/variants/inventory-levels-by-product-variant-ids
*ProductsApi* | [**productsVariantsInventoryLevelsBySkusPatch**](docs/Api/ProductsApi.md#productsvariantsinventorylevelsbyskuspatch) | **PATCH** /products/variants/inventory-levels-by-skus | PATCH /products/variants/inventory-levels-by-skus
*RetailersApi* | [**retailersPublicRetailerIdGet**](docs/Api/RetailersApi.md#retailerspublicretaileridget) | **GET** /retailers/public/{retailer_id} | GET /retailers/public/{retailer_id}

## Models

- [AddShipmentsRequestV2](docs/Model/AddShipmentsRequestV2.md)
- [CreateExternalPrepacksRequestV2](docs/Model/CreateExternalPrepacksRequestV2.md)
- [CreateExternalPrepacksResponseV2](docs/Model/CreateExternalPrepacksResponseV2.md)
- [EditItemsAvailabilityRequestV2](docs/Model/EditItemsAvailabilityRequestV2.md)
- [EditItemsAvailabilityRequestV2ItemAvailability](docs/Model/EditItemsAvailabilityRequestV2ItemAvailability.md)
- [ExternalAddressV2](docs/Model/ExternalAddressV2.md)
- [ExternalAddressV2AddressType](docs/Model/ExternalAddressV2AddressType.md)
- [ExternalCancelBrandOrderRequestV2](docs/Model/ExternalCancelBrandOrderRequestV2.md)
- [ExternalDiscountV2](docs/Model/ExternalDiscountV2.md)
- [ExternalDiscountV2DiscountType](docs/Model/ExternalDiscountV2DiscountType.md)
- [ExternalDistanceUnitV2](docs/Model/ExternalDistanceUnitV2.md)
- [ExternalImageV2](docs/Model/ExternalImageV2.md)
- [ExternalInventoryQuantity](docs/Model/ExternalInventoryQuantity.md)
- [ExternalInventoryQuantityType](docs/Model/ExternalInventoryQuantityType.md)
- [ExternalMassUnitV2](docs/Model/ExternalMassUnitV2.md)
- [ExternalMeasurementsV2](docs/Model/ExternalMeasurementsV2.md)
- [ExternalMoneyV2](docs/Model/ExternalMoneyV2.md)
- [ExternalOrderItemV2](docs/Model/ExternalOrderItemV2.md)
- [ExternalOrderItemV2Customization](docs/Model/ExternalOrderItemV2Customization.md)
- [ExternalOrderItemV2State](docs/Model/ExternalOrderItemV2State.md)
- [ExternalOrderV2](docs/Model/ExternalOrderV2.md)
- [ExternalOrderV2CancelReason](docs/Model/ExternalOrderV2CancelReason.md)
- [ExternalOrderV2Customer](docs/Model/ExternalOrderV2Customer.md)
- [ExternalOrderV2ExternalFreeShippingReason](docs/Model/ExternalOrderV2ExternalFreeShippingReason.md)
- [ExternalOrderV2State](docs/Model/ExternalOrderV2State.md)
- [ExternalPayoutCostsV2](docs/Model/ExternalPayoutCostsV2.md)
- [ExternalPrepackItemV2](docs/Model/ExternalPrepackItemV2.md)
- [ExternalPrepackV2](docs/Model/ExternalPrepackV2.md)
- [ExternalProductInfoV2](docs/Model/ExternalProductInfoV2.md)
- [ExternalProductReviewReplyV2](docs/Model/ExternalProductReviewReplyV2.md)
- [ExternalProductReviewV2](docs/Model/ExternalProductReviewV2.md)
- [ExternalProductReviewWithDetailsV2](docs/Model/ExternalProductReviewWithDetailsV2.md)
- [ExternalProductTaxonomyAttributeV2](docs/Model/ExternalProductTaxonomyAttributeV2.md)
- [ExternalProductV2](docs/Model/ExternalProductV2.md)
- [ExternalProductV2LifecycleState](docs/Model/ExternalProductV2LifecycleState.md)
- [ExternalProductV2PreorderDetails](docs/Model/ExternalProductV2PreorderDetails.md)
- [ExternalProductV2SaleState](docs/Model/ExternalProductV2SaleState.md)
- [ExternalProductVariantInventory](docs/Model/ExternalProductVariantInventory.md)
- [ExternalProductVariantOptionDefinitionV2](docs/Model/ExternalProductVariantOptionDefinitionV2.md)
- [ExternalProductVariantOptionV2](docs/Model/ExternalProductVariantOptionV2.md)
- [ExternalProductVariantV2](docs/Model/ExternalProductVariantV2.md)
- [ExternalProductVariantV2Price](docs/Model/ExternalProductVariantV2Price.md)
- [ExternalProductVariantV2PricePriceGeoConstraint](docs/Model/ExternalProductVariantV2PricePriceGeoConstraint.md)
- [ExternalProductVariantV2VariantOrderabilityType](docs/Model/ExternalProductVariantV2VariantOrderabilityType.md)
- [ExternalProductVariantV2VariantPreorderDetails](docs/Model/ExternalProductVariantV2VariantPreorderDetails.md)
- [ExternalShipmentV2](docs/Model/ExternalShipmentV2.md)
- [ExternalShipmentV2ExternalShippingType](docs/Model/ExternalShipmentV2ExternalShippingType.md)
- [ExternalTaxItemV2](docs/Model/ExternalTaxItemV2.md)
- [ExternalTaxItemV2ExternalTaxEffectV2](docs/Model/ExternalTaxItemV2ExternalTaxEffectV2.md)
- [ExternalTaxonomyTypeV2](docs/Model/ExternalTaxonomyTypeV2.md)
- [GetExternalBrandProfileResponseV2](docs/Model/GetExternalBrandProfileResponseV2.md)
- [GetExternalOrdersResponseV2](docs/Model/GetExternalOrdersResponseV2.md)
- [GetExternalOrdersResponseV2SortBy](docs/Model/GetExternalOrdersResponseV2SortBy.md)
- [GetExternalPrepacksResponseV2](docs/Model/GetExternalPrepacksResponseV2.md)
- [GetExternalProductReviewsResponseV2](docs/Model/GetExternalProductReviewsResponseV2.md)
- [GetExternalProductsResponseV2](docs/Model/GetExternalProductsResponseV2.md)
- [GetExternalRetailerProfileResponseV2](docs/Model/GetExternalRetailerProfileResponseV2.md)
- [GetExternalTaxonomyTypesResponseV2](docs/Model/GetExternalTaxonomyTypesResponseV2.md)
- [GetInventoryResponseV2](docs/Model/GetInventoryResponseV2.md)
- [IndigofairDataTaxItemTaxableItemType](docs/Model/IndigofairDataTaxItemTaxableItemType.md)
- [IndigofairDataTaxItemType](docs/Model/IndigofairDataTaxItemType.md)
- [MoveOrderToProcessingRequestV2](docs/Model/MoveOrderToProcessingRequestV2.md)
- [PatchVariantOptionSetsRequestV2](docs/Model/PatchVariantOptionSetsRequestV2.md)
- [PatchVariantOptionSetsResponseV2](docs/Model/PatchVariantOptionSetsResponseV2.md)
- [UpdateInventoryLevelsRequestV2](docs/Model/UpdateInventoryLevelsRequestV2.md)
- [UpdateInventoryLevelsRequestV2ProductVariantInventory](docs/Model/UpdateInventoryLevelsRequestV2ProductVariantInventory.md)
- [UpdateInventoryLevelsResponseV2](docs/Model/UpdateInventoryLevelsResponseV2.md)
- [UpdateOnHandInventoryRequestV2](docs/Model/UpdateOnHandInventoryRequestV2.md)
- [UpdateOnHandInventoryRequestV2ProductVariantInventory](docs/Model/UpdateOnHandInventoryRequestV2ProductVariantInventory.md)
- [UpdateOnHandInventoryResponseV2](docs/Model/UpdateOnHandInventoryResponseV2.md)
- [UpdateProductPricesByProductVariantIdsRequestV2](docs/Model/UpdateProductPricesByProductVariantIdsRequestV2.md)
- [UpdateProductPricesByProductVariantIdsRequestV2ProductVariantPriceByVariantId](docs/Model/UpdateProductPricesByProductVariantIdsRequestV2ProductVariantPriceByVariantId.md)
- [UpdateProductPricesBySkusRequestV2](docs/Model/UpdateProductPricesBySkusRequestV2.md)
- [UpdateProductPricesBySkusRequestV2ProductVariantPriceBySku](docs/Model/UpdateProductPricesBySkusRequestV2ProductVariantPriceBySku.md)
- [UpdateProductPricesResponseV2](docs/Model/UpdateProductPricesResponseV2.md)
- [UpdateProductPricesResponseV2PriceUpdateResult](docs/Model/UpdateProductPricesResponseV2PriceUpdateResult.md)
- [UploadImageRequestV2](docs/Model/UploadImageRequestV2.md)
- [UploadImageResponseV2](docs/Model/UploadImageResponseV2.md)

## Authorization

Authentication schemes defined for the API:
### OAuth

- **Type**: API key
- **API key parameter name**: X-FAIRE-OAUTH-ACCESS-TOKEN
- **Location**: HTTP header


### AppCredentials

- **Type**: API key
- **API key parameter name**: X-FAIRE-APP-CREDENTIALS
- **Location**: HTTP header


## Tests

To run the tests, use:

```bash
composer install
vendor/bin/phpunit
```

## Author



## About this package

This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: `1.0.0`
    - Package version: `1.0`
    - Generator version: `7.19.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`
