Associations of Product Character Values
Usage
Route : /api/feature_associations
Protected : true
Attributes
id : integer
feature_id : integer (PUT, DELETE), object (POST)
value_id : integer (PUT, DELETE), object (POST)
Endpoints
Return feature and value associations index list
Return feature and value associations found matching feature_id {id}
Return feature and value associations found matching value_id {id}
PUT | /store |
Required | feature_id, value_id |
Create a feature and value association using request’s body
POST | /values/{id} |
Required | feature_id as an object with current, new and rule properties. The rule property only accepts replace or nothing.
Ex. :
- "feature_id": {
- "current":20,
- "new":30,
- "rule":"replace" // only accepts "replace" or "nothing"
- }
|
Update the feature and value associations’ matching feature_id->current and value_id {id} and with feature_id->new. The update is done according to feature_id->rule : if a duplicate entry is found it replaces or does nothing.
POST | /features/{id} |
Required | value_id as an object with current and new properties. Ex :
- "value_id": {
- "current":51,
- "new":21
- }
|
Update the feature and value associations’ matching value_id_id->current and feature_id {id} and with value_id->new
DELETE | /features/{id} |
Optional | feature: {feature_id} |
Delete the feature and value association containing feature {id}. If specified within the body, replace any feature_id using {id} with {feature_id}
DELETE | /values/{id} |
Optional | feature: {feature_value} |
Delete the feature and value association containing value {id}. If specified within the body, replace any feature_value_id using {id} with {feature_value}
Related Articles
Values of product characteristics
Usage Route : /api/feature_values Protected : true Attributes id : integer name : translated Endpoints GET / Return feature Values index list GET /{id} Return details of the feature Value {id} PUT /store Required id, name Create a feature Value using ...
Association of characteristics to a product
Usage Route : /api/product_features Protected : true Attributes id : integer feature_id : integer (PUT, DELETE), object (POST) product_id : integer (PUT, DELETE), object (POST) Endpoints GET / Return product and feature associations index list GET ...
Exporting to ElasticSearch
Usage Route : /api/export Protected : true Endpoints GET / Export all your model/product associations to ElasticSearch. DELETE /delete Empty your ElasticSearch index. Warning : this operation is not reversible!
Products
Usage Route : /api/products Protected : true Attributes id : integer supplier_reference : string name : string ean13 : string reference : string Endpoints GET / Return Products index list GET /{id} Return details of the Product {id} PUT /store ...
Characteristics products
Usage Route : /api/features Protected : true Attributes id : integer name : translated Endpoints GET / Return Features index list GET /{id} Return details of the Feature {id} PUT /store Required id, name Create a product’s Feature using request’s ...