{"openapi":"3.1.0","info":{"title":"GET /api/v1/public/audit-packs/{token}","version":"1.0.0","description":"Public audit pack viewer (unauthenticated)"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/public/audit-packs/{token}":{"get":{"tags":["audit-packs-public"],"summary":"Public audit pack viewer (unauthenticated)","description":"Resolve a share token to the pack's manifest, summaries, hash and signature, with a server-recomputed `verified` flag and the binder download URL. 404 for unknown or revoked tokens alike; rate-limited per IP.","operationId":"fetch_public_audit_pack","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_PublicAuditPackResponse_"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"error":"not_found","message":"Resource not found","code":"NOT_FOUND_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests - Rate limit exceeded; back off and retry","content":{"application/json":{"example":{"error":"rate_limited","message":"Too many requests. Please slow down.","code":"GEN_005","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"validation_error","message":"Validation failed: amount: Input should be a valid integer","errors":{"amount":"Input should be a valid integer"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}}},"x-fastapi-operation-id":"fetch_public_audit_pack_api_v1_public_audit_packs__token__get"}}},"components":{"schemas":{"PublicAuditPackResponse":{"properties":{"business_name":{"type":"string","title":"Business Name"},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End"},"status":{"type":"string","title":"Status"},"manifest":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Manifest"},"replay_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Replay Summary"},"chain_verified":{"type":"boolean","title":"Chain Verified","default":false},"chain_report":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Chain Report"},"approvals_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Approvals Summary"},"traces_count":{"type":"integer","title":"Traces Count","default":0},"pack_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack Hash"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"},"verified":{"type":"boolean","title":"Verified","description":"The server recomputed the hash and signature and they match"},"binder_download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Binder Download Url"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"cached":{"type":"boolean","title":"Cached","default":false}},"additionalProperties":false,"type":"object","required":["business_name","status","verified"],"title":"PublicAuditPackResponse","description":"What an anonymous holder of a pack link sees.\n\nAggregates and hashes only: the approvals list carries tool names,\ndecisions and timestamps, never ledger rows or amounts."},"SuccessEnvelope_PublicAuditPackResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/PublicAuditPackResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[PublicAuditPackResponse]"},"ErrorResponse":{"title":"ErrorResponse","type":"object","description":"Envelope returned by every non-2xx response. Branch on `code` (stable) rather than `message` (human-readable, may change).","required":["error","message","code"],"properties":{"error":{"type":"string","description":"Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`."},"message":{"type":"string","description":"Human-readable explanation, safe to show to end users."},"code":{"type":"string","description":"Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`)."},"request_id":{"type":"string","description":"Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied."},"errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Field-level validation messages keyed by field name. Present on 400/422 validation failures only."}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}