# Dischem — 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 for pharmacy products and retrieve detailed information including prices, descriptions, and images directly from Dis-Chem's catalog. Browse product listings and access complete product details all in one place.

**Category:** Healthcare | **Website:** [dischem.co.za/](https://dischem.co.za/) | **Docs:** [parse.bot/marketplace/fa9a4e1b-4db0-46a2-9109-c8257bc0f719/dischem-co-za-api](https://parse.bot/marketplace/fa9a4e1b-4db0-46a2-9109-c8257bc0f719/dischem-co-za-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-dischem-co-za-api-fa9a4e1b/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_product_details

Get basic details (title, price, SKU) for a product. Accepts either a product URL slug or a search query. If only query is provided, the first matching product is used. Returns structured product information suitable for price comparison or catalog building.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | No | Product name or keywords to search for if slug is not provided. At least one of slug or query must be specified. |
| `slug` | string | No | The product URL slug (e.g. 'bayer-aspirin-cardio-100mg-30-s-630'). If omitted, query must be provided. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dischem-co-za-api-fa9a4e1b/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","slug":"<string>"}'
```

### get_product_images

Get all catalog images for a specific product identified by its URL slug. Returns the product page URL and an array of all product image URLs. The slug is the trailing path segment of a Dis-Chem product URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | The product URL slug, which is the trailing path of a Dis-Chem product page URL (e.g. 'bayer-aspirin-cardio-100mg-30-s-630'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dischem-co-za-api-fa9a4e1b/get_product_images \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### search_product

Search for a product by query on Dis-Chem and return the first matching product's page URL and all catalog images found on that product page. Useful for discovering product URLs and image assets from a keyword.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Product name or keywords to search for (e.g. 'aspirin', 'paracetamol'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dischem-co-za-api-fa9a4e1b/search_product \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
