# Legami — 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 Legami's product catalog, view detailed item information and categories, manage shopping carts, and find nearby boutique locations. Streamline online shopping with product discovery, cart management, and store locator features all in one place.

**Category:** E-commerce | **Website:** [legami.com/](https://legami.com/) | **Docs:** [parse.bot/marketplace/48a40e68-bad5-4dbc-8c20-54037c96f816/legami-com-api](https://parse.bot/marketplace/48a40e68-bad5-4dbc-8c20-54037c96f816/legami-com-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-legami-com-api-48a40e68/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### add_to_cart

Add a product variant to the shopping cart. Automatically creates a basket if one does not exist. Returns the updated basket state with totals and shipment information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product variant ID to add (e.g. 'VEP0074'). |
| `quantity` | integer | No | Quantity to add. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-legami-com-api-48a40e68/add_to_cart \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>","quantity":"<integer>"}'
```

### create_basket

Create a new shopping basket for the current guest session. Returns the basket details including a unique basket ID, currency, and initial totals. Each call generates a fresh basket.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-legami-com-api-48a40e68/create_basket \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### find_boutique

Retrieve all Legami boutique store locations grouped by country code and region. Each store includes address, phone, opening hours, services, and customer ratings.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-legami-com-api-48a40e68/find_boutique \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_basket

Retrieve the current shopping basket(s) for the session's guest customer. Returns the count of baskets associated with the guest token.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-legami-com-api-48a40e68/get_basket \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_details

Retrieve full product details by SKU. Supports batch retrieval via comma-separated IDs. Returns detailed product data including pricing, variants, variation attributes, images, descriptions, ratings, shipping info, and inventory status.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID/SKU, or comma-separated IDs for batch retrieval (e.g. 'GEP0074' or 'GEP0074,VSKA0001'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-legami-com-api-48a40e68/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### list_categories

Retrieve search suggestions including matching categories, product suggestions, and brand suggestions for a given keyword. Useful for autocomplete and category discovery.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | No | Search keyword for category/product suggestions. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-legami-com-api-48a40e68/list_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### search_products

Full-text search over the Legami product catalog. Returns paginated results including product tiles with pricing, images, variation swatches, and available refinement filters. Pagination via offset; each page returns up to `limit` items from a total `count`.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max results per page. |
| `offset` | integer | No | Pagination offset (number of results to skip). |
| `query` | string | Yes | Search keyword (e.g. 'notebook', 'penna', 'zaino'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-legami-com-api-48a40e68/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```
