Bulk import volume prices
Import the quantity-based volume prices of many products in a single call, for example the price breaks your ERP keeps per product. The API calls them bulk prices.
Endpoint
POST /v2/bulk-prices/bulk
Request
{
"bulkPrices": [
{
"source": { "id": "PRD-00482", "name": "MY_ERP" },
"quantityFrom": 10,
"value": 27.50
},
{
"source": { "id": "PRD-00482", "name": "MY_ERP" },
"quantityFrom": 50,
"value": 25.00
},
{
"source": { "id": "PRD-00482", "name": "MY_ERP" },
"quantityFrom": 100,
"value": 22.50
},
{
"source": { "id": "PRD-00482", "name": "MY_ERP" },
"quantityFrom": 50,
"value": 23.95,
"validFrom": "2027-01-04T00:00:00Z",
"validTo": "2027-01-31T23:59:59Z"
}
],
"directives": [
{ "operation": "resetOnUpdate", "fields": [] }
]
}
Response
{
"created": 4,
"updated": 0,
"total": 4
}
How it works
Each entry is one tier that applies from quantityFrom units. How Propeller reads value depends on the bulkDiscountType of the product's price, which you set with Bulk import prices:
bulkDiscountType | value means |
|---|---|
netprice | The unit price from this quantity |
listpricemin | A percentage off the list price |
costpriceplus | A percentage on top of the cost price |
A price created without a bulkDiscountType uses listpricemin. The request above uses netprice values.
Volume prices attach to the product's price, so import the price first. When a product in the request has no price, the call answers 404 and saves nothing, also not the tiers of the other products. Identify products by productId or by source, which takes the product's source as name and its sourceId as id. You can also send the ID of the product's price in priceId. Each tier takes one of these three fields. productSource, which the prices and discounts endpoints use, is refused with 400.
Add validFrom and validTo (ISO 8601 timestamps) for a tier that applies only in a period, such as a promotion. A dated tier is stored next to the undated tier at the same quantity: the request above gives the product three undated tiers and one January tier at 50 units. Propeller identifies a tier by its product, quantityFrom and validFrom. Without directives the call merges: a tier you send again gets its new value, a new tier is added and tiers you leave out stay.
Each tier can appear only once per request. A repeated product, quantityFrom and validFrom refuses the whole request with 400.
Replace the tiers of a product
With the resetOnUpdate directive the call replaces all volume prices of every product in the request with the tiers it carries, dated tiers included. A tier you removed in your ERP then disappears from Propeller on the next import. An empty fields list is enough: the directive replaces the whole set of tiers, not single fields.
- Products that are not in the request keep their volume prices.
- Keep all tiers of a product in one request. A second request with the directive replaces the tiers the first one created.
- The response counts every tier as
created, because the tiers are written anew.
To remove all volume prices of a product, find the ID of its price with POST /v2/prices/search and the productIds filter, then call DELETE /v2/prices/{id}/bulk-prices. Read the tiers of a price with POST /v2/bulk-prices/search and the priceIds filter.
See also
- Bulk import prices (recipe)
- Bulk import volume cost prices (recipe)
- Bulk create volume prices endpoint
- Tiered and volume pricing for how storefronts show the tiers