{"openapi":"3.1.0","info":{"title":"Divorce Network Pro API","version":"1.0.0","description":"Public REST API for Divorce Network Pro — search verified divorce professionals, browse professional types, and integrate with the Divorce Network Pro directory. Authenticated endpoints use Firebase ID tokens (Bearer).","contact":{"name":"Divorce Network Pro Developer Support","email":"support@divorcenetworkpro.com","url":"https://divorcenetworkpro.com/developers"},"termsOfService":"https://divorcenetworkpro.com/terms"},"servers":[{"url":"https://divorcenetworkpro.com"}],"tags":[{"name":"Directory","description":"Public professional directory search"},{"name":"Meta","description":"Health and metadata endpoints"}],"paths":{"/api/v1/health":{"get":{"operationId":"getHealth","summary":"API health check","description":"Returns API availability. No authentication required.","tags":["Meta"],"security":[],"responses":{"200":{"description":"API is healthy","content":{"application/json":{"schema":{"type":"object","required":["status","service"],"properties":{"status":{"type":"string","enum":["ok"]},"service":{"type":"string"},"version":{"type":"string"}}}}}}}}},"/api/v1/professional-types":{"get":{"operationId":"listProfessionalTypes","summary":"List professional types","description":"Returns all professional categories available in the Divorce Network Pro directory (attorneys, mediators, CDFAs, therapists, etc.). No authentication required.","tags":["Directory"],"security":[],"responses":{"200":{"description":"List of professional types","content":{"application/json":{"schema":{"type":"object","required":["types"],"properties":{"types":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"URL-safe profession key"},"name":{"type":"string","description":"Human-readable profession name"}}}}}}}}}}}},"/api/v1/professionals":{"get":{"operationId":"searchProfessionals","summary":"Search divorce professionals","description":"Search the public directory of verified divorce professionals. Filter by location, profession type, telehealth, and insurance. No authentication required.","tags":["Directory"],"security":[],"parameters":[{"name":"q","in":"query","description":"Free-text search query (name, specialty, bio keywords)","schema":{"type":"string"}},{"name":"country","in":"query","description":"ISO country code (us, ca, uk, au)","schema":{"type":"string","enum":["us","ca","uk","au","nz"]}},{"name":"state","in":"query","description":"US state code (e.g. ca, ny, tx)","schema":{"type":"string"}},{"name":"city","in":"query","description":"City name","schema":{"type":"string"}},{"name":"type","in":"query","description":"Professional type ID (e.g. attorney, mediator)","schema":{"type":"string"}},{"name":"telehealth","in":"query","description":"Filter to professionals offering telehealth","schema":{"type":"boolean"}},{"name":"takesInsurance","in":"query","description":"Filter to professionals who accept insurance","schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Maximum results to return (1–50, default 20)","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"page","in":"query","description":"Page number (0-indexed)","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","required":["professionals","total","page","limit"],"properties":{"professionals":{"type":"array","items":{"$ref":"#/components/schemas/ProfessionalSummary"}},"total":{"type":"integer"},"page":{"type":"integer"},"limit":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/api/contact":{"post":{"operationId":"submitContactForm","summary":"Submit a contact inquiry","description":"Send a message to Divorce Network Pro support. No authentication required.","tags":["Meta"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email","subject","message"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"subject":{"type":"string"},"message":{"type":"string"},"inquiryType":{"type":"string","enum":["general","professional","support","partnership"]}}}}}},"responses":{"200":{"description":"Message sent","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Firebase ID token obtained via the Firebase client SDK or session cookie exchange at /api/auth/sessionLogin."},"oauth2":{"type":"oauth2","description":"OAuth 2.0 scopes for Divorce Network Pro API access (Firebase-backed).","flows":{"authorizationCode":{"authorizationUrl":"https://accounts.google.com/o/oauth2/auth","tokenUrl":"https://divorcenetworkpro.com/api/auth/sessionLogin","scopes":{"professionals:read":"Search and read public professional directory listings","professionals:write":"Create and update your professional profile (requires professional account)","services:read":"Read marketplace services for a professional","services:write":"Manage your marketplace services (requires professional account)","client:read":"Read your client portal data (requires client account)","client:write":"Update your client portal profile and preferences (requires client account)"}}}}},"schemas":{"ProfessionalSummary":{"type":"object","required":["id","fullName","profileUrl"],"properties":{"id":{"type":"string"},"fullName":{"type":"string"},"title":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"professionalTypes":{"type":"array","items":{"type":"string"}},"telehealth":{"type":"boolean"},"takesInsurance":{"type":"boolean"},"photoURL":{"type":"string","format":"uri"},"profileUrl":{"type":"string","format":"uri"}}},"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"resolution":{"type":"string"},"docs":{"type":"string","format":"uri"}}}}}},"responses":{"BadRequest":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Unauthorized":{"description":"Missing or invalid authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"InternalError":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"security":[{"bearerAuth":["professionals:read","professionals:write","services:read","services:write","client:read","client:write"]}]}