# Macys — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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.

> Browse Macy's product catalog by navigating categories, searching for items, and viewing detailed product information all in one place. Discover products across different categories and get comprehensive details to help you find exactly what you're looking for.

**Category:** E-commerce | **Website:** [macys.com/](https://macys.com/) | **Docs:** [parse.bot/marketplace/5c7b1722-4868-4e86-859a-200f8725efba/macys-com-api](https://parse.bot/marketplace/5c7b1722-4868-4e86-859a-200f8725efba/macys-com-api)

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

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/macys/`
**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

### Browse category

Browse products in a specific category. Returns product IDs, total count, and available filter facets for the category. Use category_id and pathname from the get_category_navigation endpoint.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Category ID from get_category_navigation (e.g., '55352') |
| `page_index` | integer | No | Page number for paginated results |
| `pathname` | string | Yes | Category pathname starting with /shop/ (e.g., '/shop/jewelry-watches/jewelry/fashion-jewelry'). Obtained from get_category_navigation results url field (strip query params). |
| `products_per_page` | integer | No | Number of product IDs per page |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/macys/browse-category \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","page_index":"<integer>","pathname":"<string>","products_per_page":"<integer>"}'
```

### Get category navigation

Retrieve the site menu structure including all main departments and subcategories with associated category IDs. Returns a flat map of category objects keyed by category ID. Each category includes id, text, url, parent info, children (if any), and categoryPageType. Use this to discover valid category_id and pathname values for the browse_category endpoint.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/macys/get-category-navigation \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get product details

Retrieve full product details for given product ID(s). Supports batching with comma-separated IDs. Returns comprehensive product data including name, description, brand, pricing, colors, sizes, availability, imagery, and shipping information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_ids` | string | Yes | Single product ID or comma-separated list of product IDs (e.g., '10525052' or '10525052,24607666') |

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

### Search products

Search for products by keyword. Returns full product details for up to 20 matching products including name, description, brand, pricing, colors, sizes, availability, and imagery.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page_index` | integer | No | Page number for results |
| `query` | string | Yes | Search keyword (e.g., 'shoes', 'handbags', 'watches') |

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

## Next steps

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