# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

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

### 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/credits/lalpathlabs/find-nearest-center \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/lalpathlabs/get-special-offers \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/lalpathlabs/get-test-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/lalpathlabs/list-all-tests \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/lalpathlabs/list-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/lalpathlabs/list-cities \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/lalpathlabs/search-tests \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"city_id":"<integer>","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.