Venddor IO provides a systematic way to access and manipulate product features:
Endpoint: http://example.com/api/features
Methods: GET and POST
Endpoint: http://example.com/api/features/:id
Methods: GET, PUT, and DELETE
Endpoint: http://example.com/api/products/:id/features
Method: GET
If you're looking to access a defined set of features or a specific page of features, you can leverage the pagination parameters:
page: Determines the page number to be displayed.items_per_page: Specifies the number of features to show on a page.For instance:
http://example.com/api/features?page=5 displays 10 features from the 5th page.http://example.com/api/features?items_per_page=20 showcases 20 features from the initial page.http://example.com/api/features?page=5&items_per_page=20 presents 20 features from the 5th page.Every product feature in Venddor IO is described by specific attributes or fields. Here's a brief look:
company_id, description, and feature_type are essential when making API requests.description, feature_type, and status.For a detailed understanding of each field and its expected values, refer to the provided table in the documentation.
Variants describe the different options available for a product feature, especially for those that offer choices like size or color. Each variant is characterized by fields such as description, feature_id, and variant_id.
curl -X GET 'http://example.com/api/features'
This returns a list of product features with their associated attributes.
curl -X GET 'http://example.com/api/features/14'
This provides the attributes of the product feature with feature_id=14.
curl --header 'Content-type: application/json' -X POST 'http://example.com/api/features' --data-binary '{"company_id":"1", "feature_type":"C", "description":"Handmade", "status":"A"}'
This creates a new checkbox feature named "Handmade" for the store with company_id=1 and sets its status to Active.
curl --header 'Content-type: application/json' -X PUT 'http://example.com/api/features/22' --data-binary '{"company_id":"1", "feature_type":"S", "comparison":"Y", "variants":[{"variant": "Unique"}, {"variant": "Mass-produced"}]}'
This modifies the feature with feature_id=22 and adds two new variants: Unique and Mass-produced. It also makes this feature visible on the product comparison page.
curl -X DELETE 'http://example.com/api/features/22'
This deletes the product feature with feature_id=22.
curl -X GET 'http://example.com/api/products/14/features'
curl --header 'Content-type: application/json' -X POST 'http://example.com/api/products' --data-binary '{"product": "New Product", "category_ids": "223", "main_category": "223", "price": "10", "status": "A", "product_features": {"23": {"feature_type": "T", "value": "Test"}}}'
curl --header 'Content-type: application/json' -X PUT 'http://example.com/api/products/14' --data-binary '{"product_features": {"23": {"feature_type": "T", "value": "Updated Test"}}}'