{
  "awp_version": "0.1",
  "domain": "calendar.widgets.goil.app",
  "api_base_url": "https://community.goil.app",
  "name": "Serveis Integrals | M. Crous — calendari",
  "description": "Calendar booking widget (“calendari”) for Serveis Integrals | M. Crous.",
  "intent": "Allow AI agents to list calendars and services, check availability, and create bookings via the public Goil widget API. When multiple options exist, agents must present numbered choice lists and confirm before booking (see llms.txt).",
  "url": "https://calendar.widgets.goil.app/agent/690997477a7aa80220c3f3d8/calendari",
  "business": {
    "id": "690997477a7aa80220c3f3d8",
    "name": "Serveis Integrals | M. Crous"
  },
  "widget": {
    "slug": "calendari",
    "type": "calendar",
    "name": "Serveis Integrals | M. Crous"
  },
  "documentation": {
    "llms_txt": "https://calendar.widgets.goil.app/agent/690997477a7aa80220c3f3d8/calendari/llms.txt",
    "openapi": "https://calendar.widgets.goil.app/agent/690997477a7aa80220c3f3d8/calendari/openapi.json"
  },
  "authentication": {
    "read": "none",
    "write": "none"
  },
  "rate_limit": {
    "requests_per_minute": 60
  },
  "actions": [
    {
      "id": "fetch_widget_configuration",
      "name": "Get widget configuration",
      "description": "Returns widget metadata, including registration groups. Each group's `id` is the `groupId` required in booking and register-and-book bodies.",
      "method": "GET",
      "endpoint": "https://community.goil.app/api/v2/widget/calendar/690997477a7aa80220c3f3d8/calendari"
    },
    {
      "id": "fetch_calendars",
      "name": "List calendars",
      "description": "List calendars exposed by this widget.",
      "method": "GET",
      "endpoint": "https://community.goil.app/api/v2/widget/calendar/690997477a7aa80220c3f3d8/calendari/available-calendars"
    },
    {
      "id": "fetch_services",
      "name": "List services",
      "description": "List services for a given calendar.",
      "method": "GET",
      "endpoint": "https://community.goil.app/api/v2/widget/calendar/690997477a7aa80220c3f3d8/calendari/available-calendars/{calendar_id}/services",
      "parameters": {
        "calendar_id": {
          "type": "string",
          "description": "Calendar ID returned by fetch_calendars (path segment after available-calendars).",
          "required": true
        }
      }
    },
    {
      "id": "fetch_available_time_slots",
      "name": "Check availability",
      "description": "Return available time slots for a service within a date range (inclusive).",
      "method": "GET",
      "endpoint": "https://community.goil.app/api/v2/widget/calendar/690997477a7aa80220c3f3d8/calendari/available-calendars/{calendar_id}/services/{service_id}/time-slots",
      "parameters": {
        "calendar_id": {
          "type": "string",
          "description": "Calendar ID returned by fetch_calendars.",
          "required": true
        },
        "service_id": {
          "type": "string",
          "description": "Service ID returned by fetch_services.",
          "required": true
        },
        "startDate": {
          "type": "string",
          "required": true,
          "description": "Range start YYYY-MM-DD (query)."
        },
        "endDate": {
          "type": "string",
          "required": true,
          "description": "Range end YYYY-MM-DD (query)."
        }
      }
    },
    {
      "id": "create_booking_existing_user",
      "name": "Create booking (existing user)",
      "description": "Create a booking for a user identified by phone (after checkPhone flow in the widget).",
      "method": "POST",
      "endpoint": "https://community.goil.app/api/v2/widget/calendar/690997477a7aa80220c3f3d8/calendari/available-calendars/{calendar_id}/services/{service_id}/bookings",
      "parameters": {
        "calendar_id": {
          "type": "string",
          "required": true,
          "description": "Calendar ID for the booking."
        },
        "service_id": {
          "type": "string",
          "required": true,
          "description": "Service ID to book."
        }
      },
      "request_body": {
        "required": [
          "phone",
          "groupId",
          "date",
          "timeSlot"
        ],
        "properties": {
          "phone": {
            "type": "string",
            "description": "E.164 or national format as accepted by the API"
          },
          "groupId": {
            "type": "string",
            "description": "`data.groups[].id` from fetch_widget_configuration (GET widget calendar). Required for every booking."
          },
          "date": {
            "type": "string",
            "description": "Booking date YYYY-MM-DD"
          },
          "timeSlot": {
            "type": "string",
            "description": "Time label as returned in time-slots (e.g. HH:mm)"
          },
          "mode": {
            "type": "string",
            "enum": [
              "online",
              "onsite"
            ],
            "description": "Optional; defaults follow widget rules"
          }
        }
      }
    },
    {
      "id": "create_booking_new_user",
      "name": "Create booking (new user)",
      "description": "Register a new customer and create a booking in one call.",
      "method": "POST",
      "endpoint": "https://community.goil.app/api/v2/widget/calendar/690997477a7aa80220c3f3d8/calendari/available-calendars/{calendar_id}/services/{service_id}/register-and-book",
      "parameters": {
        "calendar_id": {
          "type": "string",
          "required": true,
          "description": "Calendar ID for the booking."
        },
        "service_id": {
          "type": "string",
          "required": true,
          "description": "Service ID to book."
        }
      },
      "request_body": {
        "required": [
          "phone",
          "groupId",
          "fields",
          "date",
          "timeSlot"
        ],
        "properties": {
          "phone": {
            "type": "string"
          },
          "groupId": {
            "type": "string",
            "description": "`data.groups[].id` from fetch_widget_configuration. Build `fields` with `attributeId` from that group's `fields`."
          },
          "date": {
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "timeSlot": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "online",
              "onsite"
            ]
          },
          "fields": {
            "type": "array",
            "description": "Registration field payloads: each `attributeId` must match `data.groups[].fields[].id` for the same `groupId` (from fetch_widget_configuration). Include one of text, number, boolean, or date per item.",
            "items": {
              "type": "object",
              "required": [
                "attributeId"
              ],
              "properties": {
                "attributeId": {
                  "type": "string"
                },
                "tag": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "number": {
                  "type": "number"
                },
                "boolean": {
                  "type": "boolean"
                },
                "date": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  ],
  "powered_by": {
    "platform": "Goil Technologies",
    "url": "https://goil.com",
    "directory": "https://discover.goil.dev"
  }
}