# Salla — 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 stores across the Salla e-commerce platform, explore their product catalogs organized by category, and retrieve detailed information about specific items including pricing and availability. Access store profiles, product listings, and category structures for any store hosted on Salla.

**Category:** E-commerce | **Website:** [salla.com/](https://salla.com/) | **Docs:** [parse.bot/marketplace/c61c6cee-6519-4d35-852d-e02d243e38b5/salla-com-api](https://parse.bot/marketplace/c61c6cee-6519-4d35-852d-e02d243e38b5/salla-com-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/salla/`
**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 product details

Get detailed information for a specific product in a Salla store, including full description, pricing breakdown, available quantity, availability flags, image with alt text, and shipping requirements. Requires both the store identifier and the product ID from list_products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | The product ID from list_products results (e.g. '613566215'). |
| `store_id` | string | Yes | The numeric store identifier obtained from get_store_id endpoint. |

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

### Get store id

Extract the numeric store-identifier from a Salla store's homepage URL. The store ID is a prerequisite for all other endpoints (get_store_info, list_categories, list_products, get_product_details). Fetches the store homepage and parses the identifier from page source.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The homepage URL of a Salla-hosted store (e.g. 'https://homesfurniture.sa'). |

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

### Get store info

Get general information and settings for a Salla store including availability status, supported languages, authentication settings, rating configuration, and maintenance state. Requires the numeric store identifier from get_store_id.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `store_id` | string | Yes | The numeric store identifier obtained from get_store_id endpoint. |

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

### List categories

List all product categories for a given Salla store. Returns category names, numeric IDs, image URLs, and nested sub-categories. Category IDs can be passed to list_products to filter by category.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `store_id` | string | Yes | The numeric store identifier obtained from get_store_id endpoint. |

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

### List products

List or search products in a Salla store. Supports filtering by category ID, keyword search, and cursor-based pagination. Returns product summaries with pricing, availability flags, and image URLs. The next_cursor field provides a cursor for the next page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | No | Filter products by category ID (numeric ID from list_categories results, e.g. '1986261554'). |
| `cursor` | string | No | Pagination cursor URL from the 'next_cursor' field of a previous response. |
| `per_page` | integer | No | Number of results per page. |
| `query` | string | No | Search query for products within the store. |
| `store_id` | string | Yes | The numeric store identifier obtained from get_store_id endpoint. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/salla/list-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","cursor":"<string>","per_page":"<integer>","query":"<string>","store_id":"<string>"}'
```

### Search stores

Search for stores on the Salla platform. Returns a list of matching store URLs and names based on the provided query, supplemented by search engine results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | No | Search query to find stores on Salla platform. |

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