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

# Read style item lists

> Retrieve the bill-of-materials for a style — every trim, fabric, and component together with their colour combinations.

<Info>
  **When to use this.** The style item list is the bill-of-materials (BOM) for a style. Each
  entry links a reusable item from the item library to a specific style, recording how many units
  are needed, which size variant applies, and which item colour card aligns with each style colour.
  Use these endpoints to pull full item-level specification data for a style — for example to feed
  an ERP, drive a compliance check, or build a custom product sheet.
</Info>

## The workflow

A style item list is assembled in Delogue by designer users and then read by both internal tools
and supplier integrations. The typical read path is:

<Steps>
  <Step title="Identify the style">
    Use `GET /api/styles` to find the style you need. Note its `id` — that becomes `styleId` in
    the steps below.
  </Step>

  <Step title="List all style items">
    `GET /api/styles/{styleId}/items` returns every item on the style's BOM together with the
    full item library detail: category, composition, supplier, sizes, and properties such as
    `mainItem` or `includedCostPrice`.
  </Step>

  <Step title="Inspect a single style item">
    `GET /api/styles/{styleId}/items/{styleItemId}` fetches one style item record when you
    already know the `styleItemId` and need the complete detail without loading the full list.
  </Step>

  <Step title="Read colour card slots">
    `GET /api/styles/{styleId}/items/{styleItemId}/colors` returns each style colour column paired
    with the item colour card selected for it, including admin and supplier colour specs.
  </Step>
</Steps>

```mermaid theme={"dark"}
sequenceDiagram
  participant C as Client
  participant API as Delogue API
  C->>API: GET /api/styles
  API-->>C: style list (pick styleId)
  C->>API: GET /api/styles/{styleId}/items
  API-->>C: style items (BOM rows)
  C->>API: GET /api/styles/{styleId}/items/{styleItemId}/colors
  API-->>C: colour card slots per style colour
```

## Walkthrough

