# tys.products.garments.createDraft()

> Starts a new draft version (sizes, POMs in mm, grading, fabric).

Source: https://docs.tryyoursize.com/reference/node/products-garments-create-draft/

*Method* · `@tryyoursize/node`

Starts a new draft version (sizes, POMs in mm, grading, fabric). 422 errors carry `issues`.

```ts
createDraft(idOrSku: string, garment: GarmentInput, options?: RequestOptions): Promise<GarmentVersion>
```

## Parameters

- **`idOrSku`** (`string`, required): The product's TryYourSize ID or your SKU (URL-encoded for you, so `TEE/01` works).
- **`garment`** (`GarmentInput`, required)
  - **`category`** (`GarmentCategory`, required): The garment type; it sets which POMs are needed.
  - **`fit_intent`** (`FitIntent`, required): The designer's intended silhouette; sets the ease targets the fit judgement compares against.
  - **`sizes`** (`string[]`, required): Size labels, smallest to largest.
  - **`poms`** (`POMTable`, required): Garment measurements per size: size label → POM code → millimetres. Widths are flat half-measurements. See GET /v1/studio/garment_dictionary for codes and plausible ranges.
  - **`grading`** (`GradingRule`, optional): How the POM table was derived: the base size's values plus, per POM, the increment (mm) between each pair of consecutive sizes (len = number of sizes - 1). The table stays the source of truth.
  - **`fabric`** (`Fabric`, required): What the tech pack / mill sheet says.
  - **`import_id`** (`string`, optional): Pattern import linked to this version (omit to unlink).
  - **`season`** (`string`, optional): Season tag, e.g. "SS27".
  - **`tolerances_mm`** (`TolerancesMM`, optional): Spec-sheet tolerance per POM code, ± mm (e.g. {"chest_width": 10}). Optional; the flat preview uses ±5 mm when a POM has none.
  - **`spec_source`** (`SpecSource`, optional): Where the POM table came from, kept for audit. Set by Studio's paste/import.
- **`options`** (`RequestOptions`, optional)

## Returns

`Promise<GarmentVersion>`: The draft garment version, with `issues` that still block publishing.

## Example

**Node.js**

```ts

const garment: GarmentInput = {
  category: "tshirt",
  fit_intent: "regular",
  sizes: ["S", "M", "L"],
  poms: { S: { chest_width: 480 }, M: { chest_width: 510 }, L: { chest_width: 540 } }, // mm
  fabric: { composition: [{ fiber: "cotton", pct: 100 }], weight_gsm: 180 },
};
const draft = await tys.products.garments.createDraft("TEE-001", garment);
console.log(draft.version, draft.issues); // what still blocks publishing
```

**Python**

```python
garment = {
    "category": "tshirt",
    "fit_intent": "regular",
    "sizes": ["S", "M", "L"],
    "poms": {"S": {"chest_width": 480}, "M": {"chest_width": 510}, "L": {"chest_width": 540}},  # mm
    "fabric": {"composition": [{"fiber": "cotton", "pct": 100}], "weight_gsm": 180},
}
draft = tys.products.garments.create_draft("TEE-001", garment)
print(draft["version"], draft["issues"])
```

**cURL**

```bash
curl -X POST https://api.tryyoursize.com/v1/products/TEE-001/garments \
  -H "Authorization: Bearer $TRYYOURSIZE_SECRET_KEY" \
  -H "TYS-Version: 2026-10-25" \
  -H "Content-Type: application/json" \
  -d '{"category":"tshirt","fit_intent":"regular","sizes":["S","M","L"],"poms":{"S":{"chest_width":480},"M":{"chest_width":510},"L":{"chest_width":540}},"fabric":{"composition":[{"fiber":"cotton","pct":100}],"weight_gsm":180}}'
```

## See also

- [Catalog API](https://docs.tryyoursize.com/products/catalog-api.md)
- [products.garments.createDraft (HTTP API)](https://docs.tryyoursize.com/api/reference/operations/createcataloggarmentdraft.md)
