{
 "openapi": "3.1.0",
 "info": {
  "title": "Plombierama public API",
  "version": "1.0.0",
  "description": "Public read-only API, no key. It stores no data. No booking, no payment, no request sent on our behalf: the person sends their own message."
 },
 "servers": [
  {
   "url": "https://ai.plombierama.com"
  }
 ],
 "paths": {
  "/v1/services.json": {
   "get": {
    "operationId": "listServices",
    "summary": "List the 13 services (FR/EN) with their link",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/v1/price.json": {
   "get": {
    "operationId": "getPrice",
    "summary": "Give the price 'from €120 excl. VAT' with the VAT note, never a price including VAT",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/v1/contact.json": {
   "get": {
    "operationId": "getContact",
    "summary": "Give the contact channels: phone, text, WhatsApp, email, Contact page",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/v1/communes.json": {
   "get": {
    "operationId": "listCommunes",
    "summary": "We cover all 8 départements. 1266 towns and the 20 Paris arrondissements.",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/v1/faq.json": {
   "get": {
    "operationId": "getFaq",
    "summary": "FAQ (FR/EN)",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/v1/coverage": {
   "get": {
    "operationId": "checkCoverage",
    "summary": "Check that a town is covered (name or postcode)",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/v1/message": {
   "get": {
    "operationId": "prepareMessage",
    "summary": "Prepare a pre-filled message (WhatsApp, text or email) with the service, the town and the problem. The person sends the message themselves.",
    "parameters": [
     {
      "name": "channel",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "whatsapp",
        "sms",
        "email"
       ]
      }
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "fr",
        "en"
       ]
      }
     },
     {
      "name": "service",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "fuite-eau",
        "debouchage",
        "fuite-encastree",
        "sanibroyeur",
        "chauffe-eau",
        "groupe-securite",
        "douche-senior",
        "douche-baignoire",
        "wc",
        "robinetterie",
        "lave-linge-lave-vaisselle",
        "entretien",
        "joints-carrelage"
       ]
      }
     },
     {
      "name": "commune",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "description",
      "in": "query",
      "schema": {
       "type": "string",
       "maxLength": 1000
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  }
 }
}
