List Options of a Product - Venddor API

List Product Options

This endpoint allows you to retrieve all configurable options for a specific product. Product options are customizable attributes that customers can select when ordering a product (e.g., size, color, material).

Base URL: https://your-store-url.com/api

Endpoint Details

GET /api/options/?product_id={id}

This request returns all options and their variants for the specified product.

Query Parameters

Parameter Type Description
product_id* integer The unique identifier of the product

Example Request

GET /api/options/?product_id=12

Response Format

The response is a JSON object where each key is an option ID, and the value is the option details including its variants:

{
  "3": {
    "option_id": "3",
    "product_id": "12",
    "company_id": "1",
    "option_type": "S",
    "inventory": "Y",
    "regexp": "",
    "required": "N",
    "multiupload": "N",
    "allowed_extensions": "",
    "max_file_size": "0",
    "missing_variants_handling": "M",
    "status": "A",
    "position": "20",
    "value": "",
    "option_name": "Size",
    "option_text": "Size",
    "description": "",
    "inner_hint": "",
    "incorrect_message": "",
    "comment": "",
    "variants": {
      "12": {
        "variant_id": "12",
        "option_id": "3",
        "position": "10",
        "modifier": "0.000",
        "modifier_type": "A",
        "weight_modifier": "0.000",
        "weight_modifier_type": "A",
        "point_modifier": "0.000",
        "point_modifier_type": "A",
        "variant_name": "Small",
        "image_pair": []
      },
      "13": {
        "variant_id": "13",
        "option_id": "3",
        "position": "20",
        "modifier": "0.000",
        "modifier_type": "A",
        "weight_modifier": "0.000",
        "weight_modifier_type": "A",
        "point_modifier": "0.000",
        "point_modifier_type": "A",
        "variant_name": "Medium",
        "image_pair": []
      }
    }
  },
  "4": {
    "option_id": "4",
    "product_id": "12",
    "company_id": "1",
    "option_type": "S",
    "inventory": "Y",
    "required": "N",
    "status": "A",
    "position": "0",
    "option_name": "Color",
    "variants": {
      "17": {
        "variant_id": "17",
        "option_id": "4",
        "position": "0",
        "modifier": "0.000",
        "modifier_type": "A",
        "weight_modifier": "0.000",
        "weight_modifier_type": "A",
        "point_modifier": "0.000",
        "point_modifier_type": "A",
        "variant_name": "Black/White/White",
        "image_pair": {
          "pair_id": "805",
          "image_id": "861",
          "detailed_id": "0",
          "position": "0",
          "icon": {
            "image_path": "http://localhost/images/variant_image/0/173283_01.jpg",
            "alt": ""
          }
        }
      }
    }
  }
}

Understanding the Response

Option Fields

Field Type Description
option_id string Unique identifier of the option
product_id string ID of the product that this option belongs to
company_id string ID of the company (vendor) that owns the product
option_type string Type of option:
S — Select box
R — Radio button
C — Checkbox
I — Text
T — Textarea
F — File
D — Date
inventory string Whether this option affects product inventory tracking:
Y — Yes
N — No
required string Whether this option is required:
Y — Yes
N — No
status string Option status:
A — Active
D — Disabled
H — Hidden
position string Display position order
option_name string Name of the option shown to customers
variants object Object containing all available variants for this option

Variant Fields

Field Type Description
variant_id string Unique identifier of the variant
option_id string ID of the parent option
position string Display position order
modifier string Price modifier amount
modifier_type string Type of price modification:
A — Fixed amount
P — Percentage
weight_modifier string Weight modifier amount
weight_modifier_type string Type of weight modification:
A — Fixed amount
P — Percentage
variant_name string Name of the variant shown to customers
image_pair object/array Image associated with this variant (empty array if no image)
Tip: When building a product configurator, use the position field to display options and variants in the correct order.

Common Use Cases