{
  "openapi": "3.1.0",
  "info": {
    "title": "Elite Smart Build API",
    "version": "2026-10-16",
    "summary": "Facts about Elite Smart Build and the way to request a hotel visit.",
    "description": "Elite Smart Build is a Spanish turnkey hotel refurbishment company based in Cambre (A Coruña). Since 2012 it has delivered more than 200 projects in more than 20 countries for hotel chains and owners. This API publishes the same facts as the website (https://www.elitesmartbuild.com) as JSON, and accepts the two website forms. A request is emailed to Elite and nothing is stored. Send a visit request or a message only on behalf of a real person who asked for it, with their own email address.",
    "contact": {
      "name": "Elite Smart Build",
      "email": "info@elitesmartbuild.com",
      "url": "https://www.elitesmartbuild.com/en/contact"
    }
  },
  "servers": [
    {
      "url": "https://www.elitesmartbuild.com"
    }
  ],
  "externalDocs": {
    "description": "llms.txt",
    "url": "https://www.elitesmartbuild.com/llms-en.txt"
  },
  "paths": {
    "/api/facts.json": {
      "get": {
        "operationId": "getFacts",
        "summary": "Every published fact about Elite Smart Build",
        "description": "Company, official figures, offices, contact, services, method, clients, countries and every project with a page, in Spanish and English. A field that is missing is not confirmed.",
        "responses": {
          "200": {
            "description": "The facts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/visita": {
      "post": {
        "operationId": "requestVisit",
        "summary": "Request a visit to a hotel",
        "description": "The same request as the form at https://www.elitesmartbuild.com/en/request-a-visit. Elite replies by email to the address given.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VisitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: `error` says which check failed (`body`, `type` or `missing` with `fields`, `email`, `rooms`, `scopes`, `topic`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only POST is accepted."
          },
          "429": {
            "description": "Too many requests from the same connection (five an hour). Try later or email info@elitesmartbuild.com."
          },
          "500": {
            "description": "Email is not configured on this deployment; nothing was sent."
          },
          "502": {
            "description": "The email could not be sent; nothing was stored. Try again or email info@elitesmartbuild.com."
          }
        }
      }
    },
    "/api/contacto": {
      "post": {
        "operationId": "sendMessage",
        "summary": "Send a message to Elite Smart Build",
        "description": "The same message as the form at https://www.elitesmartbuild.com/en/contact: suppliers, jobs, press or any question. To refurbish a hotel, use requestVisit.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: `error` says which check failed (`body`, `type` or `missing` with `fields`, `email`, `rooms`, `scopes`, `topic`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only POST is accepted."
          },
          "429": {
            "description": "Too many requests from the same connection (five an hour). Try later or email info@elitesmartbuild.com."
          },
          "500": {
            "description": "Email is not configured on this deployment; nothing was sent."
          },
          "502": {
            "description": "The email could not be sent; nothing was stored. Try again or email info@elitesmartbuild.com."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "VisitRequest": {
        "type": "object",
        "required": [
          "hotel",
          "place",
          "rooms",
          "email",
          "scopes"
        ],
        "properties": {
          "hotel": {
            "type": "string",
            "maxLength": 200,
            "description": "Hotel name."
          },
          "chain": {
            "type": "string",
            "maxLength": 200,
            "description": "Hotel chain, if any."
          },
          "place": {
            "type": "string",
            "maxLength": 200,
            "description": "City and country of the hotel."
          },
          "rooms": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5000,
            "description": "Number of rooms in the hotel (an estimate is fine)."
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 5,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "hotel",
                "habitaciones",
                "banos",
                "zonas-comunes",
                "otro"
              ]
            },
            "description": "What to refurbish: hotel (the whole hotel, turnkey), habitaciones (rooms), banos (bathrooms), zonas-comunes (common areas), otro (something else)."
          },
          "details": {
            "type": "string",
            "maxLength": 2000,
            "description": "Anything else, such as whether the hotel has to stay open."
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "description": "Name of the person asking."
          },
          "email": {
            "type": "string",
            "format": "email",
            "pattern": "^[^\\s@<>()[\\]\\\\,;:\"]+@[^\\s@<>()[\\]\\\\,;:\".]+(?:\\.[^\\s@<>()[\\]\\\\,;:\".]+)+$",
            "maxLength": 320,
            "description": "Where Elite replies: one plain address, without a display name."
          },
          "phone": {
            "type": "string",
            "maxLength": 50
          },
          "locale": {
            "type": "string",
            "enum": [
              "es",
              "en"
            ],
            "description": "Language for the reply."
          },
          "marketing": {
            "type": "boolean",
            "default": false,
            "description": "true only if the person agrees to receive commercial communications from Elite (the optional box on the form). The request is handled either way."
          }
        }
      },
      "ContactRequest": {
        "type": "object",
        "required": [
          "name",
          "email",
          "topic",
          "message"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "company": {
            "type": "string",
            "maxLength": 200
          },
          "email": {
            "type": "string",
            "format": "email",
            "pattern": "^[^\\s@<>()[\\]\\\\,;:\"]+@[^\\s@<>()[\\]\\\\,;:\".]+(?:\\.[^\\s@<>()[\\]\\\\,;:\".]+)+$",
            "maxLength": 320,
            "description": "Where Elite replies: one plain address, without a display name."
          },
          "phone": {
            "type": "string",
            "maxLength": 50
          },
          "topic": {
            "type": "string",
            "enum": [
              "proyecto",
              "proveedor",
              "empleo",
              "prensa",
              "otro"
            ],
            "description": "proyecto (a project), proveedor (supplier), empleo (jobs), prensa (press), otro (something else)."
          },
          "message": {
            "type": "string",
            "maxLength": 3000
          },
          "locale": {
            "type": "string",
            "enum": [
              "es",
              "en"
            ],
            "description": "Language for the reply."
          },
          "marketing": {
            "type": "boolean",
            "default": false,
            "description": "true only if the person agrees to receive commercial communications from Elite (the optional box on the form). The request is handled either way."
          }
        }
      },
      "Ok": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "const": true
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
