{
  "openapi": "3.1.0",
  "info": {
    "title": "Venue Authority API",
    "version": "2026-08-21",
    "description": "Match a food-service merchant name and street address to a supported US regulator record and retain source-linked evidence. Inspect a public accepted and rejected example at https://venueauthority.com/portfolio-proof#example-report before creating an account. One valid authenticated resolver or canonical facility request consumes one prepaid unit, including a policy rejection. Exact replay is not charged twice.",
    "termsOfService": "https://venueauthority.com/terms",
    "contact": {
      "name": "Venue Authority support",
      "url": "https://venueauthority.com/support",
      "email": "support@venueauthority.com"
    }
  },
  "externalDocs": {
    "description": "Venue Authority API documentation",
    "url": "https://venueauthority.com/developers"
  },
  "servers": [
    {
      "url": "https://venueauthority.com"
    }
  ],
  "tags": [
    {
      "name": "Resolution & Evidence",
      "description": "Resolve a merchant and retrieve its canonical regulator record and retained evidence."
    },
    {
      "name": "Coverage",
      "description": "Read supported sources, record counts, availability, and freshness."
    },
    {
      "name": "Watchlists",
      "description": "Manage account-owned facility watchlists and stable change history."
    },
    {
      "name": "Webhooks",
      "description": "Register endpoints and inspect delivery attempts."
    },
    {
      "name": "Audit Exports",
      "description": "Create and download account-scoped evidence exports."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/api/v1/resolve": {
      "post": {
        "operationId": "resolveFacility",
        "tags": [
          "Resolution & Evidence"
        ],
        "summary": "Resolve a merchant name and street address",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveRequest"
              },
              "example": {
                "name": "REDACTED MERCHANT",
                "address": "REDACTED STREET ADDRESS"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Resolution"
          },
          "400": {
            "description": "Malformed input is not metered.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "A valid API key is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "The prepaid balance is exhausted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The request ID conflicts with different work or the first request is incomplete.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Resolution"
          },
          "503": {
            "description": "The serving snapshot or source approval is unavailable. No unit is debited.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/facilities/{id}": {
      "get": {
        "operationId": "getFacility",
        "tags": [
          "Resolution & Evidence"
        ],
        "summary": "Get one canonical regulator facility",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/FacilityId"
          }
        ],
        "responses": {
          "200": {
            "description": "Canonical facility and evidence receipt. Evidence retrieved for this request is labelled retrieved_on_demand. effectiveAt is null when the source does not provide a usable effective date."
          },
          "404": {
            "description": "The facility was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "The source was withdrawn. No unit is debited.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The serving snapshot or source approval is unavailable. No unit is debited.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/coverage": {
      "get": {
        "operationId": "getCoverage",
        "tags": [
          "Coverage"
        ],
        "summary": "Read supported source and freshness status",
        "security": [],
        "responses": {
          "200": {
            "description": "Coverage and freshness by jurisdiction."
          },
          "410": {
            "description": "A source was withdrawn. No source body is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Source approval or serving evidence is unavailable. No source body is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portfolios": {
      "get": {
        "operationId": "listWatchlists",
        "tags": [
          "Watchlists"
        ],
        "summary": "List account watchlists",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Account-owned watchlists."
          }
        }
      },
      "post": {
        "operationId": "createWatchlist",
        "tags": [
          "Watchlists"
        ],
        "summary": "Create an account watchlist",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Watchlist created."
          },
          "400": {
            "description": "Invalid watchlist input.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portfolios/{id}/items": {
      "get": {
        "operationId": "listWatchlistItems",
        "tags": [
          "Watchlists"
        ],
        "summary": "List watchlist items",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PortfolioId"
          }
        ],
        "responses": {
          "200": {
            "description": "Account-owned watchlist items."
          },
          "404": {
            "description": "The watchlist was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "A represented source was withdrawn. No item body is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Source approval or watchlist data is unavailable. No item body is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "addWatchlistItem",
        "tags": [
          "Watchlists"
        ],
        "summary": "Add a canonical facility to a watchlist",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PortfolioId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jurisdiction",
                  "sourceId"
                ],
                "properties": {
                  "jurisdiction": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Watchlist item created."
          },
          "400": {
            "description": "Use a canonical jurisdiction and source ID returned by the resolver.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The watchlist was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "The source was withdrawn.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Source approval or serving data is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portfolios/{id}/items/{itemId}": {
      "delete": {
        "operationId": "deleteWatchlistItem",
        "tags": [
          "Watchlists"
        ],
        "summary": "Remove a watchlist item",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PortfolioId"
          },
          {
            "$ref": "#/components/parameters/ItemId"
          }
        ],
        "responses": {
          "200": {
            "description": "Watchlist item removed."
          },
          "404": {
            "description": "The watchlist item was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portfolios/{id}/events": {
      "get": {
        "operationId": "listWatchlistEvents",
        "tags": [
          "Watchlists"
        ],
        "summary": "List stable change events for a watchlist",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PortfolioId"
          }
        ],
        "responses": {
          "200": {
            "description": "Account-owned change events in reverse chronological order."
          },
          "404": {
            "description": "The watchlist was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "A represented source was withdrawn. No event body is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Source approval or event data is unavailable. No event body is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "operationId": "listWebhooks",
        "tags": [
          "Webhooks"
        ],
        "summary": "List account webhook endpoints",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook endpoints without plaintext secrets."
          }
        }
      },
      "post": {
        "operationId": "createWebhook",
        "tags": [
          "Webhooks"
        ],
        "summary": "Create an HTTPS webhook endpoint",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Endpoint created. The signing secret appears once."
          },
          "400": {
            "description": "The webhook URL is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{id}": {
      "delete": {
        "operationId": "deleteWebhook",
        "tags": [
          "Webhooks"
        ],
        "summary": "Disable and remove a webhook endpoint",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook removed."
          },
          "404": {
            "description": "The webhook was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook delivery attempts",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "webhookId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Per-delivery state, attempts, response class, and timestamps for this account."
          }
        }
      }
    },
    "/api/v1/audit-exports": {
      "post": {
        "operationId": "createAuditExport",
        "tags": [
          "Audit Exports"
        ],
        "summary": "Create a JSON export from owned completed evidence receipts",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "201": {
            "description": "Account-scoped JSON artifact and SHA-256 hash."
          },
          "404": {
            "description": "A requested receipt is missing, incomplete, or belongs to another account. No unit is debited.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "A source needed by the export was withdrawn. No unit is debited.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Source approval is unavailable. No unit is debited.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit-exports/{id}": {
      "get": {
        "operationId": "downloadAuditExport",
        "tags": [
          "Audit Exports"
        ],
        "summary": "Download an already-issued audit export",
        "security": [
          {
            "sessionAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuditExportId"
          }
        ],
        "responses": {
          "200": {
            "description": "The immutable JSON artifact. Download remains subject to authenticated API approval for every enabled source."
          },
          "404": {
            "description": "The export was not found in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "A source represented by the export is withdrawn. No artifact body is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Source approval is unavailable. No artifact body is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "VenueAuthorityKey"
      },
      "sessionAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__session",
        "description": "Authenticated customer session."
      }
    },
    "parameters": {
      "RequestId": {
        "name": "x-request-id",
        "in": "header",
        "required": false,
        "description": "Stable 8 to 128 character idempotency key. Same work replays without another debit; changed work returns 409.",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9._:-]{8,128}$"
        }
      },
      "FacilityId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "PortfolioId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "ItemId": {
        "name": "itemId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "WebhookId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "AuditExportId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "schemas": {
      "ResolveRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "address"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "address": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        }
      },
      "EvidenceEvent": {
        "type": "object",
        "required": [
          "eventType",
          "observedAt",
          "effectiveAt",
          "effectiveAtStatus"
        ],
        "properties": {
          "eventType": {
            "type": "string"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time"
          },
          "effectiveAt": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "effectiveAtStatus": {
            "enum": [
              "provided_by_source",
              "unavailable"
            ]
          }
        }
      },
      "SourceAttribution": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "sourceId": {
            "type": "string"
          },
          "sourceClass": {
            "enum": [
              "food_inspection",
              "food_business_license",
              "alcohol_license",
              "hospitality_license"
            ]
          },
          "sourceClassLabel": {
            "type": "string"
          },
          "attribution": {
            "type": "string"
          },
          "requiredNotice": {
            "type": [
              "string",
              "null"
            ]
          },
          "licenseUrl": {
            "type": "string",
            "format": "uri"
          },
          "modificationNotice": {
            "type": "string"
          }
        }
      },
      "Resolution": {
        "type": "object",
        "required": [
          "disposition",
          "reason",
          "requestId",
          "sourceAttribution"
        ],
        "properties": {
          "disposition": {
            "enum": [
              "accepted",
              "rejected"
            ]
          },
          "reason": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "record": {
            "type": "object"
          },
          "sourceAttribution": {
            "$ref": "#/components/schemas/SourceAttribution"
          },
          "snapshot": {
            "type": "object"
          },
          "evidence": {
            "type": "object",
            "properties": {
              "status": {
                "enum": [
                  "retrieved_on_demand",
                  "unavailable"
                ]
              },
              "events": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EvidenceEvent"
                }
              }
            }
          }
        }
      }
    },
    "responses": {
      "Resolution": {
        "description": "Accepted responses use 200. Policy rejections use 422. Both consume one unit when the request is otherwise valid and the serving snapshot is available.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Resolution"
            }
          }
        }
      }
    }
  }
}
