{
 "openapi": "3.1.0",
 "info": {
  "title": "Ponykaams API",
  "version": "1.0.0",
  "description": "Company facts, portfolio and enquiries. No authentication.",
  "contact": {
   "email": "contact@ponykaams.com"
  },
  "termsOfService": "https://www.ponykaams.com/terms-of-service.html"
 },
 "servers": [
  {
   "url": "https://www.ponykaams.com"
  }
 ],
 "paths": {
  "/api/site": {
   "get": {
    "operationId": "getSite",
    "summary": "Company, services and FAQ",
    "responses": {
     "200": {
      "description": "Site data",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/projects": {
   "get": {
    "operationId": "listProjects",
    "summary": "List or fetch projects",
    "parameters": [
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "Sector",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Country",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "technology",
      "in": "query",
      "required": false,
      "description": "Technology",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "slug",
      "in": "query",
      "required": false,
      "description": "One project",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Projects",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Unknown slug"
     }
    }
   }
  },
  "/api/search": {
   "get": {
    "operationId": "search",
    "summary": "Search",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "description": "Search words",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Results",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/enquiry": {
   "post": {
    "operationId": "submitEnquiry",
    "summary": "Submit an enquiry with the person's consent",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "name",
         "email",
         "message",
         "consent"
        ],
        "properties": {
         "name": {
          "type": "string",
          "maxLength": 100
         },
         "email": {
          "type": "string",
          "format": "email"
         },
         "organization": {
          "type": "string"
         },
         "service": {
          "type": "string"
         },
         "message": {
          "type": "string",
          "minLength": 10,
          "maxLength": 2000
         },
         "consent": {
          "type": "boolean",
          "const": true
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Delivered, ok is true",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     },
     "429": {
      "description": "Rate limited"
     },
     "502": {
      "description": "Delivery not confirmed, use email"
     }
    }
   }
  }
 }
}