# Patagonia — 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.

> Access Patagonia's full product catalog via search and category browsing. Retrieve detailed product information including variants, pricing, specs, and materials. Fetch customer reviews, locate nearby stores and authorized dealers, and browse the Worn Wear used and refurbished gear selection.

**Category:** E-commerce | **Website:** [patagonia.com/](https://patagonia.com/) | **Docs:** [parse.bot/marketplace/bab1abce-5111-4d31-b476-9e02675b9bce/patagonia-com-api](https://parse.bot/marketplace/bab1abce-5111-4d31-b476-9e02675b9bce/patagonia-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-patagonia-com-api-bab1abce/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### find_stores

Find nearby Patagonia stores and authorized dealers based on geographic coordinates. Returns store details including address, phone, hours, distance, and open/closed status. Results are sorted by proximity.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dist` | integer | No | Search radius distance in miles. |
| `lat` | number | Yes | Latitude of search center (e.g. 40.7128 for NYC, 37.7749 for San Francisco). |
| `lng` | number | Yes | Longitude of search center (e.g. -74.0060 for NYC, -122.4194 for San Francisco). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-patagonia-com-api-bab1abce/find_stores \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dist":"<integer>","lat":"<number>","lng":"<number>"}'
```

### get_category_products

Browse products within a specific Patagonia category. Returns the same product structure as search with offset-based pagination. Category IDs are URL slugs visible in patagonia.com category pages (e.g. 'mens-jackets-vests', 'womens-fleece').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Category ID slug (e.g. 'mens-jackets-vests', 'womens-fleece', 'mens-baselayers'). |
| `start` | integer | No | Offset for pagination (increments by sz value each page). |
| `sz` | integer | No | Number of results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-patagonia-com-api-bab1abce/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","start":"<integer>","sz":"<integer>"}'
```

### get_product_details

Retrieve complete product details including per-color pricing, available variants (color and size), images per color, fit information, specs, and materials. Requires a product ID (style number) from search or category results. Makes two requests: one to load the product page and one to fetch variation attributes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `pid` | string | Yes | Product ID / style number (e.g. '84213', '68460') from search_products or get_category_products results. |

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

### get_product_reviews

Fetch customer reviews for a product from Yotpo. Returns paginated reviews with rating scores, content, reviewer info, and an aggregate bottomline with average score and star distribution. Pagination is page-based.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for review pagination. |
| `per_page` | integer | No | Number of reviews per page. |
| `pid` | string | Yes | Product ID (e.g. '68460', '84213') from search_products or get_category_products results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-patagonia-com-api-bab1abce/get_product_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","per_page":"<integer>","pid":"<string>"}'
```

### get_worn_wear_products

List available Worn Wear (used/refurbished) Patagonia products from the Worn Wear Shopify store. Returns up to 50 products with title, condition, pricing (including compare_at_price for savings calculation), images, and variant options. No pagination parameters — returns the most recently listed items.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-patagonia-com-api-bab1abce/get_worn_wear_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_products

Full-text search across the Patagonia product catalog. Returns paginated product listings with name, price, brand, and category. Pagination is offset-based: advance by incrementing start by sz each page. The response includes has_next to signal more results and next_start for the next offset value.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g. 'backpack', 'jacket', 'fleece'). |
| `start` | integer | No | Offset for pagination (increments by sz value each page). |
| `sz` | integer | No | Number of results per page. |

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