{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/prosp-cc/json-schema/prosp-cc-tenant-odoo-connection-request-schema.json",
  "title": "TenantOdooConnectionRequest",
  "description": "Your own Odoo destination and credentials for self-serve onboarding. `odoo_api_key`\nis write-only (accepted here, never returned). `odoo_url` must be a public http(s)\nhost — private, loopback, link-local, and reserved addresses are rejected.\n",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/prosp-cc-openapi.yaml#/components/schemas/TenantOdooConnectionRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "odoo_url",
    "odoo_db",
    "odoo_uid",
    "odoo_api_key"
  ],
  "properties": {
    "odoo_url": {
      "type": "string",
      "description": "Public https base URL of the tenant's Odoo instance."
    },
    "odoo_db": {
      "type": "string",
      "description": "Your Odoo database name — one of the four API authentication parameters (alongside `odoo_url`, `odoo_uid`, `odoo_api_key`). An Odoo server can host multiple databases, so this identifies which one to sync leads into. Leads are written through Odoo's JSON-RPC API — no direct database access is used. If unsure, find it at `https://<your-odoo-host>/web/database/list`."
    },
    "odoo_uid": {
      "type": "integer",
      "minimum": 1,
      "description": "The Odoo user id the API key belongs to."
    },
    "odoo_api_key": {
      "type": "string",
      "minLength": 1,
      "writeOnly": true,
      "description": "Odoo API key used to authenticate. Write-only — accepted here but never returned on any response."
    },
    "stage_id": {
      "type": "integer",
      "minimum": 1,
      "description": "Optional Odoo CRM stage id to place new leads in. Validated to exist before the connection is saved."
    },
    "team_id": {
      "type": "integer",
      "minimum": 1,
      "description": "Optional Odoo sales-team id to assign new leads to. Validated to exist before the connection is saved."
    },
    "user_id": {
      "type": "integer",
      "minimum": 1,
      "description": "Optional Odoo user id to assign as the salesperson on new leads. Validated to exist before the connection is saved."
    },
    "enrichment_stage_id": {
      "type": "integer",
      "minimum": 1,
      "description": "Optional Odoo CRM stage id for leads awaiting further contact enrichment. Validated to exist before the connection is saved."
    },
    "lead_type": {
      "type": "string",
      "enum": [
        "lead",
        "opportunity"
      ],
      "description": "Whether new records are created as CRM leads or opportunities. Defaults to `opportunity` when omitted."
    }
  }
}