# Ahlens — 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 products from Åhléns Swedish department store to get pricing, images, brands, and category information, with autocomplete suggestions to help you find what you're looking for. Access detailed product information and explore items across different categories in real-time.

**Category:** E-commerce | **Website:** [ahlens.se/](https://ahlens.se/) | **Docs:** [parse.bot/marketplace/81b9217f-abf8-44a8-a9aa-e178b71a5f55/ahlens-se-api](https://parse.bot/marketplace/81b9217f-abf8-44a8-a9aa-e178b71a5f55/ahlens-se-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/ahlens/`
**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

### Autocomplete

Get search autocomplete suggestions for a partial query. Returns matching products (without size variants), category links, brand links, and content page links. Useful for building search-as-you-type interfaces or discovering related categories and brands.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Partial search query (e.g. 'jack', 'klän') |

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

### Browse category

Browse products within a specific category path on Åhléns. Returns paginated products with the same structure as search_products. Category paths follow the site hierarchy (e.g. '/dam/jackor' for women's jackets). Sort controls result ordering.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | Yes | Category path (e.g. '/dam/jackor', '/herr/byxor', '/barn', '/skonhet') |
| `limit` | integer | No | Number of products to return per page. |
| `skip` | integer | No | Number of products to skip for pagination. |
| `sort` | string | No | Sort order for results. |

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

### Get product

Fetch detailed product information by product key UUID. Returns enriched data including care/washing description, material composition, season, brand URL, and product category not available in search or browse results. The product key is a UUID obtained from search_products or browse_category results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_key` | string | Yes | Product UUID key from search_products or browse_category results |

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

### Search products

Full-text search over Åhléns product catalog by keyword. Returns paginated products with brand, title, prices, images, colors, categories, stock levels, and size variants. Paginates via skip/limit offsets. Each product exposes variant-level stock and pricing. Sort controls result ordering; default is relevance-ranked.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of products to return per page. |
| `query` | string | Yes | Search keyword (e.g. 'jacka', 'klänning', 'skor') |
| `skip` | integer | No | Number of products to skip for pagination. |
| `sort` | string | No | Sort order for results. |

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