# Lalpathlabs — 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 Dr. Lal PathLabs pathology tests and packages, get detailed information about specific tests, and find the nearest diagnostic center by location. You can also explore available test categories, view special offers, and discover all testing options across different cities.

**Category:** Healthcare | **Website:** [lalpathlabs.com/](https://lalpathlabs.com/) | **Docs:** [parse.bot/marketplace/1a82bf85-b781-419a-9982-5162c3086e38/lalpathlabs-com-api](https://parse.bot/marketplace/1a82bf85-b781-419a-9982-5162c3086e38/lalpathlabs-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-lalpathlabs-com-api-1a82bf85/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### find_nearest_center

Find the nearest collection centers in a city.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city` | string | Yes | City name (e.g., 'Delhi', 'Mumbai') |
| `state` | string | No | State name (defaults to city name) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lalpathlabs-com-api-1a82bf85/find_nearest_center \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city":"<string>","state":"<string>"}'
```

### get_special_offers

Get current promotions and discount offers from Dr. Lal PathLabs. Returns active coupons with descriptions, banners, and terms and conditions.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lalpathlabs-com-api-1a82bf85/get_special_offers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_test_details

Retrieve full details of a specific pathology test by its item ID. Returns pricing, analyte parameters, supplementary tests, specimen requirements, pretest information, and report delivery details. Supports querying multiple item IDs by passing comma-separated values.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city_name` | string | No | City name for city-specific pricing (e.g., 'Delhi', 'Mumbai', 'Bengaluru'). |
| `item_id` | string | Yes | Test item ID (e.g., 'Z021' for CBC, 'S153' for Thyroid, 'WM14SN' for Swasthfit packages). Multiple IDs can be passed comma-separated (e.g., 'Z021,S153'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lalpathlabs-com-api-1a82bf85/get_test_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city_name":"<string>","item_id":"<string>"}'
```

### list_all_tests

Get a paginated list of all available pathology tests from the test menu.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lalpathlabs-com-api-1a82bf85/list_all_tests \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### list_categories

Get all test categories (conditions/specialities) available for filtering tests.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lalpathlabs-com-api-1a82bf85/list_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### list_cities

Get the list of all cities served by Dr. Lal PathLabs. Returns city IDs, names, state information, and service configuration for each city. No parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lalpathlabs-com-api-1a82bf85/list_cities \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_tests

Search for pathology tests and health packages by keyword using elastic search. Returns matching tests with prices, analyte parameters, supplementary tests, and collection options. Requires a non-empty search query.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city_id` | integer | No | City ID for city-specific pricing (default: 2 for Delhi). Obtain city IDs from list_cities endpoint. |
| `query` | string | Yes | Search keyword (e.g., 'diabetes', 'thyroid', 'CBC') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lalpathlabs-com-api-1a82bf85/search_tests \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city_id":"<integer>","query":"<string>"}'
```
