{
  "openapi": "3.1.1",
  "info": {
    "title": "Archer DMC Inbound Lead API",
    "description": "Partner-facing API for posting won-bid lead details to Archer DMC. The default integration path is the normalized JSON envelope at POST /v1/leads; per-vendor native-format endpoints are available by arrangement. Full guides, the narrative contract, and the pinned copy of this document live at https://docs.archerdmc.com.",
    "contact": {
      "name": "Archer Integrations",
      "email": "integrations@archerdmc.com"
    },
    "version": "1.3"
  },
  "servers": [
    {
      "url": "https://api-test.archerdmc.com"
    }
  ],
  "paths": {
    "/v1/leads": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Post a won-bid lead in Archer's normalized envelope (v1.2 §5).",
        "operationId": "PostNormalizedLead",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboundLeadEnvelope"
              },
              "examples": {
                "auto": {
                  "summary": "Auto — full packet (warm transfer)",
                  "description": "Every §6.1 field: two drivers with incidents, two vehicles, requested coverage, and call_metadata (§6.5).",
                  "value": {
                    "meta": {
                      "lead_id": "EXAMPLE-AUTO-0001",
                      "schema_version": "1.3",
                      "vendor_id": "your-archer-vendor-slug",
                      "lead_type": "auto",
                      "delivery_mode": "warm_transfer",
                      "quality_tier": "premium",
                      "agent_id": "archer-agent-key-abc",
                      "campaign": "brand-auto-q3",
                      "upstream_source": "GOOGLE",
                      "vendor_source_ids": {
                        "publisher_id": "pub-8842",
                        "placement_id": "plc-17"
                      },
                      "submission_url": "https://quotes.example.com/auto/form",
                      "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) Safari/605.1.15",
                      "source_ip": "203.0.113.42",
                      "form_duration_ms": 47500,
                      "comment": "Consumer prefers evening calls",
                      "note": "Vendor free-form note",
                      "created_at_source": "2026-07-09T15:30:00Z"
                    },
                    "contact": {
                      "first_name": "Avery",
                      "last_name": "Fullfield",
                      "email": "avery.auto@example.com",
                      "phone": "+12085550101",
                      "dob": "1987-03-14",
                      "address": {
                        "line1": "742 Evergreen Terrace",
                        "line2": "Unit 4B",
                        "city": "Boise",
                        "county": "Ada",
                        "state": "ID",
                        "zip": "83702",
                        "country": "US"
                      }
                    },
                    "consent": {
                      "tcpa_opt_in": true,
                      "tcpa_language": "By clicking Submit you consent to be contacted by up to four insurance agents.",
                      "captured_at": "2026-07-09T15:29:45Z",
                      "trusted_form_cert_url": "https://cert.trustedform.com/2f7a1c9e8b3d4e5f6a7b8c9d0e1f2a3b",
                      "jornaya_lead_id": "C0FFEE00-1234-5678-9ABC-DEF012345678"
                    },
                    "cost": {
                      "payout": 13.00,
                      "list_price": 21.00,
                      "currency": "USD"
                    },
                    "attributes": {
                      "drivers": [
                        {
                          "first_name": "Avery",
                          "last_name": "Fullfield",
                          "dob": "1987-03-14",
                          "license_state": "ID",
                          "license_status": "valid",
                          "license_ever_suspended": false,
                          "age_licensed": 16,
                          "occupation": "Nurse",
                          "years_in_field": 12,
                          "education": "bachelors",
                          "incidents": [
                            {
                              "type_raw": "At-fault accident",
                              "incident_date": "2024-11-02",
                              "at_fault": true,
                              "what_damaged": "Other vehicle",
                              "insurance_paid": 8250.00
                            },
                            {
                              "type_raw": "Speeding 10-15 over",
                              "incident_date": "2025-06-18",
                              "at_fault": false,
                              "what_damaged": "None",
                              "insurance_paid": 0
                            }
                          ],
                          "requires_sr22": false,
                          "credit_rating": "good",
                          "bankruptcy": false,
                          "repossessions": false,
                          "has_military_affiliation": true,
                          "gender": "female",
                          "marital_status": "married",
                          "relationship_to_applicant": "self"
                        },
                        {
                          "first_name": "Jordan",
                          "last_name": "Fullfield",
                          "dob": "1985-09-22",
                          "license_state": "ID",
                          "license_status": "valid",
                          "license_ever_suspended": true,
                          "age_licensed": 17,
                          "occupation": "Teacher",
                          "years_in_field": 9,
                          "education": "masters",
                          "incidents": [ ],
                          "requires_sr22": false,
                          "credit_rating": "excellent",
                          "bankruptcy": false,
                          "repossessions": false,
                          "has_military_affiliation": false,
                          "gender": "male",
                          "marital_status": "married",
                          "relationship_to_applicant": "spouse"
                        }
                      ],
                      "vehicles": [
                        {
                          "year": 2022,
                          "make": "Toyota",
                          "model": "RAV4",
                          "submodel": "XLE Premium",
                          "vin_prefix": "2T3P1RFV",
                          "primary_use": "commute",
                          "annual_miles": 12500,
                          "weekly_commute_days": 5,
                          "one_way_distance_miles": 18,
                          "owned_or_leased": "owned",
                          "antitheft_features": [
                            "alarm",
                            "vin_etching"
                          ],
                          "location_parked": "garage"
                        },
                        {
                          "year": 2018,
                          "make": "Honda",
                          "model": "Civic",
                          "submodel": "EX-T",
                          "vin_prefix": "19XFC1F3",
                          "primary_use": "pleasure",
                          "annual_miles": 6000,
                          "weekly_commute_days": 0,
                          "one_way_distance_miles": 0,
                          "owned_or_leased": "leased",
                          "antitheft_features": [
                            "immobilizer"
                          ],
                          "location_parked": "driveway"
                        }
                      ],
                      "current_insurer": "Geico",
                      "years_with_carrier": 4,
                      "continuously_insured_since": "2015-05-01",
                      "homeowner": true,
                      "household_income": 142000,
                      "requested_coverage": {
                        "bodily_injury_per_person": 100000,
                        "bodily_injury_per_accident": 300000,
                        "property_damage": 100000,
                        "uninsured_motorist": 100000,
                        "comprehensive_deductible": 500,
                        "collision_deductible": 1000
                      },
                      "call_metadata": {
                        "call_duration_seconds": 312,
                        "recording_url": "https://recordings.example.com/calls/9f8e7d6c.mp3",
                        "agent_disposition": "transferred",
                        "transferred_at": "2026-07-09T15:35:12Z"
                      }
                    }
                  }
                },
                "home": {
                  "summary": "Home — full packet (live transfer)",
                  "description": "Every §6.2 field: applicant, residence with separate insured-property address, prior claims, and call_metadata.",
                  "value": {
                    "meta": {
                      "lead_id": "EXAMPLE-HOME-0001",
                      "schema_version": "1.3",
                      "vendor_id": "your-archer-vendor-slug",
                      "lead_type": "home",
                      "delivery_mode": "live_transfer",
                      "quality_tier": "standard",
                      "agent_id": "archer-agent-key-abc",
                      "campaign": "brand-home-q3",
                      "upstream_source": "GOOGLE",
                      "vendor_source_ids": {
                        "publisher_id": "pub-8842",
                        "placement_id": "plc-17"
                      },
                      "submission_url": "https://quotes.example.com/home/form",
                      "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) Safari/605.1.15",
                      "source_ip": "203.0.113.42",
                      "form_duration_ms": 47500,
                      "created_at_source": "2026-07-09T15:30:00Z"
                    },
                    "contact": {
                      "first_name": "Avery",
                      "last_name": "Fullfield",
                      "email": "avery.home@example.com",
                      "phone": "+12085550102",
                      "dob": "1987-03-14",
                      "address": {
                        "line1": "742 Evergreen Terrace",
                        "line2": "Unit 4B",
                        "city": "Boise",
                        "county": "Ada",
                        "state": "ID",
                        "zip": "83702",
                        "country": "US"
                      }
                    },
                    "consent": {
                      "tcpa_opt_in": true,
                      "tcpa_language": "By clicking Submit you consent to be contacted by up to four insurance agents.",
                      "captured_at": "2026-07-09T15:29:45Z",
                      "trusted_form_cert_url": "https://cert.trustedform.com/2f7a1c9e8b3d4e5f6a7b8c9d0e1f2a3b",
                      "jornaya_lead_id": "C0FFEE00-1234-5678-9ABC-DEF012345678"
                    },
                    "cost": {
                      "payout": 11.00,
                      "list_price": 15.00,
                      "currency": "USD"
                    },
                    "attributes": {
                      "applicant": {
                        "gender": "female",
                        "marital_status": "married",
                        "occupation": "Nurse",
                        "education": "bachelors",
                        "credit_rating": "good",
                        "has_military_affiliation": true
                      },
                      "residence": {
                        "ownership_status": "own",
                        "dwelling_type": "single_family",
                        "year_built": 1996,
                        "occupancy_date": "2019-08-15",
                        "square_footage": 2350,
                        "number_bedrooms": 4,
                        "number_bathrooms": 2.5,
                        "construction": "frame",
                        "roof_type": "asphalt_shingle",
                        "roof_age_years": 6,
                        "replacement_cost": 425000,
                        "security_features": [
                          "monitored_alarm",
                          "deadbolts",
                          "smoke_detectors"
                        ],
                        "residence_address": {
                          "line1": "980 Lakeshore Dr",
                          "line2": "",
                          "city": "McCall",
                          "county": "Valley",
                          "state": "ID",
                          "zip": "83638",
                          "country": "US"
                        }
                      },
                      "current_policy": {
                        "carrier": "State Farm",
                        "expiration_date": "2026-09-30",
                        "annual_premium": 1840.50,
                        "years_with_carrier": 7,
                        "claims": [
                          {
                            "claim_date": "2023-01-12",
                            "type_raw": "Hail damage - roof",
                            "amount_paid": 11200.00
                          },
                          {
                            "claim_date": "2021-07-04",
                            "type_raw": "Water damage - burst pipe",
                            "amount_paid": 4300.75
                          }
                        ]
                      },
                      "call_metadata": {
                        "call_duration_seconds": 312,
                        "recording_url": "https://recordings.example.com/calls/9f8e7d6c.mp3",
                        "agent_disposition": "transferred",
                        "transferred_at": "2026-07-09T15:35:12Z"
                      }
                    }
                  }
                },
                "health": {
                  "summary": "Health — full packet (web)",
                  "description": "Every §6.3 field, including the open qualifying_conditions boolean map.",
                  "value": {
                    "meta": {
                      "lead_id": "EXAMPLE-HEALTH-0001",
                      "schema_version": "1.3",
                      "vendor_id": "your-archer-vendor-slug",
                      "lead_type": "health",
                      "delivery_mode": "web",
                      "quality_tier": "standard",
                      "agent_id": "archer-agent-key-abc",
                      "campaign": "brand-health-q3",
                      "upstream_source": "GOOGLE",
                      "vendor_source_ids": {
                        "publisher_id": "pub-8842",
                        "placement_id": "plc-17"
                      },
                      "submission_url": "https://quotes.example.com/health/form",
                      "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) Safari/605.1.15",
                      "source_ip": "203.0.113.42",
                      "form_duration_ms": 47500,
                      "created_at_source": "2026-07-09T15:30:00Z"
                    },
                    "contact": {
                      "first_name": "Avery",
                      "last_name": "Fullfield",
                      "email": "avery.health@example.com",
                      "phone": "+12085550103",
                      "dob": "1987-03-14",
                      "address": {
                        "line1": "742 Evergreen Terrace",
                        "line2": "Unit 4B",
                        "city": "Boise",
                        "county": "Ada",
                        "state": "ID",
                        "zip": "83702",
                        "country": "US"
                      }
                    },
                    "consent": {
                      "tcpa_opt_in": true,
                      "tcpa_language": "By clicking Submit you consent to be contacted by up to four insurance agents.",
                      "captured_at": "2026-07-09T15:29:45Z",
                      "trusted_form_cert_url": "https://cert.trustedform.com/2f7a1c9e8b3d4e5f6a7b8c9d0e1f2a3b",
                      "jornaya_lead_id": "C0FFEE00-1234-5678-9ABC-DEF012345678"
                    },
                    "cost": {
                      "payout": 9.00,
                      "currency": "USD"
                    },
                    "attributes": {
                      "applicant": {
                        "gender": "male",
                        "marital_status": "married",
                        "household_size": 4,
                        "household_income": 142000,
                        "number_of_children": 2,
                        "annual_income": 88000,
                        "tobacco_user": false,
                        "has_lost_health_coverage": true,
                        "has_moved_to_another_state": false,
                        "family_size_has_changed": true,
                        "expecting": false
                      },
                      "qualifying_conditions": {
                        "diabetes": false,
                        "heart_disease": false,
                        "copd": false,
                        "cancer_history": true,
                        "high_blood_pressure": true
                      },
                      "requested_coverage": {
                        "coverage_type": "family",
                        "coverage_level": "silver",
                        "start_date": "2026-08-01"
                      }
                    }
                  }
                },
                "life": {
                  "summary": "Life — full packet (web)",
                  "description": "Every §6.4 field: applicant, health profile, medications, requested coverage, and beneficiaries.",
                  "value": {
                    "meta": {
                      "lead_id": "EXAMPLE-LIFE-0001",
                      "schema_version": "1.3",
                      "vendor_id": "your-archer-vendor-slug",
                      "lead_type": "life",
                      "delivery_mode": "web",
                      "quality_tier": "premium",
                      "agent_id": "archer-agent-key-abc",
                      "campaign": "brand-life-q3",
                      "upstream_source": "GOOGLE",
                      "vendor_source_ids": {
                        "publisher_id": "pub-8842",
                        "placement_id": "plc-17"
                      },
                      "submission_url": "https://quotes.example.com/life/form",
                      "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) Safari/605.1.15",
                      "source_ip": "203.0.113.42",
                      "form_duration_ms": 47500,
                      "created_at_source": "2026-07-09T15:30:00Z"
                    },
                    "contact": {
                      "first_name": "Avery",
                      "last_name": "Fullfield",
                      "email": "avery.life@example.com",
                      "phone": "+12085550104",
                      "dob": "1987-03-14",
                      "address": {
                        "line1": "742 Evergreen Terrace",
                        "line2": "Unit 4B",
                        "city": "Boise",
                        "county": "Ada",
                        "state": "ID",
                        "zip": "83702",
                        "country": "US"
                      }
                    },
                    "consent": {
                      "tcpa_opt_in": true,
                      "tcpa_language": "By clicking Submit you consent to be contacted by up to four insurance agents.",
                      "captured_at": "2026-07-09T15:29:45Z",
                      "trusted_form_cert_url": "https://cert.trustedform.com/2f7a1c9e8b3d4e5f6a7b8c9d0e1f2a3b",
                      "jornaya_lead_id": "C0FFEE00-1234-5678-9ABC-DEF012345678"
                    },
                    "cost": {
                      "payout": 17.00,
                      "list_price": 24.00,
                      "currency": "USD"
                    },
                    "attributes": {
                      "applicant": {
                        "gender": "female",
                        "marital_status": "married",
                        "height_inches": 66,
                        "weight_pounds": 148,
                        "tobacco_user": false,
                        "occupation": "Nurse",
                        "household_income": 142000,
                        "household_size": 4,
                        "has_military_affiliation": true
                      },
                      "health": {
                        "conditions_raw": {
                          "asthma": true,
                          "hypertension": false,
                          "anxiety": true
                        },
                        "family_history_cancer": true,
                        "family_history_heart": false,
                        "private_pilot": false,
                        "hazardous_activities": [
                          "scuba_diving",
                          "rock_climbing"
                        ],
                        "medications": [
                          {
                            "name": "Albuterol",
                            "for": "asthma"
                          },
                          {
                            "name": "Sertraline",
                            "for": "anxiety"
                          }
                        ]
                      },
                      "requested_coverage": {
                        "coverage_amount": 750000,
                        "term_length_years": 20,
                        "policy_type": "term",
                        "plan_to_replace_existing": true
                      },
                      "beneficiaries": [
                        {
                          "first_name": "Jordan",
                          "last_name": "Fullfield",
                          "relationship": "spouse"
                        },
                        {
                          "first_name": "Riley",
                          "last_name": "Fullfield",
                          "relationship": "child"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "409": {
            "description": "Conflict"
          },
          "429": {
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/vendors/quotewizard/leads": {
      "post": {
        "tags": [
          "QuoteWizard"
        ],
        "operationId": "QuoteWizardPostLead",
        "requestBody": {
          "content": {
            "application/xml": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "409": {
            "description": "Conflict"
          },
          "429": {
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/vendors/smartfi/leads": {
      "post": {
        "tags": [
          "SmartFi"
        ],
        "operationId": "SmartFiPostLead",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboundLeadEnvelope"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "409": {
            "description": "Conflict"
          },
          "429": {
            "description": "Too Many Requests"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddressBlock": {
        "required": [
          "line1",
          "city",
          "state",
          "zip"
        ],
        "type": "object",
        "properties": {
          "line1": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "line2": {
            "type": [
              "null",
              "string"
            ]
          },
          "county": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": "string",
            "default": "US"
          }
        }
      },
      "ConsentBlock": {
        "required": [
          "tcpa_opt_in",
          "tcpa_language",
          "captured_at"
        ],
        "type": "object",
        "properties": {
          "tcpa_opt_in": {
            "type": "boolean"
          },
          "tcpa_language": {
            "type": "string"
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "trusted_form_cert_url": {
            "type": [
              "null",
              "string"
            ]
          },
          "jornaya_lead_id": {
            "type": [
              "null",
              "string"
            ]
          },
          "everquote_eq_id": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContactBlock": {
        "required": [
          "first_name",
          "last_name",
          "email",
          "phone",
          "address"
        ],
        "type": "object",
        "properties": {
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/AddressBlock"
          },
          "dob": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "CostBlock": {
        "required": [
          "payout"
        ],
        "type": "object",
        "properties": {
          "payout": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": "string",
            "default": "USD"
          },
          "list_price": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "DeliveryMode": {
        "enum": [
          "web",
          "warm_transfer",
          "live_transfer"
        ]
      },
      "InboundLeadEnvelope": {
        "required": [
          "meta",
          "contact",
          "consent",
          "cost",
          "attributes"
        ],
        "type": "object",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/MetaBlock"
          },
          "contact": {
            "$ref": "#/components/schemas/ContactBlock"
          },
          "consent": {
            "$ref": "#/components/schemas/ConsentBlock"
          },
          "cost": {
            "$ref": "#/components/schemas/CostBlock"
          },
          "attributes": {
            "$ref": "#/components/schemas/JsonElement"
          }
        }
      },
      "JsonElement": { },
      "LeadType": {
        "enum": [
          "auto",
          "home",
          "health",
          "life"
        ]
      },
      "MetaBlock": {
        "required": [
          "lead_id",
          "schema_version",
          "vendor_id",
          "lead_type",
          "delivery_mode",
          "agent_id",
          "created_at_source"
        ],
        "type": "object",
        "properties": {
          "lead_id": {
            "type": "string"
          },
          "schema_version": {
            "type": "string"
          },
          "vendor_id": {
            "type": "string"
          },
          "lead_type": {
            "$ref": "#/components/schemas/LeadType"
          },
          "delivery_mode": {
            "$ref": "#/components/schemas/DeliveryMode"
          },
          "agent_id": {
            "type": "string"
          },
          "created_at_source": {
            "type": "string",
            "format": "date-time"
          },
          "quality_tier": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/QualityTier"
              }
            ]
          },
          "campaign": {
            "type": [
              "null",
              "string"
            ]
          },
          "upstream_source": {
            "type": [
              "null",
              "string"
            ]
          },
          "vendor_source_ids": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "submission_url": {
            "type": [
              "null",
              "string"
            ]
          },
          "user_agent": {
            "type": [
              "null",
              "string"
            ]
          },
          "source_ip": {
            "type": [
              "null",
              "string"
            ]
          },
          "form_duration_ms": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "comment": {
            "type": [
              "null",
              "string"
            ]
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "QualityTier": {
        "enum": [
          "premium",
          "standard",
          "unverified",
          null
        ]
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "description": "Short-lived JWT obtained via OAuth2 client-credentials against Microsoft Entra ID (separate client per environment; token must carry the Leads.Post app role). See spec §3.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "Leads"
    },
    {
      "name": "QuoteWizard"
    },
    {
      "name": "SmartFi"
    }
  ]
}