> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Get Product Variant Option

GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/options/{option_id}

Returns a single *Variant Option*. Optional parameters can be passed in.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/catalog/product-variant-options/get-product-variant-option

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Products | modify | `store_v2_products` | | Products | read-only | `store_v2_products_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

## Request

### Path parameters

- `product_id` (integer, required) — The ID of the `Product` to which the resource belongs.
- `option_id` (integer, required) — The ID of the `Option`.
- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Query parameters

- `include_fields` (list of string, optional) — Fields to include, in a comma-separated list. The ID and the specified fields will be returned.
- `exclude_fields` (list of string, optional) — Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.

### Headers

- `Accept` (string, required, default: application/json) — The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

## Response

### 200

OK

- `data` (productOption_Full, optional)
- `meta` (metaEmpty_Full, optional) — Response metadata.

## Errors

### 404 Not Found Error

The resource was not found.

- `status` (integer, optional) — 404 HTTP status code.
- `title` (string, optional) — The error title describing the particular error.
- `type` (string, optional)
- `instance` (string, optional)

## Types

### productOption_Full

- `config` (productOptionConfig_Full, optional) — The values for option config can vary based on the Modifier created.
- `display_name` (string, optional) — The name of the option shown on the storefront.
- `id` (integer, optional, nullable) — The unique numerical ID of the option, increments sequentially.
- `name` (string, optional) — The unique option name, auto-generated from the display name, a timestamp, and the product ID.
- `option_values` (list of productOptionOptionValue_Full, optional)
- `product_id` (integer, optional) — The unique numerical ID of the product to which the option belongs.
- `sort_order` (integer, optional) — Order in which the option is displayed on the storefront.
- `type` (enum, optional) — The type of option, which determines how it will display on the storefront. Acceptable values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. For reference, the former v2 API values are: RB = radio_buttons, RT = rectangles, S = dropdown, P = product_list, PI = product_list_with_images, CS = swatch.
  - Allowed values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`

### metaEmpty_Full

Response metadata.

### productOptionConfig_Full

The values for option config can vary based on the Modifier created.

- `default_value` (string, optional) — (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string.
- `checked_by_default` (boolean, optional) — (checkbox) Flag for setting the checkbox to be checked by default.
- `checkbox_label` (string, optional) — (checkbox) Label displayed for the checkbox option.
- `date_limited` (boolean, optional) — (date) Flag to limit the dates allowed to be entered on a date option.
- `date_limit_mode` (enum, optional) — (date) The type of limit that is allowed to be entered on a date option.
  - Allowed values: `earliest`, `range`, `latest`
- `date_earliest_value` (date, optional) — (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
- `date_latest_value` (date, optional) — (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
- `file_types_mode` (enum, optional) — (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types.
  - Allowed values: `specific`, `all`
- `file_types_supported` (list of string, optional) — (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). `other` - Allows file types defined in the `file_types_other` array.
- `file_types_other` (list of string, optional) — (file) A list of other file types allowed with the file upload option.
- `file_max_size` (integer, optional) — (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server.
- `text_characters_limited` (boolean, optional) — (text, multi_line_text) Flag to validate the length of a text or multi-line text input.
- `text_min_length` (integer, optional) — (text, multi_line_text) The minimum length allowed for a text or multi-line text option.
- `text_max_length` (integer, optional) — (text, multi_line_text) The maximum length allowed for a text or multi line text option.
- `text_lines_limited` (boolean, optional) — (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input.
- `text_max_lines` (integer, optional) — (multi_line_text) The maximum number of lines allowed on a multi-line text input.
- `number_limited` (boolean, optional) — (numbers_only_text) Flag to limit the value of a number option.
- `number_limit_mode` (enum, optional) — (numbers_only_text) The type of limit on values entered for a number option.
  - Allowed values: `lowest`, `highest`, `range`
- `number_lowest_value` (double, optional) — (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true.
- `number_highest_value` (double, optional) — (numbers_only_text) The highest allowed value for a number option if `number_limited` is true.
- `number_integers_only` (boolean, optional) — (numbers_only_text) Flag to limit the input on a number option to whole numbers only.
- `product_list_adjusts_inventory` (boolean, optional) — (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list.
- `product_list_adjusts_pricing` (boolean, optional) — (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price.
- `product_list_shipping_calc` (enum, optional) — (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions.
  - Allowed values: `none`, `weight`, `package`

### productOptionOptionValue_Full

Product Option `option_value`.

- `label` (string, required) — The text display identifying the value on the storefront. Required in a /POST.
- `sort_order` (integer, required) — The order in which the value will be displayed on the product page. Required in a /POST.
- `id` (integer, optional) — The unique numeric ID of the value; increments sequentially.
- `is_default` (boolean, optional) — The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers.
- `value_data` (ProductOptionOptionValueBaseValueData, optional, nullable) — Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. If no data is available, returns `null`.

### ProductOptionOptionValueBaseValueData

Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. If no data is available, returns `null`.

## Examples

**Response**

```json
{
  "data": {
    "config": {
      "default_value": "string",
      "checked_by_default": true,
      "checkbox_label": "string",
      "date_limited": true,
      "date_limit_mode": "range",
      "date_earliest_value": "2023-01-15",
      "date_latest_value": "2023-01-15",
      "file_types_mode": "specific",
      "file_types_supported": [
        "images, documents, other"
      ],
      "file_types_other": [
        "pdf"
      ],
      "file_max_size": 5,
      "text_characters_limited": true,
      "text_min_length": 1,
      "text_max_length": 55,
      "text_lines_limited": true,
      "text_max_lines": 4,
      "number_limited": true,
      "number_limit_mode": "lowest",
      "number_lowest_value": 100,
      "number_highest_value": 1.1,
      "number_integers_only": false,
      "product_list_adjusts_inventory": true,
      "product_list_adjusts_pricing": true,
      "product_list_shipping_calc": "weight"
    },
    "display_name": "Add-a-$5-Donation1535042499-187",
    "id": 55,
    "name": "Add-a-$5-Donation1535042499-187",
    "option_values": [
      {
        "label": "Green",
        "sort_order": 0,
        "id": 1,
        "is_default": false,
        "value_data": {}
      }
    ],
    "product_id": 4,
    "sort_order": 1,
    "type": "radio_buttons"
  },
  "meta": {}
}
```

**SDK Code**

```python
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1"

headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1';
const options = {
  method: 'GET',
  headers: {Accept: 'application/json', 'X-Auth-Token': '<apiKey>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1', [
  'headers' => [
    'Accept' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```