# Desertcart — 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 products across Desertcart to access detailed information including specifications, images, pricing, and real-time availability. Explore product categories, subcategories, and variants to compare options and find exactly what you're looking for.

**Category:** E-commerce | **Website:** [desertcart.com/](https://desertcart.com/) | **Docs:** [parse.bot/marketplace/506c96f2-32f8-41e9-81f3-8f0cb09b8aea/desertcart-com-api](https://parse.bot/marketplace/506c96f2-32f8-41e9-81f3-8f0cb09b8aea/desertcart-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-desertcart-com-api-506c96f2/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Retrieve the list of top-level product categories available on Desertcart. Returns a static list of 15 categories with display name and URL-friendly slug.

**Estimated cost:** Metered

_No parameters required._

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

### get_product_availability

Check product availability, stock status, delivery date estimates, store country, and Desertcart Pro eligibility.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID from search_products results (e.g. '817555289'). |

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

### get_product_details

Retrieve full product details by product ID including description, features, images, pricing, delivery, variant information, seller info, and enhanced descriptions. A separate round-trip per product.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID from search_products results (e.g. '817555289'). |

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

### get_product_images

Retrieve product image URLs including the main image and all available product gallery images.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID from search_products results (e.g. '817555289'). |

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

### get_product_pricing

Retrieve pricing information for a product including current price, list price, discount percentage, and price breakdown with duties and shipping costs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID from search_products results (e.g. '817555289'). |

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

### get_product_specifications

Extract technical specifications for a product as key-value pairs. Not all products have specifications; an empty array is returned when none are available.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID from search_products results (e.g. '817555289'). |

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

### get_product_variants

Retrieve product variant configurations including color, size, and other attributes. Returns an empty object for single-SKU products; only multi-SKU products return populated variant data with thumbnails, variations map, and attribute names.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Numeric product ID from search_products results (e.g. '817555289'). Multi-SKU products will return populated variant data. |

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

### get_subcategories

Retrieve subcategory information for a given category. Currently returns a guidance message as Desertcart does not expose a dedicated subcategory API; subcategories are accessed via search with category-specific queries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category slug from get_categories results (e.g. 'electronics', 'fashion', 'home-kitchen'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-desertcart-com-api-506c96f2/get_subcategories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>"}'
```

### search_products

Full-text search over Desertcart product catalog. Returns paginated product summaries with pricing, ratings, and delivery estimates. Pagination via page number; 10 results per page, up to total_pages. Optional country filter narrows results to a source-store country.

**Estimated cost:** Metered

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

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