Inventory API
Products
Create Service
this api endpoint (post) (post) creates a service 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 } } unlimited stock boolean the default value is false you can set this to true if the tax category of the product is digital services stock integer the available stock for this product you can ignore this parameter if unlimited stock is set to true stock limit warning integer if the product stock falls below this value, an email notification will be sent to you not supported for services with unlimited stock is set to true 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 price new from appendix docid\ kfbmx4q3dxjtduqf75yx1 the date 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 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 " 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, "shown" true, "gallery" \[], "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 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 options object the keys of the object correspond to a supported language the values are also objects with the option configuration in that language require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/products/create/service") 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 = { unlimited stock true, tax category "digital services", pricing model \[ { currency "eur", price 1000 } ], languages { en { title "my awesome product" } } } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/products/create/service' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{"unlimited stock" true, "tax category" "digital services", "pricing model" \[{"currency" "eur", "price" 10}],"languages" {"en" {"title" "my awesome product"}}}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { unlimited stock true, tax category "digital services", pricing model \[ { currency "eur", price 10 } ], languages { en { title "my awesome product" } } }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/products/create/service", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "product" { "id" "cbadfed2 4464 452c a146 6f064c863953", "object" "product", "name" " my awesome product", "classification" "digital services", "created" "2022 10 20 23 42 05 +0000", "created unix" 1666309325, "price" 1000, "currency" "eur", "gallery" \[], "in stock" true, "type" "digital service", "updated" "2022 10 20 23 42 05 +0000", "updated unix" 1666309325, "on sale" true, "discount allowed" true, "reviews allowed" false, "hide if no stock" null, "shown" true, "description" null, "seo description" null, "seo title" null, "stock" null, "tax calculation" "exclusive", "has variations" false, "unlimited stock" true, "pricing model" \[ { "id" "d50ddc33 6cc2 4ccb 86d8 72819cccb8c3", "object" "pricing model", "currency" "eur", "price" 1000, "recommended seller price" 0, "acquisition price" 0 } ], "related products" null, "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 }, "languages" { "en" { "title" " my awesome product", "seo title" null, "description" null, "seo description" null, "slug" null } }, "is moss product" true }, "status" 200 }