# Mood Fabrics — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse Mood Fabrics' extensive catalog of fabrics, notions, and accessories with detailed product information including fiber content, weight, and pattern details. Discover blog posts, view color variants, filter collections, and find sale items all from one convenient integration.

**Category:** E-commerce | **Website:** [moodfabrics.com/](https://moodfabrics.com/) | **Docs:** [parse.bot/marketplace/f3cfb0ec-c0ab-4b8f-add4-9107fe48e4b1/moodfabrics-com-api](https://parse.bot/marketplace/f3cfb0ec-c0ab-4b8f-add4-9107fe48e4b1/moodfabrics-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-moodfabrics-com-api-f3cfb0ec/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### filter_collection

Filter a collection by a facet such as product_type, color, pattern, or content. Returns paginated results matching the filter criteria. Filter values are case-sensitive and correspond to the site's faceted navigation values (e.g. 'Red' not 'red', 'Silk' not 'silk'). Combines with collection scoping.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `collection` | string | No | Collection handle to filter within. |
| `filter_type` | string | Yes | Facet type to filter by. Accepted values: product_type, color, pattern, content. |
| `filter_value` | string | Yes | Facet value to filter by (case-sensitive, e.g. Red, Silk, Floral, Chiffon). |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-moodfabrics-com-api-f3cfb0ec/filter_collection \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"collection":"<string>","filter_type":"<string>","filter_value":"<string>","page":"<integer>"}'
```

### get_blog_posts

Retrieve blog posts from the Sewciety blog (blog.moodfabrics.com). Returns WordPress post objects with title, content excerpt, publication date, and link. Posts cover sewing patterns, fabric guides, and designer spotlights.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum posts per page. |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-moodfabrics-com-api-f3cfb0ec/get_blog_posts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### get_collection_products

Retrieve paginated product listings from a collection. Returns products with detailed metadata including fiber content, weight, pattern, color, and pricing. Collections group products by category (fashion-fabrics, new-arrivals, buttons, trims, etc). Default sort is best-selling. Quick Ship filter narrows to in-stock items ready for immediate dispatch.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `collection` | string | No | Collection handle (e.g. fashion-fabrics, new-arrivals, all-hides, buttons, trims, sewing-notions, home-fabrics). |
| `limit` | integer | No | Maximum results per page. |
| `page` | integer | No | Page number for pagination. |
| `quickship` | string | No | Filter by Quick Ship availability. Accepted values: true, false. |
| `sort_by` | string | No | Sort option. Accepted values: best-selling, price-asc, price-desc, newest. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-moodfabrics-com-api-f3cfb0ec/get_collection_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"collection":"<string>","limit":"<integer>","page":"<integer>","quickship":"<string>","sort_by":"<string>"}'
```

### get_product_color_variants

Retrieve available variants (typically color options) for a product from Shopify. Returns variant objects with title, SKU, price (in cents), and availability status. Price is in cents (divide by 100 for dollars).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `handle` | string | Yes | Product handle/URL slug (e.g. nude-tonal-striped-gauzy-silk-322655). Obtainable from search_products or get_collection_products results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-moodfabrics-com-api-f3cfb0ec/get_product_color_variants \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"handle":"<string>"}'
```

### get_product_details

Retrieve full details of a single product by its handle or SKU. At least one of handle or sku must be provided. First attempts SearchSpring lookup; falls back to Shopify product JSON if not found. Returns fiber content, weight, care instructions, pricing, and all product metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `handle` | string | No | Product handle/URL slug (e.g. nude-tonal-striped-gauzy-silk-322655). Obtainable from search_products or get_collection_products results. |
| `sku` | string | No | Product SKU/item number (e.g. 322655). Obtainable from search_products or get_collection_products results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-moodfabrics-com-api-f3cfb0ec/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"handle":"<string>","sku":"<string>"}'
```

### get_sale_items

Retrieve all currently discounted/sale products with original and sale pricing. Products include discount_percentage and both sale_price and original_price fields. Results are paginated.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum results per page. |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-moodfabrics-com-api-f3cfb0ec/get_sale_items \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### search_products

Search for products by keyword across all collections. Returns paginated results with detailed product metadata. Searches match against product names and attributes. Sort is relevance-based by default; only price-asc and price-desc are effective for search.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum results per page. |
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword (e.g. silk, cotton, linen). |
| `sort_by` | string | No | Sort option for search results. Only price-asc and price-desc are effective for search; best-selling and newest have no effect. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-moodfabrics-com-api-f3cfb0ec/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>","query":"<string>","sort_by":"<string>"}'
```
