Products in Venddor can have options—additional properties that customers may select when buying a product. For example, for clothes that would be color, size, optional accessories, etc. Product options enable you to offer product variations and customizations without creating separate product entries.
https://www.venddor.com.br/api/2.0/products/{product_id}/options
Option Type | Code | Description |
---|---|---|
Select Box | S |
A dropdown menu that allows customers to select one option from a list (e.g., size: S, M, L, XL) |
Radio Group | R |
A set of radio buttons that allows customers to select one option (e.g., color: Red, Blue, Green) |
Checkbox | C |
A checkbox that allows customers to include or exclude an option (e.g., Gift wrapping: Yes/No) |
Input Field | I |
A text field that allows customers to enter custom information (e.g., Custom engraving text) |
Text Area | T |
A multi-line text field for longer customer input (e.g., Special instructions) |
File Upload | F |
Allows customers to upload a file (e.g., Custom design image) |
Date | D |
A date picker for selecting dates (e.g., Delivery date) |
{ "option_id": "16", "product_id": "423", "option_name": "Color", "option_type": "S", "position": 10, "required": "Y", "comment": "Please select your preferred color", "inventory": "Y", "variants": [ { "variant_id": "42", "variant_name": "Black", "position": 10, "modifier_type": "A", // A - absolute, P - percentage "modifier": "0.00", "weight_modifier": "0.00", "status": "A" }, { "variant_id": "43", "variant_name": "White", "position": 20, "modifier_type": "A", "modifier": "0.00", "weight_modifier": "0.00", "status": "A" }, { "variant_id": "44", "variant_name": "Red", "position": 30, "modifier_type": "A", "modifier": "5.00", "weight_modifier": "0.00", "status": "A" } ] }
Retrieves all options associated with a specific product.
Retrieves details for a specific product option.
Creates a new option for a product.
Updates an existing product option.
Deletes a product option.
Y
/N
)Y
/N
)A
- Absolute (adds or subtracts a fixed amount)P
- Percentage (adds or subtracts a percentage of the base price)A
) or disabled (D
)inventory=Y
attribute can be used for inventory tracking and in option combinations.
inventory=Y
), make sure to also update your product option combinations to reflect the accurate stock levels for each possible combination.
POST /api/2.0/products/423/options { "option_name": "Size", "option_type": "S", "position": 20, "required": "Y", "comment": "Please select your size", "inventory": "Y", "variants": [ { "variant_name": "Small", "position": 10, "modifier_type": "A", "modifier": "0.00", "weight_modifier": "-0.20", "status": "A" }, { "variant_name": "Medium", "position": 20, "modifier_type": "A", "modifier": "0.00", "weight_modifier": "0.00", "status": "A" }, { "variant_name": "Large", "position": 30, "modifier_type": "A", "modifier": "2.00", "weight_modifier": "0.30", "status": "A" }, { "variant_name": "Extra Large", "position": 40, "modifier_type": "A", "modifier": "5.00", "weight_modifier": "0.50", "status": "A" } ] }
When you have multiple options with inventory tracking enabled, you need to manage the inventory for specific combinations of options. For example, you might have 10 "Blue" and "Small" shirts, but only 5 "Red" and "Large" shirts.
Option combinations are managed through a separate API endpoint:
Retrieves all option combinations for a product.
Creates a new option combination with inventory data.
inventory=Y
, you must create option combinations with specific inventory levels. Otherwise, customers won't be able to purchase the product with those option combinations.