Get a Specific Option

GET /api/options/{option_id}

This endpoint allows you to retrieve detailed information about a specific product option by its unique identifier.

Request Example

GET /api/options/3
Success Response: If the request is successful, you'll receive HTTP/1.1 200 OK and a JSON response with the option details.

Response Format

{
  "option_id": "3",
  "product_id": "12",
  "company_id": "1",
  "option_type": "S",
  "option_name": "Size",
  "required": "Y",
  "position": 10,
  "status": "A",
  "variants": [
    {
      "variant_id": "12",
      "option_id": "3",
      "position": 0,
      "modifier": "",
      "modifier_type": "A",
      "variant_name": "Small",
      "point_modifier": "",
      "weight_modifier": "",
      "weight_modifier_type": "",
      "status": "A"
    },
    {
      "variant_id": "13",
      "option_id": "3",
      "position": 1,
      "modifier": "5.00",
      "modifier_type": "A",
      "variant_name": "Medium",
      "point_modifier": "",
      "weight_modifier": "",
      "weight_modifier_type": "",
      "status": "A"
    },
    {
      "variant_id": "14",
      "option_id": "3",
      "position": 2,
      "modifier": "10.00",
      "modifier_type": "A",
      "variant_name": "Large",
      "point_modifier": "",
      "weight_modifier": "",
      "weight_modifier_type": "",
      "status": "A"
    }
  ]
}

Response Fields

Option Fields

Field Type Description
option_id string The unique identifier of the option
product_id string The ID of the product this option belongs to
company_id string The ID of the company/vendor
option_type string The type of option: S (Select box), R (Radio button), C (Checkbox), I (Text), T (Text area), F (File), D (Date), etc.
option_name string The display name of the option
required string Whether this option is required: Y (Yes) or N (No)
position number The sorting position of this option
status string The status of the option: A (Active) or D (Disabled)
variants array An array of option variants/values

Variant Fields

Field Type Description
variant_id string The unique identifier of the variant
option_id string The ID of the parent option
position number The sorting position of this variant
modifier string The price modifier value
modifier_type string The type of price modifier: A (Absolute) or P (Percentage)
variant_name string The display name of the variant
status string The status of the variant: A (Active) or D (Disabled)
Tip: Product options allow customers to customize their purchases. The structure includes the option itself (e.g., "Size") and variants/values (e.g., "Small", "Medium", "Large"). Price modifiers can adjust the product price based on selected options.