Skip to content

tys.products.create()

Method@tryyoursize/node

create(input: ProductInput, options?: RequestOptions): Promise<Product>
inputProductInputRequired
Properties
external_idstringRequired
namestringRequired
categoryGarmentCategoryRequired

The garment type; it sets which POMs are needed.

optionsRequestOptionsOptional

Promise<Product>: The product.

idstringRequired
external_idstringRequired

The brand's SKU or style ID (unique per brand).

namestringRequired
categoryGarmentCategoryRequired

The garment type; it sets which POMs are needed.

published_versionintegerOptional

Garment version shoppers are fitted against, if any.

draft_versionintegerOptional

Garment version being edited, if any.

created_atstringRequired
updated_atstringRequired
fit_group_idstringOptional

The fit group whose garment this product uses (absent until grouped).

brand_idstringOptional

The brand the product belongs to; every store of the brand sees it.

home_store_idstringOptional

The store the product was created in.

retired_atstringOptional

Set when the product is retired; shoppers no longer get a size for it.

availablebooleanOptional

Whether the store it was read through offers it (false in the brand list, see stores).

const product = await tys.products.create({
external_id: "TEE-001", // your SKU / style ID, unique per store
name: "Basic tee",
category: "tshirt",
});

Was this page helpful?