{
  "openapi": "3.1.0",
  "info": {
    "title": "Double Ace Lending Public Inquiry Contract",
    "version": "2026-10-24",
    "description": "Machine-readable documentation for public Double Ace Lending pages and its existing browser-mediated inquiry flow. This contract does not expose CRM records, underwriting, approval, rates, terms, documents, or an unauthenticated direct mutation API. An agent must obtain explicit user authorization and consent, preserve the first-party intake cookie, and submit the rendered form exactly once. Browser automation is supported through the existing first-party HTML forms. This is not a native A2A protocol endpoint. See /agents.html for session, confirmation, and recovery instructions."
  },
  "servers": [
    {
      "url": "https://doubleacelending.com"
    }
  ],
  "paths": {
    "/business/": {
      "get": {
        "summary": "Open the business-financing inquiry form",
        "operationId": "openBusinessInquiry",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "es"
              ],
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTML form, consent text, first-party intake cookie, and hidden idempotency token."
          },
          "503": {
            "description": "Business intake is temporarily unavailable."
          }
        }
      }
    },
    "/mortgage/": {
      "get": {
        "summary": "Open the mortgage inquiry form",
        "operationId": "openMortgageInquiry",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "es"
              ],
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTML form, consent text, first-party intake cookie, and hidden idempotency token."
          },
          "503": {
            "description": "Mortgage intake is temporarily unavailable."
          }
        }
      }
    },
    "/actions/intake.php": {
      "post": {
        "summary": "Submit an explicitly authorized initial inquiry",
        "description": "Use only after GETting the appropriate form in the same cookie-preserving session and obtaining the person's explicit authorization and consent. The idempotency_token must exactly match the __Host-dal_intake cookie. This creates an initial CRM inquiry, not a loan application or preapproval. Do not submit sensitive identity, banking, authentication, or regulated loan-document data. Keep only one active intake form per browser session: opening another form replaces the shared intake cookie. Submit through the page so the browser supplies Origin and cookies; do not read HttpOnly cookies with JavaScript. On successful navigation, a server-issued ref query value is the inquiry receipt, not an approval or funding decision. A generic thank-you page alone is not proof that an inquiry was stored. After an ambiguous network outcome, do not obtain a new token and resubmit automatically.",
        "operationId": "submitAuthorizedInquiry",
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "description": "The intake endpoint accepts browser-mediated submissions only from the canonical first-party HTTPS origin.",
            "schema": {
              "type": "string",
              "const": "https://doubleacelending.com"
            }
          }
        ],
        "security": [
          {
            "intakeCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "product",
                  "language",
                  "idempotency_token",
                  "website",
                  "name",
                  "phone",
                  "email",
                  "amount",
                  "city",
                  "state",
                  "contact_preference",
                  "consent"
                ],
                "properties": {
                  "product": {
                    "type": "string",
                    "enum": [
                      "business",
                      "mortgage"
                    ]
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "en",
                      "es"
                    ]
                  },
                  "idempotency_token": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{43}$",
                    "description": "Copy exactly from the rendered hidden field; it must match the first-party intake cookie."
                  },
                  "campaign": {
                    "type": "string",
                    "pattern": "^(?:[A-Za-z0-9._-]{1,120})?$",
                    "description": "Preserve the rendered hidden field. An empty string is accepted; do not invent an attribution code."
                  },
                  "website": {
                    "type": "string",
                    "maxLength": 0,
                    "description": "Honeypot. Must remain empty."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Use the person's actual phone number: 10 US digits, 11 digits beginning with 1, or an international + number containing 8–15 digits. Never invent a contact detail."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "amount": {
                    "type": "string",
                    "maxLength": 15,
                    "description": "Approximate whole-dollar amount from 1,000 through 100,000,000. Prefer digits only, without decimals. Ask the person if unknown."
                  },
                  "city": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "AL",
                      "AK",
                      "AZ",
                      "AR",
                      "CA",
                      "CO",
                      "CT",
                      "DE",
                      "FL",
                      "GA",
                      "HI",
                      "ID",
                      "IL",
                      "IN",
                      "IA",
                      "KS",
                      "KY",
                      "LA",
                      "ME",
                      "MD",
                      "MA",
                      "MI",
                      "MN",
                      "MS",
                      "MO",
                      "MT",
                      "NE",
                      "NV",
                      "NH",
                      "NJ",
                      "NM",
                      "NY",
                      "NC",
                      "ND",
                      "OH",
                      "OK",
                      "OR",
                      "PA",
                      "RI",
                      "SC",
                      "SD",
                      "TN",
                      "TX",
                      "UT",
                      "VT",
                      "VA",
                      "WA",
                      "WV",
                      "WI",
                      "WY",
                      "DC"
                    ],
                    "description": "Two-letter US state or District of Columbia code. For mortgages, use the property state. This list matches the intake validator and includes VT."
                  },
                  "contact_preference": {
                    "type": "string",
                    "enum": [
                      "phone",
                      "email"
                    ]
                  },
                  "consent": {
                    "type": "string",
                    "enum": [
                      "yes"
                    ],
                    "description": "The person explicitly authorized contact after reading the rendered consent text."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "303": {
            "description": "When the website honeypot is empty and all validation passes, the inquiry was accepted or idempotently replayed and the response redirects to the first-party thank-you page. A suspicious request with a non-empty website honeypot is deliberately diverted to the generic thank-you page without creating an inquiry; compliant agents must always leave website empty. Successful accepted or queued submissions include a submission reference in the Location query parameter ref. Preserve that reference. A missing reference is not verified acceptance. The intake cookie is cleared after success, so a later replay may return 422; do not assume an unlimited retry window.",
            "headers": {
              "Location": {
                "description": "First-party /thank-you/?lang=en|es&ref=<submission UUID> for accepted/queued inquiries; the honeypot diversion omits ref.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Missing or mismatched canonical Origin, or canonical-origin enforcement is unavailable."
          },
          "405": {
            "description": "The intake action accepts POST only."
          },
          "413": {
            "description": "Request body exceeds the 16,384-byte limit."
          },
          "422": {
            "description": "Invalid, expired, malformed, or unauthorized form submission. Do not retry without correcting the request or obtaining a fresh form session."
          },
          "429": {
            "description": "Rate limited. Do not blindly retry."
          },
          "503": {
            "description": "The selected product intake path is temporarily unavailable."
          }
        }
      }
    },
    "/agents.html": {
      "get": {
        "summary": "Read browser agent integration instructions",
        "operationId": "readAgentGuide",
        "responses": {
          "200": {
            "description": "Public HTML guide; no authentication or customer records."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "intakeCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-dal_intake",
        "description": "Short-lived first-party anti-replay cookie issued by the business or mortgage form. Not a reusable API credential."
      }
    }
  },
  "externalDocs": {
    "description": "Browser agent workflow, receipt verification, and recovery",
    "url": "https://doubleacelending.com/agents.html"
  }
}
