Associations of Product Character Values

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

GET /
Return feature and value associations index list

GET /features/{id}
Return feature and value associations found matching feature_id {id}

GET /values/{id}
Return feature and value associations found matching value_id {id}

PUT/store
Requiredfeature_id, value_id
Create a feature and value association using request’s body

POST /values/{id}
Requiredfeature_id as an object with current, new and rule properties. The rule property only accepts replace or nothing.
Ex. : 
  1.     "feature_id": {
  2.         "current":20,
  3.         "new":30,
  4.         "rule":"replace" // only accepts "replace" or "nothing"
  5.     }
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}
Requiredvalue_id as an object with current and new properties. Ex : 
  1.     "value_id": {
  2.         "current":51,
  3.         "new":21
  4.     }
Update the feature and value associations’ matching value_id_id->current and feature_id {id} and with value_id->new

DELETE /features/{id}
Optionalfeature: {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}
Optionalfeature: {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 ...