{"openapi":"3.1.0","info":{"title":"CentralSource API","version":"0.1.0","description":"Approved business knowledge for AI assistants. Every response contains only approved, in-force content at the calling key's audience level."},"servers":[{"url":"https://api.centralsource.com.au"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"CentralSource API key (cs_live_…)"}},"schemas":{"SearchResponse":{"type":"object","properties":{"found":{"type":"boolean","description":"False when no approved content covers the question. Assistants must not guess."},"degraded":{"type":"boolean","description":"True when semantic search was unavailable and only exact keyword matches were used."},"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"guidance":{"type":"string"}},"required":["found","degraded","results","guidance"]},"SearchHit":{"type":"object","properties":{"type":{"type":"string","enum":["record","document_chunk"]},"id":{"type":"string","format":"uuid"},"recordId":{"type":["string","null"],"format":"uuid"},"documentId":{"type":["string","null"],"format":"uuid"},"kind":{"type":"string"},"key":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"version":{"type":["integer","null"]},"effectiveFrom":{"type":["string","null"]},"effectiveTo":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]},"score":{"type":"number"},"similarity":{"type":["number","null"]},"keywordMatch":{"type":"boolean"}},"required":["type","id","recordId","documentId","kind","key","title","content","data","version","effectiveFrom","effectiveTo","approvedAt","sourceUrl","score","similarity","keywordMatch"]},"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status"],"description":"RFC 9457 problem details"},"CreateRecordInput":{"allOf":[{"$ref":"#/components/schemas/VersionInput"},{"type":"object","properties":{"kind":{"type":"string","enum":["business","location","service_area","product","service","price","policy","faq","procedure","other"],"description":"Record type"},"key":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$","example":"call-out-fee","description":"Your stable identifier: SKU, slug or code. Unique per kind."}},"required":["kind","key"]}]},"VersionInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300,"example":"Standard call-out fee"},"summary":{"type":"string","minLength":1,"maxLength":4000,"example":"Our standard call-out fee is $99 including GST, within our Melbourne metro service area.","description":"A plain-language statement an assistant can repeat. Keep conditions explicit."},"data":{"type":"object","additionalProperties":{},"default":{},"example":{"amount_inc_gst":99,"currency":"AUD","applies_to":"metro","conditions":"Mon–Fri 7am–5pm"},"description":"Structured fields. Lowercase snake_case keys are directly lookup-able."},"audience":{"type":"string","enum":["public","customer","staff","restricted"],"default":"customer","description":"Who may receive this content: public < customer < staff < restricted"},"effectiveFrom":{"type":["string","null"],"format":"date-time","example":"2026-11-03T00:00:00+11:00"},"effectiveTo":{"type":["string","null"],"format":"date-time","example":"2026-11-03T00:00:00+11:00"},"sourceUrl":{"type":["string","null"],"maxLength":2000,"format":"uri"}},"required":["title","summary"]},"DocumentInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"filename":{"type":["string","null"],"maxLength":300},"text":{"type":"string","minLength":1,"maxLength":500000,"description":"Markdown or plain text. PDF parsing arrives in a later iteration."},"audience":{"type":"string","enum":["public","customer","staff","restricted"],"default":"customer","description":"Who may receive this content: public < customer < staff < restricted"},"sourceUrl":{"type":["string","null"],"maxLength":2000,"format":"uri"}},"required":["title","text"]}},"parameters":{}},"paths":{"/v1/search":{"get":{"tags":["Read"],"security":[{"bearerAuth":[]}],"summary":"Search approved knowledge","description":"Hybrid keyword + semantic search over approved, in-force content at your key's audience level. Returns found:false instead of weak matches.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":500,"example":"Is the call-out fee still $99?"},"required":true,"name":"q","in":"query"},{"schema":{"type":"string","enum":["business","location","service_area","product","service","price","policy","faq","procedure","other"],"description":"Record type"},"required":false,"description":"Record type","name":"kind","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":20,"default":5},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/lookup":{"get":{"tags":["Read"],"security":[{"bearerAuth":[]}],"summary":"Exact field lookup (fast path for voice)","description":"Match a structured field exactly, e.g. field=postcodes&value=3078 or field=sku&value=ABC-1. No embedding call.","parameters":[{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"postcodes"},"required":true,"name":"field","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"example":"3078"},"required":true,"name":"value","in":"query"},{"schema":{"type":"string","enum":["business","location","service_area","product","service","price","policy","faq","procedure","other"],"description":"Record type"},"required":false,"description":"Record type","name":"kind","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Matching records","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/profile":{"get":{"tags":["Read"],"security":[{"bearerAuth":[]}],"summary":"Business profile: identity, locations and service areas","responses":{"200":{"description":"Profile","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/records":{"get":{"tags":["Read"],"security":[{"bearerAuth":[]}],"summary":"List current approved records","parameters":[{"schema":{"type":"string","enum":["business","location","service_area","product","service","price","policy","faq","procedure","other"],"description":"Record type"},"required":false,"description":"Record type","name":"kind","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Page of records","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Write"],"security":[{"bearerAuth":[]}],"summary":"Create a record with a draft first version","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecordInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/records/{id}":{"get":{"tags":["Read"],"security":[{"bearerAuth":[]}],"summary":"Get a record: current version, plus history for editors","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Record","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/records/{id}/versions":{"post":{"tags":["Write"],"security":[{"bearerAuth":[]}],"summary":"Add a new draft version to a record","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/versions/{id}/submit":{"post":{"tags":["Approval"],"security":[{"bearerAuth":[]}],"summary":"Submit a draft for review","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/versions/{id}/approve":{"post":{"tags":["Approval"],"security":[{"bearerAuth":[]}],"summary":"Approve and publish a version","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/versions/{id}/reject":{"post":{"tags":["Approval"],"security":[{"bearerAuth":[]}],"summary":"Reject a draft or in-review version","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["reason"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/versions/{id}/retire":{"post":{"tags":["Approval"],"security":[{"bearerAuth":[]}],"summary":"Retire an approved version now","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/documents":{"post":{"tags":["Write"],"security":[{"bearerAuth":[]}],"summary":"Upload a text/markdown document as a draft","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"tags":["Editor"],"security":[{"bearerAuth":[]}],"summary":"List documents (drafts first)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Documents","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/documents/{id}/approve":{"post":{"tags":["Approval"],"security":[{"bearerAuth":[]}],"summary":"Approve and publish a document","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/insights/unanswered":{"get":{"tags":["Insights"],"security":[{"bearerAuth":[]}],"summary":"Questions assistants asked that approved content did not answer (last 90 days)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Unanswered questions","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/export/prompt":{"get":{"tags":["Sync"],"security":[{"bearerAuth":[]}],"summary":"All approved information as one text block for prompt-based assistants","description":"For assistants that keep business knowledge in their prompt (such as a voice receptionist). Returns text/plain by default or JSON with ?format=json. Cache on the revision (also sent as ETag); send If-None-Match to get 304 when nothing changed.","parameters":[{"schema":{"type":"string","enum":["public","customer","staff","restricted"],"default":"customer","description":"Who may receive this content: public < customer < staff < restricted"},"required":false,"description":"Who may receive this content: public < customer < staff < restricted","name":"audience","in":"query"},{"schema":{"type":"integer","minimum":1000,"maximum":100000,"default":20000},"required":false,"name":"maxChars","in":"query"},{"schema":{"type":"string","enum":["text","json"],"default":"text"},"required":false,"name":"format","in":"query"}],"responses":{"200":{"description":"Knowledge block","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"304":{"description":"Not modified"},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/imports/website":{"post":{"tags":["Imports"],"security":[{"bearerAuth":[]}],"summary":"Import from a public website (crawls up to maxPages pages of the same site)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"maxPages":{"type":"integer","minimum":1,"maximum":100,"default":30}},"required":["url"]}}}},"responses":{"202":{"description":"Import queued","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/imports/text":{"post":{"tags":["Imports"],"security":[{"bearerAuth":[]}],"summary":"Import from pasted text (emails, notes, FAQ lists)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":20,"maxLength":500000}},"required":["label","text"]}}}},"responses":{"202":{"description":"Import queued","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/onboarding/lookup":{"post":{"tags":["Imports"],"security":[{"bearerAuth":[]}],"summary":"Suggest business details from the ABN register and the business's own website","description":"Returns suggestions with their source and fetch time, plus consistency checks. Nothing is stored; the owner confirms what to keep, which creates draft records.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"abn":{"type":"string","maxLength":20},"website":{"type":"string","maxLength":500,"format":"uri"},"email":{"type":"string","maxLength":200,"format":"email"}}}}}},"responses":{"200":{"description":"Suggestions","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/imports":{"get":{"tags":["Imports"],"security":[{"bearerAuth":[]}],"summary":"Recent imports","responses":{"200":{"description":"Imports","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/imports/{id}":{"get":{"tags":["Imports"],"security":[{"bearerAuth":[]}],"summary":"An import and its proposed records","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Import","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/imports/proposals/{id}/accept":{"post":{"tags":["Imports"],"security":[{"bearerAuth":[]}],"summary":"Accept a proposed record as a draft (or straight to live with approve:true), optionally with edits","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean","default":false},"edits":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"summary":{"type":"string","minLength":1,"maxLength":4000},"data":{"type":"object","additionalProperties":{}},"audience":{"type":"string","enum":["public","customer","staff","restricted"],"description":"Who may receive this content: public < customer < staff < restricted"}}}}}}}},"responses":{"200":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/imports/proposals/{id}/reject":{"post":{"tags":["Approval"],"security":[{"bearerAuth":[]}],"summary":"Discard a proposed record","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/coverage":{"get":{"tags":["Imports"],"security":[{"bearerAuth":[]}],"summary":"What the business template expects and what is covered, waiting or missing","responses":{"200":{"description":"Coverage","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/settings":{"get":{"tags":["Imports"],"security":[{"bearerAuth":[]}],"summary":"Business settings, including the template","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/settings/template":{"put":{"tags":["Imports"],"security":[{"bearerAuth":[]}],"summary":"Choose the business template","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"string","maxLength":40}},"required":["template"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me":{"get":{"tags":["Read"],"security":[{"bearerAuth":[]}],"summary":"Who this key belongs to: business, scopes and audience level","responses":{"200":{"description":"Key details","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/editor/records":{"get":{"tags":["Editor"],"security":[{"bearerAuth":[]}],"summary":"All records with their newest version (drafts included) and current approved version","parameters":[{"schema":{"type":"string","enum":["business","location","service_area","product","service","price","policy","faq","procedure","other"],"description":"Record type"},"required":false,"description":"Record type","name":"kind","in":"query"},{"schema":{"type":"string","enum":["draft","in_review","approved","retired","rejected","pending","live","offline"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Records","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/versions/{id}":{"get":{"tags":["Editor"],"security":[{"bearerAuth":[]}],"summary":"Get one version (any status)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Version","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/records/{id}/audit":{"get":{"tags":["Editor"],"security":[{"bearerAuth":[]}],"summary":"Change history for a record: who created, approved, superseded or retired what","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Audit entries","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/documents/{id}":{"get":{"tags":["Editor"],"security":[{"bearerAuth":[]}],"summary":"Get a document with its text","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Document","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/documents/{id}/retire":{"post":{"tags":["Approval"],"security":[{"bearerAuth":[]}],"summary":"Retire an approved document","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Key lacks scope or audience level","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"webhooks":{}}