# Bershka — 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 and browse Bershka's fashion collection by category, color, and size to find exactly what you're looking for. Get comprehensive product details including prices, materials, and real-time availability to make informed shopping decisions.

**Category:** E-commerce | **Website:** [www.bershka.com/es/q/](https://www.bershka.com/es/q/) | **Docs:** [parse.bot/marketplace/2755076c-2ca2-4fc1-8bdc-a22846f32850/bershka-com-api](https://parse.bot/marketplace/2755076c-2ca2-4fc1-8bdc-a22846f32850/bershka-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/bershka/`
**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 product

Retrieve detailed information for a single product by its numeric ID. Returns full product data including all color variants with per-size pricing and availability, care instructions, and composition details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country` | string | No | Country code determining store locale and language. |
| `product_id` | string | Yes | Numeric product ID (e.g. '229723098'). Obtained from search_products results. |

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

### List categories

List all available product categories on Bershka with product counts. Categories are derived from Algolia facets and can be used as filter values in the category parameter of search_products. Also returns a top-level hierarchy (e.g. clothes, women, men, shoes).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country` | string | No | Country code determining store locale. |
| `gender` | string | No | Filter categories by gender section. Omit for all. |

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

### Search products

Full-text search over Bershka's product catalog. Returns products with name, price, image, colors, sizes, and composition. Supports filtering by color, category, and size via Algolia facets. Results are auto-iterated; facets in the response show available filter values and counts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Filter by category name in English (e.g. 'T-shirts', 'Jeans', 'Dresses'). Available values returned in facets.categoryNameEn of search results. |
| `color` | string | No | Filter by color name in the store's language (e.g. 'Negro', 'Blanco', 'Rojo' for Spain). Available values returned in facets.colorNameEs of search results. |
| `country` | string | No | Country code determining store locale and language. |
| `limit` | integer | No | Number of products per page (max 224). |
| `page` | integer | No | Zero-based page number for pagination. |
| `query` | string | Yes | Search query text (e.g. 'camiseta', 'jacket', 'jeans'). |
| `size` | string | No | Filter by size (e.g. 'S', 'M', 'L', 'XL', 'XXS'). Available values returned in facets.sizes of search results. |

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