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

## Access

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

### 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/credits/mazda/get-deals \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/mazda/get-payment-quote \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/mazda/get-trims \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"language":"<string>","model":"<string>","province":"<string>","year":"<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.