{
  "openapi": "3.1.0",
  "info": {
    "title": "RoboSim API (Service Robot Co.)",
    "version": "1.0.0",
    "description": "Size a fleet of Nexmow M2 autonomous mowers for any US golf course's roughs: recommended mowers, crew hours freed a week, yearly saving and the RoboCare price. Public and free, no key. Every endpoint returns JSON, or Markdown with Accept: text/markdown.",
    "contact": {
      "name": "Service Robot Co.",
      "url": "https://servicerobotco.com/contact"
    }
  },
  "externalDocs": {
    "url": "https://servicerobotco.com/docs",
    "description": "Quickstart and reference"
  },
  "servers": [
    {
      "url": "https://servicerobotco.com/api/v1/robosim"
    }
  ],
  "paths": {
    "/courses": {
      "get": {
        "operationId": "searchGolfCourses",
        "summary": "Find US golf courses by name",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2
            },
            "description": "Course name, city or state words."
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching courses with ids and an estimateUrl each."
          },
          "400": {
            "description": "Bad input."
          }
        }
      }
    },
    "/estimate": {
      "get": {
        "operationId": "estimateMowerFleet",
        "summary": "RoboSim quick estimate: Nexmow M2 fleet, crew time and price for a course",
        "parameters": [
          {
            "name": "course",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Course id from GET /courses (e.g. w123456). Best input."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Course name, when no id is known. The best match is used; others come back in otherMatches."
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            "description": "Two-letter US state to narrow a name lookup."
          },
          {
            "name": "roughAcres",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0.5,
              "maximum": 2000
            },
            "description": "Acres of rough to mow, if known. Overrides the course size."
          },
          {
            "name": "courseAcres",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 25,
              "maximum": 2000
            },
            "description": "Whole course acres; rough is taken in GCSAA median proportions."
          },
          {
            "name": "holes",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 72
            },
            "description": "Hole count, when nothing else is known."
          },
          {
            "name": "cutsPerWeek",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 7,
              "default": 2.5
            },
            "description": "Cuts a week of the rough."
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "md"
              ]
            },
            "description": "Force JSON or Markdown. Accept: text/markdown also returns Markdown."
          }
        ],
        "responses": {
          "200": {
            "description": "The estimate."
          },
          "400": {
            "description": "Bad input."
          },
          "404": {
            "description": "Course not found."
          }
        }
      },
      "post": {
        "operationId": "estimateMowerFleetPost",
        "summary": "The same estimate, inputs as a JSON body",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "course": {
                    "type": "string",
                    "description": "Course id from GET /courses (e.g. w123456). Best input."
                  },
                  "name": {
                    "type": "string",
                    "description": "Course name, when no id is known. The best match is used; others come back in otherMatches."
                  },
                  "state": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "Two-letter US state to narrow a name lookup."
                  },
                  "roughAcres": {
                    "type": "number",
                    "minimum": 0.5,
                    "maximum": 2000,
                    "description": "Acres of rough to mow, if known. Overrides the course size."
                  },
                  "courseAcres": {
                    "type": "number",
                    "minimum": 25,
                    "maximum": 2000,
                    "description": "Whole course acres; rough is taken in GCSAA median proportions."
                  },
                  "holes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 72,
                    "description": "Hole count, when nothing else is known."
                  },
                  "cutsPerWeek": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 7,
                    "default": 2.5,
                    "description": "Cuts a week of the rough."
                  }
                }
              },
              "example": {
                "name": "Pebble Beach Golf Links",
                "state": "CA",
                "cutsPerWeek": 3
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The estimate."
          },
          "400": {
            "description": "Bad input."
          },
          "404": {
            "description": "Course not found."
          }
        }
      }
    },
    "/pricing": {
      "get": {
        "operationId": "getMowerPricing",
        "summary": "Nexmow M2 pricing: lease term, setup, RoboCare plans",
        "responses": {
          "200": {
            "description": "Pricing."
          }
        }
      }
    }
  }
}