Product Prices [API]
Product prices, define the prices per price list per product.
| Description | List Product Prices |
| Action | GET |
| URL | <your URL here>/api/product_prices |
| Sample request parameters |
{"product_code_eq":"00001"}
|
| Sample Successful Response |
[{"id":19,"product_id":12,"pricelist_id":1,"price":"99.99","created_at":"2016-09-12T07:40:06.000Z","updated_at":"2016-09-12T07:40:06.000Z"},{"id":20,"product_id":12,"pricelist_id":2,"price":"75.0","created_at":"2016-09-12T07:40:28.000Z","updated_at":"2016-09-12T07:40:28.000Z"}]
|
| Available parameters | product_id_eq (product_id), product_code_eq (product code) |
| Pagination support
(optional) |
Use paginated=1 with per_page and page params to specify the results to fetch
Example: /api/product_prices?paginated=1&per_page=50&page=3 |
| Description | Create Product Price |
| Action | POST |
| URL | <your URL here>/api/product_prices |
| Sample request |
{"product_price":{"product_id":12,"pricelist_id":1,"price":99.99}}
|
| Sample Successful Response |
{"id":19,"product_id":12,"pricelist_id":1,"price":"99.99","created_at":"2016-09-12T07:40:06.730Z","updated_at":"2016-09-12T07:40:06.730Z"}
|
| Required fields | product_id, pricelist_id, price |
| Description | Update Product Price |
| Action | PATCH |
| URL | <your URL here>/api/product_prices/<product price id> |
| Sample request |
{"product_price":{"product_id":12,"pricelist_id":1,"price":50.99}}
|
| Sample Successful Response | Same as create |
| Required fields | product_id, pricelist_id, price |
| Description | Bulk Update Product Prices |
| Action | PATCH |
| URL | <your URL here>/api/product_prices/update_prices |
| Sample request |
{
"pricelist_id":1,
"product_prices": [
{
"product_id": 1,
"price": 11.11
},
{
"product_id": 2,
"price": 22.0
},
{
"product_id": 3,
"price": 33.10
},
{
"product_id": 4,
"price": 44.0
}
]
}
|
| Sample Successful Response | Same as create |
| Required fields | pricelist_id
product_id (or product_code), price |