# Lockcodes — 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 lock key codes, pin charts, and key blank cross-references to find the right locksmith information for your projects. Access cylinder types, combination counters, and comprehensive key blank data with flexible free demo or subscription options.

**Category:** Other | **Website:** [lockcodes.com/](https://lockcodes.com/) | **Docs:** [parse.bot/marketplace/417c3320-d511-4e65-aa1f-15fb0e1c5706/lockcodes-com-api](https://parse.bot/marketplace/417c3320-d511-4e65-aa1f-15fb0e1c5706/lockcodes-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-lockcodes-com-api-417c3320/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### combination_counter

Calculate the number of possible key combinations based on spaces, depths, and MACS (Maximum Adjacent Cut Specification) rules. Also reports pullout count and explanation. MACS must be less than depths for valid results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `depths` | integer | Yes | Number of available depth values. |
| `macs` | integer | Yes | Maximum Adjacent Cut Specification value. Must be less than depths. |
| `spaces` | integer | Yes | Number of key spaces (positions on the key). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lockcodes-com-api-417c3320/combination_counter \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"depths":"<integer>","macs":"<integer>","spaces":"<integer>"}'
```

### names_listing_search

Search the lock name listing for blank cross-references. Performs case-insensitive substring matching against a static cross-reference database. Returns matching lock names with pipe-separated cross-reference details. An empty results array indicates no matches were found for the query.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Lock name to search for (e.g. Abus, Master, Schlage). Case-insensitive substring match. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lockcodes-com-api-417c3320/names_listing_search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### pinitnow_get_pin_chart

Generate a pinning chart for a specific cylinder type and key cuts. Returns a text representation of the pin chart including top/bottom pin assignments and pin lengths in thousandths. The chart includes standard, OEM, .005, and .003 kit lengths. Accepts change key cuts (required) and optional master/control key cuts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `change_cuts` | string | Yes | Cuts for the change key as a digit string (e.g. 1234). Length depends on cylinder type. |
| `control_cuts` | string | No | Cuts for the control key as a digit string. When omitted, no control key is included. |
| `cylinder_slug` | string | Yes | Cylinder slug identifying the lock type. Obtain from pinitnow_list_cylinder_types endpoint. |
| `master_cuts` | string | No | Cuts for the master key as a digit string. When omitted, chart is generated for change key only. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lockcodes-com-api-417c3320/pinitnow_get_pin_chart \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"change_cuts":"<string>","control_cuts":"<string>","cylinder_slug":"<string>","master_cuts":"<string>"}'
```

### pinitnow_list_cylinder_types

List all available cylinder types for the Pin It Now! pinning calculator. Returns cylinder names, slugs (used as input to pinitnow_get_pin_chart), and template strings. The full catalog is returned in a single response with no pagination.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-lockcodes-com-api-417c3320/pinitnow_list_cylinder_types \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
