# Defacto (Türkiye) — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 DeFacto's Turkish product catalog to find clothing items, explore categories, and view detailed product information including pricing and availability. Apply filters to narrow down results by color, size, gender, and more.

**Category:** E-commerce | **Website:** [defacto.com.tr/](https://defacto.com.tr/) | **Docs:** [parse.bot/marketplace/df4048af-5e95-4c40-9e32-4308c8e96df8/defacto-com-tr-api](https://parse.bot/marketplace/df4048af-5e95-4c40-9e32-4308c8e96df8/defacto-com-tr-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/defacto-turkiye/`
**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

### Browse category

Browse products in a specific DeFacto category by URL slug. Supports optional Turkish-language filters via a semicolon-separated filter string. Returns paginated product summaries. Filter keys and values are discoverable via get_search_filters.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category URL slug (e.g., 'erkek-t-shirt', 'kadin-elbise') |
| `filters` | string | No | Filter string passed as 'filtre' query parameter in format 'key:value;key:value' (e.g., 'renk:mavi', 'renk:mavi;beden:l'). Filter group names and values are Turkish and can be discovered via the get_search_filters endpoint. |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/defacto-turkiye/browse-category \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>","filters":"<string>","page":"<integer>"}'
```

### Get product details

Retrieve full product details for a single item including images, available sizes with stock, color variants, material composition, and properties. Accepts product URL paths or full URLs. The productUrl field from search_products or browse_category results can be passed directly.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_url` | string | Yes | Product URL path or full URL (e.g., '/oversize-tisort-3374606' or 'https://www.defacto.com.tr/oversize-tisort-3374606'). The productUrl field from search_products or browse_category results can be used directly. |

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

### Get search filters

Retrieve available filter options for a search query. Returns filter groups like Cinsiyet (gender), Kategori (category), Beden (size), Renk (color), Fiyat (price), Yaka (collar), Kol Boyu (sleeve length), Kalıp (fit). Filter names and values are in Turkish and can be used with browse_category's filters parameter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword to get available filters for (e.g., 'tişört', 'elbise', 'ayakkabi') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/defacto-turkiye/get-search-filters \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Search products

Full-text search over DeFacto's product catalog by keyword. Returns paginated product summaries including title, price, color, sizes, and stock. Pagination via integer page parameter. Results are in Turkish.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword in Turkish (e.g., 'tişört', 'elbise', 'ayakkabı') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/defacto-turkiye/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.