# Mazda — 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.

> Find current vehicle deals, financing rates, lease options, and incentives across all Mazda Canada models and trims, with pricing tailored to your province. Get instant payment quotes to compare your options and discover the best offers available.

**Category:** Automotive | **Website:** [www.mazda.ca/en/shopping-tools/offers/](https://www.mazda.ca/en/shopping-tools/offers/) | **Docs:** [parse.bot/marketplace/8a23937e-db1d-41d8-8112-2f4a612b514e/mazda-ca-api](https://parse.bot/marketplace/8a23937e-db1d-41d8-8112-2f4a612b514e/mazda-ca-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-mazda-ca-api-8a23937e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_deals

Get all current vehicle deals and offers from Mazda Canada. Returns every available model/year with MSRP, financing rates (APR for all terms), lease rates, residual values, cash incentives/rebates, fees, vehicle images, and promotional text. Province determines region-specific pricing and fees.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `language` | string | No | Language code for response content. |
| `province` | string | No | Canadian province code for region-specific pricing and fees. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mazda-ca-api-8a23937e/get_deals \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"language":"<string>","province":"<string>"}'
```

### get_payment_quote

Calculate exact loan or lease payment quotes for a specific vehicle configuration. Uses Mazda's payment calculator to return weekly, bi-weekly, and monthly payments with and without taxes. Requires a model_code from get_deals or get_trims. If msrp is not provided, it is fetched automatically from the upstream package endpoint.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `annual_mileage` | integer | No | Annual mileage allowance in km (for leasing) |
| `down_payment` | integer | No | Down payment amount in dollars |
| `lease_term` | integer | No | Lease term in months (for leasing). Common values: 36, 42, 48, 54, 60 |
| `loan_term` | integer | No | Loan term in months (for financing). Common values: 24, 36, 48, 60, 72, 84 |
| `model_code` | string | Yes | Vehicle model code from get_deals or get_trims results (e.g. 'NXXL86', 'NXSL86') |
| `msrp` | string | No | Vehicle MSRP as a numeric string. Auto-fetched from upstream if not provided. |
| `option_code` | string | No | Option code from get_deals or get_trims results |
| `product_key` | string | No | Payment type. |
| `province` | string | No | Canadian province code. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mazda-ca-api-8a23937e/get_payment_quote \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"annual_mileage":"<integer>","down_payment":"<integer>","lease_term":"<integer>","loan_term":"<integer>","model_code":"<string>","msrp":"<string>","option_code":"<string>","product_key":"<string>","province":"<string>"}'
```

### get_trims

Get all available trims for a specific vehicle model and year, with trim-level pricing, financing rates, lease rates, and incentives. Returns stale_input with kind input_not_found if the model/year/language/province combination does not exist upstream.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `language` | string | No | Language code for response content. |
| `model` | string | Yes | Model URL slug as returned in get_deals results (e.g. 'CX-5', 'CX-30', 'CX-70-MHEV') |
| `province` | string | No | Canadian province code for region-specific pricing. |
| `year` | string | Yes | Model year (e.g. '2026', '2025') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mazda-ca-api-8a23937e/get_trims \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"language":"<string>","model":"<string>","province":"<string>","year":"<string>"}'
```
