{
  "version": "1",
  "business": {
    "businessId": "Cb5QydVLV2n8WpdouSO1",
    "name": "Second Opinion",
    "slug": "second-opinion",
    "url": "https://www.lemeno.ai/s/second-opinion",
    "data": "https://www.lemeno.ai/s/second-opinion/data.json"
  },
  "agentPolicy": "allow",
  "conventions": {
    "transport": "HTTPS POST, Content-Type: application/json.",
    "requestBody": "Wrap the fields below in a `data` object: { \"data\": { ... } }.",
    "successBody": "HTTP 200 with { \"result\": { ... } }.",
    "errorBody": "Non-200 with { \"error\": { \"message\": string, \"status\": string, \"details\": { \"error\": \"<code>\", ... } } }. `details.error` is the stable code; `message` is written for a person and may change.",
    "noDeadEnds": "Refusals carry what to do instead wherever one exists — free times, in-stock substitutes, the shortfall against a minimum. Read `details` before giving up.",
    "money": "Amounts ending in Paise are integers; 100 paise = ₹1. Fields ending in Inr are rupees.",
    "identity": "Declaring an `agent` grants nothing and withholding it costs nothing. It is recorded for the business, and their policy may hold or refuse assistant actions."
  },
  "actions": [
    {
      "id": "enquire",
      "title": "Send an enquiry",
      "endpoint": "https://us-central1-le-me-no.cloudfunctions.net/submitEnquiry",
      "method": "POST",
      "humanUrl": "https://www.lemeno.ai/s/second-opinion#enquiry",
      "request": {
        "type": "object",
        "properties": {
          "businessId": {
            "type": "string",
            "required": true,
            "description": "From this document, or from /s/<slug>/data.json."
          },
          "idempotencyKey": {
            "type": "string",
            "required": false,
            "maxLength": 128,
            "description": "Send a unique value per attempt and reuse it when retrying. A retry returns the original result rather than acting twice. Reusing a key for different content is rejected as a conflict."
          },
          "agent": {
            "type": "object",
            "required": false,
            "description": "Identify yourself: { name, version?, url? }. Used for the business's own records and for their policy on assistants — it grants nothing, and omitting it gains nothing."
          },
          "name": {
            "type": "string",
            "required": true,
            "maxLength": 120
          },
          "message": {
            "type": "string",
            "required": true,
            "maxLength": 2000
          },
          "phone": {
            "type": "string",
            "required": false,
            "maxLength": 20,
            "description": "Phone or email is required."
          },
          "email": {
            "type": "string",
            "required": false,
            "maxLength": 200
          }
        }
      },
      "response": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "enquiryId": {
            "type": "string"
          }
        }
      },
      "errors": [
        {
          "code": "message_required",
          "meaning": "message was blank.",
          "details": "`required`."
        },
        {
          "code": "name_required",
          "meaning": "The customer's name was blank.",
          "details": "`required`."
        },
        {
          "code": "contact_required",
          "meaning": "Neither a phone number nor an email was given; one is needed so the business can reach them.",
          "details": "`required`."
        },
        {
          "code": "enquiries_not_offered",
          "meaning": "This business does not take enquiries online.",
          "details": "`contact`."
        },
        {
          "code": "missing_business",
          "meaning": "businessId was absent or not a string."
        },
        {
          "code": "business_not_found",
          "meaning": "No business with that id."
        },
        {
          "code": "invalid_idempotency_key",
          "meaning": "idempotencyKey was not a string of ≤128 characters."
        },
        {
          "code": "idempotency_key_reused",
          "meaning": "That key was already used for a different request."
        },
        {
          "code": "agent_bookings_not_accepted",
          "meaning": "This business has chosen not to accept actions from assistants. `details.contact` carries their phone and email — pass those to the person instead."
        },
        {
          "code": "resource-exhausted",
          "meaning": "Too many attempts. Back off; the message says roughly how long for."
        }
      ],
      "rateLimit": {
        "perCaller": "6 per hour"
      }
    }
  ]
}