{
  "openapi": "3.1.0",
  "info": {
    "title": "Whereday Website API",
    "version": "1.0.0",
    "description": "Read-only public product metadata and a validated browser measurement endpoint for daily aggregate counts. No account, credentials, personal locations, exports, or journal records are accessible through this API.",
    "contact": {
      "name": "Cody Bontecou",
      "email": "cody.bontecou@gmail.com",
      "url": "https://whereday.com/contact"
    }
  },
  "servers": [
    {
      "url": "https://whereday.com"
    }
  ],
  "security": [],
  "paths": {
    "/api/v1/product": {
      "get": {
        "operationId": "getIsoMeProduct",
        "summary": "Read Whereday capabilities and documentation links",
        "description": "Retrieve public metadata about the native app. No parameters or authentication are required. Responses are cacheable for five minutes. There is no fixed advertised application quota; Cloudflare protections may apply. The /v1 response can gain optional fields; incompatible changes use a new major path. No writes or private journal access are supported.",
        "responses": {
          "200": {
            "description": "Public product metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                },
                "example": {
                  "name": "Whereday",
                  "summary": "An open source location journal for iPhone and Apple Watch, with on-device visits, GPS routes, and optional portable export.",
                  "homepage": "https://whereday.com/",
                  "appStore": "https://apps.apple.com/us/app/iso-me/id6761960794",
                  "sourceRepository": "https://github.com/CodyBontecou/isome",
                  "platforms": [
                    "iOS 17 or later",
                    "watchOS 10 or later"
                  ],
                  "capabilities": [
                    "Visit detection during tracking",
                    "GPS route recording",
                    "Timeline and outings",
                    "Independent Apple Watch recording",
                    "Portable export",
                    "Supported Whereday file import (App Store 1.7.16)",
                    "Country Days and manual stays",
                    "Siri and Shortcuts",
                    "Optional outbound webhooks"
                  ],
                  "exportFormats": [
                    "JSON",
                    "CSV",
                    "Markdown",
                    "GeoJSON",
                    "GPX",
                    "KML",
                    "OwnTracks",
                    "Overland"
                  ],
                  "pricingURL": "https://whereday.com/#pricing",
                  "privacyURL": "https://whereday.com/privacy",
                  "privateJournalAPI": false,
                  "documentation": [
                    {
                      "title": "Getting started",
                      "url": "https://whereday.com/docs/getting-started/"
                    },
                    {
                      "title": "Tracking",
                      "url": "https://whereday.com/docs/tracking/"
                    },
                    {
                      "title": "Export and import",
                      "url": "https://whereday.com/docs/export-import/"
                    },
                    {
                      "title": "Automatic exports",
                      "url": "https://whereday.com/docs/automatic-exports/"
                    },
                    {
                      "title": "Webhooks",
                      "url": "https://whereday.com/docs/webhooks/"
                    },
                    {
                      "title": "Siri and Shortcuts",
                      "url": "https://whereday.com/docs/siri-shortcuts/"
                    },
                    {
                      "title": "Apple Watch",
                      "url": "https://whereday.com/docs/apple-watch/"
                    },
                    {
                      "title": "Privacy and data",
                      "url": "https://whereday.com/docs/privacy-data/"
                    }
                  ]
                }
              }
            }
          },
          "405": {
            "description": "Unsupported method. Use GET or HEAD.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/acquisition": {
      "post": {
        "operationId": "countWebsiteAcquisition",
        "summary": "Count a gated website page load or App Store link activation",
        "description": "Internal browser measurement endpoint. Same-origin requests only, after the analytics exclusion gate. Accepts public page paths and coarse dimensions; no visitor identifiers or journal data. Updates daily aggregate counters. Does not measure installs or purchases.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "event",
                  "page",
                  "placement",
                  "source"
                ],
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "page_view",
                      "app_store_clicked"
                    ]
                  },
                  "page": {
                    "type": "string",
                    "description": "An exact known public page path without a query or fragment."
                  },
                  "placement": {
                    "type": "string",
                    "enum": [
                      "page",
                      "header",
                      "inline",
                      "footer",
                      "qr"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "direct",
                      "internal",
                      "search",
                      "other"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Count accepted, or privacy preference honored without storing."
          },
          "400": {
            "description": "Invalid or unknown dimensions."
          },
          "403": {
            "description": "Origin or host rejected."
          },
          "405": {
            "description": "Use POST."
          },
          "413": {
            "description": "Payload exceeds 512 bytes."
          },
          "415": {
            "description": "Use application/json."
          },
          "503": {
            "description": "Measurement unavailable; no success claimed."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "summary",
          "homepage",
          "appStore",
          "sourceRepository",
          "platforms",
          "capabilities",
          "exportFormats",
          "pricingURL",
          "privacyURL",
          "privateJournalAPI",
          "documentation"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Native app name."
          },
          "summary": {
            "type": "string",
            "description": "What the native app does."
          },
          "homepage": {
            "type": "string",
            "format": "uri",
            "description": "Canonical marketing homepage."
          },
          "appStore": {
            "type": "string",
            "format": "uri",
            "description": "Official download link."
          },
          "sourceRepository": {
            "type": "string",
            "format": "uri",
            "description": "Public source repository."
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Supported native platforms and minimum versions."
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Product capabilities; features may require a purchase or explicit device permission."
          },
          "exportFormats": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Supported native export formats. Writing exports requires the optional unlock."
          },
          "pricingURL": {
            "type": "string",
            "format": "uri",
            "description": "Pricing details; regional App Store purchase sheets are authoritative."
          },
          "privacyURL": {
            "type": "string",
            "format": "uri",
            "description": "Data-handling policy."
          },
          "privateJournalAPI": {
            "type": "boolean",
            "const": false,
            "description": "False: the site cannot read a user's private journal."
          },
          "documentation": {
            "type": "array",
            "description": "Task-specific native app documentation.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title",
                "url"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "Problem": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "resolution"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "resolution": {
            "type": "string"
          }
        }
      }
    }
  }
}
