Kaaj Web Presence API
This document describes the API endpoint for generating a full web presence report as a PDF (returned as markdown text) for a business entity.
Endpoint
POST https://api.kaaj.ai/application/web-presence
Headers
Authorization: Bearer <your_api_key> content-type: application/json
Request Body
The JSON request body must include the following fields:
Field Name | Type | Required | Description |
---|---|---|---|
appId | string | Yes | Unique identifier for the application/form |
businessLegalName | string | Yes | Legal name of the business |
address | string | Yes | Physical address of the business |
businessDbaName | string | No | Optional Doing Business As (alternate trading name) |
website | string | No | Official website URL of the business |
Example Request Body
{
"appId": "AOFtest1",
"businessLegalName": "Kathmandu Cuisine LLC",
"address": "138 South Main Street, Milpitas, CA 95035",
"businessDbaName": "Kathmandu Cuisine",
"website": "https://kathmanducuisine.com/"
}
Response
The API returns a JSON object that includes a full report in markdown format (representing the PDF content) along with additional structured data such as industry codes, reviews, and metadata.
Success Response
- Code: 200 OK
- Content: JSON object with the following fields:
Field Name | Type | Description |
---|---|---|
success | boolean | Indicates if the request was successful |
ref_id | integer | Unique identifier for the report |
task_id | string | Unique identifier for the task, useful for tracking the status of the report and retrieving the report later |
{
"success": true,
"ref_id": 8,
"task_id": "987da4ba-ecaa-4abd-8231-416ae3fd4395"
}
Error Response
- Code: 400 Bad Request
- Content: JSON object with the following fields:
Field Name | Type | Description |
---|---|---|
error | string | Error message describing the issue |
{
"message": "Missing required field(s): appId, businessLegalName, and/or address."
}
Additional Notes
- Authentication: The API key must be included in the Authorization header for authentication.
- Content-Type: Always use application/json for the request header.
- Report Format: The report field in the response is in markdown format. You can convert this markdown to a PDF using a markdown-to-PDF converter.
- Logging: All requests are logged, including the request body and headers, for audit purposes.
- Customization: Industry codes (MCC, NAICS, SIC) and review summaries are provided to help integrate with analytics and reporting systems.