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

# List Garments

> Browse available garment blanks

# List Garments

Retrieve available garment blanks with colors, sizes, and print zone information.

<Info>
  This endpoint is **free** — no tokens required.
</Info>

## Endpoint

```
GET https://garmint.app/api/v1/garments
```

## Query Parameters

<ParamField query="category" type="string">
  Filter by category: `t-shirts`, `hoodies`, `tanks`, `long-sleeves`, etc.
</ParamField>

<ParamField query="limit" type="number" default="50">
  Number of results to return (max 100).
</ParamField>

<ParamField query="cursor" type="string">
  Pagination cursor from previous response.
</ParamField>

## Response

<ResponseField name="garments" type="array">
  Array of garment objects.

  <Expandable title="Garment properties">
    <ResponseField name="id" type="string">
      Unique garment identifier.
    </ResponseField>

    <ResponseField name="name" type="string">
      Product name (e.g., "Gildan 5000 Heavy Cotton Tee").
    </ResponseField>

    <ResponseField name="brand" type="string">
      Brand name (e.g., "Gildan", "Bella+Canvas").
    </ResponseField>

    <ResponseField name="category" type="string">
      Product category.
    </ResponseField>

    <ResponseField name="basePrice" type="number">
      Starting price in USD.
    </ResponseField>

    <ResponseField name="currency" type="string">
      Currency code (always "USD").
    </ResponseField>

    <ResponseField name="colors" type="array">
      Available color variants.
    </ResponseField>

    <ResponseField name="sizes" type="array">
      Available sizes (e.g., \["S", "M", "L", "XL", "2XL"]).
    </ResponseField>

    <ResponseField name="printZones" type="array">
      Available print areas with dimensions.
    </ResponseField>

    <ResponseField name="images" type="object">
      Thumbnail and full-size image URLs.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  <Expandable title="Pagination properties">
    <ResponseField name="hasMore" type="boolean">
      Whether more results are available.
    </ResponseField>

    <ResponseField name="nextCursor" type="string">
      Cursor for fetching the next page.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={}
  curl https://garmint.app/api/v1/garments?category=t-shirts&limit=10 \
    -H "Authorization: Bearer gm_live_xxx"
  ```

  ```typescript TypeScript theme={}
  const response = await fetch(
    'https://garmint.app/api/v1/garments?category=t-shirts&limit=10',
    {
      headers: {
        'Authorization': `Bearer ${GARMINT_API_KEY}`,
      },
    }
  );

  const { garments, pagination } = await response.json();
  ```

  ```python Python theme={}
  import requests

  response = requests.get(
      'https://garmint.app/api/v1/garments',
      headers={'Authorization': f'Bearer {GARMINT_API_KEY}'},
      params={'category': 't-shirts', 'limit': 10}
  )

  data = response.json()
  garments = data['garments']
  ```
</CodeGroup>

## Response Example

```json theme={}
{
  "garments": [
    {
      "id": "gildan-5000",
      "name": "Gildan 5000 Heavy Cotton Tee",
      "brand": "Gildan",
      "category": "t-shirts",
      "basePrice": 12.99,
      "currency": "USD",
      "colors": [
        {
          "name": "Black",
          "hex": "#000000",
          "imageUrl": "https://cdn.shopify.com/.../black.png",
          "available": true
        },
        {
          "name": "White",
          "hex": "#FFFFFF",
          "imageUrl": "https://cdn.shopify.com/.../white.png",
          "available": true
        }
      ],
      "sizes": ["S", "M", "L", "XL", "2XL"],
      "printZones": [
        {
          "id": "front",
          "name": "Front",
          "maxWidth": 12,
          "maxHeight": 14,
          "position": { "x": 50, "y": 35 }
        },
        {
          "id": "back",
          "name": "Back",
          "maxWidth": 12,
          "maxHeight": 14,
          "position": { "x": 50, "y": 35 }
        }
      ],
      "images": {
        "thumbnail": "https://cdn.shopify.com/.../thumb.png",
        "full": "https://cdn.shopify.com/.../full.png"
      }
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": "eyJsYXN0SWQiOiJnaWxkYW4tNTAwMCJ9"
  }
}
```

## Pagination

To fetch all garments, loop through pages using the cursor:

```typescript theme={}
async function getAllGarments() {
  const garments = [];
  let cursor: string | undefined;
  
  do {
    const url = new URL('https://garmint.app/api/v1/garments');
    url.searchParams.set('limit', '100');
    if (cursor) url.searchParams.set('cursor', cursor);
    
    const response = await fetch(url, {
      headers: { 'Authorization': `Bearer ${API_KEY}` },
    });
    
    const data = await response.json();
    garments.push(...data.garments);
    cursor = data.pagination.hasMore ? data.pagination.nextCursor : undefined;
  } while (cursor);
  
  return garments;
}
```

## Get Single Garment

Fetch details for a specific garment:

```
GET https://garmint.app/api/v1/garments/:id
```

```bash theme={}
curl https://garmint.app/api/v1/garments/gildan-5000 \
  -H "Authorization: Bearer gm_live_xxx"
```
