# 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 Mango's complete product catalog, including categories, detailed product information, search functionality, and new arrivals to discover and browse clothing and fashion items. Find similar products and explore the full range of Mango's store inventory programmatically.

**Category:** E-commerce | **Website:** [mango.com/](https://mango.com/) | **Docs:** [parse.bot/marketplace/99a6a9dd-226f-491b-b631-1444b1fbb1c5/mango-com-api](https://parse.bot/marketplace/99a6a9dd-226f-491b-b631-1444b1fbb1c5/mango-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/mango/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get categories

Returns the navigation category tree from Mango. Each menu item may contain nested sub-menus with catalog IDs that can be passed to list_products. Optionally filter by gender/department.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `gender` | string | No | Gender/department to filter by. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mango/get-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"gender":"<string>"}'
```

### Get new arrivals

Returns new arrival products for a gender/department. Automatically resolves the new arrivals catalog from the category tree and returns the product listing with items, filters, and grid metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `gender` | string | No | Gender/department. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mango/get-new-arrivals \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"gender":"<string>"}'
```

### Get product details

Returns full details for a single product including name, model, available colors with images and sizes, pricing per color, and stock availability per size. Product IDs are obtainable from list_products items.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID (e.g. '37021396'). Obtainable from list_products items' productId field. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mango/get-product-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### Get similar products

Returns similar/related products for a given product ID, extracted from the product's color variants that link to different product references. Returns an empty array when no cross-references exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID (e.g. '37021396'). Obtainable from list_products items' productId field. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mango/get-similar-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### List products

Lists products for a given catalog ID. Returns product items keyed by a composite productId:colorId string, along with available filters and grid metadata. Catalog IDs are obtained from get_categories menu entries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `catalog_id` | string | Yes | Catalog ID from get_categories menus (e.g. 'nuevo', 'prendas_she.vaqueros_she'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mango/list-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"catalog_id":"<string>"}'
```

### Search products

Searches for products by query string. Returns keyword suggestion groups, each containing an array of search term suggestions with their result counts. Useful for auto-complete and discovering related search terms.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query string (e.g. 'jeans', 'dress'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mango/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.