Inventory API
Products
Bulk Update
this api endpoint (post) (post) bulk updates a limited set of attributes (such as stock, pricing or expiry date) on multiple products with a single request if the request succeeds, it will return the ids of the products that were updated permissions products edit webhook events product events docid\ bfktivl3xva6ucdtrt5bz , product events docid\ bfktivl3xva6ucdtrt5bz and product events docid\ bfktivl3xva6ucdtrt5bz (for each product updated) for more advanced bulk editing see power editor docid\ ar9zq3xwvbwe m0imfu9w body parameters products array of strings an array of strings each representing a product id that you wish to update the maximum products that can be updated in a single request is 300 stock updates object configure this attribute if you like to bulk update the stock of your products stock updates apply to all product types including items with unlimited stock { "stock" 10, "action" "increase" } stock integer the number of items to add or remove from the product's stock action string determines how the price changes will be applied to the products the available options are increase and decrease if an item has variations configured, then the stock updates will be applied to variants pricing updates array of objects configure this attribute if you like to bulk update one or more pricing model of your products pricing updates are available on a percentage basis or fixed amount "pricing updates" \[ { currency 'eur', action 'decrease', price change percent 10 } ] currency string appendix docid\ kfbmx4q3dxjtduqf75yx1 the currency of the pricing model that will be updated the price changes will be applied if the items have a valid pricing model in this currency price change percent integer the percentage change to apply to the product's price optional if price change fixed is provided price change fixed integer a fixed amount to add or substrack from the product's price optional if price change percent is provided action string determines how the price changes will be applied to the products the available options are increase and decrease if an item has variations configured then the price changes will be applied to all variants pricing updates are not available for billing plans new from appendix docid\ kfbmx4q3dxjtduqf75yx1 the date that products were launched for sale as a brand new item price new to appendix docid\ kfbmx4q3dxjtduqf75yx1 after this date the products will not be considered as brand new items price expiry date appendix docid\ kfbmx4q3dxjtduqf75yx1 after this date the products will not be available for sale price release date appendix docid\ kfbmx4q3dxjtduqf75yx1 the date that the products will be released for sale max units integer the maximum amount of stock that can be purchased in a single order price min units integer the minimum amount of stock that can be purchased in a single order on sale boolean determines if the products have any active special promotion or sale buyable boolean determines if the products are available for sale and can be purchased via external sites and checkout flows price discount allowed boolean determines if the products can have any discounts applied to it price shown boolean determines if the products are currently visible in external assets price exclude from feed boolean determines if the products will be included in third party feeds and product search engines unlimited stock boolean determines if the products can have unlimited stock it will ignore items with type physical products , physical services or any product with manual licensing retries integer the number of retries that are allowed when the customer fails to pay for their billing plan available for billing plans cancel action string determines what action is taken when all available retries for a recurring payment have failed the possible values are pause and cancel available for billing plans cancel behaviour string determines how cancelations are handled the possible values are immediate and end of period available for billing plans require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/products/bulk/update") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" data = { products \[ 'cbadfed2 4464 452c a146 6f064c863953' ], pricing updates \[ { currency 'eur', action 'decrease', price change percent 10 } ] } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/products/bulk/update' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{ "products" \[ "cbadfed2 4464 452c a146 6f064c863953" ], "pricing updates" \[ { "currency" "eur", "action" "decrease", "price change percent" 10 } ] }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { products \[ 'cbadfed2 4464 452c a146 6f064c863953' ], pricing updates \[ { currency 'eur', action 'decrease', price change percent 10 } ] }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/products/bulk/update", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "products" \[ "cbadfed2 4464 452c a146 6f064c863953" ] }