{"openapi":"3.1.0","info":{"title":"HSD directory API","version":"1.0.0","summary":"Public and partner read API, change feed and exports for HSD directories.","description":"Every response is projected for the caller's audience tier (X-HSD-Audience): anonymous callers read the public tier;\npartner clients read at the tier and agreement the directory gave them. Confidential and private details never appear\nfor a tier that may not see them, in any endpoint, the change feed or exports.\n\nTolerant reader: within v1 fields are only added. Ignore fields you do not know. Deprecated operations send\nDeprecation and Sunset headers at least 12 months before they are removed.\n\nAnonymous callers are limited per IP address (60 requests a minute, 10,000 a day by default); partner clients have\ntheir agreed limit. A 429 response carries Retry-After.\n\nAddress data: verified Australian addresses incorporate or were developed using G-NAF © Geoscape Australia, licensed\nby the Commonwealth of Australia under the Open Geo-coded National Address File (G-NAF) End User Licence Agreement;\nNew Zealand addresses are sourced from the LINZ Data Service and licensed for reuse under CC BY 4.0 (some through\nOverture Maps Foundation). Keep this attribution when you show or pass on addresses (the X-HSD-Attribution header\nand export ATTRIBUTION.txt files carry it). The G-NAF licence does not allow using the addresses to compile lists\nfor sending mail.","license":{"name":"Directory data licence: see each directory's terms","identifier":"LicenseRef-HSD-Directory"}},"servers":[{"url":"https://api.hark.health"}],"tags":[{"name":"Authentication","description":"OAuth 2.0 client credentials"},{"name":"Search"},{"name":"Records"},{"name":"Change feed"},{"name":"Exports"},{"name":"Federation","description":"Publishing to aggregate directories (ADR-008)"},{"name":"Webhooks","description":"Endpoints that receive the change feed as signed POST requests (Standard Webhooks signatures)"},{"name":"Reference and geography"},{"name":"FHIR","description":"Read-only FHIR R4 server per directory (application/fhir+json; the CapabilityStatement at metadata lists the search parameters). Errors are OperationOutcome resources."},{"name":"Meta"}],"paths":{"/oauth/token":{"post":{"summary":"Get an access token (client credentials)","tags":["Authentication"],"security":[],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"grant_type":{"type":"string","const":"client_credentials"},"client_id":{"type":"string","maxLength":100},"client_secret":{"type":"string","maxLength":200},"scope":{"type":"string","maxLength":500}},"required":["grant_type"]}},"application/json":{"schema":{"type":"object","properties":{"grant_type":{"type":"string","const":"client_credentials"},"client_id":{"type":"string","maxLength":100},"client_secret":{"type":"string","maxLength":200},"scope":{"type":"string","maxLength":500}},"required":["grant_type"]}}}},"responses":{"200":{"description":"Token issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Invalid request or scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"401":{"description":"Client authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/v1/d/{dir}/search/services":{"get":{"summary":"Search services","tags":["Search"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":200}},{"name":"near","in":"query","schema":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?$"}},{"name":"locality","in":"query","schema":{"type":"string","maxLength":100}},{"name":"postcode","in":"query","schema":{"type":"string","pattern":"^\\d{4}$"}},{"name":"radiusKm","in":"query","schema":{"type":"number","exclusiveMinimum":0,"maximum":2000}},{"name":"includeCatchment","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"cost","in":"query","schema":{"type":"string"}},{"name":"openNow","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"openOn","in":"query","schema":{"type":"string","enum":["any","weekdays","weekends","mon","tue","wed","thu","fri","sat","sun"]}},{"name":"openFrom","in":"query","schema":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},{"name":"openTo","in":"query","schema":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},{"name":"afterHours","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"publicHolidays","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"delivery","in":"query","schema":{"type":"string"}},{"name":"appointment","in":"query","schema":{"type":"string","enum":["required","not_required"]}},{"name":"referral","in":"query","schema":{"type":"string","enum":["self"]}},{"name":"facility","in":"query","schema":{"type":"string"}},{"name":"language","in":"query","schema":{"type":"string"}},{"name":"targetGroup","in":"query","schema":{"type":"string"}},{"name":"program","in":"query","schema":{"type":"string"}},{"name":"area","in":"query","description":"One area as type:code (lga:24600, phn:PHN201, district:CMH): services located in it, whose catchment reaches it, or that serve the whole country","schema":{"type":"string","pattern":"^[a-z]{2,12}:[A-Za-z0-9_.-]{1,40}$"}},{"name":"sort","in":"query","schema":{"default":"relevance","type":"string","enum":["relevance","distance","name"]}},{"name":"limit","in":"query","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"default":0,"type":"integer","minimum":0,"maximum":10000}},{"name":"spell","in":"query","description":"off: search for the words and place exactly as typed, without spelling correction (D-140)","schema":{"type":"string","enum":["off"]}}],"security":[{},{"partner":["search:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","description":"Result cards, facets and the interpretation of the query","additionalProperties":true}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/autocomplete":{"get":{"summary":"Suggest service types, places and organisations","tags":["Search"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":100}}],"security":[{},{"partner":["search:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/services":{"get":{"summary":"List services (filtered, cursor paged)","tags":["Records"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"updatedSince","in":"query","description":"Only services whose service, location or organisation changed at or after this time","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"area","in":"query","description":"Area IDs (LGA, PHN and so on): services at locations in any of them","schema":{"type":"string"}},{"name":"type","in":"query","description":"Service type codes","schema":{"type":"string"}},{"name":"category","in":"query","description":"Service categories (parent type codes)","schema":{"type":"string"}},{"name":"organisation","in":"query","description":"Organisation public IDs","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"security":[{},{"partner":["graph:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceList"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/services/{publicId}":{"get":{"summary":"Get a service","tags":["Records"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"publicId","in":"path","required":true,"description":"Public ID","schema":{"type":"string"}},{"name":"view","in":"query","description":"brief returns the canonical representation used by the feed and exports","schema":{"type":"string","enum":["brief"]}}],"security":[{},{"partner":["graph:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Service as the public site shows it, with related records expanded. Add view=brief for the service representation.","additionalProperties":true},{"$ref":"#/components/schemas/Service"}]}}}},"301":{"description":"Merged: the Location header names the surviving record"},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Closed or removed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/locations/{publicId}":{"get":{"summary":"Get a location with its services","tags":["Records"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"publicId","in":"path","required":true,"description":"Public ID","schema":{"type":"string"}},{"name":"view","in":"query","description":"brief returns the canonical representation used by the feed and exports","schema":{"type":"string","enum":["brief"]}}],"security":[{},{"partner":["graph:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Location as the public site shows it, with related records expanded. Add view=brief for the location representation.","additionalProperties":true},{"$ref":"#/components/schemas/Location"}]}}}},"301":{"description":"Merged"},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Closed or removed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/organisations/{publicId}":{"get":{"summary":"Get an organisation with its services","tags":["Records"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"publicId","in":"path","required":true,"description":"Public ID","schema":{"type":"string"}},{"name":"view","in":"query","description":"brief returns the canonical representation used by the feed and exports","schema":{"type":"string","enum":["brief"]}}],"security":[{},{"partner":["graph:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Organisation as the public site shows it, with related records expanded. Add view=brief for the organisation representation.","additionalProperties":true},{"$ref":"#/components/schemas/Organisation"}]}}}},"301":{"description":"Merged"},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Closed or removed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/practitioners/{publicId}":{"get":{"summary":"Get a practitioner","description":"Fields the practitioner keeps private from your tier are null. view=page adds the practitioner's roles with the services this directory lists; practitioners whose name you may not see have no page (404).","tags":["Records"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"publicId","in":"path","required":true,"description":"Public ID","schema":{"type":"string"}},{"name":"view","in":"query","schema":{"type":"string","enum":["page"]}}],"security":[{},{"partner":["graph:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Practitioner"},{"type":"object","description":"The practitioner page","additionalProperties":true}]}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/categories":{"get":{"summary":"Service categories with counts","tags":["Search"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"security":[{},{"partner":["search:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}}},"required":["categories"]}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/taxonomy":{"get":{"summary":"The directory's taxonomy","description":"Categories and local types (use a slug as `category` in search), platform types by the directory's labels, and the directory's own programs and target groups. Hidden entries are left out. Public.","tags":["Reference and geography"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"security":[{}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectoryTaxonomy"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/collections":{"get":{"summary":"Collections the caller may see","description":"Curated sets of services the directory names (FR-SRCH-012). Drafts, collections for other audiences and those outside their dates are left out. home=true: only those chosen for the home page.","tags":["Search"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"home","in":"query","schema":{"type":"string","enum":["true"]}}],"security":[{},{"partner":["search:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CollectionSummary"}}},"required":["items"]}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/collections/{slug}":{"get":{"summary":"A collection","description":"Its picked services as result cards at your tier (any you may not see are left out), and its saved search: run `search` with /search/services for the rest.","tags":["Search"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"security":[{},{"partner":["search:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionDetail"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/categories/{code}":{"get":{"summary":"A service category: its types and the places with most services","tags":["Search"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"security":[{},{"partner":["search:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryDetail"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/localities/nearest":{"post":{"summary":"The nearest place to a position (use my location)","description":"The position is read from the body and neither stored nor logged.","tags":["Reference and geography"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NearestLocalityRequest"}}}},"security":[{}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Place"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/roles/{publicId}":{"get":{"summary":"Get a practitioner role","tags":["Records"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"publicId","in":"path","required":true,"description":"Public ID","schema":{"type":"string"}}],"security":[{},{"partner":["graph:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PractitionerRole"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/identifiers/search":{"get":{"summary":"Find records by external identifier","description":"Matches only records you can see, by identifiers your tier can see.","tags":["Records"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"system","in":"query","required":true,"description":"Identifier system URI or HSD type code (abn, hpio ...)","schema":{"type":"string"}},{"name":"value","in":"query","required":true,"schema":{"type":"string"}}],"security":[{},{"partner":["graph:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string"},"publicId":{"type":"string"}},"required":["entityType","publicId"]}}},"required":["items"]}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/changes":{"get":{"summary":"Change feed","description":"Ordered events for this directory as your tier sees it. Consumers deduplicate by (publicId, version, localRevision, eventType); localRevision changes when the directory's own information on a record changes (D-267). Tombstones: closed, deleted, merged (with survivorPublicId) and visibility_reduced (remove the record). Mirrored records carry their origin (ADR-008); aggregator clients see only their harvest scope. A cursor older than 13 months answers 410.","tags":["Change feed"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"since","in":"query","description":"Cursor from a previous page (nextCursor or an item cursor). Omit to start at the oldest retained event.","schema":{"type":"string","maxLength":200}},{"name":"types","in":"query","description":"Entity types, comma separated: organisation, location, service, practitioner, role","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Include each entity's current representation (as the caller sees it now)","schema":{"type":"string","enum":["entity"]}},{"name":"limit","in":"query","schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}],"security":[{},{"partner":["feed:read"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedPage"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Cursor older than the retention period","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/developers":{"get":{"summary":"What the directory offers developers","description":"The directory's REST API base, this document, the token endpoint, the FHIR R4 base with its CapabilityStatement and claimed profiles (AU Base or NZ Base), the change feed and how to ask the directory for partner access (FR-PUB-030). Public; the directory site's /developers page shows it.","tags":["Meta"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"security":[{}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperInfo"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/federation/manifest":{"get":{"summary":"Federation manifest","description":"What an aggregate directory needs to harvest this directory (FR-FED-003): identity, region, jurisdiction packs, the endpoints for the change feed, read API, exports and FHIR $export, the tiers offered, code systems, the contact for data issues and the licence. Public. Aggregator clients are registered by the directory's admins and hold federation:harvest.","tags":["Federation"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"security":[{}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FederationManifest"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/federation/forwarded/proposals":{"post":{"summary":"Forward a correction from an aggregate","description":"An aggregate directory that harvests this directory forwards its curator's correction to one of this directory's records (FR-FED-007). It enters the moderation queue as a change request for the record's stewards (curators for gated fields); the record changes only if they approve it, and the aggregate sees it in the change feed. Text fields only; anything else goes in the message. Aggregator clients only (graph:propose, implied by federation:harvest).","tags":["Federation"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardedProposal"}}}},"security":[{"partner":["graph:propose"]}],"responses":{"201":{"description":"Received","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardedReceipt"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"This directory mirrors the record from elsewhere (mirrored-record)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A field that cannot be proposed, or nothing to change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/federation/forwarded/issues":{"post":{"summary":"Forward a visitor's report from an aggregate","description":"A problem a visitor reported on the aggregate's copy of a listing (FR-FED-007). It becomes a listing issue here, routed to the record's stewards and curators. Reporter details only when the reporter agreed to be contacted. Aggregator clients only.","tags":["Federation"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardedIssue"}}}},"security":[{"partner":["graph:propose"]}],"responses":{"201":{"description":"Received","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardedReceipt"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"This directory mirrors the record from elsewhere (mirrored-record)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/federation/forwarded/{id}":{"get":{"summary":"What became of something forwarded","description":"The status of a correction or report this client forwarded: pending, accepted (published), rejected, withdrawn, resolved or no_action. Only the client that forwarded it can read it.","tags":["Federation"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"partner":["graph:propose"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardedReceipt"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/exports":{"post":{"summary":"Request an export","description":"Runs in the background; poll the export until it succeeds, then download its files.","tags":["Exports"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"security":[{"partner":["export:run"]}],"responses":{"202":{"description":"Accepted","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"summary":"Your recent exports","tags":["Exports"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"security":[{"partner":["export:run"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Export"}}},"required":["items"]}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/exports/{id}":{"get":{"summary":"Export status and download links","tags":["Exports"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"partner":["export:run"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/fhir/metadata":{"get":{"summary":"CapabilityStatement for this directory's FHIR server","tags":["FHIR"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"security":[{},{"partner":["graph:read"]}],"responses":{"200":{"description":"CapabilityStatement","content":{"application/fhir+json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid search (OperationOutcome)","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"404":{"description":"Unknown type, or not found or hidden (the same answer)","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"406":{"description":"Only FHIR JSON is offered","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"429":{"description":"Rate limited","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}}}}},"/v1/d/{dir}/fhir/{type}":{"get":{"summary":"Search a resource type","description":"Search parameters as listed in the CapabilityStatement, matched on the resource the reader receives. _include, _revinclude, _summary=count and _total=accurate are supported.","tags":["FHIR"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["Organization","Location","HealthcareService","Practitioner","PractitionerRole","Endpoint"]}},{"name":"_count","in":"query","schema":{"type":"integer","maximum":100}},{"name":"_page","in":"query","description":"Opaque page token from a next link","schema":{"type":"string"}}],"security":[{},{"partner":["graph:read"]}],"responses":{"200":{"description":"Bundle (searchset) with self and next links","content":{"application/fhir+json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid search (OperationOutcome)","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"404":{"description":"Unknown type, or not found or hidden (the same answer)","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"406":{"description":"Only FHIR JSON is offered","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"429":{"description":"Rate limited","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}}}}},"/v1/d/{dir}/fhir/{type}/{id}":{"get":{"summary":"Read a resource","tags":["FHIR"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["Organization","Location","HealthcareService","Practitioner","PractitionerRole","Endpoint"]}},{"name":"id","in":"path","required":true,"description":"The public ID with - for _, e.g. svc-7K2M9Q4TZ1AB","schema":{"type":"string"}}],"security":[{},{"partner":["graph:read"]}],"responses":{"200":{"description":"The resource, with ETag and Last-Modified","content":{"application/fhir+json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid search (OperationOutcome)","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"404":{"description":"Unknown type, or not found or hidden (the same answer)","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"406":{"description":"Only FHIR JSON is offered","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}},"429":{"description":"Rate limited","content":{"application/fhir+json":{"schema":{"type":"object","description":"OperationOutcome","additionalProperties":true}}}}}}},"/v1/d/{dir}/fhir/$export":{"get":{"summary":"Start a bulk export (FHIR Bulk Data)","tags":["FHIR"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"_type","in":"query","schema":{"type":"string"}},{"name":"_since","in":"query","schema":{"type":"string","format":"date-time"}}],"security":[{"partner":["export:run"]}],"responses":{"202":{"description":"Accepted: poll the URL in Content-Location until it answers 200 with the manifest"},"403":{"description":"Not a partner client, or no export:run scope (OperationOutcome)"}}}},"/v1/exports/{id}/files/{name}":{"get":{"summary":"Download an export file (signed link)","tags":["Exports"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"expires","in":"query","required":true,"schema":{"type":"integer"}},{"name":"sig","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The file (CSV, JSON or FHIR NDJSON)"},"403":{"description":"Link expired or invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"File no longer available","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/webhooks":{"get":{"summary":"Your webhook endpoints","tags":["Webhooks"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"security":[{"partner":["webhooks:manage"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["items"]}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Register a webhook endpoint","description":"The endpoint receives your change feed (the same items and tier as GET /changes) as feed.changes messages of up to 100 items, starting from now. Needs feed:read too. The URL must be https and public; redirects are not followed. The signing secret is returned once.","tags":["Webhooks"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"}}}},"security":[{"partner":["webhooks:manage"]}],"responses":{"201":{"description":"Created","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/webhooks/{id}":{"get":{"summary":"A webhook endpoint","tags":["Webhooks"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"partner":["webhooks:manage"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"summary":"Change, pause or resume a webhook endpoint","tags":["Webhooks"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointUpdate"}}}},"security":[{"partner":["webhooks:manage"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"summary":"Delete a webhook endpoint","tags":["Webhooks"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"partner":["webhooks:manage"]}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/webhooks/{id}/rotate":{"post":{"summary":"Replace the signing secret","description":"For 24 hours deliveries carry a second signature made with the old secret.","tags":["Webhooks"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"partner":["webhooks:manage"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/webhooks/{id}/test":{"post":{"summary":"Send a test ping now","tags":["Webhooks"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"partner":["webhooks:manage"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"delivery":{"$ref":"#/components/schemas/WebhookDelivery"},"durationMs":{"type":"integer"}},"required":["ok","delivery","durationMs"]}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/webhooks/{id}/deliveries":{"get":{"summary":"Delivery log (30 days)","tags":["Webhooks"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","delivered","failed","dead"]}},{"name":"before","in":"query","schema":{"type":"string","format":"date-time"}}],"security":[{"partner":["webhooks:manage"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryPage"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/webhooks/{id}/deliveries/{deliveryId}":{"get":{"summary":"A delivery with its attempts and a redacted payload preview","tags":["Webhooks"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"partner":["webhooks:manage"]}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/d/{dir}/webhooks/{id}/deliveries/{deliveryId}/replay":{"post":{"summary":"Send a delivery again (same webhook-id)","tags":["Webhooks"],"parameters":[{"name":"dir","in":"path","required":true,"description":"Directory slug","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"partner":["webhooks:manage"]}],"responses":{"202":{"description":"Queued","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/reference/{codeSystem}":{"get":{"summary":"Reference codes","tags":["Reference and geography"],"parameters":[{"name":"codeSystem","in":"path","required":true,"schema":{"type":"string"}}],"security":[{}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/geo/localities":{"get":{"summary":"Localities by postcode or name","tags":["Reference and geography"],"parameters":[{"name":"postcode","in":"query","schema":{"type":"string","pattern":"^\\d{4}$"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":100}},{"name":"pack","in":"query","schema":{"type":"string","enum":["au","nz"],"default":"au"}}],"security":[{}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Locality"}}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/geo/areas":{"get":{"summary":"Areas for a locality or point (LGA, PHN and more)","tags":["Reference and geography"],"parameters":[{"name":"locality","in":"query","description":"Locality ID from /v1/geo/localities","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"point","in":"query","description":"lat,lng","schema":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?$"}},{"name":"type","in":"query","description":"Only areas of this type, e.g. lga, phn","schema":{"type":"string","maxLength":40}},{"name":"pack","in":"query","schema":{"default":"au","type":"string","enum":["au","nz"]}}],"security":[{}],"responses":{"200":{"description":"OK","headers":{"X-HSD-Audience":{"description":"Audience tier the response was projected for","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Area"}}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or another directory's client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found or hidden (the same answer, so records cannot be enumerated)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/meta/version":{"get":{"summary":"API version","tags":["Meta"],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/openapi.json":{"get":{"summary":"This document","tags":["Meta"],"security":[],"responses":{"200":{"description":"OpenAPI 3.1"}}}}},"webhooks":{"feed.changes":{"post":{"summary":"Change feed items for your tier","description":"Sent to each endpoint you register. Headers: webhook-id (deduplicate by it; it stays the same on retries and replays), webhook-timestamp (Unix seconds; reject anything older than five minutes) and webhook-signature: v1,<base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{raw body}` keyed by the base64 bytes after `whsec_`>; during a secret rotation several space-separated signatures, any of which may match. Answer 2xx within 10 seconds. Failed deliveries are retried with exponential backoff (about 1 min, 5 min, 25 min, 2 h, 10 h, then daily) for eight attempts; an endpoint failing for three days is switched off. Items are the change feed's: deduplicate by (publicId, version, eventType) and remove records on visibility_reduced.","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookMessage"}}}},"responses":{"200":{"description":"Any 2xx status acknowledges the delivery"}}}}},"components":{"schemas":{"ApiScope":{"type":"string","enum":["search:read","graph:read","feed:read","export:run","restricted_contacts:export","webhooks:manage","federation:harvest","graph:propose"]},"ApiTier":{"type":"string","enum":["public","professional","partner"],"description":"Audience tier the caller reads at (tenancy-and-access §5)."},"Area":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"}},"required":["id","type","code","name"]},"Category":{"type":"object","properties":{"code":{"type":"string"},"display":{"type":"string"},"definition":{"type":["string","null"]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"types":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"display":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","display","count"]}}},"required":["code","display","definition","count","types"],"description":"A service category with its types; counts include only services the caller may see."},"CategoryDetail":{"type":"object","properties":{"code":{"type":"string"},"display":{"type":"string"},"definition":{"type":["string","null"]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"types":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"display":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","display","count"]}},"localities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"state":{"type":["string","null"]},"postcode":{"type":["string","null"]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","state","postcode","count"]}}},"required":["code","display","definition","count","types","localities"]},"CollectionDetail":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"intro":{"type":["string","null"]},"icon":{"type":["string","null"]},"showOnHome":{"type":"boolean"},"showUntil":{"description":"When the collection stops being shown, if it has an end date","type":["string","null"]},"audience":{"type":"string","enum":["public","professional"],"description":"professional: shown only to signed-in health professionals and partners"},"items":{"type":"array","items":{"type":"object","properties":{"note":{"type":["string","null"]},"service":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The service's result card at the reader's tier, as search returns it"}},"required":["note","service"]},"description":"The services picked by hand, in order. A service the reader may not see (closed, out of scope, taken down, unlisted) is left out without a trace."},"search":{"description":"The saved search as /search/services query parameters (comma-separated lists), or null for picked services only","type":["string","null"]},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The same saved search in the public site's search fields (q, where, type[], cost[], openNow, area and so on)"}},"required":["slug","title","intro","icon","showOnHome","showUntil","audience","items","search","query"],"description":"A collection: its picked services resolved for the reader, and its saved search to run with /search/services."},"CollectionSummary":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"intro":{"type":["string","null"]},"icon":{"type":["string","null"]},"showOnHome":{"type":"boolean"},"showUntil":{"description":"When the collection stops being shown, if it has an end date","type":["string","null"]},"audience":{"type":"string","enum":["public","professional"],"description":"professional: shown only to signed-in health professionals and partners"}},"required":["slug","title","intro","icon","showOnHome","showUntil","audience"],"description":"A collection the reader may see now (drafts and those outside their dates are left out)."},"Contact":{"type":"object","properties":{"kind":{"type":"string","description":"phone, mobile, freecall, local_rate, fax, email, website, tty or sms"},"value":{"type":"string"},"label":{"type":["string","null"]},"isPrimary":{"type":"boolean"},"acceptsReferrals":{"type":"boolean"}},"required":["kind","value","label","isPrimary","acceptsReferrals"]},"DeveloperInfo":{"type":"object","properties":{"directory":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"region":{"type":"string","enum":["au","nz"]}},"required":["slug","name","region"]},"api":{"type":"object","properties":{"base":{"type":"string","description":"Base of the directory's REST API: /v1/d/{dir}"},"openapi":{"type":"string","description":"The OpenAPI 3.1 document"},"token":{"type":"string","description":"OAuth 2.0 client credentials token endpoint for partner clients"},"anonymousLimits":{"type":"object","properties":{"perMinute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"perDay":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["perMinute","perDay"],"description":"Requests without credentials, per IP address"}},"required":["base","openapi","token","anonymousLimits"]},"fhir":{"type":"object","properties":{"base":{"type":"string"},"capabilityStatement":{"type":"string"},"fhirVersion":{"type":"string"},"resourceTypes":{"type":"array","items":{"type":"string"}},"profiles":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string"},"url":{"type":"string"},"package":{"type":"string"}},"required":["resourceType","url","package"]}},"bulkExport":{"type":"string","description":"FHIR Bulk Data $export, for partner clients with export:run"}},"required":["base","capabilityStatement","fhirVersion","resourceTypes","profiles","bulkExport"]},"changeFeed":{"type":"object","properties":{"url":{"type":"string"},"scope":{"type":"string"},"webhooks":{"type":"boolean","description":"Partners with webhooks:manage may have changes pushed to them"}},"required":["url","scope","webhooks"]},"manifest":{"description":"The federation manifest, when the directory publishes to aggregates","type":["string","null"]},"scopes":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string"},"description":{"type":"string"}},"required":["scope","description"]}},"access":{"type":"object","properties":{"contactEmail":{"type":["string","null"]},"note":{"type":["string","null"]}},"required":["contactEmail","note"]}},"required":["directory","api","fhir","changeFeed","manifest","scopes","access"],"description":"What a directory offers developers: its REST API, FHIR R4 server, change feed and how to ask for access (FR-PUB-030). Public."},"DirectoryTaxonomy":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyNode"}},"types":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"parentCode":{"type":["string","null"]}},"required":["code","label","parentCode"]},"description":"Platform service types by this directory's labels; hidden types are left out"},"programs":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"}},"required":["code","label"]},"description":"The directory's own programs, coded {directory}:{code}"},"targetGroups":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"mapsTo":{"type":["string","null"]}},"required":["code","label","mapsTo"]},"description":"The directory's own target groups; mapsTo is the platform group each narrows"}},"required":["categories","types","programs","targetGroups"],"description":"A directory's vocabulary for browsing: its categories and local types, type labels, programs and target groups (FR-TAX-002)."},"Endpoint":{"type":"object","properties":{"publicId":{"type":"string"},"connectionType":{"type":"string","description":"secure-messaging, hl7-fhir-rest, direct-email, referral-portal or other"},"name":{"description":"Display name, e.g. Intake referrals","type":["string","null"]},"payloadTypes":{"type":"array","items":{"type":"string"},"description":"Platform payload type codes (e.g. hl7v2-ref-i12) or URIs such as SMD service categories"},"payloadMimeTypes":{"type":"array","items":{"type":"string"}},"vendor":{"description":"Messaging provider code, e.g. healthlink","type":["string","null"]},"address":{"type":"string"},"status":{"type":"string","description":"active, suspended, error, off or test"}},"required":["publicId","connectionType","payloadTypes","address","status"],"description":"An electronic endpoint (FR-FHIR-002). Endpoints are professional-only unless the provider publishes them; no certificates are held (ADR-004)."},"Entity":{"oneOf":[{"$ref":"#/components/schemas/Organisation"},{"$ref":"#/components/schemas/Location"},{"$ref":"#/components/schemas/Service"},{"$ref":"#/components/schemas/Practitioner"},{"$ref":"#/components/schemas/PractitionerRole"}]},"Export":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"format":{"type":"string","enum":["csv","json","fhir_ndjson"]},"tier":{"$ref":"#/components/schemas/ApiTier"},"filters":{"$ref":"#/components/schemas/ExportFilters"},"status":{"type":"string","enum":["queued","running","succeeded","failed","expired"]},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"resourceType":{"type":["string","null"]},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"contentType":{"type":"string"},"url":{"description":"Signed, time-limited download link (null until the export succeeds)","type":["string","null"]}},"required":["name","resourceType","records","bytes","contentType","url"]}},"counts":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},{"type":"null"}]},"error":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"linkExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","format","tier","filters","status","files","counts","error","createdAt","finishedAt","expiresAt","linkExpiresAt"]},"ExportFilters":{"type":"object","properties":{"area":{"description":"Area IDs","maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"category":{"description":"Service categories or type codes","maxItems":50,"type":"array","items":{"type":"string","maxLength":80}},"organisation":{"description":"Organisation public IDs","maxItems":200,"type":"array","items":{"type":"string","maxLength":40}},"updatedSince":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}},"ExportRequest":{"type":"object","properties":{"format":{"type":"string","enum":["csv","json","fhir_ndjson"]},"filters":{"default":{},"$ref":"#/components/schemas/ExportFilters"},"tier":{"$ref":"#/components/schemas/ApiTier"}},"required":["format"]},"FederationManifest":{"type":"object","properties":{"manifestVersion":{"type":"number","const":1},"instanceId":{"type":"string","description":"This HSD instance, as origin.instanceId names it"},"software":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]},"directory":{"type":"object","properties":{"id":{"type":"string","description":"origin.directoryId of records stewarded here"},"slug":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["standard","aggregate"]},"operator":{"type":"string","description":"Who runs the platform"},"region":{"type":"string","enum":["au","nz"]},"jurisdictionPacks":{"type":"array","items":{"type":"string"}},"publicLocales":{"type":"array","items":{"type":"string"}}},"required":["id","slug","name","kind","operator","region","jurisdictionPacks","publicLocales"]},"publishing":{"type":"boolean","description":"Whether the directory registers aggregator clients"},"tiers":{"type":"array","items":{"type":"string","enum":["public","professional"]},"description":"Tiers offered to aggregators; professional only under a written agreement"},"endpoints":{"type":"object","properties":{"api":{"type":"string"},"token":{"type":"string"},"changes":{"type":"string"},"services":{"type":"string"},"exports":{"type":"string"},"fhirBase":{"type":"string"},"fhirExport":{"type":"string"},"openapi":{"type":"string"},"publicSite":{"type":["string","null"]},"listingUrlPattern":{"description":"Public listing URL for a service, with {publicId}; services redirect to their canonical path","type":["string","null"]}},"required":["api","token","changes","services","exports","fhirBase","fhirExport","openapi","publicSite","listingUrlPattern"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes an aggregator client holds"},"codeSystems":{"type":"array","items":{"type":"string"},"description":"Code systems the directory's records use"},"contact":{"type":"object","properties":{"dataIssues":{"type":["string","null"]}},"required":["dataIssues"]},"licence":{"type":["string","null"]},"proposals":{"description":"What forwarded corrections may change (D-376); absent means text fields only","$ref":"#/components/schemas/ProposalCapabilities"},"generatedAt":{"type":"string"}},"required":["manifestVersion","instanceId","software","directory","publishing","tiers","endpoints","scopes","codeSystems","contact","licence","generatedAt"],"description":"What an aggregate needs to harvest this directory (FR-FED-003, product-specs §9.10.2). Public."},"FeedItem":{"type":"object","properties":{"cursor":{"type":"string"},"eventType":{"type":"string","enum":["created","updated","closed","reopened","deleted","merged","visibility_reduced"]},"entityType":{"type":"string","enum":["organisation","location","service","practitioner","role"]},"publicId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"changedFields":{"type":"array","items":{"type":"string"},"description":"Top-level fields of the representation that changed, as the caller sees it"},"survivorPublicId":{"description":"For merged: the record that replaces this one","type":"string"},"localRevision":{"description":"Revision of this directory's own information on the record (D-267): an event can change it without a new version, so deduplicate on (publicId, version, localRevision, eventType)","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"origin":{"$ref":"#/components/schemas/Origin"},"entity":{"description":"With expand=entity: the current representation, or null for tombstones and records no longer visible","anyOf":[{"$ref":"#/components/schemas/Entity"},{"type":"null"}]}},"required":["cursor","eventType","entityType","publicId","version","occurredAt","changedFields"]},"FeedPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FeedItem"}},"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["items","nextCursor","hasMore"]},"ForwardedFrom":{"type":"object","properties":{"directoryName":{"type":"string","minLength":1,"maxLength":200},"directoryId":{"type":"string","minLength":1,"maxLength":300},"instanceId":{"default":"","type":"string","maxLength":300},"correctionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The aggregate's ID for the correction, for its curators."},"url":{"description":"The aggregate's listing of the record, if public.","anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]}},"required":["directoryName","directoryId","correctionId"]},"ForwardedIssue":{"type":"object","properties":{"entityType":{"type":"string","enum":["organisation","location","service"]},"publicId":{"type":"string","minLength":3,"maxLength":40},"category":{"type":"string","enum":["wrong_contact","wrong_address","wrong_hours","closed","eligibility_cost","practitioner","duplicate","other"]},"description":{"type":"string","minLength":5,"maxLength":2000},"reporter":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]}}},{"type":"null"}]},"forwardedFrom":{"$ref":"#/components/schemas/ForwardedFrom"}},"required":["entityType","publicId","category","description","forwardedFrom"],"description":"A problem a visitor reported on an aggregate's copy of a listing; it becomes a listing issue here."},"ForwardedProposal":{"type":"object","properties":{"entityType":{"type":"string","enum":["organisation","location","service"]},"publicId":{"type":"string","minLength":3,"maxLength":40},"changes":{"default":{},"description":"New values for the record's text fields (null clears a field).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"hours":{"description":"The service's whole new opening hours (an HoursSchedule as in Service.hours, in the record's time zone). Only where the manifest's proposals.hours lists the type.","anyOf":[{"type":"object","properties":{"timezone":{"type":"string","minLength":3,"maxLength":64},"periods":{"maxItems":50,"type":"array","items":{}}},"required":["timezone","periods"],"additionalProperties":{}},{"type":"null"}]},"contacts":{"description":"Contacts to add or take away. Only where the manifest's proposals.contacts lists the type.","anyOf":[{"$ref":"#/components/schemas/ProposedContacts"},{"type":"null"}]},"message":{"type":"string","minLength":5,"maxLength":2000},"baseVersion":{"description":"The record's version the aggregate saw.","anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"forwardedFrom":{"$ref":"#/components/schemas/ForwardedFrom"}},"required":["entityType","publicId","message","forwardedFrom"],"description":"A correction an aggregate's curator proposes; it enters this directory's moderation queue like any change."},"ForwardedReceipt":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["proposal","issue"]},"status":{"type":"string","enum":["pending","accepted","rejected","withdrawn","resolved","no_action"],"description":"pending until decided; accepted (published) or resolved means the change is or will be in the change feed."},"reference":{"description":"This directory's reference (an issue's reference, or the change request's ID).","type":["string","null"]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"reason":{"type":["string","null"]}},"required":["id","kind","status","reference","decidedAt","reason"]},"HarvestScope":{"type":"object","properties":{"areaIds":{"default":[],"description":"Only services in these areas; empty for all","maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"categories":{"default":[],"description":"Only services of these categories or types; empty for all","maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"entityTypes":{"default":[],"description":"Only these record types; empty for all","maxItems":5,"type":"array","items":{"type":"string","enum":["organisation","location","service","practitioner","role"]}}},"description":"The subset of a directory an aggregator client may harvest (FR-FED-003). It only ever narrows the client's tier."},"Identifier":{"type":"object","properties":{"type":{"type":"string","description":"HSD identifier type code, e.g. abn, hpio"},"system":{"description":"FHIR identifier system URI","type":["string","null"]},"value":{"type":"string"}},"required":["type","system","value"]},"LocalInfo":{"type":"object","properties":{"directory":{"type":"string","description":"Name of the directory this information comes from"},"note":{"type":["string","null"]},"description":{"description":"The directory's own description, shown in place of the provider's on its pages","type":["string","null"]},"eligibilityNote":{"type":["string","null"]},"intakeInstructions":{"description":"How to refer or get in through this directory's pathways","type":["string","null"]},"programs":{"type":"array","items":{"type":"string"},"description":"This directory's program codes tagged on the record here"},"localTypes":{"type":"array","items":{"type":"string"},"description":"Slugs of this directory's local types tagged on the record here"},"featured":{"type":"boolean"},"shared":{"description":"Aggregate directories: members' shared public information, each attributed to its member","type":"array","items":{"$ref":"#/components/schemas/SharedLocalInfo"}}},"required":["directory","note","description","eligibilityNote","intakeInstructions","programs","localTypes","featured"],"description":"This directory's own information on a shared record (local overlay, FR-TEN-006, D-262), as the caller may see it. It never changes the provider's values in the other fields; fields the directory hides are null there."},"Locality":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"postcode":{"type":"string"},"stateOrRegion":{"type":"string"}},"required":["id","name","postcode","stateOrRegion"]},"Location":{"type":"object","properties":{"entityType":{"type":"string","const":"location"},"publicId":{"type":"string","pattern":"^loc_[0-9A-Z]{12}$","description":"Public ID (loc_...)"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Increases with every published change"},"status":{"type":"string","enum":["active","temporarily_closed","closed","deleted","draft"]},"lastModifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastConfirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"origin":{"anyOf":[{"$ref":"#/components/schemas/Origin"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string"},"organisation":{"type":"string","description":"Organisation public ID"},"addressWithheld":{"type":"boolean","description":"True when the street address and point are withheld from this caller"},"address":{"anyOf":[{"type":"object","properties":{"line1":{"type":["string","null"]},"line2":{"type":["string","null"]},"locality":{"type":["string","null"]},"state":{"type":["string","null"]},"postcode":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["line1","line2","locality","state","postcode","country"]},{"type":"null"}]},"point":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}},"required":["lat","lng"]},{"type":"null"}]},"area":{"type":"string","description":"General area, shown when the address is withheld"},"timezone":{"type":"string"},"facilities":{"type":"array","items":{"type":"string"}},"notes":{"type":["string","null"]},"parkingNotes":{"type":["string","null"]},"transportNotes":{"type":["string","null"]},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoint"}},"services":{"type":"array","items":{"type":"string"},"description":"Public IDs of services at this location the caller can see"},"local":{"anyOf":[{"$ref":"#/components/schemas/LocalInfo"},{"type":"null"}]},"localRevision":{"description":"Revision of this directory's overlay on the record (D-267); null without one","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["entityType","publicId","version","status","lastModifiedAt","lastConfirmedAt","origin","name","kind","organisation","addressWithheld","address","point","area","timezone","facilities","notes","parkingNotes","transportNotes","contacts","identifiers","endpoints","services"]},"NearestLocalityRequest":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"description":"A position to find the nearest place to. It is not stored or logged."},"OAuthError":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_client","unsupported_grant_type","invalid_scope"]},"error_description":{"type":"string"}},"required":["error","error_description"],"description":"RFC 6749 §5.2 error response (the token endpoint does not use problem details)."},"Organisation":{"type":"object","properties":{"entityType":{"type":"string","const":"organisation"},"publicId":{"type":"string","pattern":"^org_[0-9A-Z]{12}$","description":"Public ID (org_...)"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Increases with every published change"},"status":{"type":"string","enum":["active","temporarily_closed","closed","deleted","draft"]},"lastModifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastConfirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"origin":{"anyOf":[{"$ref":"#/components/schemas/Origin"},{"type":"null"}]},"name":{"type":"string"},"legalName":{"type":"string"},"tradingNames":{"type":"array","items":{"type":"string"}},"typeCode":{"type":"string"},"description":{"type":["string","null"]},"website":{"type":["string","null"]},"verified":{"type":"boolean"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoint"}},"locations":{"type":"array","items":{"type":"string"},"description":"Public IDs of this organisation's locations the caller can see in this directory"},"local":{"anyOf":[{"$ref":"#/components/schemas/LocalInfo"},{"type":"null"}]},"localRevision":{"description":"Revision of this directory's overlay on the record (D-267); null without one","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["entityType","publicId","version","status","lastModifiedAt","lastConfirmedAt","origin","name","legalName","tradingNames","typeCode","description","website","verified","contacts","identifiers","endpoints","locations"]},"Origin":{"type":"object","properties":{"instanceId":{"type":"string"},"directoryId":{"type":"string"},"publicId":{"type":"string"},"url":{"type":["string","null"]},"region":{"type":"string"},"chain":{"type":"array","items":{"type":"string"}}},"required":["instanceId","directoryId","publicId","url","region","chain"],"description":"Origin of a mirrored record (ADR-008). Absent for records stewarded in this instance."},"PartnerAgreement":{"type":"object","properties":{"withheldAddresses":{"description":"The agreement allows street addresses of address-withheld locations.","type":"boolean"},"unlistedLocations":{"description":"The agreement allows unlisted locations and their services.","type":"boolean"}}},"Place":{"type":"object","properties":{"name":{"type":"string"},"postcode":{"type":"string"},"state":{"type":"string"}},"required":["name","postcode","state"]},"Practitioner":{"type":"object","properties":{"entityType":{"type":"string","const":"practitioner"},"publicId":{"type":"string","pattern":"^prac_[0-9A-Z]{12}$","description":"Public ID (prac_...)"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Increases with every published change"},"status":{"type":"string","enum":["active","temporarily_closed","closed","deleted","draft"]},"lastModifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastConfirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"origin":{"anyOf":[{"$ref":"#/components/schemas/Origin"},{"type":"null"}]},"displayName":{"type":"string"},"nameWithheld":{"type":"boolean"},"name":{"anyOf":[{"type":"object","properties":{"title":{"type":["string","null"]},"given":{"type":"string"},"middle":{"type":["string","null"]},"family":{"type":"string"},"preferred":{"type":["string","null"]}},"required":["title","given","middle","family","preferred"]},{"type":"null"}]},"gender":{"type":["string","null"]},"languages":{"anyOf":[{"type":"array","items":{}},{"type":"null"}]},"qualifications":{"anyOf":[{"type":"array","items":{}},{"type":"null"}]},"registrations":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"body":{"type":"string"},"number":{"type":"string"},"status":{"type":["string","null"]}},"required":["body","number","status"]}},{"type":"null"}]},"specialityCodes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"specialInterests":{"type":["string","null"]},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}},"roles":{"type":"array","items":{"type":"string"}}},"required":["entityType","publicId","version","status","lastModifiedAt","lastConfirmedAt","origin","displayName","nameWithheld","name","gender","languages","qualifications","registrations","specialityCodes","specialInterests","identifiers","roles"],"description":"Fields the practitioner's privacy settings hide from the caller are null (FR-PRIV)."},"PractitionerRole":{"type":"object","properties":{"entityType":{"type":"string","const":"role"},"publicId":{"type":"string","pattern":"^role_[0-9A-Z]{12}$","description":"Public ID (role_...)"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Increases with every published change"},"status":{"type":"string","enum":["active","temporarily_closed","closed","deleted","draft"]},"lastModifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastConfirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"origin":{"anyOf":[{"$ref":"#/components/schemas/Origin"},{"type":"null"}]},"practitioner":{"type":"string"},"service":{"type":"string"},"location":{"type":"string"},"organisation":{"type":"string"},"title":{"type":["string","null"]},"providerNumber":{"type":["string","null"]},"acceptingNewClients":{"type":["boolean","null"]},"hours":{"anyOf":[{},{"type":"null"}]},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoint"}},"local":{"anyOf":[{"$ref":"#/components/schemas/LocalInfo"},{"type":"null"}]},"localRevision":{"description":"Revision of this directory's overlay on the record (D-267); null without one","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["entityType","publicId","version","status","lastModifiedAt","lastConfirmedAt","origin","practitioner","service","location","organisation","title","providerNumber","acceptingNewClients","hours","contacts","identifiers","endpoints"]},"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"],"description":"RFC 7807 problem details"},"ProposalCapabilities":{"type":"object","properties":{"fields":{"type":"object","properties":{"organisation":{"type":"array","items":{"type":"string"}},"location":{"type":"array","items":{"type":"string"}},"service":{"type":"array","items":{"type":"string"}}},"required":["organisation","location","service"],"description":"Text fields that can be proposed, by record type"},"contacts":{"type":"array","items":{"type":"string","enum":["organisation","location","service"]},"description":"Record types whose contacts can be proposed"},"hours":{"type":"array","items":{"type":"string","enum":["service"]},"description":"Record types whose opening hours can be proposed"}},"required":["fields","contacts","hours"]},"ProposedContacts":{"type":"object","properties":{"add":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["phone","mobile","freecall","local_rate","fax","email","website","tty","sms"]},"value":{"type":"string","minLength":1,"maxLength":254},"label":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"required":["kind","value"]}},"remove":{"default":[],"description":"Values of contacts to take away; only contacts the client's tier can see are matched.","maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":254}}},"description":"Contacts to add and contacts to take away (D-376). Added contacts are visible at the forwarding client's tier; contacts its tier cannot see are never touched."},"Service":{"type":"object","properties":{"entityType":{"type":"string","const":"service"},"publicId":{"type":"string","pattern":"^svc_[0-9A-Z]{12}$","description":"Public ID (svc_...)"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Increases with every published change"},"status":{"type":"string","enum":["active","temporarily_closed","closed","deleted","draft"]},"lastModifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastConfirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"origin":{"anyOf":[{"$ref":"#/components/schemas/Origin"},{"type":"null"}]},"name":{"type":"string"},"typeCode":{"type":"string"},"secondaryTypeCodes":{"type":"array","items":{"type":"string"}},"programCodes":{"type":"array","items":{"type":"string"}},"organisation":{"type":"string"},"location":{"type":"string"},"description":{"type":["string","null"]},"eligibility":{"anyOf":[{},{"type":"null"}]},"cost":{"type":"object","properties":{"model":{"type":"string"},"notes":{"type":["string","null"]}},"required":["model","notes"]},"access":{"type":"object","properties":{"appointment":{"type":"string"},"walkIn":{"type":"boolean"},"selfReferral":{"type":"boolean"},"referralRequiredFrom":{"type":"array","items":{"type":"string"}},"intakeModes":{"type":"array","items":{"type":"string"}},"notes":{"type":["string","null"]}},"required":["appointment","walkIn","selfReferral","referralRequiredFrom","intakeModes","notes"]},"deliveryModes":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"string"}},"targetGroups":{"type":"array","items":{"type":"string"}},"hours":{"description":"Opening hours schedule (data-model HoursSchedule)"},"catchment":{"anyOf":[{},{"type":"null"}]},"alerts":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"start":{"type":"string"},"end":{"type":["string","null"]}},"required":["type","message","start","end"]}},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"referralPathways":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"preference":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"detail":{"type":["string","null"]}},"required":["method","preference","detail"]}},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoint"}},"roles":{"type":"array","items":{"type":"string"},"description":"Public IDs of practitioner roles at this service"},"local":{"anyOf":[{"$ref":"#/components/schemas/LocalInfo"},{"type":"null"}]},"localRevision":{"description":"Revision of this directory's overlay on the record (D-267); null without one","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["entityType","publicId","version","status","lastModifiedAt","lastConfirmedAt","origin","name","typeCode","secondaryTypeCodes","programCodes","organisation","location","description","eligibility","cost","access","deliveryModes","languages","targetGroups","hours","catchment","alerts","contacts","referralPathways","identifiers","endpoints","roles"]},"ServiceList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Service"}},"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["items","nextCursor","hasMore"]},"SharedLocalInfo":{"type":"object","properties":{"directory":{"type":"string","description":"Name of the member directory the information comes from"},"note":{"type":["string","null"]},"intakeInstructions":{"type":["string","null"]},"programs":{"type":"array","items":{"type":"string"},"description":"The member directory's program codes ({slug}:{code}) tagged on the record"}},"required":["directory","note","intakeInstructions","programs"],"description":"A member directory's own public information on a record, shown in an aggregate directory where the member opted in (FR-FED-002, D-271), attributed to the member."},"TaxonomyNode":{"type":"object","properties":{"slug":{"type":"string","description":"Use as `category` in search"},"kind":{"type":"string","enum":["category","local_type"]},"label":{"type":"string"},"types":{"type":"array","items":{"type":"string"},"description":"Platform service type codes this entry covers"},"children":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyNode"}}},"required":["slug","kind","label","types","children"],"description":"A directory category (up to three levels) or a local type that refines one platform type."},"TokenResponse":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","const":"Bearer"},"expires_in":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"scope":{"type":"string"},"tier":{"$ref":"#/components/schemas/ApiTier"}},"required":["access_token","token_type","expires_in","scope","tier"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"messageId":{"type":"string","description":"The webhook-id header: the same across retries and replays"},"eventType":{"type":"string"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","delivered","failed","dead"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextAttemptAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastStatusCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastError":{"type":["string","null"]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"replayOf":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"test":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"payloadPreview":{"description":"The start of the payload (details view)","type":"string"},"attemptLog":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"statusCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"error":{"type":["string","null"]},"responsePreview":{"description":"The start of the response body, with anything that looks like a secret or an email address masked","type":["string","null"]}},"required":["attempt","startedAt","durationMs","statusCode","error","responsePreview"]}}},"required":["id","messageId","eventType","itemCount","status","attempts","nextAttemptAt","lastStatusCode","lastError","deliveredAt","replayOf","test","createdAt"]},"WebhookDeliveryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"nextBefore":{"type":["string","null"]}},"required":["items","nextBefore"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"description":{"type":["string","null"]},"tier":{"$ref":"#/components/schemas/ApiTier"},"events":{"type":"array","items":{"type":"string"}},"entityTypes":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","paused","disabled"]},"disabledReason":{"type":["string","null"]},"secretHint":{"type":"string","description":"Last characters of the signing secret"},"previousSecretExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}],"description":"After a rotation, deliveries carry a second signature with the old secret until then"},"lastSuccessAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastFailureAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"notifyEmail":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","url","description","tier","events","entityTypes","status","disabledReason","secretHint","previousSecretExpiresAt","lastSuccessAt","lastFailureAt","consecutiveFailures","notifyEmail","createdAt"]},"WebhookEndpointCreate":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri","description":"https URL that receives the events. Redirects are not followed."},"description":{"type":"string","maxLength":200},"events":{"minItems":1,"maxItems":11,"type":"array","items":{"type":"string","enum":["record.created","record.updated","record.closed","record.reopened","record.deleted","record.merged","record.visibility_reduced","issue.created","issue.resolved","import.completed","changeRequest.decided"]}},"entityTypes":{"description":"Entity types for record events; omit for all","maxItems":5,"type":"array","items":{"type":"string","enum":["organisation","location","service","practitioner","role"]}},"notifyEmail":{"description":"Who to tell if the endpoint is switched off after failing","type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["url","events"]},"WebhookEndpointCreated":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"type":"string","description":"whsec_... signing secret, shown once"}},"required":["endpoint","secret"]},"WebhookEndpointUpdate":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri","description":"https URL that receives the events. Redirects are not followed."},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"events":{"minItems":1,"maxItems":11,"type":"array","items":{"type":"string","enum":["record.created","record.updated","record.closed","record.reopened","record.deleted","record.merged","record.visibility_reduced","issue.created","issue.resolved","import.completed","changeRequest.decided"]}},"entityTypes":{"maxItems":5,"type":"array","items":{"type":"string","enum":["organisation","location","service","practitioner","role"]}},"notifyEmail":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"status":{"description":"Pause or resume; active also switches a disabled endpoint back on","type":"string","enum":["active","paused"]}}},"WebhookMessage":{"type":"object","properties":{"id":{"type":"string","description":"Message ID (also the webhook-id header)"},"type":{"type":"string","description":"feed.changes, a workflow event name, or webhook.test"},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"directory":{"type":"string","description":"Directory slug"},"audience":{"description":"The tier the items were projected for","$ref":"#/components/schemas/ApiTier"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"feed.changes: { items: FeedItem[] } (no entity; fetch details with your credentials). Workflow events: their own fields."}},"required":["id","type","timestamp","directory","audience","data"]}},"securitySchemes":{"partner":{"type":"oauth2","description":"Partner clients issued by a directory (tenancy-and-access §7: one client per directory).","flows":{"clientCredentials":{"tokenUrl":"https://api.hark.health/oauth/token","scopes":{"search:read":"Search services and autocomplete","graph:read":"Read organisations, locations, services, practitioners and roles, including filtered lists","feed:read":"Read the change feed","export:run":"Request and download exports","restricted_contacts:export":"Include restricted contacts marked for health professionals in exports (partner tier, directories with restricted contacts on)","webhooks:manage":"Register webhook endpoints that receive the change feed (needs feed:read too)","federation:harvest":"Harvest this directory into an aggregate directory: the change feed, read API and bulk exports, within the client's harvest scope (aggregator clients only)","graph:propose":"Forward corrections and issue reports on this directory's records to its moderation queue (aggregator clients only, implied by federation:harvest)"}}}}}}}