# Move products into a fit group

```http
POST /v1/fit_groups/{fit_group_id}/products
```

Source: https://docs.tryyoursize.com/api/reference/operations/linkcatalogfitgroupproducts/

**Key scopes:** `products:write`. A secret key (`sk_`) has every scope; a restricted key (`rk_`) needs the scopes listed.

The products then use this group's garment.

## Authentication

Secret key (`sk_…`) or restricted key (`rk_…`) from your server: `Authorization: Bearer sk_…`.

## Parameters

- `fit_group_id` (path, `string (uuid)`, required): A fit group.
- `Idempotency-Key` (header, `string`, optional): A unique value per logical request (a UUID v4 is ideal), 1-255 printable ASCII characters. With a secret or restricted key, the first response is stored for 24 hours per store and mode: a retry with the same key and the same body gets the stored response back (header `Idempotent-Replayed: true`); the same key with a different body is `422 idempotency_key_reused`; a retry while the first request still runs is `409 idempotency_key_in_use`. Responses with a 5xx status are not stored, so a retry runs again.

## Request body

`application/json`: `LinkProductsRequest`

- `product_ids` (`string (uuid)[]`, required, max 500 items)

## Responses

### 200

OK (`FitGroup`)

- `id` (`string (uuid)`, required)
- `name` (`string`, required)
- `product_ids` (`string (uuid)[]`, required)
- `published_version_id` (`string (uuid)`, optional)
- `draft_version_id` (`string (uuid)`, optional)
- `created_at` (`string (date-time)`, required)
- `updated_at` (`string (date-time)`, required)

### 400

Invalid request (`Error`)

### 401

Missing or invalid credentials (`Error`)

### 403

Not allowed (`Error`)

### 404

Not found (`Error`)

### 409

Conflicts with the current state (duplicate SKU, editing a published version) (`Error`)

## Example

```bash
curl -X POST https://api.tryyoursize.com/v1/fit_groups/<fit_group_id>/products \
  -H "Authorization: Bearer $TRYYOURSIZE_SECRET_KEY" \
  -H "TYS-Version: 2026-10-25" \
  -H "Content-Type: application/json" \
  -d @body.json
```

## In the SDKs

- Node.js: [`tys.fitGroups.linkProducts()`](https://docs.tryyoursize.com/reference/node/fit-groups-link-products.md)
- Python: [`tys.fit_groups.link_products()`](https://docs.tryyoursize.com/reference/python/fit-groups-link-products.md)
