Product Price Adjustments [API]

Product Price Adjustments are variations of products for specific options. 

Description List available Product Price Adjustments
Action GET
URL <your URL here>/api/product_price_adjustments
Sample request parameters id_eq=11    --> Search by Product Price Adjustment ID
product_id_eq=100   --> Search by product id
pricelist_id_eq=1   --> Search by pricelist id
option_id_eq=2   --> Search by option id
option_value_id_eq=3   --> Search by option value id

order_id=123 --> Filter pricelist, products, and option values based on a specific order. Note: the price adjustments are current and not the ones when the order was submitted (they could have been changed).
order_product_id=123 --> Filter pricelist, products, and option values based on a specific order product. Note: the price adjustments are current and not the ones when the order was submitted (they could have been changed).

Eg. <your URL here>/api/product_price_adjustments.json?product_id_eq=100&pricelist_id=1&option_value_id=3
Sample successful response [
    {
        "product_price_adjustment": {
           "id":12,
           "product_id":123,
           "option_id":1,
           "option_value_id":3,
           "pricelist_id":1,
           "price_modification": "100.0"

         }
    }
]

Description Creates a Product Price Adjustment

NOTES:
  1. When creating product price adjustments, the option must already exist on the product. An option value, that does not exist, will raise an error.
  2. If you create a product price adjustment with a combination of product_id, pricelist_id and option_value_id that already exists, the system will find and update the existing record instead of creating a new record.
Action POST
URL <your URL here>/api/product_price_adjustments
Sample request body     {
        "product_price_adjustment": {
           "product_id":123,
           "option_id":1,
           "option_value_id":3,
           "pricelist_id":1,
           "price_modification": "100.0"

         }
    }

Sample Successful Response     {
        "product_price_adjustment": {
           "id":12,
           "product_id":123,
           "option_id":1,
           "option_value_id":3,
           "pricelist_id":1,
           "price_modification": "100.0"

         }
    }
Description Update a Product Price Adjustment

NOTES:
  1. You can omit product_id, option_id, option_value_id, pricelist_id and pass only the "price_modification" value.
  2. You can pass product_id, option_id, option_value_id, pricelist_id but they have to be the same as in the existing record.
Action PATCH
URL <your URL here>/api/product_price_adjustments/<id of Product Price Adjustment>

Eg. <your URL here>/api/product_price_adjustments/12.json
Sample request body {
      "product_price_adjustment": {
           "id":12,
           "product_id":123,
           "option_id":1,
           "option_value_id":3,
           "pricelist_id":1,
           "price_modification": "111.0"

       }
 }

or just: 

{
     "product_price_adjustment": {
           "price_modification": "111.0"
      }
}



Sample Successful Response {
      "product_price_adjustment": {
           "id":12,
           "product_id":123,
           "option_id":1,
           "option_value_id":3,
           "pricelist_id":1,
           "price_modification": "111.0"

       }
}
Description Delete a Product Price Adjustment
Action DELETE
URL <your URL here>/api/product_price_adjustments/ <id of Product Price Adjustment>

Eg. <your URL here>/api/product_price_adjustments/12.json
Sample request body <empty>
Sample Successful Response <empty>

Still need help? Contact Us Contact Us