Skip to content

tys.products.update()

Method@tryyoursize/node

Replaces the SKU, name and category (all three required).

update(idOrSku: string, input: ProductInput, options?: RequestOptions): Promise<Product>
idOrSkustringRequired

The product's TryYourSize ID or your SKU (URL-encoded for you, so TEE/01 works).

inputProductInputRequired
Properties
external_idstringRequired
namestringRequired
categoryGarmentCategoryRequired

The garment type; it sets which POMs are needed.

optionsRequestOptionsOptional

Promise<Product>: The updated product.

await tys.products.update("TEE-001", { external_id: "TEE-001", name: "Basic tee (organic)", category: "tshirt" });

Was this page helpful?