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

> Search for products from Krasnoe & Beloe, locate nearby shops across different cities, and check real-time stock availability to find what you need. View detailed product information and discover which stores have items in stock so you can plan your shopping trip efficiently.

**Category:** E-commerce | **Website:** [krasnoeibeloe.ru/](https://krasnoeibeloe.ru/) | **Docs:** [parse.bot/marketplace/6347879c-c7b3-4b2d-bdd6-4954547c7bd6/krasnoeibeloe-ru-api](https://parse.bot/marketplace/6347879c-c7b3-4b2d-bdd6-4954547c7bd6/krasnoeibeloe-ru-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/krasnoeibeloe/`
**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 cities

Returns all cities served by Krasnoe & Beloe stores, including their numeric IDs and region associations. City IDs are used as input to get_shops. The full list is returned in a single response with no pagination.

**Estimated cost:** Metered

_No parameters required._

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

### Get product details

Extracts product details including the XML ID and current stock amount from a product page URL slug. The URL slug is the path portion of a product page starting with /catalog/. Returns the resolved URL, xml_id, city_id detected from page context, and total stock amount.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Product page URL slug starting with /catalog/ (e.g. '/catalog/vino/'). |

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

### Get product stock

Get stock availability in shops for a product. Note: Often restricted by Yandex SmartCaptcha.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city_id` | string | No | City ID from the get_cities endpoint (e.g. 778 for Белгород, 1433 for Челябинск). |
| `xml_id` | string | Yes | Product XML ID obtained from search_products or get_product_details (e.g. '<xml_id>'). |

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

### Get shops

Returns all shops in a given city, including addresses, geographic coordinates, working hours, and alcohol sale hours. Each shop has a unique numeric ID and shop number. Without a city_id, defaults to city 1433 (Челябинск).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city_id` | string | No | City ID from the get_cities endpoint. |

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

### Search products

Search for products by name or keyword. Returns product metadata including XML IDs needed for get_product_details. Results come from the catalog page HTML and include pricing and stock summary. A single page of results is returned.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query such as a product name or keyword (e.g. 'вино', 'пиво', 'виски'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/krasnoeibeloe/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://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.