{
  "openapi": "3.1.0",
  "info": {
    "title": "A1 Corporate Cars API",
    "version": "1.0.0",
    "summary": "Read-only facts about A1 Corporate Cars: fleet, kinds of trip, cities and how to book.",
    "description": "Public and read-only: no key or sign-in. Prices are not published (every trip is quoted), so no endpoint returns one. Booking is done by the person at /contact, by phone, WhatsApp or email. Errors are JSON ({ error: { code, message, docs } }). Rate limit: 120 requests a minute per IP, shown in RateLimit-* headers; a 429 carries Retry-After. Versioning: the major version is in the path (/api/v1/); a breaking change gets /api/v2/ with at least 90 days’ notice on /developers, and a retiring path sends Deprecation and Sunset headers. The same data is on the MCP server at /mcp.",
    "contact": {
      "name": "A1 Corporate Cars",
      "email": "info@a1corporatecars.com.au",
      "url": "https://a1corporatecars.com.au/contact"
    }
  },
  "servers": [
    {
      "url": "https://a1corporatecars.com.au"
    }
  ],
  "externalDocs": {
    "description": "Developers and AI agents",
    "url": "https://a1corporatecars.com.au/developers"
  },
  "security": [],
  "tags": [
    {
      "name": "overview"
    },
    {
      "name": "fleet"
    },
    {
      "name": "services"
    },
    {
      "name": "locations"
    },
    {
      "name": "contact"
    }
  ],
  "paths": {
    "/api/v1/overview": {
      "get": {
        "operationId": "getOverview",
        "tags": [
          "overview"
        ],
        "summary": "What A1 does, where, and how to book",
        "responses": {
          "200": {
            "description": "The overview",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Overview"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fleet": {
      "get": {
        "operationId": "listFleet",
        "tags": [
          "fleet"
        ],
        "summary": "Every car A1 runs",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor from the previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of fleet",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarPage"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fleet/{id}": {
      "get": {
        "operationId": "getCar",
        "tags": [
          "fleet"
        ],
        "summary": "One item from fleet",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id (or slug) from the list.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The item",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Car"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/services": {
      "get": {
        "operationId": "listServices",
        "tags": [
          "services"
        ],
        "summary": "Every kind of trip",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor from the previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of services",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicePage"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/services/{id}": {
      "get": {
        "operationId": "getService",
        "tags": [
          "services"
        ],
        "summary": "One item from services",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id (or slug) from the list.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The item",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/locations": {
      "get": {
        "operationId": "listLocations",
        "tags": [
          "locations"
        ],
        "summary": "Every city A1 covers",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor from the previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of locations",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CityPage"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/locations/{id}": {
      "get": {
        "operationId": "getCity",
        "tags": [
          "locations"
        ],
        "summary": "One item from locations",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id (or slug) from the list.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The item",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/City"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contact": {
      "get": {
        "operationId": "getContact",
        "tags": [
          "contact"
        ],
        "summary": "Phone, WhatsApp, email and booking page",
        "responses": {
          "200": {
            "description": "Contact details",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "RateLimit-Limit": {
        "description": "Requests allowed per minute.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Remaining": {
        "description": "Requests left in this minute.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until the window resets.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "not_found",
                  "bad_request",
                  "rate_limited",
                  "method_not_allowed",
                  "internal_error"
                ]
              },
              "message": {
                "type": "string"
              },
              "docs": {
                "type": "string"
              }
            }
          }
        }
      },
      "Overview": {
        "type": "object",
        "required": [
          "name",
          "url",
          "cities",
          "services",
          "pricing",
          "howToBook"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "hours": {
            "type": "string"
          },
          "cities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notServed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pricing": {
            "type": "string"
          },
          "howToBook": {
            "type": "string"
          },
          "docs": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "Car": {
        "type": "object",
        "required": [
          "id",
          "name",
          "class",
          "passengers",
          "bookAs"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "class": {
            "type": "string"
          },
          "passengers": {
            "type": "integer"
          },
          "luggage": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Suitcases; null where not yet confirmed."
          },
          "bookAs": {
            "type": "string",
            "enum": [
              "sclass",
              "suv",
              "mover"
            ],
            "description": "The kind of car to ask for when booking."
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CarPage": {
        "type": "object",
        "required": [
          "data",
          "nextCursor",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Car"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as cursor for the next page; null on the last page."
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "Service": {
        "type": "object",
        "required": [
          "id",
          "title",
          "whatToSend",
          "bookingUrl"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "whatToSend": {
            "type": "string"
          },
          "carsThatFit": {
            "type": "string"
          },
          "bookingUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "ServicePage": {
        "type": "object",
        "required": [
          "data",
          "nextCursor",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Service"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as cursor for the next page; null on the last page."
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "City": {
        "type": "object",
        "required": [
          "slug",
          "name",
          "state",
          "airport",
          "cityPage"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "headOffice": {
            "type": "boolean"
          },
          "airport": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "iata": {
                "type": "string"
              }
            }
          },
          "cityPage": {
            "type": "string",
            "format": "uri"
          },
          "airportPage": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      },
      "CityPage": {
        "type": "object",
        "required": [
          "data",
          "nextCursor",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/City"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as cursor for the next page; null on the last page."
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "Contact": {
        "type": "object",
        "required": [
          "phone",
          "email",
          "bookingUrl"
        ],
        "properties": {
          "phone": {
            "type": "string"
          },
          "whatsapp": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "bookingUrl": {
            "type": "string",
            "format": "uri"
          },
          "hours": {
            "type": "string"
          },
          "headOffice": {
            "type": "string"
          }
        }
      }
    }
  }
}