{"openapi":"3.1.0","info":{"title":"Xplor-H2O API","version":"1.0.0","description":"One versioned API for the Xplor-H2O website and phone apps. Breaking changes go to /api/v2; v1 stays for at least 12 months."},"servers":[{"url":"https://h2o.3.21.25.218.nip.io/api/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Session token from sign-in (phone apps)."},"cookie":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"Website session cookie."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"}}}}}}},"paths":{"/me":{"get":{"operationId":"getMe","summary":"The signed-in person: roles, the pages and places they can act as.","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean"},"twoFactorEnabled":{"type":"boolean"}},"required":["id","name","email","emailVerified","twoFactorEnabled"],"additionalProperties":false},"roles":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"requiresTwoFactor":{"type":"boolean"}},"required":["code","name","kind","status","requiresTwoFactor"],"additionalProperties":false}},"actingOptions":{"type":"array","items":{"type":"object","properties":{"entityId":{"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)$"},"entityKind":{"type":"string","enum":["page","location"]},"name":{"type":"string"},"slug":{"type":"string"},"pageKind":{"anyOf":[{"type":"string","enum":["personal","provider","club","organization"]},{"type":"null"}]},"providerType":{"type":["string","null"]},"positionCode":{"type":"string"},"positionName":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["entityId","entityKind","name","slug","pageKind","providerType","positionCode","positionName","permissions"],"additionalProperties":false}},"twoFactorRequired":{"type":"boolean"},"switchedBy":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"expiresAt":{"type":"string"}},"required":["name","expiresAt"],"additionalProperties":false},{"type":"null"}]}},"required":["user","roles","actingOptions","twoFactorRequired","switchedBy"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/roles":{"get":{"operationId":"listRoleOptions","summary":"Roles a person can hold, with their status for each.","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string"},"requiresApproval":{"type":"boolean"},"pageProviderType":{"type":["string","null"]},"myStatus":{"type":["string","null"]}},"required":["code","name","description","kind","requiresApproval","pageProviderType","myStatus"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"applyForRole","summary":"Apply for a role (Captain, Trainer, Club Manager, ...). Roles that need approval wait for Host Admin.","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"type":"string"},"status":{"type":"string"}},"required":["role","status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"type":"string","maxLength":40},"about":{"type":"string","minLength":20,"maxLength":4000},"credentials":{"type":"string","maxLength":4000}},"required":["role","about"]}}}}}},"/pages":{"post":{"operationId":"createPage","summary":"Create a provider page, club or organization. Needs the matching active role; starts as a draft.","tags":["Pages"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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":["personal","provider","club","organization"]},"providerType":{"type":["string","null"]},"slug":{"type":"string"},"name":{"type":"string"},"tagline":{"type":["string","null"]},"description":{"type":["string","null"]},"contact":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"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,}$"},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":300,"format":"uri"},"vhf":{"type":"string","maxLength":20}},"additionalProperties":false},"serviceAreaText":{"type":["string","null"]},"status":{"type":"string","enum":["draft","pending","active","suspended","archived"]},"visibility":{"type":"string","enum":["public","members","private"]},"verified":{"type":"boolean"},"logo":{"anyOf":[{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false},{"type":"null"}]},"cover":{"anyOf":[{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false},{"type":"null"}]},"gallery":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"linkedPages":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"providerType":{"type":["string","null"]}},"required":["slug","name","kind","providerType"],"additionalProperties":false}},"rating":{"type":"object","properties":{"average":{"type":["number","null"]},"count":{"type":"number"}},"required":["average","count"],"additionalProperties":false},"following":{"type":"boolean"},"followers":{"type":"number"},"myPermissions":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","slug","name","tagline","description","contact","serviceAreaText","status","visibility","verified","logo","cover","gallery","linkedPages","rating","following","followers","myPermissions"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["provider","club","organization"]},"providerType":{"type":"string","maxLength":40},"name":{"type":"string","minLength":2,"maxLength":120},"tagline":{"type":"string","maxLength":160},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{1,78}[a-z0-9])$"}},"required":["kind","name"]}}}}}},"/pages/{ref}":{"get":{"operationId":"getPage","summary":"A page by its web name. Drafts and private pages only for their staff.","tags":["Pages"],"security":[{},{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","maxLength":80}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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":["personal","provider","club","organization"]},"providerType":{"type":["string","null"]},"slug":{"type":"string"},"name":{"type":"string"},"tagline":{"type":["string","null"]},"description":{"type":["string","null"]},"contact":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"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,}$"},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":300,"format":"uri"},"vhf":{"type":"string","maxLength":20}},"additionalProperties":false},"serviceAreaText":{"type":["string","null"]},"status":{"type":"string","enum":["draft","pending","active","suspended","archived"]},"visibility":{"type":"string","enum":["public","members","private"]},"verified":{"type":"boolean"},"logo":{"anyOf":[{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false},{"type":"null"}]},"cover":{"anyOf":[{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false},{"type":"null"}]},"gallery":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"linkedPages":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"providerType":{"type":["string","null"]}},"required":["slug","name","kind","providerType"],"additionalProperties":false}},"rating":{"type":"object","properties":{"average":{"type":["number","null"]},"count":{"type":"number"}},"required":["average","count"],"additionalProperties":false},"following":{"type":"boolean"},"followers":{"type":"number"},"myPermissions":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","slug","name","tagline","description","contact","serviceAreaText","status","visibility","verified","logo","cover","gallery","linkedPages","rating","following","followers","myPermissions"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updatePage","summary":"Edit a page's details.","description":"Needs page.edit on the page.","tags":["Pages"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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":["personal","provider","club","organization"]},"providerType":{"type":["string","null"]},"slug":{"type":"string"},"name":{"type":"string"},"tagline":{"type":["string","null"]},"description":{"type":["string","null"]},"contact":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"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,}$"},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":300,"format":"uri"},"vhf":{"type":"string","maxLength":20}},"additionalProperties":false},"serviceAreaText":{"type":["string","null"]},"status":{"type":"string","enum":["draft","pending","active","suspended","archived"]},"visibility":{"type":"string","enum":["public","members","private"]},"verified":{"type":"boolean"},"logo":{"anyOf":[{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false},{"type":"null"}]},"cover":{"anyOf":[{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false},{"type":"null"}]},"gallery":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"linkedPages":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"providerType":{"type":["string","null"]}},"required":["slug","name","kind","providerType"],"additionalProperties":false}},"rating":{"type":"object","properties":{"average":{"type":["number","null"]},"count":{"type":"number"}},"required":["average","count"],"additionalProperties":false},"following":{"type":"boolean"},"followers":{"type":"number"},"myPermissions":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","slug","name","tagline","description","contact","serviceAreaText","status","visibility","verified","logo","cover","gallery","linkedPages","rating","following","followers","myPermissions"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"tagline":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"contact":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"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,}$"},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":300,"format":"uri"},"vhf":{"type":"string","maxLength":20}}},"serviceAreaText":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"homePoint":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"logoMediaId":{"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"}]},"coverMediaId":{"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"}]},"visibility":{"type":"string","enum":["public","members","private"]}}}}}}}},"/pages/{ref}/submit":{"post":{"operationId":"submitPage","summary":"Send a draft page to Host Admin for review.","description":"Needs page.publish.","tags":["Pages"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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":["personal","provider","club","organization"]},"providerType":{"type":["string","null"]},"slug":{"type":"string"},"name":{"type":"string"},"tagline":{"type":["string","null"]},"description":{"type":["string","null"]},"contact":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"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,}$"},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":300,"format":"uri"},"vhf":{"type":"string","maxLength":20}},"additionalProperties":false},"serviceAreaText":{"type":["string","null"]},"status":{"type":"string","enum":["draft","pending","active","suspended","archived"]},"visibility":{"type":"string","enum":["public","members","private"]},"verified":{"type":"boolean"},"logo":{"anyOf":[{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false},{"type":"null"}]},"cover":{"anyOf":[{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false},{"type":"null"}]},"gallery":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"linkedPages":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"providerType":{"type":["string","null"]}},"required":["slug","name","kind","providerType"],"additionalProperties":false}},"rating":{"type":"object","properties":{"average":{"type":["number","null"]},"count":{"type":"number"}},"required":["average","count"],"additionalProperties":false},"following":{"type":"boolean"},"followers":{"type":"number"},"myPermissions":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","slug","name","tagline","description","contact","serviceAreaText","status","visibility","verified","logo","cover","gallery","linkedPages","rating","following","followers","myPermissions"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{}}}}}}},"/pages/{ref}/staff":{"get":{"operationId":"listStaff","summary":"People who hold positions on a page or location.","description":"Needs page.view or location.view.","tags":["Pages"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"position":{"type":"string"},"positionName":{"type":"string"},"status":{"type":"string"}},"required":["id","name","email","position","positionName","status"],"additionalProperties":false}},"positions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false}}},"required":["items","positions"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"inviteStaff","summary":"Invite someone by email to a position on a page or location.","description":"Needs page.staff or location.staff. Each person uses their own account.","tags":["Pages"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"position":{"type":"string"},"positionName":{"type":"string"},"status":{"type":"string"}},"required":["id","name","email","position","positionName","status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","maxLength":200,"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,}$"},"position":{"type":"string","maxLength":60}},"required":["email","position"]}}}}}},"/pages/{ref}/staff/{memberId}":{"delete":{"operationId":"removeStaff","summary":"Remove a position. The last manager can't be removed.","tags":["Pages"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"memberId","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations/{token}/accept":{"post":{"operationId":"acceptInvitation","summary":"Accept a staff invitation sent to your email.","tags":["Pages"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":20,"maxLength":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entityId":{"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":{"type":"string"},"slug":{"type":"string"},"kind":{"type":"string"}},"required":["entityId","name","slug","kind"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{}}}}}}},"/location-types":{"get":{"operationId":"listLocationTypes","summary":"Kinds of place.","tags":["Locations"],"security":[{},{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/locations":{"get":{"operationId":"searchLocations","summary":"Search published places by text, type, distance (near + radiusKm) or map area (bbox = west,south,east,north).","tags":["Locations"],"security":[{},{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"type","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"near","in":"query","required":false,"schema":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?$"}},{"name":"radiusKm","in":"query","required":false,"schema":{"default":25,"type":"number","minimum":0.1,"maximum":500}},{"name":"bbox","in":"query","required":false,"schema":{"type":"string","pattern":"^(-?\\d+(\\.\\d+)?,){3}-?\\d+(\\.\\d+)?$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false},"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},"city":{"type":["string","null"]},"claimed":{"type":"boolean"},"distanceKm":{"type":["number","null"]},"visibility":{"type":"string","enum":["pending","published","hidden"]}},"required":["id","slug","name","type","point","city","claimed","distanceKm","visibility"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createLocation","summary":"Add a place. Member-added places wait for Host review before they are public.","tags":["Locations"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false},"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},"city":{"type":["string","null"]},"claimed":{"type":"boolean"},"distanceKm":{"type":["number","null"]},"visibility":{"type":"string","enum":["pending","published","hidden"]},"description":{"type":["string","null"]},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"region":{"type":"string","maxLength":100},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","maxLength":2}},"additionalProperties":false},"waterPoint":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},{"type":"null"}]},"hours":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"amenities":{"type":"array","items":{"type":"string"}},"prices":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"contact":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"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,}$"},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":300,"format":"uri"},"vhf":{"type":"string","maxLength":20}},"additionalProperties":false},"menu":{"type":["string","null"]},"gallery":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"accessByWater":{"anyOf":[{"type":"object","properties":{"version":{"type":"number"},"verifiedOn":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"approachPath":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},{"type":"null"}]},"notice":{"type":"string"},"arrivalPhotos":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}}},"required":["version","verifiedOn","data","approachPath","notice","arrivalPhotos"],"additionalProperties":false},{"type":"null"}]},"managers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"string"}},"required":["name","position"],"additionalProperties":false}},"myPermissions":{"type":"array","items":{"type":"string"}},"myOpenClaim":{"type":"boolean"},"rating":{"type":"object","properties":{"average":{"type":["number","null"]},"count":{"type":"number"}},"required":["average","count"],"additionalProperties":false},"following":{"type":"boolean"},"followers":{"type":"number"},"saved":{"type":"boolean"},"pendingAccessProposals":{"type":"number"}},"required":["id","slug","name","type","point","city","claimed","distanceKm","visibility","description","address","waterPoint","hours","amenities","prices","contact","menu","gallery","accessByWater","managers","myPermissions","myOpenClaim","rating","following","followers","saved","pendingAccessProposals"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":160},"type":{"type":"string","maxLength":40},"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"waterPoint":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"region":{"type":"string","maxLength":100},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","maxLength":2}}},"description":{"type":"string","maxLength":8000}},"required":["name","type","point"]}}}}}},"/locations/{ref}":{"get":{"operationId":"getLocation","summary":"A place, with its approved Access-by-Water information.","tags":["Locations"],"security":[{},{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","maxLength":80}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false},"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},"city":{"type":["string","null"]},"claimed":{"type":"boolean"},"distanceKm":{"type":["number","null"]},"visibility":{"type":"string","enum":["pending","published","hidden"]},"description":{"type":["string","null"]},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"region":{"type":"string","maxLength":100},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","maxLength":2}},"additionalProperties":false},"waterPoint":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},{"type":"null"}]},"hours":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"amenities":{"type":"array","items":{"type":"string"}},"prices":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"contact":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"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,}$"},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":300,"format":"uri"},"vhf":{"type":"string","maxLength":20}},"additionalProperties":false},"menu":{"type":["string","null"]},"gallery":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"accessByWater":{"anyOf":[{"type":"object","properties":{"version":{"type":"number"},"verifiedOn":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"approachPath":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},{"type":"null"}]},"notice":{"type":"string"},"arrivalPhotos":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}}},"required":["version","verifiedOn","data","approachPath","notice","arrivalPhotos"],"additionalProperties":false},{"type":"null"}]},"managers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"string"}},"required":["name","position"],"additionalProperties":false}},"myPermissions":{"type":"array","items":{"type":"string"}},"myOpenClaim":{"type":"boolean"},"rating":{"type":"object","properties":{"average":{"type":["number","null"]},"count":{"type":"number"}},"required":["average","count"],"additionalProperties":false},"following":{"type":"boolean"},"followers":{"type":"number"},"saved":{"type":"boolean"},"pendingAccessProposals":{"type":"number"}},"required":["id","slug","name","type","point","city","claimed","distanceKm","visibility","description","address","waterPoint","hours","amenities","prices","contact","menu","gallery","accessByWater","managers","myPermissions","myOpenClaim","rating","following","followers","saved","pendingAccessProposals"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateLocation","summary":"Edit a place's business details (hours, prices, amenities, contact).","description":"Location managers (location.edit) or Host Admin: Locations. Access-by-Water is separate and Host-approved.","tags":["Locations"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false},"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},"city":{"type":["string","null"]},"claimed":{"type":"boolean"},"distanceKm":{"type":["number","null"]},"visibility":{"type":"string","enum":["pending","published","hidden"]},"description":{"type":["string","null"]},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"region":{"type":"string","maxLength":100},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","maxLength":2}},"additionalProperties":false},"waterPoint":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},{"type":"null"}]},"hours":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"amenities":{"type":"array","items":{"type":"string"}},"prices":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"contact":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"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,}$"},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":300,"format":"uri"},"vhf":{"type":"string","maxLength":20}},"additionalProperties":false},"menu":{"type":["string","null"]},"gallery":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"accessByWater":{"anyOf":[{"type":"object","properties":{"version":{"type":"number"},"verifiedOn":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"approachPath":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},{"type":"null"}]},"notice":{"type":"string"},"arrivalPhotos":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}}},"required":["version","verifiedOn","data","approachPath","notice","arrivalPhotos"],"additionalProperties":false},{"type":"null"}]},"managers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"string"}},"required":["name","position"],"additionalProperties":false}},"myPermissions":{"type":"array","items":{"type":"string"}},"myOpenClaim":{"type":"boolean"},"rating":{"type":"object","properties":{"average":{"type":["number","null"]},"count":{"type":"number"}},"required":["average","count"],"additionalProperties":false},"following":{"type":"boolean"},"followers":{"type":"number"},"saved":{"type":"boolean"},"pendingAccessProposals":{"type":"number"}},"required":["id","slug","name","type","point","city","claimed","distanceKm","visibility","description","address","waterPoint","hours","amenities","prices","contact","menu","gallery","accessByWater","managers","myPermissions","myOpenClaim","rating","following","followers","saved","pendingAccessProposals"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":160},"description":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"menu":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"region":{"type":"string","maxLength":100},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","maxLength":2}}},"hours":{"type":"object","propertyNames":{"type":"string","maxLength":20},"additionalProperties":{"type":"string","maxLength":60}},"amenities":{"maxItems":40,"type":"array","items":{"type":"string","maxLength":40}},"prices":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":60}},"contact":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"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,}$"},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":300,"format":"uri"},"vhf":{"type":"string","maxLength":20}}},"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"waterPoint":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]}}}}}}}},"/locations/{ref}/claims":{"post":{"operationId":"claimLocation","summary":"Claim a place you run. Host Admin checks the evidence; approval makes you its manager.","tags":["Locations"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"relationship":{"type":"string","enum":["owner","manager","employee","agent","other"]},"businessName":{"type":"string","maxLength":160},"evidence":{"type":"string","minLength":10,"maxLength":4000},"evidenceMediaIds":{"default":[],"maxItems":10,"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)$"}}},"required":["relationship","evidence"]}}}}}},"/media":{"post":{"operationId":"createUpload","summary":"Start an upload: returns where to PUT the file. Then call /media/{id}/complete.","description":"Images (JPEG, PNG, WebP, HEIC) up to 15 MB; PDF evidence up to 15 MB. Uploads to object storage when configured.","tags":["Media"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"media":{"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)$"},"status":{"type":"string"},"moderation":{"type":"string"},"mime":{"type":"string"},"bytes":{"type":"number"},"url":{"type":["string","null"]},"thumbUrl":{"type":["string","null"]}},"required":["id","status","moderation","mime","bytes","url","thumbUrl"],"additionalProperties":false},"upload":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string","const":"PUT"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"string"}},"required":["url","method","headers","expiresAt"],"additionalProperties":false}},"required":["media","upload"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contextKind":{"type":"string","enum":["page","location","claim","profile","listing"]},"contextId":{"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)$"},"purpose":{"default":"gallery","type":"string","enum":["gallery","logo","cover","avatar","evidence","arrival"]},"mime":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/heic","application/pdf"]},"bytes":{"type":"integer","minimum":1,"maximum":15728640},"caption":{"type":"string","maxLength":300}},"required":["contextKind","mime","bytes"]}}}}}},"/media/{id}/complete":{"post":{"operationId":"completeUpload","summary":"Finish an upload: the file is checked, measured and thumbnailed.","tags":["Media"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"},"moderation":{"type":"string"},"mime":{"type":"string"},"bytes":{"type":"number"},"url":{"type":["string","null"]},"thumbUrl":{"type":["string","null"]}},"required":["id","status","moderation","mime","bytes","url","thumbUrl"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{}}}}}}},"/admin/role-applications":{"get":{"operationId":"adminListRoleApplications","summary":"Role applications waiting for a decision.","description":"Host Admin with two-factor sign-in on. Sub-role: Providers.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","active","rejected"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"userId":{"type":"string"},"userName":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"roleName":{"type":"string"},"status":{"type":"string"},"application":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","userId","userName","email","role","roleName","status","application","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/role-applications/{id}/decide":{"post":{"operationId":"adminDecideRoleApplication","summary":"Approve or reject a role application.","description":"Host Admin with two-factor sign-in on.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"approve":{"type":"boolean"},"note":{"type":"string","maxLength":1000}},"required":["approve"]}}}}}},"/admin/pages":{"get":{"operationId":"adminListPages","summary":"Pages by status (default: waiting for review).","description":"Host Admin with two-factor sign-in on. Sub-role: Providers.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","active","suspended","draft"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"slug":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"providerType":{"type":["string","null"]},"owner":{"type":"string"},"status":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","kind","providerType","owner","status","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/pages/{id}/decide":{"post":{"operationId":"adminDecidePage","summary":"Approve (publish) or send back a page; or suspend an active one.","description":"Host Admin with two-factor sign-in on.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","status","verified"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["approve","reject","suspend","reinstate","verify"]},"note":{"type":"string","maxLength":1000}},"required":["action"]}}}}}},"/admin/claims":{"get":{"operationId":"adminListClaims","summary":"Location claims.","description":"Host Admin with two-factor sign-in on. Sub-role: Locations.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","approved","rejected"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"locationId":{"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)$"},"locationName":{"type":"string"},"locationSlug":{"type":"string"},"userName":{"type":"string"},"email":{"type":"string"},"relationship":{"type":"string"},"businessName":{"type":["string","null"]},"evidence":{"type":"string"},"evidenceCount":{"type":"number"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","locationId","locationName","locationSlug","userName","email","relationship","businessName","evidence","evidenceCount","status","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/claims/{id}/decide":{"post":{"operationId":"adminDecideClaim","summary":"Approve a claim (the claimant becomes Location Manager) or reject it.","description":"Host Admin with two-factor sign-in on.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"approve":{"type":"boolean"},"note":{"type":"string","maxLength":1000}},"required":["approve"]}}}}}},"/admin/locations":{"get":{"operationId":"adminListLocations","summary":"Places by visibility (default: waiting for review).","description":"Host Admin with two-factor sign-in on. Sub-role: Locations.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"visibility","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","published","hidden"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false},"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},"city":{"type":["string","null"]},"claimed":{"type":"boolean"},"distanceKm":{"type":["number","null"]},"visibility":{"type":"string","enum":["pending","published","hidden"]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","slug","name","type","point","city","claimed","distanceKm","visibility","createdBy","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/locations/{id}/decide":{"post":{"operationId":"adminDecideLocation","summary":"Publish or hide a place.","description":"Host Admin with two-factor sign-in on.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"visibility":{"type":"string"}},"required":["id","visibility"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["publish","hide"]},"note":{"type":"string","maxLength":1000}},"required":["action"]}}}}}},"/admin/media":{"get":{"operationId":"adminListMedia","summary":"Uploaded media waiting for moderation.","description":"Host Admin with two-factor sign-in on. Sub-role: Content Moderator.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"moderation","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","approved","rejected"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"status":{"type":"string"},"moderation":{"type":"string"},"mime":{"type":"string"},"bytes":{"type":"number"},"url":{"type":["string","null"]},"thumbUrl":{"type":["string","null"]},"contextKind":{"type":"string"},"contextId":{"type":["string","null"]},"owner":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","status","moderation","mime","bytes","url","thumbUrl","contextKind","contextId","owner","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/media/{id}/decide":{"post":{"operationId":"adminDecideMedia","summary":"Approve or reject uploaded media.","description":"Host Admin with two-factor sign-in on.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"},"moderation":{"type":"string"},"mime":{"type":"string"},"bytes":{"type":"number"},"url":{"type":["string","null"]},"thumbUrl":{"type":["string","null"]}},"required":["id","status","moderation","mime","bytes","url","thumbUrl"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"approve":{"type":"boolean"},"note":{"type":"string","maxLength":1000}},"required":["approve"]}}}}}},"/admin/users":{"get":{"operationId":"adminListUsers","summary":"Find accounts by name or email.","description":"Host Admin with two-factor sign-in on. Sub-role: Users or Support.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"emailVerified":{"type":"boolean"},"twoFactorEnabled":{"type":"boolean"},"roles":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"}},"required":["id","name","email","status","emailVerified","twoFactorEnabled","roles","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/users/{id}/roles":{"post":{"operationId":"adminSetUserRole","summary":"Grant or remove a role.","description":"Host Admin with two-factor sign-in on. Host Admin roles: Super Admin only. Other roles: Users or Providers.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}}},"required":["roles"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"type":"string","maxLength":40},"grant":{"type":"boolean"},"note":{"type":"string","maxLength":1000}},"required":["role","grant"]}}}}}},"/admin/users/{id}/status":{"post":{"operationId":"adminSetUserStatus","summary":"Suspend or reinstate an account (signs them out everywhere).","description":"Host Admin with two-factor sign-in on. Sub-role: Users.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string"}},"required":["status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["active","suspended"]},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["status","note"]}}}}}},"/admin/audit":{"get":{"operationId":"adminAudit","summary":"The audit log, newest first.","description":"Host Admin with two-factor sign-in on. Sub-role: Super, Users, Risk or Support.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"actor","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"action","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"targetId","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"switchId","in":"query","required":false,"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":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"at":{"type":"string"},"actor":{"type":["string","null"]},"actorName":{"type":["string","null"]},"actingAs":{"type":["string","null"]},"action":{"type":"string"},"targetKind":{"type":["string","null"]},"targetId":{"type":["string","null"]},"ip":{"type":["string","null"]},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"switchedBy":{"type":["string","null"]},"switchedByName":{"type":["string","null"]},"switchId":{"type":["string","null"]}},"required":["id","at","actor","actorName","actingAs","action","targetKind","targetId","ip","detail","switchedBy","switchedByName","switchId"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reviews":{"get":{"operationId":"listReviews","summary":"Published reviews of one place or page (plus your own, whatever its state), with the rating summary.","tags":["Reviews"],"security":[{},{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"targetId","in":"query","required":true,"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":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"targetKind":{"type":"string","enum":["location","page"]},"targetId":{"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)$"},"rating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":["string","null"]},"body":{"type":"string"},"visitedOn":{"type":["string","null"]},"status":{"type":"string","enum":["pending","published","rejected","removed"]},"badge":{"type":["string","null"]},"author":{"type":"string"},"mine":{"type":"boolean"},"response":{"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"by":{"type":["string","null"]},"at":{"type":"string"}},"required":["body","by","at"],"additionalProperties":false},{"type":"null"}]},"moderationNote":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","targetKind","targetId","rating","title","body","visitedOn","status","badge","author","mine","response","moderationNote","createdAt","updatedAt"],"additionalProperties":false}},"summary":{"type":"object","properties":{"average":{"type":["number","null"]},"count":{"type":"number"}},"required":["average","count"],"additionalProperties":false},"nextCursor":{"type":["string","null"]}},"required":["items","summary","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createReview","summary":"Review a place or a provider/club page. One live review per person per target; it waits for Host moderation before it is public.","description":"People who hold a position on the target can't review it. Daily limit: setting reviews.daily_limit.","tags":["Reviews"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"targetKind":{"type":"string","enum":["location","page"]},"targetId":{"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)$"},"rating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":["string","null"]},"body":{"type":"string"},"visitedOn":{"type":["string","null"]},"status":{"type":"string","enum":["pending","published","rejected","removed"]},"badge":{"type":["string","null"]},"author":{"type":"string"},"mine":{"type":"boolean"},"response":{"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"by":{"type":["string","null"]},"at":{"type":"string"}},"required":["body","by","at"],"additionalProperties":false},{"type":"null"}]},"moderationNote":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","targetKind","targetId","rating","title","body","visitedOn","status","badge","author","mine","response","moderationNote","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"targetKind":{"type":"string","enum":["location","page"]},"targetId":{"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)$"},"rating":{"type":"integer","minimum":1,"maximum":5},"title":{"type":"string","maxLength":120},"body":{"type":"string","minLength":10,"maxLength":4000},"visitedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["targetKind","targetId","rating","body"]}}}}}},"/reviews/{id}":{"patch":{"operationId":"updateReview","summary":"Edit your review. It goes back to moderation.","tags":["Reviews"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"targetKind":{"type":"string","enum":["location","page"]},"targetId":{"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)$"},"rating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":["string","null"]},"body":{"type":"string"},"visitedOn":{"type":["string","null"]},"status":{"type":"string","enum":["pending","published","rejected","removed"]},"badge":{"type":["string","null"]},"author":{"type":"string"},"mine":{"type":"boolean"},"response":{"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"by":{"type":["string","null"]},"at":{"type":"string"}},"required":["body","by","at"],"additionalProperties":false},{"type":"null"}]},"moderationNote":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","targetKind","targetId","rating","title","body","visitedOn","status","badge","author","mine","response","moderationNote","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rating":{"type":"integer","minimum":1,"maximum":5},"title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"body":{"type":"string","minLength":10,"maxLength":4000},"visitedOn":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}}}}}}},"delete":{"operationId":"withdrawReview","summary":"Withdraw your own review. Nobody else can delete a review; report it instead.","tags":["Reviews"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reviews/{id}/response":{"post":{"operationId":"respondToReview","summary":"Reply publicly to a review of a place or page you run (null removes the reply).","description":"Needs location.respond on the place, or page.edit on the page.","tags":["Reviews"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"targetKind":{"type":"string","enum":["location","page"]},"targetId":{"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)$"},"rating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":["string","null"]},"body":{"type":"string"},"visitedOn":{"type":["string","null"]},"status":{"type":"string","enum":["pending","published","rejected","removed"]},"badge":{"type":["string","null"]},"author":{"type":"string"},"mine":{"type":"boolean"},"response":{"anyOf":[{"type":"object","properties":{"body":{"type":"string"},"by":{"type":["string","null"]},"at":{"type":"string"}},"required":["body","by","at"],"additionalProperties":false},{"type":"null"}]},"moderationNote":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","targetKind","targetId","rating","title","body","visitedOn","status","badge","author","mine","response","moderationNote","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"anyOf":[{"type":"string","minLength":2,"maxLength":2000},{"type":"null"}]}},"required":["body"]}}}}}},"/reports":{"post":{"operationId":"createReport","summary":"Report a review, listing or photo to the moderators.","tags":["Reviews"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"targetKind":{"type":"string","enum":["review","listing","media"]},"targetId":{"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)$"},"reason":{"type":"string","enum":["spam","offensive","false_information","conflict_of_interest","unsafe","prohibited_item","scam","other"]},"detail":{"type":"string","maxLength":2000}},"required":["targetKind","targetId","reason"]}}}}}},"/me/follows":{"get":{"operationId":"listFollows","summary":"Places and pages you follow (a bookmark list; there is no activity feed).","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"entityId":{"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":["page","location"]},"name":{"type":"string"},"url":{"type":"string"},"subtitle":{"type":["string","null"]},"since":{"type":"string"}},"required":["entityId","kind","name","url","subtitle","since"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"followEntity","summary":"Follow a place or page.","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entityId":{"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)$"},"following":{"type":"boolean"},"followers":{"type":"number"}},"required":["entityId","following","followers"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entityId":{"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)$"}},"required":["entityId"]}}}}}},"/me/follows/{entityId}":{"delete":{"operationId":"unfollowEntity","summary":"Stop following a place or page.","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"entityId","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entityId":{"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)$"},"following":{"type":"boolean"},"followers":{"type":"number"}},"required":["entityId","following","followers"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/saved":{"get":{"operationId":"listSaved","summary":"Your saved places and listings (the phone apps keep these for offline use).","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"targetKind":{"type":"string","enum":["location","listing"]},"targetId":{"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":{"type":"string"},"url":{"type":"string"},"subtitle":{"type":["string","null"]},"state":{"type":["string","null"]},"point":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},{"type":"null"}]},"savedAt":{"type":"string"}},"required":["targetKind","targetId","name","url","subtitle","state","point","savedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"saveItem","summary":"Save a place or listing.","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"targetKind":{"type":"string","enum":["location","listing"]},"targetId":{"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)$"},"saved":{"type":"boolean"}},"required":["targetKind","targetId","saved"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"targetKind":{"type":"string","enum":["location","listing"]},"targetId":{"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)$"}},"required":["targetKind","targetId"]}}}}}},"/me/saved/{targetKind}/{targetId}":{"delete":{"operationId":"unsaveItem","summary":"Remove a saved place or listing.","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"targetKind","in":"path","required":true,"schema":{"type":"string","enum":["location","listing"]}},{"name":"targetId","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"targetKind":{"type":"string","enum":["location","listing"]},"targetId":{"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)$"},"saved":{"type":"boolean"}},"required":["targetKind","targetId","saved"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/reviews":{"get":{"operationId":"listMyReviews","summary":"Reviews you've written and where each one stands.","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"targetKind":{"type":"string"},"targetName":{"type":"string"},"targetUrl":{"type":"string"},"rating":{"type":"number"},"title":{"type":["string","null"]},"status":{"type":"string"},"moderationNote":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","targetKind","targetName","targetUrl","rating","title","status","moderationNote","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/listing-categories":{"get":{"operationId":"listListingCategories","summary":"Marketplace categories.","tags":["Marketplace"],"security":[{},{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/listings":{"get":{"operationId":"searchListings","summary":"Browse live listings by text, category, distance (near + radiusKm) or map area (bbox). Newest first.","tags":["Marketplace"],"security":[{},{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"category","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"near","in":"query","required":false,"schema":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?$"}},{"name":"radiusKm","in":"query","required":false,"schema":{"default":80,"type":"number","minimum":1,"maximum":500}},{"name":"bbox","in":"query","required":false,"schema":{"type":"string","pattern":"^(-?\\d+(\\.\\d+)?,){3}-?\\d+(\\.\\d+)?$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"title":{"type":"string"},"priceCents":{"type":["number","null"]},"currency":{"type":"string"},"condition":{"type":["string","null"]},"city":{"type":["string","null"]},"region":{"type":["string","null"]},"category":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false},"point":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},{"type":"null"}]},"distanceKm":{"type":["number","null"]},"thumbUrl":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","title","priceCents","currency","condition","city","region","category","point","distanceKm","thumbUrl","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createListing","summary":"List a personal item for sale (free). It waits for Host review; add photos with /media (contextKind listing).","description":"Give contactPhone and/or contactEmail (at least one): buyers contact you directly. The price is the seller's asking price, for display only. Settings: marketplace.listing_days, marketplace.max_open_listings.","tags":["Marketplace"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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":["personal","commercial"]},"category":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false},"title":{"type":"string"},"description":{"type":"string"},"priceCents":{"type":["number","null"]},"currency":{"type":"string"},"condition":{"type":["string","null"]},"city":{"type":["string","null"]},"region":{"type":["string","null"]},"point":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["pending","active","sold","withdrawn","expired","rejected","removed"]},"expiresAt":{"type":"string"},"soldAt":{"type":["string","null"]},"seller":{"type":"object","properties":{"name":{"type":"string"},"memberSince":{"type":"string"}},"required":["name","memberSince"],"additionalProperties":false},"photos":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"mine":{"type":"boolean"},"saved":{"type":"boolean"},"moderationNote":{"type":["string","null"]},"purchase":{"type":"string","const":"contact_seller"},"hasContact":{"type":"boolean"},"contact":{"anyOf":[{"type":"object","properties":{"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["phone","email"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","category","title","description","priceCents","currency","condition","city","region","point","status","expiresAt","soldAt","seller","photos","mine","saved","moderationNote","purchase","hasContact","contact","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"category":{"type":"string","maxLength":40},"title":{"type":"string","minLength":3,"maxLength":120},"description":{"type":"string","minLength":10,"maxLength":8000},"priceCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"condition":{"type":"string","enum":["new","like_new","good","fair","for_parts"]},"city":{"type":"string","maxLength":100},"region":{"type":"string","maxLength":100},"point":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"contactPhone":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","minLength":7,"maxLength":30,"pattern":"^\\+?[0-9 ().\\-]+$"}]},{"type":"null"}]},"contactEmail":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":254,"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"}]}},"required":["category","title","description"]}}}}}},"/listings/{ref}":{"get":{"operationId":"getListing","summary":"One listing. Pending, sold and withdrawn listings only for the seller and Host Admin.","description":"The seller's contact details (contact) are included for signed-in members only.","tags":["Marketplace"],"security":[{},{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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":["personal","commercial"]},"category":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false},"title":{"type":"string"},"description":{"type":"string"},"priceCents":{"type":["number","null"]},"currency":{"type":"string"},"condition":{"type":["string","null"]},"city":{"type":["string","null"]},"region":{"type":["string","null"]},"point":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["pending","active","sold","withdrawn","expired","rejected","removed"]},"expiresAt":{"type":"string"},"soldAt":{"type":["string","null"]},"seller":{"type":"object","properties":{"name":{"type":"string"},"memberSince":{"type":"string"}},"required":["name","memberSince"],"additionalProperties":false},"photos":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"mine":{"type":"boolean"},"saved":{"type":"boolean"},"moderationNote":{"type":["string","null"]},"purchase":{"type":"string","const":"contact_seller"},"hasContact":{"type":"boolean"},"contact":{"anyOf":[{"type":"object","properties":{"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["phone","email"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","category","title","description","priceCents","currency","condition","city","region","point","status","expiresAt","soldAt","seller","photos","mine","saved","moderationNote","purchase","hasContact","contact","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateListing","summary":"Edit your listing. Changing the title, description or category sends it back to review.","description":"Contact details can be changed but not both removed.","tags":["Marketplace"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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":["personal","commercial"]},"category":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false},"title":{"type":"string"},"description":{"type":"string"},"priceCents":{"type":["number","null"]},"currency":{"type":"string"},"condition":{"type":["string","null"]},"city":{"type":["string","null"]},"region":{"type":["string","null"]},"point":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["pending","active","sold","withdrawn","expired","rejected","removed"]},"expiresAt":{"type":"string"},"soldAt":{"type":["string","null"]},"seller":{"type":"object","properties":{"name":{"type":"string"},"memberSince":{"type":"string"}},"required":["name","memberSince"],"additionalProperties":false},"photos":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"mine":{"type":"boolean"},"saved":{"type":"boolean"},"moderationNote":{"type":["string","null"]},"purchase":{"type":"string","const":"contact_seller"},"hasContact":{"type":"boolean"},"contact":{"anyOf":[{"type":"object","properties":{"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["phone","email"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","category","title","description","priceCents","currency","condition","city","region","point","status","expiresAt","soldAt","seller","photos","mine","saved","moderationNote","purchase","hasContact","contact","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"category":{"type":"string","maxLength":40},"title":{"type":"string","minLength":3,"maxLength":120},"description":{"type":"string","minLength":10,"maxLength":8000},"priceCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"condition":{"type":"string","enum":["new","like_new","good","fair","for_parts"]},"city":{"type":"string","maxLength":100},"region":{"type":"string","maxLength":100},"point":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"contactPhone":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","minLength":7,"maxLength":30,"pattern":"^\\+?[0-9 ().\\-]+$"}]},{"type":"null"}]},"contactEmail":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":254,"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"}]}}}}}}}},"/listings/{ref}/status":{"post":{"operationId":"setListingStatus","summary":"Mark your listing sold, withdraw it, or relist it (renews the expiry).","tags":["Marketplace"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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":["personal","commercial"]},"category":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false},"title":{"type":"string"},"description":{"type":"string"},"priceCents":{"type":["number","null"]},"currency":{"type":"string"},"condition":{"type":["string","null"]},"city":{"type":["string","null"]},"region":{"type":["string","null"]},"point":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["pending","active","sold","withdrawn","expired","rejected","removed"]},"expiresAt":{"type":"string"},"soldAt":{"type":["string","null"]},"seller":{"type":"object","properties":{"name":{"type":"string"},"memberSince":{"type":"string"}},"required":["name","memberSince"],"additionalProperties":false},"photos":{"type":"array","items":{"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)$"},"pending":{"type":"boolean"},"url":{"type":"string"},"thumbUrl":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"caption":{"type":["string","null"]}},"required":["id","url","thumbUrl","width","height","caption"],"additionalProperties":false}},"mine":{"type":"boolean"},"saved":{"type":"boolean"},"moderationNote":{"type":["string","null"]},"purchase":{"type":"string","const":"contact_seller"},"hasContact":{"type":"boolean"},"contact":{"anyOf":[{"type":"object","properties":{"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["phone","email"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","category","title","description","priceCents","currency","condition","city","region","point","status","expiresAt","soldAt","seller","photos","mine","saved","moderationNote","purchase","hasContact","contact","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["sold","withdrawn","active"]}},"required":["status"]}}}}}},"/me/listings":{"get":{"operationId":"listMyListings","summary":"Your marketplace listings.","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"title":{"type":"string"},"status":{"type":"string","enum":["pending","active","sold","withdrawn","expired","rejected","removed"]},"priceCents":{"type":["number","null"]},"currency":{"type":"string"},"moderationNote":{"type":["string","null"]},"hasContact":{"type":"boolean"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","title","status","priceCents","currency","moderationNote","hasContact","expiresAt","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/locations/{ref}/access":{"get":{"operationId":"listAccessVersions","summary":"Approach-information versions for a place: the published one, proposals and history.","description":"The place's managers and Host Admin: Locations.","tags":["Locations"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"version":{"type":"number"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"approachPath":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},{"type":"null"}]},"status":{"type":"string","enum":["proposed","approved","rejected","superseded"]},"verifiedOn":{"type":["string","null"]},"proposedBy":{"type":"string"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"note":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","version","data","approachPath","status","verifiedOn","proposedBy","decidedBy","decidedAt","note","createdAt"],"additionalProperties":false}},"canPublish":{"type":"boolean"}},"required":["items","canPublish"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"proposeAccess","summary":"Propose new approach information (managers), or publish it directly (Host Admin: Locations, publish=true).","description":"Nothing a manager sends is public until Host Admin approves it. Every published version carries the not-for-navigation notice.","tags":["Locations"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"ref","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"version":{"type":"number"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"approachPath":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},{"type":"null"}]},"status":{"type":"string","enum":["proposed","approved","rejected","superseded"]},"verifiedOn":{"type":["string","null"]},"proposedBy":{"type":"string"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"note":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","version","data","approachPath","status","verifiedOn","proposedBy","decidedBy","decidedAt","note","createdAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"approach":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"waterway":{"type":"string","maxLength":200},"channel":{"type":"string","maxLength":500},"markers":{"type":"string","maxLength":1000},"dockLayout":{"type":"string","maxLength":1000},"reportedDepthFt":{"type":"number","minimum":0,"maximum":200},"bridgeClearanceFt":{"type":"number","minimum":0,"maximum":300},"noWake":{"type":"string","maxLength":500},"instructions":{"type":"string","maxLength":2000},"hazards":{"type":"string","maxLength":2000}}},"approachPath":{"anyOf":[{"maxItems":200,"type":"array","items":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]}},{"type":"null"}]},"note":{"type":"string","maxLength":1000},"publish":{"type":"boolean"},"verifiedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["data"]}}}}}},"/search":{"get":{"operationId":"search","summary":"Search everything at once: places, provider pages (captains, charters, scuba, rentals, ...), clubs and marketplace items, grouped by kind.","tags":["Search"],"security":[{},{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":100}},{"name":"near","in":"query","required":false,"schema":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?$"}},{"name":"perGroup","in":"query","required":false,"schema":{"default":6,"type":"integer","minimum":1,"maximum":20}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":["string","null"]},"url":{"type":"string"},"point":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},{"type":"null"}]}},"required":["kind","id","title","subtitle","url","point"],"additionalProperties":false}},"moreUrl":{"type":["string","null"]}},"required":["key","label","items","moreUrl"],"additionalProperties":false}},"total":{"type":"number"},"training":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false}},"required":["query","groups","total","training"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/geocode":{"get":{"operationId":"geocode","summary":"Address search (MapTiler Geocoding, called server-side). Returns 503 not_configured when no key is set.","description":"Cached for a day; 20 searches a minute per person or IP.","tags":["Search"],"security":[{},{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":120}},{"name":"near","in":"query","required":false,"schema":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?$"}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"point":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},"bbox":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}]},"kind":{"type":["string","null"]}},"required":["label","point","bbox","kind"],"additionalProperties":false}},"cached":{"type":"boolean"}},"required":["items","cached"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/contributions":{"get":{"operationId":"adminListContributions","summary":"Reviews by state (default: waiting).","description":"Host Admin with two-factor sign-in on. Sub-role: Content Moderator.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"default":"review","type":"string","enum":["review"]}},{"name":"status","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","published","rejected"]}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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":["review"]},"rating":{"type":["number","null"]},"title":{"type":["string","null"]},"body":{"type":"string"},"author":{"type":"string"},"authorId":{"type":"string"},"targetName":{"type":"string"},"targetUrl":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","kind","rating","title","body","author","authorId","targetName","targetUrl","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/contributions/{id}/decide":{"post":{"operationId":"adminDecideContribution","summary":"Publish, reject, or take down a review.","description":"Host Admin with two-factor sign-in on.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"default":"review","type":"string","enum":["review"]},"action":{"type":"string","enum":["approve","reject","remove"]},"note":{"type":"string","maxLength":1000}},"required":["action"]}}}}}},"/admin/reports":{"get":{"operationId":"adminListReports","summary":"Reported content.","description":"Host Admin with two-factor sign-in on. Sub-role: Content Moderator (reviews, photos) or Marketplace (listings).","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","actioned","dismissed"]}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"targetKind":{"type":"string"},"targetId":{"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)$"},"reason":{"type":"string"},"detail":{"type":["string","null"]},"status":{"type":"string"},"reporter":{"type":"string"},"preview":{"type":["string","null"]},"url":{"type":["string","null"]},"openReports":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","targetKind","targetId","reason","detail","status","reporter","preview","url","openReports","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/reports/{id}/decide":{"post":{"operationId":"adminDecideReport","summary":"Take the reported content down (closes every open report on it) or dismiss the report.","description":"Host Admin with two-factor sign-in on.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["remove","dismiss"]},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["action","note"]}}}}}},"/admin/listings":{"get":{"operationId":"adminListListings","summary":"Marketplace listings by state (default: waiting for review).","description":"Host Admin with two-factor sign-in on. Sub-role: Marketplace.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","active","rejected","removed"]}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":["number","null"]},"currency":{"type":"string"},"city":{"type":["string","null"]},"seller":{"type":"string"},"sellerEmail":{"type":"string"},"contactPhone":{"type":["string","null"]},"contactEmail":{"type":["string","null"]},"status":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","description","category","priceCents","currency","city","seller","sellerEmail","contactPhone","contactEmail","status","updatedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/listings/{id}/decide":{"post":{"operationId":"adminDecideListing","summary":"Approve, reject or take down a listing.","description":"Host Admin with two-factor sign-in on.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["approve","reject","remove"]},"note":{"type":"string","maxLength":1000}},"required":["action"]}}}}}},"/admin/access":{"get":{"operationId":"adminListAccessProposals","summary":"Approach-information proposals (default: waiting).","description":"Host Admin with two-factor sign-in on. Sub-role: Locations.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"proposed","type":"string","enum":["proposed","approved","rejected"]}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"version":{"type":"number"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"approachPath":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},{"type":"null"}]},"status":{"type":"string","enum":["proposed","approved","rejected","superseded"]},"verifiedOn":{"type":["string","null"]},"proposedBy":{"type":"string"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"note":{"type":["string","null"]},"createdAt":{"type":"string"},"location":{"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)$"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false}},"required":["id","version","data","approachPath","status","verifiedOn","proposedBy","decidedBy","decidedAt","note","createdAt","location"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/access/{id}/decide":{"post":{"operationId":"adminDecideAccess","summary":"Approve (publish, with the date it was checked) or reject an approach-information proposal.","description":"Host Admin with two-factor sign-in on.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"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":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","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)$"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"approve":{"type":"boolean"},"verifiedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"note":{"type":"string","maxLength":1000}},"required":["approve"]}}}}}},"/admin/settings":{"get":{"operationId":"adminListSettings","summary":"Platform settings, with placeholders for decisions the owner hasn't made yet.","description":"Host Admin with two-factor sign-in on. Any Host Admin may read; Super Admin edits.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{},"label":{"type":["string","null"]},"placeholder":{"type":"boolean"},"updatedAt":{"type":"string"}},"required":["key","value","label","placeholder","updatedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/settings/{key}":{"patch":{"operationId":"adminUpdateSetting","summary":"Change a setting (the same JSON type as before). Clears its placeholder flag.","description":"Host Admin with two-factor sign-in on. Super Admin only.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z_]+(\\.[a-z_]+)+$"}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string"},"value":{},"placeholder":{"type":"boolean"}},"required":["key","value","placeholder"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"}]}},"required":["value"]}}}}}},"/admin/users/{id}/switch":{"post":{"operationId":"adminStartSwitch","summary":"Sign in as another user (switch user).","description":"Super Admin with two-factor on, re-checked with a current authenticator code. Not into Host Admins, Super Admins or suspended accounts. Lasts 60 minutes; while it lasts this session acts as the account and Host Admin tools are off. Audited.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"switchId":{"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)$"},"target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"expiresAt":{"type":"string"}},"required":["switchId","target","expiresAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"},"reason":{"type":"string","maxLength":500}},"required":["code"]}}}}}},"/me/switch/return":{"post":{"operationId":"returnFromSwitch","summary":"End a switch and return to the Super Admin's own account.","description":"Only while a Super Admin is signed in as this account. Signing out does the same.","tags":["Me"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat a write safely: the same key replays the first answer.","schema":{"type":"string","minLength":8,"maxLength":100}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/switches":{"get":{"operationId":"adminListSwitches","summary":"Switch-user history, newest first.","description":"Host Admin with two-factor sign-in on. Sub-role: Super or Risk.","tags":["Admin"],"security":[{"bearer":[]},{"cookie":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"X-Acting-As","in":"header","required":false,"description":"Page or location id to act for (must be one you hold a position on).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"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)$"},"admin":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"reason":{"type":["string","null"]},"startedAt":{"type":"string"},"expiresAt":{"type":"string"},"endedAt":{"type":["string","null"]},"status":{"type":"string","enum":["active","returned","expired","signed_out","revoked"]},"requests":{"type":"number"},"ip":{"type":["string","null"]}},"required":["id","admin","target","reason","startedAt","expiresAt","endedAt","status","requests","ip"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}