Retrieve all items on style `10` to build a component specification list.

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl "https://service.my.delogue.com/api/styles/{styleId}/items" \
    -H "Accept: application/json" \
    -H "X-Auth-Token: Bearer YOUR_API_KEY"
  ```

  ```js JavaScript theme={"dark"}
  const res = await fetch("https://service.my.delogue.com/api/styles/{styleId}/items", {
    method: "GET",
    headers: {
      "Accept": "application/json",
      "X-Auth-Token": "Bearer YOUR_API_KEY",
    },
  });
  const { data } = await res.json();
  ```
</CodeGroup>

```json theme={"dark"}
{
  "status": "success",
  "code": "ok",
  "data": [
    {
      "id": 3,
      "styleId": 10,
      "description": "Placering",
      "position": 1,
      "quantity": 5.0,
      "dateAdded": null,
      "state": "active",
      "itemSize": {
        "id": 1,
        "name": "24\"",
        "state": "active",
        "deadline": null,
        "etd": null,
        "position": 0,
        "physicalReferenceNumber": null,
        "erpSizeId": null,
        "properties": [
          "default"
        ]
      },
      "item": {
        "id": 5,
        "name": "Riveted logo pushbutton",
        "customId": "KB201",
        "state": "active",
        "description": "Metal shank button with logo embossing",
        "brand": {
          "id": 4,
          "name": "Default Brand"
        },
        "organization": {
          "id": 9,
          "name": "Acme Fashion"
        },
        "supplier": {
          "id": 11,
          "name": "Button & Trim Co."
        },
        "companyContactPerson": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "name": "Jamie Rivera"
        },
        "supplierContactPerson": null,
        "categories": [
          {
            "id": 3,
            "name": "Button"
          }
        ],
        "parts": [
          {
            "id": 1,
            "name": "Base button",
            "value": 0.0,
            "unit": null,
            "materials": [
              {
                "id": 10,
                "name": "Zinc Alloy",
                "percentage": 100.0
              }
            ]
          },
          {
            "id": 2,
            "name": "Kids logo",
            "value": 0.0,
            "unit": null,
            "materials": []
          }
        ],
        "adminUnit": {
          "id": 2,
          "name": "Pieces",
          "customId": "PCS",
          "properties": []
        },
        "logo": {
          "id": "5c45cc58-6c16-439e-a82c-553a2ea509dd",
          "url": "https://cdn.delogue.com/items/5c45cc58-6c16-439e-a82c-553a2ea509dd.png"
        },
        "lastUpdated": "2024-03-15T10:22:00Z",
        "deadline": null,
        "etd": null,
        "erpItemId": null,
        "defaultQty": 1.0,
        "nameGeneratorExtraText": null,
        "physicalReferenceNumber": null,
        "properties": []
      },
      "properties": [
        "mainItem"
      ]
    },
    {
      "id": 24,
      "styleId": 10,
      "description": null,
      "position": 2,
      "quantity": 1.0,
      "dateAdded": null,
      "state": "active",
      "itemSize": null,
      "item": {
        "id": 23,
        "name": "Coastal printed jersey",
        "customId": "acd 237",
        "state": "active",
        "description": "100% cotton jersey fabric with all-over print",
        "brand": {
          "id": 4,
          "name": "Default Brand"
        },
        "organization": {
          "id": 9,
          "name": "Acme Fashion"
        },
        "supplier": {
          "id": 12,
          "name": "Nordic Fabric Mill"
        },
        "companyContactPerson": null,
        "supplierContactPerson": null,
        "categories": [
          {
            "id": 1,
            "name": "Fabric"
          }
        ],
        "parts": [
          {
            "id": 15,
            "name": "Shell",
            "value": 150.0,
            "unit": "g/m²",
            "materials": [
              {
                "id": 4,
                "name": "Cotton",
                "percentage": 100.0
              }
            ]
          }
        ],
        "adminUnit": {
          "id": 3,
          "name": "Metres",
          "customId": "M",
          "properties": [
            "fraction"
          ]
        },
        "logo": null,
        "lastUpdated": "2024-05-20T08:45:00Z",
        "deadline": "2024-08-01T00:00:00Z",
        "etd": null,
        "erpItemId": null,
        "defaultQty": 1.5,
        "nameGeneratorExtraText": null,
        "physicalReferenceNumber": null,
        "properties": [
          "readyForExport"
        ]
      },
      "properties": [
        "includedCostPrice"
      ]
    }
  ]
}
```

The response envelope contains every BOM row. Each entry carries the full item library record
nested under `item`, so a single call gives you categories, parts, materials, supplier, and
contact information without further lookups.

## Field reference

### Style item (BOM row)

| Field         | What it means at Delogue                                                                                                                                                                                              |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `dateAdded`   | Timestamp when the item was first added to the style. Null when the record pre-dates tracking.                                                                                                                        |
| `description` | Placement or usage note for this item on the style, e.g. 'Front chest' or 'Sleeve hem'. Null when no placement has been specified.                                                                                    |
| `id`          | Unique identifier of the style item (the junction record between a style and an item).                                                                                                                                |
| `item`        | Full detail of the item from the item library.                                                                                                                                                                        |
| `itemSize`    | The specific item size selected for this style item, or null if no size is pinned.                                                                                                                                    |
| `position`    | 1-based display order of this item within the style item list.                                                                                                                                                        |
| `properties`  | Boolean flags encoded as strings. Possible values: 'mainItem' (this item is designated the main composition item for the style), 'includedCostPrice' (the item cost is included in the style cost price calculation). |
| `quantity`    | Number of units of this item required per style unit.                                                                                                                                                                 |
| `state`       | Lifecycle state of the style item: active or deleted. Derived from IsDeleted on the junction record — there is no inactive state for style items.                                                                     |
| `styleId`     | Identifier of the parent style.                                                                                                                                                                                       |

### Item library detail (`item`)

| Field                                            | What it means at Delogue                                                                                                                        |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                                             | Unique identifier of the item in the item library.                                                                                              |
| `name`                                           | Display name, e.g. `Riveted logo pushbutton`.                                                                                                   |
| `customId`                                       | Customer-defined item number (maps to `UserDefinedId`).                                                                                         |
| `state`                                          | `active` or `inactive`. Derived from `IsActive` on the item record.                                                                             |
| `description`                                    | Free-text description of the item.                                                                                                              |
| `brand` / `organization`                         | Brand and designer organisation that own the item.                                                                                              |
| `supplier`                                       | Primary supplier organisation, or null if unassigned.                                                                                           |
| `companyContactPerson` / `supplierContactPerson` | Brand-side and supplier-side contact people.                                                                                                    |
| `categories`                                     | Item categories, e.g. Fabric, Button, Label.                                                                                                    |
| `parts`                                          | Quality card parts — each has a name, value, unit, and material composition list with percentages.                                              |
| `adminUnit`                                      | Measurement unit group for this item (e.g. Metres, Pieces).                                                                                     |
| `logo`                                           | Thumbnail image `id` and pre-signed `url`. Null if no image has been uploaded.                                                                  |
| `lastUpdated`                                    | Timestamp of the most recent change to the item.                                                                                                |
| `deadline` / `etd`                               | Target completion deadline and estimated time of delivery. Null when not set.                                                                   |
| `defaultQty`                                     | Default quantity suggested when adding this item to a new style.                                                                                |
| `physicalReferenceNumber`                        | Physical sample reference number. Null when not set.                                                                                            |
| `properties`                                     | Flags: `readyForExport` (marked ready for ERP export), `updatedAfterLastExport` (changed since last export), `commented` (has unread comments). |

### Item size (`itemSize`)

| Field        | What it means at Delogue                                             |
| ------------ | -------------------------------------------------------------------- |
| `id`         | Unique identifier of the item size.                                  |
| `name`       | Display name, e.g. `24"` or `150 g`.                                 |
| `state`      | `active`, `inactive`, or `deleted`.                                  |
| `position`   | Display order within the item's size list.                           |
| `properties` | Flags: `default` (the item's default size), `approved`, `commented`. |

### Colour card slot (`/colors` endpoint)

| Field                     | What it means at Delogue                                                                                                                                        |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                      | Unique identifier of the colour card slot (junction of style item and style colour).                                                                            |
| `styleItemId`             | Parent style item.                                                                                                                                              |
| `state`                   | `active` or `deleted`.                                                                                                                                          |
| `styleColor.id`           | The style colour column this slot belongs to.                                                                                                                   |
| `styleColor.colorMaster`  | The master colour (AdminColor) behind this style colour column — carries `name`, `colorReference` (e.g. a Pantone code), and optional `customId` / `customId2`. |
| `itemColor`               | The item colour card selected for this style colour. Null if no colour combination has been assigned yet.                                                       |
| `itemColor.adminColor`    | Admin-defined colour spec (from the first item part). Null if no spec exists.                                                                                   |
| `itemColor.supplierColor` | Supplier-defined colour spec including `rgb` hex, `colorReference`, and an `approved` flag.                                                                     |

## Roles & permissions

Reading style item lists requires the **`styles`** permission on either a **designer** or a
**supplier** account. Supplier users can only see style items for styles that have been published
and assigned to their organisation. Designer users see all style items within their organisation.

Creating, updating, or removing items from a style item list is a designer-side operation and
requires the **`styles`** write permission — those actions are not yet available through the
Delogue API and must be performed in Delogue Classic or Delogue 2.0.

## When things go wrong

Errors use the standard envelope (`status: "error"`, a `code`, and `error.details[]`). See
[Errors & responses](/concepts/errors) for the full list of codes and how to resolve them.

Common cases for these endpoints:

| HTTP | Code                                  | Likely cause                                                          |
| ---- | ------------------------------------- | --------------------------------------------------------------------- |
| 404  | `resource_error.style_not_found`      | The `styleId` does not exist or does not belong to your organisation. |
| 404  | `resource_error.style_item_not_found` | The `styleItemId` does not exist on the given style.                  |
| 401  | `authorization_error.unauthenticated` | Missing or invalid `X-Auth-Token`.                                    |
| 403  | `authorization_error`                 | Your account does not have access to this style or brand.             |

## What to call next

<CardGroup cols={2}>
  <Card title="Colours" href="/guides/colors">
    Manage the master colour library that backs style colour columns.
  </Card>

  <Card title="Seasons" href="/guides/seasons">
    Look up the season a style belongs to before fetching its items.
  </Card>

  <Card title="Style categories" href="/guides/style-categories">
    Filter styles by category before pulling their item lists.
  </Card>

  <Card title="Size ranges" href="/guides/size-ranges">
    Understand the size ranges that underpin item size variants.
  </Card>
</CardGroup>
