> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drssed.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Outfits: combining clothing items in Drssed

> Outfits group clothing items into a named collection with a visual scene layout. Learn the data model, the scene concept, visibility, and the favorite flag.

An outfit in Drssed is a named collection of clothing items arranged on a canvas. Rather than just listing items, each outfit stores a scene — a set of placement instructions that describe where each piece sits, how large it appears, and in what order it layers relative to other items. This lets your app recreate a visual collage of the outfit exactly as the user arranged it.

## The outfit object

An outfit has the following fields:

| Field         | Type              | Description                                                                                                  |
| ------------- | ----------------- | ------------------------------------------------------------------------------------------------------------ |
| `outfit_id`   | string            | Unique identifier for the outfit.                                                                            |
| `name`        | string            | Display name for the outfit (e.g. `"Summer Casual"`).                                                        |
| `description` | string            | Optional free-text description.                                                                              |
| `is_public`   | boolean           | Whether the outfit is visible to other users.                                                                |
| `is_favorite` | boolean           | Whether the user has marked this outfit as a favorite.                                                       |
| `seasons`     | array of strings  | Seasons the outfit suits. Any combination of `Spring`, `Summer`, `Autumn`, `Winter`.                         |
| `tags`        | array of strings  | Style tags. Any combination of `Casual`, `Formal`, `Sports`, `Vintage`, `Outdoor`, `Party`, `Work`, `Beach`. |
| `scene`       | array of objects  | Canvas placement data for each clothing item in the outfit. See below.                                       |
| `created_at`  | string (ISO 8601) | Timestamp of when the outfit was created.                                                                    |
| `updated_at`  | string (ISO 8601) | Timestamp of the last update to the outfit.                                                                  |
| `user_id`     | string            | The ID of the user who owns this outfit.                                                                     |

## The scene

The `scene` array is what makes outfits more than a simple list. Each entry is a `CanvasPlacement` object that binds a clothing item to a specific position, size, and rotation on a shared canvas. Your app reads these values to render the outfit exactly as the user designed it.

Each placement object has the following fields:

| Field         | Type    | Description                                                                |
| ------------- | ------- | -------------------------------------------------------------------------- |
| `clothing_id` | string  | The ID of the clothing item placed in this position.                       |
| `x`           | number  | Horizontal position on the canvas.                                         |
| `y`           | number  | Vertical position on the canvas.                                           |
| `z`           | integer | Stack order. Higher values appear in front of lower ones.                  |
| `scale`       | number  | Size multiplier relative to the item's default size. `1.0` means unscaled. |
| `rotation`    | number  | Rotation in degrees.                                                       |

When you create or update an outfit, you pass the full `scene` array. The API replaces the existing scene with whatever you provide, so always send the complete layout.

## Public and private outfits

Like clothing items, outfits have an `is_public` flag. Private outfits (`is_public: false`) are only accessible to their owner. Public outfits can be retrieved by other authenticated users.

You set `is_public` when creating an outfit and can change it later via `PATCH /outfits/{outfit_id}`.

## The favorite flag

`is_favorite` lets users surface their preferred outfits without any special collection logic. You toggle it by sending `"is_favorite": true` or `"is_favorite": false` in a `PATCH` request to the outfit. Your app can filter or sort by this flag to build a "favorites" view.

## Example outfit object

```json theme={null}
{
  "outfit_id": "of1a2b3c-4d5e-6f70-8910-abcdef123456",
  "name": "Summer Casual",
  "description": "A light, everyday outfit for warm weather.",
  "is_public": true,
  "is_favorite": true,
  "seasons": ["Summer"],
  "tags": ["Casual", "Beach"],
  "scene": [
    {
      "clothing_id": "c3d4e5f6-7890-abcd-ef01-234567890abc",
      "x": 120.5,
      "y": 80.0,
      "z": 1,
      "scale": 1.0,
      "rotation": 0.0
    },
    {
      "clothing_id": "d4e5f6a7-8901-bcde-f012-345678901bcd",
      "x": 110.0,
      "y": 220.0,
      "z": 2,
      "scale": 0.9,
      "rotation": -5.0
    }
  ],
  "created_at": "2025-09-10T09:15:00+00:00",
  "updated_at": "2025-09-12T11:40:00+00:00",
  "user_id": "u9f8e7d6c-5b4a-3210-fedc-ba9876543210"
}
```
