{
  "openapi": "3.1.0",
  "info": {
    "title": "Zorro Ticket Public Information API",
    "version": "1.0.0",
    "description": "Read-only, sourced general information about Quebec traffic tickets. No plea recommendation, outcome prediction or legal advice.",
    "contact": {
      "name": "Zorro Ticket",
      "url": "https://avocatscontravention.ca/en/contact-us",
      "email": "info@zorroticket.com"
    }
  },
  "servers": [
    {
      "url": "https://avocatscontravention.ca"
    }
  ],
  "tags": [
    {
      "name": "Traffic information"
    },
    {
      "name": "Resources"
    }
  ],
  "paths": {
    "/api/public/v1/demerit-points": {
      "get": {
        "operationId": "calculateDemeritPoints",
        "summary": "Estimate speeding demerit points",
        "tags": [
          "Traffic information"
        ],
        "parameters": [
          {
            "name": "speed_limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "enum": [
                30,
                40,
                50,
                60,
                70,
                80,
                90,
                100
              ]
            },
            "description": "Posted limit in km/h"
          },
          {
            "name": "alleged_speed",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 300
            },
            "description": "Alleged speed in km/h"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr"
              ],
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful informational response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/public/v1/major-speeding": {
      "get": {
        "operationId": "checkMajorSpeeding",
        "summary": "Check the general major-speeding threshold",
        "tags": [
          "Traffic information"
        ],
        "parameters": [
          {
            "name": "speed_limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "enum": [
                30,
                40,
                50,
                60,
                70,
                80,
                90,
                100
              ]
            },
            "description": "Posted limit in km/h"
          },
          {
            "name": "alleged_speed",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 300
            },
            "description": "Alleged speed in km/h"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr"
              ],
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful informational response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/public/v1/plea-response-date": {
      "get": {
        "operationId": "estimatePleaResponseDate",
        "summary": "Estimate an indicative plea-response date",
        "tags": [
          "Traffic information"
        ],
        "parameters": [
          {
            "name": "service_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr"
              ],
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful informational response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/public/v1/courthouse-directory": {
      "get": {
        "operationId": "getCourthouseDirectory",
        "summary": "Get official Quebec courthouse links",
        "tags": [
          "Resources"
        ],
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr"
              ],
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful informational response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/public/v1/case-law": {
      "get": {
        "operationId": "listReferenceCases",
        "summary": "List leading decisions with official links",
        "tags": [
          "Resources"
        ],
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr"
              ],
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful informational response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/public/v1/search": {
      "get": {
        "operationId": "searchPublicResources",
        "summary": "Search public Zorro Ticket resources",
        "tags": [
          "Resources"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful informational response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/public/v1/fetch": {
      "get": {
        "operationId": "fetchPublicResource",
        "summary": "Fetch resource metadata by canonical URL",
        "tags": [
          "Resources"
        ],
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful informational response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    }
  }
}
