# Flanco — 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 product listings, pricing, availability, promotions, customer reviews, and store information from Flanco.ro, Romania's leading electronics retailer. Search by keyword or browse the full category hierarchy to retrieve structured product data.

**Category:** E-commerce | **Website:** [flanco.ro/](https://flanco.ro/) | **Docs:** [parse.bot/marketplace/0c9bf7ed-3ad0-4855-8e27-e5d1fcbe8e7f/flanco-ro-api](https://parse.bot/marketplace/0c9bf7ed-3ad0-4855-8e27-e5d1fcbe8e7f/flanco-ro-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-flanco-ro-api-0c9bf7ed/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Retrieve the full hierarchical category tree from the site navigation. Returns top-level categories each with nested subcategories containing name and URL. Use the URLs (stripped of domain and .html suffix) as input for get_category_listings.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flanco-ro-api-0c9bf7ed/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_category_listings

Retrieve product listings from a specific category page. The category_path must match an existing category on the site; invalid paths return an upstream_error with 404 status. Valid paths can be discovered via the get_categories endpoint by stripping the domain and .html suffix from URLs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_path` | string | Yes | Category URL path segment without leading/trailing slashes or .html suffix (e.g. 'telefoane-tablete/smartphone'). Valid paths can be derived from get_categories results by stripping the domain and .html suffix. |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flanco-ro-api-0c9bf7ed/get_category_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_path":"<string>","page":"<integer>"}'
```

### get_product_details

Retrieve full details for a specific product including price, availability, technical specifications, and promotional vouchers. Uses the product's full URL or path segment. The returned id can be used with get_product_reviews.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_url` | string | Yes | Full product URL or path segment (e.g. 'https://www.flanco.ro/laptop-gaming-lenovo-loq-15irh8.html'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flanco-ro-api-0c9bf7ed/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_url":"<string>"}'
```

### get_product_reviews

Retrieve customer reviews for a specific product via AJAX. Uses the internal numeric product ID. Products with no reviews return an empty array and null average_rating.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Internal product ID (numeric string, e.g. '911655'). Can be obtained from search_products or get_category_listings results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flanco-ro-api-0c9bf7ed/get_product_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_stores

Retrieve the list of all physical Flanco stores with addresses, phone numbers, opening schedules, email contacts, and geographic coordinates. No input parameters required; returns the complete store directory.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flanco-ro-api-0c9bf7ed/get_stores \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_products

Full-text search over Flanco's product catalog. Returns one page of matching products with names, current prices, and stock status. Pagination via the page param; each page returns up to ~25 items. Empty results are possible for obscure queries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword (e.g. 'laptop', 'telefon samsung'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flanco-ro-api-0c9bf7ed/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
