Inventory API
Products
Create Physical Product
this api endpoint (post) (post) creates a physical product if the request succeeds, it returns a product object docid 4hx r lwtyahq1 pey1da otherwise, it will return an error permissions products create webhook event product events docid\ bfktivl3xva6ucdtrt5bz body parameters tax category string the products docid\ gaxf8cqa3te sjlpubl7a of the product pricing model array of objects an array of objects, each representing a pricing model associated with the product "pricing model" \[ { "currency" "eur", "price" 1200, "recommended seller price" 0, "acquisition price" 0 } ] currency string appendix docid\ kfbmx4q3dxjtduqf75yx1 the currency of the pricing model price integer the price of the item for this pricing model recommended seller price integer the recommended price set by the merchant for the product in this currency acquisition price integer the base purchase price of the product in this currency languages object the titles, subtitles, seo descriptions, seo titles and long descriptions of the product in all supported languages the minimum information required is a title in at least one language the object's keys are a appendix docid\ kfbmx4q3dxjtduqf75yx1 while the values are also objects with the content of the product note a language has to be activated on your account before it can be used exampe "languages" { "en" { "title" "blue t shirt", "description" "exclusive blue t shirt, just 100 pieces available", "seo title" "blue t shirt", "seo description" "exclusive blue t shirt, just 100 pieces available", "slug" "blue t shirt" }, "de" { // german content }, "sv" { // swedish content } } stock breakdown array of objects an array of objects, each containing information about the warehouses and stock configuration of the product you can ignore this parameter if configuring variations or the stock parameter example "stock breakdown" \[ { "warehouse" "some warehouse id", "stock" 10 }, { "warehouse" "some other warehouse id", "stock" 200 } ] warehouse string the id of the warehouse stock integer the available stock for the product at this warehouse variations object you can use variations if you have multiple types of the same product let's say you have a small and medium t shirt but also blue or red; you can create a variation for each example "variations" { "delta pricing" true, "options" \[ { "label" { "en" "size", "de" "größe" }, "values" \[ { "en" "large", "de" "klein" } ], "type" "dropdown list" } ], "variants" \[ { "options" \[ { "size" "large", "sizen" "klein" } ], "stock" 100, "unlimited stock" false, "allow negative stock" false, "hide if no stock" true, "shown" true, "dimensions" { "height" 1, "length" 1, "width" 1 }, "gallery" \[], "sku" "skunumber", "pricing model" \[ { "currency" "eur", "price" 100 } ] } ] } example with stock breakdown (warehouses) "variations" { "delta pricing" true, "options" \[ { "label" { "en" "size", "de" "größe" }, "values" \[ { "en" "large", "de" "klein" } ], "type" "dropdown list" } ], "variants" \[ { "options" { "en" { "size" "large" }, "de" { "größe" "klein" } }, "stock breakdown" \[ 	 { 	 "warehouse" "68f5d2ca 0e90 4ed6 9c08 0f0c597b643d", 	 "stock" 10 	 } 	 ], "weight" 10, "unlimited stock" false, "allow negative stock" false, "hide if no stock" true, "shown" true, "dimensions" { "height" 1, "length" 1, "width" 1 }, "stock" 10, "gallery" \[], "sku" "skunumber", "pricing model" \[ { "currency" "eur", "price" 100, } ] } ] } delta pricing boolean determines how the cost is calculated for all the variants if delta pricing is set to true , the cost is added (or deducted) from the base product price if it is set to false , then the cost is fixed and taken directly from the variant pricing models options array of objects an array of objects, each corresponding to an option such as size or color label object the label of the option in all supported languages it is an object with key value pairs representing a supported language and its corresponding label values array of objects the values of the option such as small , red and large in all supported languages it is an object with key value pairs representing a supported language and its corresponding label type string the option type determines how they are displayed to customers during checkout in tamio sites the possible values are dropdown list and radio buttons variations array of objects an array of objects, each representive an actual product variant gallery array of strings each string in the array is an asset id shown boolean determines whether the variant is currently visible in external assets allow negative stock boolean this attribute shows whether you can accept orders for this variant if it runs out of stock available for physical products hide if no stock boolean this attribute shows if the variant is visible in external assets such as sites and checkout flows if it runs out of stock available for physical products sku string the variant's sku number available for physical products ean string the variant's ean number available for physical products weight number the weight of the variant available for physical products stock integer the total available stock of the variant pricing model array of objects an array of objects, each representing a pricing model configured on the variant stock breakdown array of objects an array of objects each containing information about the warehouses and stock configuration of the product available for physical products warehouse string the id of the warehouse stock integer the available stock for the product at this warehouse dimensions object an object with the dimensions of the variant available for physical products length number the length of the variant height number the height of the variant width number the width of the variant options object the keys of the object correspond to a supported language the values are also objects with the option configuration in that language packs array of objects if you sell in bulk, you can group your product into packs this means customers will purchase one pack at a time instead of the default standard units during checkout to add packs to your product, you need to configure the packs array with the following attributes example "packs" \[ { "label" "pack of 10", "stock" 10, "multiple" false }, { "label" "pack of 5", "stock" 5, "multiple" false } ] example with variations "packs" \[ { "label" "pack of 10", "stock" 10, "multiple" false, "variants" \[ { "stock" 5, "id" "some variant id" }, { "stock" 5, "id" "some other variant id" } ] } ] label string the label of your pack stock integer the total stock contained in this pack multiples boolean determines if customers can purchase multiple packs in the same order the default value is false variants array of objects an array of objects with the variant configuration of the pack required if your product has variations each object requires the id of the variant and the stock available note when creating packs with variants, you must pass the variant's id in the request this means that you have to create the product with its variants first and then configure its packages stock integer the available stock for this product you can ignore this parameter if adding variations to the item or warehouses stock limit warning integer if the product stock falls below this value, an email notification will be sent to you 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 buyable boolean this attribute shows if the product is available for sale on sale boolean this attribute shows if there is a specific sale or promotion active currently active price discount allowed boolean determines if the product can have any discounts applied to it the default value is true reviews allowed boolean this attribute shows if customers can leave reviews for this item the default value is false price shown boolean determines if the product is currently visible in external assets the default value is true price exclude from feed boolean determines if the product will be included in third party feeds and product search engines allow negative stock boolean this attribute shows whether you can accept orders for this product if it runs out of stock hide if no stock boolean this attribute shows if the product can be shown in external assets such as sites and checkout flows if it runs out of stock price new from appendix docid\ kfbmx4q3dxjtduqf75yx1 the date that the product was launched for sale as a brand new item price new to appendix docid\ kfbmx4q3dxjtduqf75yx1 after this date, the product will not be considered a new item price expiry date appendix docid\ kfbmx4q3dxjtduqf75yx1 after this date, the product will not be available for sale price release date appendix docid\ kfbmx4q3dxjtduqf75yx1 the date that the product will be released for sale gallery array of strings each string in the array must be an asset id sku string the product's sku number mpn string the product's mpn number asin string the product's asin number ean string the product's ean number brand string the product's brand model string the model of the product isbn string the product's isbn number hscode string the product's hs code upc string the product's upc number gtin string the product's gtin number sample boolean this attribute shows if the available stock is sold as a sample related products array of strings an array of product ids, each representing a related product whitelist array of strings an array of iso country codes only customers from these countries can purchase this product custom attributes array of objects an array of objects each corresponding to a custom attribute configured on the product "custom attributes" \[ { "language" "en", "name" "attribute name", "value" "attribute value" } ] language string the language of the custom attribute name string this name of the custom attribute value string the value of the custom attribute custom fields array of objects an array of objects each corresponding to a custom field configured on the product "custom fields" \[ { "language" "en", "name" "field name", "type" "checkboxes", "values" \[ "value1", "value2" ] }, { "language" "en", "name" "name", "range from" 1709762400, "range to" 1711749600, "type" "date picker" } ] language string the language of the custom field name string this name of the custom field type string this type of the custom field the possible values are size , checkboxes , textfield , textarea , date picker values array of strings an array of strings, each represtive a value for the custom field available for custom fields with type " checkboxes " range from timestamp the starting range for the custom fields available for custom fields with type " range from " range to string the starting range for the custom fields available for custom fields with type " range to " require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/products/create/physical") 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 = { tax category "general", languages { en { 	 title "my awesome product" 	 } }, pricing model \[ { currency "eur", price 1200 } ], variations { delta pricing true, options \[ { label { en "size", de "größe" }, values \[ { en "large", de "klein" } ], type "dropdown list" }, ], variants \[ { options { en { "size" "large" }, de { "größe" "klein" } }, stock breakdown \[ { warehouse "68f5d2ca 0e90 4ed6 9c08 0f0c597b643d", stock 10 } ], unlimited stock false, allow negative stock false, hide if no stock true, shown true, dimensions { height 1, length 1, width 1 }, gallery \[], sku "skunumber", pricing model \[ { currency "eur", price 10000, recommended seller price 0, acquisition price 0 } ] } ] } } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/products/create/physical' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{ "tax category" "general", "languages" { "en" { "title" "my awesome product" } }, "pricing model" \[ { "currency" "eur", "price" 12 } ], "variations" { "delta pricing" true, "options" \[ { "label" { "en" "size", "de" "größe" }, "values" \[ { "en" "large", "de" "klein" } ], "type" "dropdown list" } ], "variants" \[ { options { "en" { "size" "large" }, "de" { "größe" "klein" } }, "stock breakdown" \[ { "warehouse" "68f5d2ca 0e90 4ed6 9c08 0f0c597b643d", "stock" 10 } ], "unlimited stock" false, "weight" null, "allow negative stock" false, "hide if no stock" true, "shown" true, "dimensions" { "height" 1, "length" 1, "width" 1 }, "gallery" \[], "sku" "skunumber", "pricing model" \[{ "currency" "eur", "price" 100 }]}]}}'var myheaders = new headers(); myheaders append("accept", "application/json"); // replace your token here with your developer key myheaders append("authorization", "bearer your token here"); var data = { tax category "general", languages { en { 	 title "my awesome product" 	 } }, pricing model \[ { currency "eur", price 12, recommended seller price 0, acquisition price 0 } ], variations { delta pricing true, options \[ { label { en "size", de "größe" }, values \[ { en "large", de "klein" } ], type "dropdown list" } ], variants \[ { options { en { "size" "large" }, de { "größe" "klein" } }, stock breakdown \[ { warehouse "68f5d2ca 0e90 4ed6 9c08 0f0c597b643d", stock 10 } ], unlimited stock false, allow negative stock false, hide if no stock true, shown true, dimensions { height 1, length 1, width 1 }, gallery \[], sku "skunumber", pricing model \[ { currency "eur", price 100 } ] } ] } }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/products/create/physical", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "product" { "id" "5730e72d 6512 466f 87b4 2cf058b9a7d8", "object" "product", "name" "my awesome product", "classification" "general", "created" "2022 10 26 11 45 58 +0000", "created unix" 1666784758, "price" 1200, "currency" "eur", "gallery" \[], "in stock" true, "type" "physical product", "updated" "2022 10 26 11 45 58 +0000", "updated unix" 1666784758, "on sale" true, "discount allowed" true, "reviews allowed" true, "hide if no stock" true, "shown" true, "description" null, "seo description" null, "seo title" null, "stock" 10, "tax calculation" "exclusive", "has variations" true, "unlimited stock" false, "pricing model" \[ { "id" "7a2457d5 f219 4332 b63b 4645cd4b80ae", "object" "pricing model", "currency" "eur", "price" 1200, "recommended seller price" 0, "acquisition price" 0 } ], "custom attributes" null, "min units" null, "max units" null, "stock limit warning" null, "allow negative stock" false, "additional information" { "sample" false, "release date unix" null, "release date" null, "expiry date unix" null, "expiry date" null, "new from unix" null, "new from" null, "new to unix" null, "new to" null, "exclude from feed" false, "brand" null, "model" null, "asin" null, "upc" null, "mpn" null, "isbn" null, "ean" null, "gtin" null, "sku" null, "hscode" null }, "languages" { "en" { "title" "my awesome product", "seo title" null, "description" null, "seo description" null, "slug" null } }, "related products" null, "packs" \[], "weight" null, "dimensions" { "length" null, "width" null, "height" null }, "variations" { "delta pricing" true, "options" \[ { "label" { "de" "größe", "en" "size" }, "type" "dropdown list", "values" \[ { "de" "klein", "en" "large" } ] } ], "variants" \[ { "allow negative stock" false, "dimensions" { "height" 1, "length" 1, "width" 1 }, "gallery" \[], "hide if no stock" true, "id" "6191e5b8 aec0 4e2f ac5e 45ad07dcaad8", "options" { "de" { "größe" "klein" }, "en" { "size" "large" } }, "pricing model" \[ { "currency" "eur", "price" 10000, "recommended seller price" 0, "acquisition price" 0 } ], "shown" true, "sku" "skunumber", "stock" 10, "stock breakdown" \[ { "areas served" \[ "au", "ar" ], "stock" 10, "warehouse" "68f5d2ca 0e90 4ed6 9c08 0f0c597b643d" } ], "unlimited stock" false, "weight" null } ] }, "is moss product" false }, "status" 200 }