# Carrefour (Spain) — 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.

> Access data from carrefour.es.

**Category:** Food & Dining | **Website:** [www.carrefour.es/supermercado](https://www.carrefour.es/supermercado) | **Docs:** [parse.bot/marketplace/975df0bf-702c-4272-936a-9012ee2faf0d/carrefour-es-api](https://parse.bot/marketplace/975df0bf-702c-4272-936a-9012ee2faf0d/carrefour-es-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/carrefour-spain/`
**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 categories

Returns supermarket product categories. Without a parent_category_id, returns top-level categories. With a parent_category_id, returns its subcategories. Each category includes its ID, name, and full URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `parent_category_id` | string | No | Category ID to retrieve subcategories for (e.g. cat20001). Omit to get top-level categories. |
| `postal_code` | string | No | 5-digit Spanish postal code for store context. |

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

### Get offers

Returns current promotional offers from Carrefour Spain supermarket. Products returned are currently featured in active promotions or special pricing campaigns.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of products to return per page (max 24). |
| `page` | integer | No | Page number (1-based). |
| `postal_code` | string | No | 5-digit Spanish postal code for store/pricing context. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/carrefour-spain/get-offers \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>","postal_code":"<string>"}'
```

### Get product detail

Returns full product details including EAN/barcode, nutritional context, net content, brand, pricing, and availability. Accepts either a product_id or a full product_url from listing results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `postal_code` | string | No | 5-digit Spanish postal code for store/pricing context. |
| `product_id` | string | No | Product identifier (e.g. 521007071). Either product_id or product_url must be provided. |
| `product_url` | string | No | Full or relative product page URL (e.g. /supermercado/leche-semidesnatada-carrefour-brik-1-l/R-521007071/p). |

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

### Get products by category

Returns paginated products from a category. Each page contains up to 24 products with pricing, availability, promotion info, and product URLs. Use category IDs obtained from get_categories.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Category identifier (e.g. cat20093 for Leche). Obtain from get_categories. |
| `limit` | integer | No | Maximum number of products to return per page (max 24). |
| `page` | integer | No | Page number (1-based). |
| `postal_code` | string | No | 5-digit Spanish postal code for store/pricing context. |

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

### Resolve location

Resolves a Spanish postal code to the assigned Carrefour store, delivery zone, and geographic identifiers. Returns the store name, sale point code, region, and warehouse identifiers that scope product availability and pricing.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `postal_code` | string | Yes | 5-digit Spanish postal code (e.g. 28232). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/carrefour-spain/resolve-location \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"postal_code":"<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.