{"openapi":"3.1.0","info":{"title":"Orgs Directory API","version":"1.0.0","description":"Read-only access to the Orgs Directory operated by JY Tech LLC: organizations, their relations and verification status, and posts approved for publication by club presidents.","contact":{"name":"JY Tech","url":"https://orgs.jytech.us/developers"}},"servers":[{"url":"https://orgs.jytech.us","description":"Production"}],"security":[{"bearer":[]}],"paths":{"/api/v1/orgs":{"get":{"operationId":"listOrgs","summary":"List organizations","description":"Published organizations in directory order. Filter by type, metro area or keyword; paginate with limit/offset.","x-summary-zh":"名录列表","x-description-zh":"按名录顺序列出已发布的组织，可按类型、地区、关键词筛选，用 limit/offset 分页。","x-scope":"orgs:read","parameters":[{"name":"lang","in":"query","description":"Language of free-text fields (summary, headquarters, tags, relation notes). English text is mostly machine-translated.","schema":{"type":"string","enum":["zh","en"],"default":"zh"}},{"name":"type","in":"query","schema":{"$ref":"#/components/schemas/OrgType"}},{"name":"metro","in":"query","description":"Metro area id, e.g. sf-bay, la, nyc.","schema":{"type":"string"}},{"name":"q","in":"query","description":"Matches id, Chinese or English name, or abbreviation (case-insensitive).","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"A page of organizations","content":{"application/json":{"schema":{"type":"object","required":["data","total","limit","offset"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Org"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/orgs/{id}":{"get":{"operationId":"getOrg","summary":"Get an organization","x-summary-zh":"单个组织","x-scope":"orgs:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"lions-sf-world-tcm"},{"name":"lang","in":"query","description":"Language of free-text fields (summary, headquarters, tags, relation notes). English text is mostly machine-translated.","schema":{"type":"string","enum":["zh","en"],"default":"zh"}}],"responses":{"200":{"description":"The organization","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Org"}}}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/orgs/{id}/posts":{"get":{"operationId":"listOrgPosts","summary":"List published posts","x-summary-zh":"已公开的报道","x-description-zh":"会长批准公开的活动报道和活动预告，新的在前。报道只有中文。","description":"Event reports and announcements approved by the club president, newest first. Posts are in Chinese only.","x-scope":"posts:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"lions-sf-world-tcm"}],"responses":{"200":{"description":"Posts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Post"}}}}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/lions/clubs/{clubId}":{"get":{"operationId":"getLionsClub","summary":"Look up a Lions club by Club ID","x-summary-zh":"按狮子会分会编号查询","x-description-zh":"用国际狮子会分会编号（Lion Portal 里的 Lion ID）查本站对应的组织。","description":"Maps a Lions International Club ID (as shown in the Lion Portal) to its organization on this site.","x-scope":"orgs:read","parameters":[{"name":"clubId","in":"path","required":true,"schema":{"type":"string"},"example":"200758"},{"name":"lang","in":"query","description":"Language of free-text fields (summary, headquarters, tags, relation notes). English text is mostly machine-translated.","schema":{"type":"string","enum":["zh","en"],"default":"zh"}}],"responses":{"200":{"description":"The club's organization","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Org"}}}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key issued by JY Tech: orgs_live_… (production) or orgs_test_… (sandbox)."}},"schemas":{"OrgType":{"type":"string","enum":["igo","government","ngo","npo","company"]},"Org":{"type":"object","required":["id","name","type","sector","headquarters","summary","tags","verification","relations","url"],"properties":{"id":{"type":"string","description":"Stable identifier on this site."},"name":{"type":"object","properties":{"zh":{"type":"string"},"en":{"type":["string","null"]}}},"abbr":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/OrgType"},"sector":{"type":"string","enum":["intergovernmental","public","social","private"]},"founded":{"type":["integer","null"]},"headquarters":{"type":"string"},"metro":{"type":["string","null"]},"website":{"type":["string","null"],"format":"uri"},"summary":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"verification":{"description":"Identity verification by JY Tech; null when absent or expired. Confirms identity only, not an endorsement.","oneOf":[{"type":"null"},{"type":"object","properties":{"level":{"type":"string","enum":["basic","verified","dd","leader"]},"region":{"type":"string","enum":["us","cn","intl"]},"verifiedOn":{"type":"string","format":"date"},"expiresOn":{"type":"string","format":"date"}}}]},"relations":{"type":"array","description":"Outgoing relations only; `to` is another organization id.","items":{"type":"object","properties":{"kind":{"type":"string","enum":["part-of","specialized-agency-of","member-of","affiliate-of","observer-at","tax-exempt-by","funds","sponsors","sibling-of","partners-with"]},"to":{"type":"string"},"note":{"type":["string","null"]}}}},"lionsClubId":{"type":["string","null"],"description":"Lions International Club ID, for clubs with a club page on this site."},"url":{"type":"string","format":"uri"},"clubUrl":{"type":["string","null"],"format":"uri"},"machineTranslated":{"type":"boolean"}}},"Post":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string"},"kind":{"type":"string","enum":["report","announcement"]},"title":{"type":"string"},"summary":{"type":"string"},"body":{"type":"string","description":"Markdown."},"publishedAt":{"type":["string","null"],"format":"date-time"},"url":{"type":"string","format":"uri"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","bad_request","unavailable","internal"]},"message":{"type":"string"}}}}}}}}