{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://restelys.com/agents/demande.schema.json",
 "title": "Restelys request sent by an AI agent",
 "description": "Body of POST /api/demande.php, or of an email to contact@restelys.com. A person at Restelys confirms every request.",
 "type": "object",
 "required": [
  "type",
  "property",
  "contact",
  "agent"
 ],
 "additionalProperties": false,
 "properties": {
  "type": {
   "enum": [
    "trial_box",
    "quote",
    "set",
    "question"
   ]
  },
  "language": {
   "enum": [
    "fr",
    "en",
    "de",
    "es",
    "it",
    "nl"
   ],
   "default": "fr"
  },
  "property": {
   "type": "object",
   "required": [
    "name",
    "city"
   ],
   "additionalProperties": false,
   "properties": {
    "name": {
     "type": "string",
     "maxLength": 160
    },
    "kind": {
     "enum": [
      "hotel",
      "luxury_hotel",
      "aparthotel_residence",
      "bnb_cottage",
      "campsite",
      "group",
      "other"
     ]
    },
    "city": {
     "type": "string",
     "maxLength": 120
    },
    "country": {
     "type": "string",
     "maxLength": 2,
     "default": "FR"
    },
    "rooms": {
     "type": "integer",
     "minimum": 1,
     "maximum": 5000
    },
    "occupancy": {
     "type": "number",
     "minimum": 0,
     "maximum": 1,
     "description": "Average occupancy, 0 to 1"
    },
    "delivery_address": {
     "type": "string",
     "maxLength": 300
    },
    "company_id": {
     "type": "string",
     "maxLength": 40,
     "description": "SIREN, SIRET or VAT number"
    }
   }
  },
  "contact": {
   "type": "object",
   "required": [
    "name",
    "email"
   ],
   "additionalProperties": false,
   "properties": {
    "name": {
     "type": "string",
     "maxLength": 160
    },
    "role": {
     "type": "string",
     "maxLength": 120
    },
    "email": {
     "type": "string",
     "format": "email",
     "maxLength": 200
    },
    "phone": {
     "type": "string",
     "maxLength": 40
    }
   }
  },
  "agent": {
   "type": "object",
   "required": [
    "name",
    "acting_for"
   ],
   "additionalProperties": false,
   "properties": {
    "name": {
     "type": "string",
     "maxLength": 120
    },
    "operator": {
     "type": "string",
     "maxLength": 120
    },
    "acting_for": {
     "type": "string",
     "maxLength": 300
    },
    "contact_url": {
     "type": "string",
     "maxLength": 300
    }
   }
  },
  "scent": {
   "enum": [
    "Le Matin",
    "Le Jardin",
    "Le Salon",
    "all"
   ]
  },
  "set": {
   "enum": [
    "salle-de-bains-complete",
    "essentiel",
    "accueil-haut-de-gamme",
    "appart-hotel"
   ]
  },
  "items": {
   "type": "array",
   "maxItems": 40,
   "items": {
    "type": "object",
    "required": [
     "product"
    ],
    "additionalProperties": false,
    "properties": {
     "product": {
      "enum": [
       "gel-douche",
       "shampoing",
       "apres-shampoing",
       "gel-corps-cheveux",
       "creme-corps",
       "savon-mains",
       "brume-oreiller",
       "parfum-ambiance",
       "support-mural-1",
       "support-mural-2",
       "support-mural-3",
       "support-vasque-1",
       "support-vasque",
       "sachets-hygieniques",
       "bonnets-douche",
       "planche-degustation",
       "plateau-courtoisie",
       "cintres-bois",
       "pancarte-ne-pas-deranger",
       "parapluie",
       "sacs-linge",
       "pochettes-chaussures",
       "chaussons-coton-bio",
       "peigne-bambou",
       "trousse-toilette",
       "carres-demaquillants",
       "necessaire-couture",
       "liquide-vaisselle",
       "nettoyant-surfaces",
       "kit-cuisine",
       "seche-cheveux",
       "seche-mains"
      ]
     },
     "quantity": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
     },
     "option": {
      "type": "string",
      "maxLength": 80
     },
     "personalisation": {
      "type": "string",
      "maxLength": 200
     }
    }
   }
  },
  "message": {
   "type": "string",
   "maxLength": 4000
  }
 }
}
