Inbound endpoints
Price List endpoints
24 min
quick reference verb path method post /api/v1/price list/bulk create/ create price lists post /api/v1/prices/bulk add products/ add products to a price list post /api/v1/prices/bulk update prices/ update prices in a price list post /api/v1/prices/get prices/ read prices in a price list post /api/v1/prices/sync with catalog/ sync a price list with the catalog, based on its product filters create price lists description price lists can be created via this api, in bulk parameters name description valid from valid to price dimensions margin formula product filters is calendar type string , required the name of the price list type string , default unknown , optional the description of the price list type date yyyy mm dd , required start date of price list's validity period type date yyyy mm dd , required end date of price list's validity period type \[strings] , default \["price"] , optional list of price column names type string , default see below , optional formula to compute the margin in the price list its default value depends on cost columns "= (price {sum of costs}}) / price 100" e g if we have 2 cost columns with letters j and g "= (price (j + g)) / price 100" type dict , default {} , optional filter on catalog products e g if we only want to allow certain categories and cities {"category" \["kids", "teens"], "city" \["paris", "berlin"]} the default value {} means we allow all products type bool , default false , optional flag to know if price list should be calendar if true; price list will have a horizon of 365 days example curl location request post 'https //api pricemoov com/api/v1/price list/bulk create/' \\ \ header 'authorization jwt \<your token>' \\ \ header 'content type application/json' \\ \ data raw '\[ 	 { 	 "name" "pl 0001", 	 "description" "prices for amazon", 	 "valid from" "2023 03 10", 	 "valid to" "2024 03 09", 	 "price dimensions" \["unit price","1 000 units","10 000 units"], 	 "margin formula" "= (price (j) / price 100", 	 "product filters" {"category" \["kids"], "model" \["cap"]}, 	 "is calendar" true, 	 }, ] ' upon success, the response is 201 ok and returns \[{"id" 1, "name" "pl 0001"}, ] add products to a price list description once a price list has been added, or already exists, we can add products to it their price will be set to 0 notes the products will be first added to the price list draft, then the price list will be published this endpoint only works with price lists that were created through the above api it does not support the price lists created through the ui parameters price list name code {extensions if any} type string , required the name of the price list type string , required product code type any , required product extensions for instance if have defined 2 extensions in our catalog, agencies (string) and size (integer), we have to mention them in our payload see example below example curl location request post 'https //api pricemoov com/api/v1/prices/bulk add products/' \\ \ header 'authorization jwt \<your token>' \\ \ header 'content type application/json' \\ \ data raw '{ 	 "name" "pl 0001", 	 "payload" \[ { "code" "something really unique", "agencies" "00 01", "size" 1 }, { "code" "something actually unique", "agencies" "00 02", "size" 10 }, 	 ] 	 }' upon success, the response is 201 ok and returns either the ids of the rows added to the price list, or job infos indeed, if you add a lot of products (> 100), we launch an async job and the products will be added in the background \[1, 2, ] or { "status" "progress", "resource type" "published price list", "progress" {"total" 110, "finished" 100, "error" 0}, } update prices in a price list description once products have been added to a price list, or already were, we can update their prices notes the prices will be directly updated / set in the published version here, we do not alter the draft this endpoint only works with price lists that were created through the above api it does not support the price lists created through the ui parameters price list name code {extensions if any} price price dimension date type string , required the name of the price list type string , required product code type any , required product extensions (see above endpoint) type float , required price to set type string , required | optional price dimension for which we set the new price required if price list is multidimensional (e g \["p1, "p2"] ) type yyyy mm dd date , required | optional date for which we set the new price required if price list is calendar example curl location request post 'https //api pricemoov com/api/v1/prices/bulk update prices/' \\ \ header 'authorization jwt \<your token>' \\ \ header 'content type application/json' \\ \ data raw '{ 	 "price list name" "pl 0001", 	 "payload" \[ { "code" "something really unique", "agencies" "00 01", "size" 1, "price" 10 23, "price dimension" "unit price" "date" "2023 01 30" }, { "code" "something actually unique", "agencies" "00 02", "size" 10, "price" 91 23, "price dimension" "1 000 units" "date" "2023 12 01" }, 	 ] 	 }' upon success, the response is 201 ok and returns the ids of the updated rows \[1, 2, ] read prices in a price list description this endpoint lets you read prices in a price list notes this endpoint works only with price lists that are published parameters price list name promotion date code {attributes if any} {extensions if any} price dimension date promotion type string , required the name of the price list type yyyy mm dd date , optional , default today date on which we'll be looking for active promotions type string , optional product code absent code will be treated as a wildcard type any , optional product attributes only used if code is not mentionned type any , optional product extensions here, absent extensions will be treated as wildcards type string , required | optional price dimension for which we want to read the price required if price list is multidimensional (e g \["p1, "p2"] ) type yyyy mm dd date , required | optional date for which which we want to read the price required if price list is calendar type string , optional specific promotion to look for if no promotion is mentionned, all promotions that are valid on promotion date will be computed example curl location request post 'https //api pricemoov com/api/v1/prices/get prices/' \\ \ header 'authorization jwt \<your token>' \\ \ header 'content type application/json' \\ \ data raw '{ 	 "price list name" "pl 0001", 	 "promotion date" "2023 01 30", 	 "payload" \[ { "code" "something really unique", "agencies" "00 01", "size" 1, "price dimension" "unit price", "date" "2023 01 30", "promotion" "blackfriday" }, { "code" "something actually unique", "agencies" "00 02", "size" 10, "price dimension" "1 000 units", "date" "2023 12 01" }, 	 ] 	 }' upon success, the response is 201 ok and returns the payload rows, enriched with the active price and other potentially useful metadata \[ { "code" "something really unique", "agencies" "00 01", "size" 1, "price dimension" "unit price", "date" "2023 01 30", "price list name" "pl 0001", "price list id" 1, "extended catalog id" 1, "pk" 1, "active price" 10 23, "promotions" \[ {"name" "blackfriday", "value" 9 50} ] }, { "code" "something actually unique", "agencies" "00 02", "size" 10, "price dimension" "1 000 units", "date" "2023 12 01", "price list name" "pl 0001", "price list id" 1, "extended catalog id" 2, "pk" 2, "active price" 91 23, "promotions" \[ {"name" "blackfriday", "value" 80 00}, {"name" "summersales", "value" 85 00} ] }, ] example with wildcards let's say we don't mention agencies in the payload below curl location request post 'https //api pricemoov com/api/v1/prices/get prices/' \\ \ header 'authorization jwt \<your token>' \\ \ header 'content type application/json' \\ \ data raw '{ 	 "price list name" "pl 0001", 	 "payload" \[ { "code" "something really unique", "size" 1, "price dimension" "unit price" "date" "2023 01 30" } 	 ] 	 }' we then get the prices for the code , size , price dimension and date specified in the payload, exploded to every agencies in the data ("00 01", "00 02 ", ) \[ { "code" "something really unique", "agencies" "00 01", "size" 1, "price dimension" "unit price", "date" "2023 01 30", "price list name" "pl 0001", "price list id" 1, "extended catalog id" 1, "pk" 1, "active price" 10 23, "promotions" \[ {"name" "blackfriday", "value" 9 50}, {"name" "summersales", "value" 10 00} ] }, { "code" "something really unique", "agencies" "00 02", "size" 1, "price dimension" "unit price", "date" "2023 01 30", "price list name" "pl 0001", "price list id" 1, "extended catalog id" 3, "pk" 3, "active price" 109 09, "promotions" \[ {"name" "blackfriday", "value" 80 00}, {"name" "summersales", "value" 85 00} ] }, ] remark you can remove as many extensions as you like from the payload you can even remove the product code you can also use attributes without the product code sync a price list with the catalog, based on its product filters description once a price list has been added, or already exists, you can synchronise its content with the current catalog products, based on product filters for instance, if you created the price list with product filters = {"category" \["kids", "teens"], "city" \["paris", "berlin"]} , and you execute the following three updates on the catalog, then this is what would happen if you call our sync endpoint catalog update pk code category city already in price list ? filtered in ? consequence nothing 1 azerty kids paris yes yes nothing keep in price list changed "category" from "kids" to "adults" 2 uiop adults paris yes no remove from price list added the row 3 qsdfg teens berlin no yes add to price list added the row 4 hjkl teens rome no no nothing keep out of price list the price of newly added products will be set to 0 notes the products will be first added / removed to the price list draft, then the price list will be published this endpoint currently only works with price lists that were created through the above api it does not support the price lists created through the ui parameters price list name type string , required the name of the price list curl location request post 'https //api pricemoov com/api/v1/prices/sync with catalog/' \\ \ header 'authorization jwt \<your token>' \\ \ header 'content type application/json' \\ \ data raw '{ 	 "price list name" "pl 0001", 	 }' upon success, the response is 201 ok and returns either the ids of the added/removed/untouched rows, or job infos indeed, if you add a lot of products (> 100), we launch an async job and the products will be added in the background { "added" \[3], "removed" \[2], "untouched" \[1] } or { "status" "progress", "resource type" "published price list", "progress" {"total" 110, "finished" 100, "error" 0}, }