# Supplier API Reference

Source: https://docs.premiumqualifiedleads.com/supplier-api/supplier-api-reference

For approved suppliers sending leads to Premium Qualified Leads.

#### Endpoints

| Method | Path | Purpose |
|---|---|---|
| POST | /api/v1/ingest | Submit one lead. |
| GET | /api/v1/supplier/stats?days=30 | Your recent submission and routing stats. |

Both use your supplier key in the `x-api-key` header.

#### How submission works

- We reply as soon as the lead passes basic checks. `accepted: true` means accepted for processing, not yet delivered to a buyer.
- Matching and delivery happen right after, so your request is never held up by delivery.
- If we can't process an accepted lead and you've given us a callback URL, we post `{"event": "lead_error", "external_id": "...", "error": "..."}` to it.

#### Example: funding lead

```plaintext
POST /api/v1/ingest
x-api-key: YOUR_SUPPLIER_API_KEY
Content-Type: application/json

{
  "vertical": "funding",
  "external_id": "lead-123",
  "first_name": "Jordan",
  "last_name": "Rivera",
  "email": "jordan@example.com",
  "phone": "+15125550142",
  "business_name": "Rivera Plumbing LLC",
  "state": "TX",
  "business_zip": "78701",
  "loan_amount": "100000",
  "monthly_revenue": "85000",
  "credit_score": "700-749",
  "industry": "Plumbing",
  "time_in_business": "4-6 years",
  "tcpa_consent": true,
  "consent_timestamp": "2026-11-25T15:04:11Z",
  "consent_language": "By clicking Submit, I agree...",
  "source_form_url": "https://www.example.com/apply",
  "lead_ip": "203.0.113.7",
  "trusted_form_cert_url": "https://cert.trustedform.com/example"
}

```

#### Example: business debt lead

```json
{
  "vertical": "debt",
  "external_id": "lead-456",
  "full_name": "Sam Lee",
  "email": "sam@example.com",
  "phone": "+13055550188",
  "business_name": "Lee Logistics Inc",
  "state": "FL",
  "debt_amount": "120000",
  "tcpa_consent": true,
  "consent_timestamp": "2026-11-25T15:04:11Z",
  "source_form_url": "https://www.example.com/relief"
}

```

#### Responses

Accepted:

```json
{ "accepted": true, "lead_id": "lead-123", "score": 78, "processingTime": 42 }

```

Rejected (400):

```json
{ "accepted": false, "reason": "email or phone required; name required", "processingTime": 18 }

```

#### Supplier stats

```plaintext
GET /api/v1/supplier/stats?days=30
x-api-key: YOUR_SUPPLIER_API_KEY

```

Returns totals for submitted, routed, rejected and pending leads, your acceptance rate and average score, and a breakdown by status.
