# Shop Mango — 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 data from shop.mango.com.

**Category:** E-commerce | **Website:** [shop.mango.com/kr/ko](https://shop.mango.com/kr/ko) | **Docs:** [parse.bot/marketplace/2d446bde-d80c-40c2-980d-fbbb4dd881cf/shop-mango-com-api](https://parse.bot/marketplace/2d446bde-d80c-40c2-980d-fbbb4dd881cf/shop-mango-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-shop-mango-com-api-2d446bde/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_product_details

Get comprehensive product details from Mango Korea including Korean name, all color variants with KRW prices, size-level stock availability, material composition, official product images (flat lay, model, detail views), and the canonical Korean product URL. Makes four upstream requests: product info, prices, stock, and product page (for composition). Validates that the response is from the KR/ko locale with KRW currency.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | 8-digit numeric Mango product ID (e.g. '37013867'). Obtainable from search_products or list_products results. |

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

### list_products

List products from a Mango Korea category page. Returns products with Korean names, colors (including RGB, sizes, images), brand, and canonical Korean URLs. The category_path corresponds to the URL path segment after /kr/ko/c/ on the site (e.g. '여성/드레스와-점프수트/e6bb8705'). One page load returns all visible products for that category section.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_path` | string | Yes | Category path segment as it appears in the Mango Korea URL after /kr/ko/c/ (e.g. '여성/드레스와-점프수트/e6bb8705'). Discoverable from site navigation links. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shop-mango-com-api-2d446bde/list_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_path":"<string>"}'
```

### search_products

Search products on the Mango Korea storefront with enriched per-item details. Returns deduplicated product/color candidates with Korean and English names, family/category labels, KRW prices, size-level availability, official images (model and flat), and canonical Korean URLs. Each result is enriched via the product orchestrator API (3 upstream calls per unique product_id). With default limit=20, expect ~60 upstream enrichment calls plus the initial search page load. Never falls back outside kr/ko locale or KRW currency.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of enriched product/color candidates to return (1–50). Controls how many items are fetched from the orchestrator API. |
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search query text in Korean or English (e.g. '원피스', 'dress', '셔츠'). |
| `section` | string | No | Gender/section to search within. |

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