tys.fit_groups.create()
Create a fit group: one garment shared by several products (colourways, prints).
def create(*, name: str, product_ids: Optional[Iterable[str]] = None, source_product_id: Optional[str] = None, idempotency_key: Optional[str] = None) -> FitGroupParameters
Section titled “Parameters”namestrRequiredThe group's name.
product_idsOptional[Iterable[str]]Optional= NoneProducts to put in the new group.
source_product_idOptional[str]Optional= NoneThe new group takes over this product's garment versions.
idempotency_keyOptional[str]Optional= NoneReturns
Section titled “Returns”FitGroup: The fit group.
Example
Section titled “Example”group = tys.fit_groups.create(name="Basic tee", product_ids=[navy["id"], black["id"]])const group = await tys.fitGroups.create({ name: "Basic tee", product_ids: [navy.id, black.id], // colourways that share one garment});curl -X POST https://api.tryyoursize.com/v1/fit_groups \ -H "Authorization: Bearer $TRYYOURSIZE_SECRET_KEY" \ -H "TYS-Version: 2026-10-25" \ -H "Content-Type: application/json" \ -d '{"name":"Basic tee","product_ids":["<product_id>","<product_id>"]}'See also
Section titled “See also”Was this page helpful?
Thank you. We read every answer.