Association of characteristics to a product

Association of characteristics to a product

Use

Road:/api/product_features
Protected:true

Attributes

id:integer
feature_id:integer (PUT, DELETE), object (POST)
product_id:integer (PUT, DELETE), object (POST)

Roads

Get/
Returns the list of associations of characteristics to products

Get/features/{id}
Returns associations of product characteristics found from a Character ID {id}

Get/products/{id}
Returns associations of product characteristics found from a Product ID {id}

Put/store
Requiredfeature_id, product_id
Creates an association between a product and a character using the body of the request

Post/features/{id}
Requiredproduct_id as an object with current and new properties. Ex:
  1. "product_id": {
  2. "current": 25,
  3. "new": 21
  4. }
Updates the association between a product and a character based on the product character whose ID is {id} and replaces the product whose ID is {id}product_id.currentby the one whose ID isproduct_id.new

Post/products/{id}
Requiredfeature_id as an object with current and new properties. Ex:
  1. "feature_id": {
  2. "current": 10,
  3. "new": 30
  4. }
Updates the association between a product and a character from the product whose ID is {id} and replaces the product character whose ID is {id}feature_id.currentby the one whose ID isfeature_id.new

Delete/features/{id}
Optionalfeature: {feature_id}
Removes character associations with a product when the product character ID is {id}. If specified, replace the character ID produced of each of these associations with {feature_id}.

Delete/products/{id}
Optionalproduct: {product_id}
Removes character associations with a product when the product ID is {id}. If specified, replace the product ID of each of these associations with {product_id}.