Hi, I’m reading the docs for creating PriceList with the Admin Web API. Do you have to update a pricelist to create priceListItems or can you create priceListItems when creating a PriceList? If so how?
Litium version: 7.7
Hi, I’m reading the docs for creating PriceList with the Admin Web API. Do you have to update a pricelist to create priceListItems or can you create priceListItems when creating a PriceList? If so how?
Litium version: 7.7
The price list itself is separate from the price list items, so when you want to update the items of a price list you call
PUT /Litium/api/admin/products/priceLists/{systemId}/items
with the prices in the body as:
[
{
"variantSystemId": "ad0fa165-3b5b-44fc-9f2f-26ddaf4fc02c",
"price": 999.2
},
{
"variantSystemId": "f9efe0ea-42aa-483e-9302-65460e162793",
"price": 888.2
},
{
"variantSystemId": "30650670-856f-4b40-9308-2d398bec88f0",
"price": 777.2
},
...
]
So just to double check. Even if i just created the pricelist with
/Litium/api/admin/products/priceLists
(no items as it was just created) i can then use /Litium/api/admin/products/priceLists/{systemId}/items
to update it with items?
Yes, exactly. Remember you can access the Swagger UI if you want try things out more easily.
https://docs.litium.com/documentation/architecture/web-api/how-to-use-the-web-api
Great, thank you!
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.