{
  "openapi": "3.1.1",
  "info": {
    "title": "ForeverMicro.Web | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://forevermicro.org/"
    }
  ],
  "paths": {
    "/lookup": {
      "get": {
        "tags": [
          "ForeverMicro.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/found-a-pet": {
      "get": {
        "tags": [
          "ForeverMicro.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/register-microchip": {
      "get": {
        "tags": [
          "ForeverMicro.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/robots.txt": {
      "get": {
        "tags": [
          "ForeverMicro.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "tags": [
          "ForeverMicro.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/manage/{foreverId}/export": {
      "get": {
        "tags": [
          "Export"
        ],
        "parameters": [
          {
            "name": "foreverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/qr/{foreverId}.svg": {
      "get": {
        "tags": [
          "Qr"
        ],
        "parameters": [
          {
            "name": "foreverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/qr/{foreverId}.png": {
      "get": {
        "tags": [
          "Qr"
        ],
        "parameters": [
          {
            "name": "foreverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/lost-pets": {
      "get": {
        "tags": [
          "LostPetsApi"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicLostPetDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lost-pets/{slug}": {
      "get": {
        "tags": [
          "LostPetsApi"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicLostPetDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lost-pets/{slug}/sightings": {
      "post": {
        "tags": [
          "LostPetsApi"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSightingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSightingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSightingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/v1/microchips/{number}/lookup": {
      "get": {
        "tags": [
          "MicrochipsApi"
        ],
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MicrochipLookupDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pets/{foreverId}": {
      "get": {
        "tags": [
          "PetsApi"
        ],
        "parameters": [
          {
            "name": "foreverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPetDto"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CreateSightingRequest": {
        "type": "object",
        "properties": {
          "location": {
            "type": [
              "null",
              "string"
            ]
          },
          "direction": {
            "type": [
              "null",
              "string"
            ]
          },
          "condition": {
            "type": [
              "null",
              "string"
            ]
          },
          "comments": {
            "type": [
              "null",
              "string"
            ]
          },
          "reporterContact": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MicrochipLookupDto": {
        "required": [
          "microchip",
          "found",
          "registry",
          "lookupProvider",
          "manufacturerPrefix",
          "foreverId",
          "status",
          "recoveryUrl",
          "nextStep",
          "queriedAtUtc"
        ],
        "type": "object",
        "properties": {
          "microchip": {
            "type": "string"
          },
          "found": {
            "type": "boolean"
          },
          "registry": {
            "type": "string"
          },
          "lookupProvider": {
            "type": "string"
          },
          "manufacturerPrefix": {
            "type": [
              "null",
              "string"
            ]
          },
          "foreverId": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": [
              "null",
              "string"
            ]
          },
          "recoveryUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "nextStep": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/NextStep"
              }
            ]
          },
          "queriedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "NextStep": {
        "required": [
          "action",
          "name",
          "url"
        ],
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PublicLostPetDto": {
        "required": [
          "slug",
          "pet",
          "reportedAtUtc",
          "lastSeenAtUtc",
          "lastSeenLocationText",
          "ownerMessage",
          "isActive",
          "sightings"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "pet": {
            "$ref": "#/components/schemas/PublicPetDto"
          },
          "reportedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastSeenLocationText": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "sightings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicSightingDto"
            }
          }
        }
      },
      "PublicPetDto": {
        "required": [
          "foreverId",
          "name",
          "species",
          "breed",
          "sex",
          "primaryColor",
          "markings",
          "estimatedAgeYears",
          "status",
          "isFriendly",
          "requiresMedication",
          "emergencyInstructions",
          "photoUrl"
        ],
        "type": "object",
        "properties": {
          "foreverId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "species": {
            "type": "string"
          },
          "breed": {
            "type": [
              "null",
              "string"
            ]
          },
          "sex": {
            "type": "string"
          },
          "primaryColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "markings": {
            "type": [
              "null",
              "string"
            ]
          },
          "estimatedAgeYears": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "status": {
            "type": "string"
          },
          "isFriendly": {
            "type": "boolean"
          },
          "requiresMedication": {
            "type": "boolean"
          },
          "emergencyInstructions": {
            "type": [
              "null",
              "string"
            ]
          },
          "photoUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PublicSightingDto": {
        "required": [
          "reportedAtUtc",
          "type",
          "locationText",
          "direction",
          "condition",
          "comments"
        ],
        "type": "object",
        "properties": {
          "reportedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "type": "string"
          },
          "locationText": {
            "type": [
              "null",
              "string"
            ]
          },
          "direction": {
            "type": [
              "null",
              "string"
            ]
          },
          "condition": {
            "type": [
              "null",
              "string"
            ]
          },
          "comments": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "ForeverMicro.Web"
    },
    {
      "name": "Export"
    },
    {
      "name": "Qr"
    },
    {
      "name": "LostPetsApi"
    },
    {
      "name": "MicrochipsApi"
    },
    {
      "name": "PetsApi"
    }
  ]
}