# Albert Heijn — 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 Albert Heijn products, browse categories, view weekly bonus offers, and fetch detailed product information including nutrition and supplier contact details.

**Category:** Food & Dining | **Website:** [ah.nl/](https://ah.nl/) | **Docs:** [parse.bot/marketplace/60c17174-2637-4903-ada3-73da3ffd29c1/ah-nl-api](https://parse.bot/marketplace/60c17174-2637-4903-ada3-73da3ffd29c1/ah-nl-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/albert-heijn/`
**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 bonus products

Get current bonus/discount products from Albert Heijn. Returns products currently on promotion with original and discounted prices, discount details, and promotion periods. Paginates via a 0-based page counter. An optional category keyword filters results within bonus products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category keyword to filter bonus products (used as search query within bonus products, e.g. 'groente', 'bier') |
| `page` | integer | No | Page number (0-based) |
| `size` | integer | No | Number of results per page (max 50) |

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

### Get categories

Get product categories. Without a category_id, returns all top-level categories with names, slugs, and images. With a category_id, returns that category's available filters, taxonomy nodes, and total product count.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | No | Category/taxonomy ID to get details for (e.g. '6401' for Groente). If omitted, returns all top-level categories. |

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

### Get product details

Get detailed product information for a single product by ID. Returns nutritional facts, allergens, storage/usage instructions, packaging details, supplier contacts, and full discount information. A separate round-trip per product.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID (numeric string, e.g. '4164' or '441199'). The 'wi' prefix is stripped automatically if present. |

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

### Get suppliers

Get supplier/manufacturer information for Albert Heijn products. Accepts either specific product IDs or a search query. When using product_ids, fetches product details for each and extracts supplier contacts. When using a query, searches for products first then extracts supplier info. At least one of product_ids or query must be provided. Makes one detail request per product.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for query-based search (0-based) |
| `product_ids` | string | No | Comma-separated product IDs (e.g. '4164,441199,197226'). Max 20 IDs processed. |
| `query` | string | No | Search query to find products and extract their supplier info |
| `size` | integer | No | Number of products to check for suppliers (max 20) |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/albert-heijn/get-suppliers \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","product_ids":"<string>","query":"<string>","size":"<integer>"}'
```

### Search products

Search for products in the Albert Heijn supermarket. Returns product listings with prices, images, categories, bonus/discount status, and more. Paginates via a 0-based page counter. Each page returns up to `size` products (max 50). Supports filtering by bonus status and category taxonomy ID.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `bonus_only` | boolean | No | Filter to only show bonus/discount products |
| `category_id` | string | No | Filter by taxonomy/category ID (e.g., '2390' for Halfvolle melk) |
| `page` | integer | No | Page number (0-based) |
| `query` | string | Yes | Search query (e.g., 'melk', 'pasta', 'bier') |
| `size` | integer | No | Number of results per page (max 50) |
| `sort_by` | string | No | Sort order for results. |

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