Skip to content

tys.products.create()

Methodtryyoursize

Create a product. external_id (SKU / style ID) is unique per store (409).

def create(*, external_id: str, name: str, category: str, idempotency_key: Optional[str] = None) -> Product
external_idstrRequired

Your SKU / style ID, unique per store (409 otherwise).

namestrRequired

The product name.

categorystrRequired

The garment category, e.g. tshirt, jeans.

idempotency_keyOptional[str]Optional= None

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).

product = tys.products.create(external_id="TEE-001", name="Basic tee", category="tshirt")

Was this page helpful?