# la Comer — 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 La Comer Mexico's product catalog across different stores and departments, then retrieve detailed product information including pricing and availability. Access the complete product hierarchy by category to discover items and compare offerings across multiple locations.

**Category:** Food & Dining | **Website:** [lacomer.com.mx/](https://lacomer.com.mx/) | **Docs:** [parse.bot/marketplace/6186eafe-caff-4fcf-a284-ce687362aa41/la-comer-com-mx-api](https://parse.bot/marketplace/6186eafe-caff-4fcf-a284-ce687362aa41/la-comer-com-mx-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/la-comer/`
**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 departments and stores

Fetch the complete department/aisle hierarchy and the list of available stores. Departments contain nested subcategories (subagrupaciones) with article counts. Use store IDs and subcategory IDs from this response in other endpoints. A single round-trip returns the full tree for one store context.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `store_id` | string | No | ID of the store to fetch context for. |

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

### Get product detail

Fetch full details for a specific product by its EAN barcode. Returns descriptions, technical specifications (fichaTecnica), pricing, stock level, and image URLs at multiple resolutions. One round-trip per product.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ean` | string | Yes | Product EAN (barcode), e.g. '7501639313538' |
| `store_id` | string | No | ID of the store. |

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

### Get products by category

Fetch products within a specific subcategory. Requires a leaf subcategory ID from get_departments_and_stores subagrupaciones and its parent department ID. Includes promotional metadata (clearance status, sale flags). Returns 20 items per page with total page count.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dept_id` | string | Yes | Top-level department ID (e.g., '57' for Despensa) |
| `page` | integer | No | Page number (1-based) |
| `store_id` | string | No | ID of the store. |
| `subcat_id` | string | Yes | Leaf subcategory ID from get_departments_and_stores subagrupaciones (e.g., '59', '72') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/la-comer/get-products-by-category \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"dept_id":"<string>","page":"<integer>","store_id":"<string>","subcat_id":"<string>"}'
```

### Search products

Full-text search for products by keyword across all categories for a given store. Returns paginated results with 20 items per page. Each product includes pricing, stock level, brand, and category. The total result count and page count are included for pagination control.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number (1-based) |
| `query` | string | Yes | Search keyword (e.g., 'leche', 'pan', 'cerveza') |
| `store_id` | string | No | ID of the store to search in. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/la-comer/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>","store_id":"<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.