tys.products.create()
Esta página aún no está disponible en tu idioma.
create(input: ProductInput, options?: RequestOptions): Promise<Product>Parameters
Section titled “Parameters”inputProductInputObligatorioPropiedades
external_idstringObligatorionamestringObligatoriocategoryGarmentCategoryObligatorioThe garment type; it sets which POMs are needed.
optionsRequestOptionsOpcionalReturns
Section titled “Returns”Promise<Product>: The product.
idstringObligatorioexternal_idstringObligatorioThe brand's SKU or style ID (unique per brand).
namestringObligatoriocategoryGarmentCategoryObligatorioThe garment type; it sets which POMs are needed.
published_versionintegerOpcionalGarment version shoppers are fitted against, if any.
draft_versionintegerOpcionalGarment version being edited, if any.
created_atstringObligatorioupdated_atstringObligatoriofit_group_idstringOpcionalThe fit group whose garment this product uses (absent until grouped).
brand_idstringOpcionalThe brand the product belongs to; every store of the brand sees it.
home_store_idstringOpcionalThe store the product was created in.
retired_atstringOpcionalSet when the product is retired; shoppers no longer get a size for it.
availablebooleanOpcionalWhether the store it was read through offers it (false in the brand list, see stores).
Example
Section titled “Example”const product = await tys.products.create({ external_id: "TEE-001", // your SKU / style ID, unique per store name: "Basic tee", category: "tshirt",});product = tys.products.create(external_id="TEE-001", name="Basic tee", category="tshirt")curl -X POST https://api.tryyoursize.com/v1/products \ -H "Authorization: Bearer $TRYYOURSIZE_SECRET_KEY" \ -H "TYS-Version: 2026-10-25" \ -H "Content-Type: application/json" \ -d '{"external_id":"TEE-001","name":"Basic tee","category":"tshirt"}'See also
Section titled “See also”¿Te ha resultado útil esta página?
Gracias. Leemos todas las respuestas.