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

> Rexel provides 3 callable API endpoints through the Parse marketplace.

**Category:** E-commerce | **Website:** [www.rexel.fr/frx](https://www.rexel.fr/frx) | **Docs:** [parse.bot/marketplace/06c94768-12d4-4376-bebb-b874b318cd0f/rexel-fr-api](https://parse.bot/marketplace/06c94768-12d4-4376-bebb-b874b318cd0f/rexel-fr-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-rexel-fr-api-06c94768/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Retrieve the full hierarchical category tree of Rexel France's product catalog. Each category includes its code, name, URL path, position, and nested children up to the specified depth.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `depth` | integer | No | Maximum depth of the category tree to return (1-3). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rexel-fr-api-06c94768/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"depth":"<integer>"}'
```

### get_product

Retrieve full details for a single product by its SKU (Rexel internal numeric identifier). Returns brand, manufacturer, descriptions, stock status, quantity constraints, images, markers, and classification.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `sku` | string | Yes | Rexel product SKU (numeric identifier, e.g. 75248328). Obtained from search_products results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rexel-fr-api-06c94768/get_product \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sku":"<string>"}'
```

### search_products

Full-text search across Rexel France's catalog of professional electrical products. Results are auto-iterated across pages. Each product includes SKU, brand, description, stock status, and image URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for results (1-based). |
| `query` | string | Yes | Search query text (product name, reference, EAN, keyword). |
| `size` | integer | No | Number of products per page (max 50). |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rexel-fr-api-06c94768/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>","size":"<integer>","sort":"<string>"}'
```
