{
    "openapi": "3.0.3",
    "info": {
        "title": "Document Planet Inc Accounting & Business Services API",
        "version": "1.0.0",
        "description": "Official public REST API for Document Planet Inc. Enables AI agents, LLM function-calling tools, and developer integrations to query accounting, corporate/personal tax preparation, payroll processing, bookkeeping, and Florida business incorporation services in Miami and South Florida.",
        "termsOfService": "https://documentplanetinc.com/terms-and-conditions/",
        "contact": {
            "name": "Document Planet Inc Support",
            "url": "https://documentplanetinc.com/contact-document-planet-inc/",
            "email": "info@documentplanetinc.com"
        },
        "license": {
            "name": "MIT",
            "url": "https://opensource.org/licenses/MIT"
        }
    },
    "servers": [
        {
            "url": "https://documentplanetinc.com",
            "description": "Production API Server"
        }
    ],
    "paths": {
        "/api/v1/services": {
            "get": {
                "operationId": "listAccountingServices",
                "summary": "List accounting, tax, payroll, and business incorporation services",
                "description": "Returns a structured list of services offered by Document Planet Inc, optionally filtered by service category. Ideal for AI agents matching user needs to Florida accounting or corporate filing services.",
                "parameters": [
                    {
                        "name": "category",
                        "in": "query",
                        "required": false,
                        "description": "Filter services by category (`all`, `tax`, `bookkeeping`, `payroll`, `incorporation`, `consulting`).",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all",
                                "tax",
                                "bookkeeping",
                                "payroll",
                                "incorporation",
                                "consulting"
                            ],
                            "default": "all"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful list of Document Planet Inc services.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ServiceListResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid query parameter supplied.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/company": {
            "get": {
                "operationId": "getCompanyProfile",
                "summary": "Get Document Planet Inc company profile, contact points, and verified metrics",
                "description": "Returns official business address, phone number, email, supported languages (English/Spanish), client metrics, and canonical discovery URLs.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Company profile and contact metadata.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CompanyProfileResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/consultation": {
            "post": {
                "operationId": "requestConsultationInfo",
                "summary": "Validate consultation parameters and retrieve booking link",
                "description": "Validates the requested accounting or tax service type and returns direct consultation booking instructions and contact channels.",
                "requestBody": {
                    "required": true,
                    "description": "Consultation intake parameters.",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ConsultationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Consultation details and booking URL returned.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ConsultationResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid required parameter in request body.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "ServiceItem": {
                "type": "object",
                "required": [
                    "id",
                    "category",
                    "name",
                    "description",
                    "booking_url"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique service identifier.",
                        "example": "corporate-individual-tax"
                    },
                    "category": {
                        "type": "string",
                        "description": "Service category.",
                        "enum": [
                            "tax",
                            "bookkeeping",
                            "payroll",
                            "incorporation",
                            "consulting"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "description": "Human-readable service name.",
                        "example": "Corporate & Individual Tax Preparation"
                    },
                    "description": {
                        "type": "string",
                        "description": "Detailed explanation of deliverables and forms covered."
                    },
                    "booking_url": {
                        "type": "string",
                        "format": "uri",
                        "description": "Canonical URL to schedule this service."
                    }
                }
            },
            "ServiceListResponse": {
                "type": "object",
                "required": [
                    "status",
                    "company",
                    "count",
                    "services"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "ok"
                    },
                    "company": {
                        "type": "string",
                        "example": "Document Planet Inc"
                    },
                    "count": {
                        "type": "integer",
                        "example": 5
                    },
                    "services": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ServiceItem"
                        }
                    }
                }
            },
            "CompanyProfileResponse": {
                "type": "object",
                "required": [
                    "status",
                    "name",
                    "url",
                    "telephone",
                    "email",
                    "address",
                    "languages"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "ok"
                    },
                    "name": {
                        "type": "string",
                        "example": "Document Planet Inc"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "example": "https://documentplanetinc.com/"
                    },
                    "telephone": {
                        "type": "string",
                        "example": "+1-305-510-3848"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "example": "info@documentplanetinc.com"
                    },
                    "address": {
                        "type": "object",
                        "properties": {
                            "streetAddress": {
                                "type": "string"
                            },
                            "addressLocality": {
                                "type": "string"
                            },
                            "addressRegion": {
                                "type": "string"
                            },
                            "postalCode": {
                                "type": "string"
                            },
                            "addressCountry": {
                                "type": "string"
                            }
                        }
                    },
                    "languages": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "ConsultationRequest": {
                "type": "object",
                "required": [
                    "service_type"
                ],
                "properties": {
                    "service_type": {
                        "type": "string",
                        "description": "Type of accounting or tax service needed.",
                        "enum": [
                            "tax",
                            "bookkeeping",
                            "payroll",
                            "incorporation",
                            "consulting"
                        ]
                    },
                    "language": {
                        "type": "string",
                        "description": "Preferred consultation language (`en` or `es`).",
                        "enum": [
                            "en",
                            "es"
                        ],
                        "default": "en"
                    }
                }
            },
            "ConsultationResponse": {
                "type": "object",
                "required": [
                    "status",
                    "message",
                    "service_type",
                    "booking_url",
                    "direct_phone",
                    "direct_email"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "ok"
                    },
                    "message": {
                        "type": "string"
                    },
                    "service_type": {
                        "type": "string"
                    },
                    "booking_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "direct_phone": {
                        "type": "string"
                    },
                    "direct_email": {
                        "type": "string",
                        "format": "email"
                    }
                }
            },
            "ErrorResponse": {
                "type": "object",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "status",
                            "message",
                            "resolution_hint"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "description": "Machine-readable error code.",
                                "example": "RESOURCE_NOT_FOUND"
                            },
                            "status": {
                                "type": "integer",
                                "description": "HTTP status code.",
                                "example": 404
                            },
                            "message": {
                                "type": "string",
                                "description": "Human-readable description of the error."
                            },
                            "path": {
                                "type": "string",
                                "description": "Request URI path that triggered the error."
                            },
                            "resolution_hint": {
                                "type": "string",
                                "description": "Actionable guidance for agents to recover from the error."
                            },
                            "documentation_url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "openapi_url": {
                                "type": "string",
                                "format": "uri"
                            }
                        }
                    }
                }
            }
        }
    }
}
