{"openapi":"3.1.0","info":{"title":"Climate Standard Registry API","version":"1.0.0","description":"Read-only public data of the Climate Standard registry: projects, credits and ledger movements. Responses are cached for 5 minutes."},"servers":[{"url":"https://registry.climatestandard.net/api/v1"}],"paths":{"/projects":{"get":{"summary":"List projects","parameters":[{"name":"status","in":"query","required":false,"description":"Project status","schema":{"type":"string","enum":["under_validation","registered","suspended","closed"]}},{"name":"country","in":"query","required":false,"description":"ISO 3166-1 alpha-2 country code","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, from 1","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"lang","in":"query","required":false,"description":"Language of names and descriptions","schema":{"type":"string","enum":["en","it","fr","es"],"default":"en"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{code}":{"get":{"summary":"One project by registry code","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"example":"CS-CRCF-2026-0001"},{"name":"lang","in":"query","required":false,"description":"Language of names and descriptions","schema":{"type":"string","enum":["en","it","fr","es"],"default":"en"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetail"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/credits/{serial}":{"get":{"summary":"Verify a credit by serial number","parameters":[{"name":"serial","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credit"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/integrity":{"get":{"summary":"Ledger integrity: chained daily fingerprints, re-verified, and reconciliation","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"latest_day":{"type":["string","null"],"format":"date"},"latest_hash":{"type":["string","null"]},"days":{"type":"integer"},"mismatched_days":{"type":"array","items":{"type":"string","format":"date"}},"anomalies":{"type":"array","items":{"type":"object"}},"checked_at":{"type":"string","format":"date-time"}}}}}}}}},"/integrity/{day}":{"get":{"summary":"One day of the chain with its canonical lines: hash = SHA-256 of previous_hash + \"\\n\" + lines joined by \"\\n\"","parameters":[{"name":"day","in":"path","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"day":{"type":"string","format":"date"},"transactions":{"type":"integer"},"previous_hash":{"type":["string","null"]},"hash":{"type":"string"},"lines":{"type":"array","items":{"type":"string"}}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transactions":{"get":{"summary":"Ledger movements, newest first","parameters":[{"name":"project","in":"query","required":false,"description":"Project registry code","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Movement type","schema":{"type":"string","enum":["issuance","transfer","retirement","cancellation"]}},{"name":"page","in":"query","required":false,"description":"Page number, from 1","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"Project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"registry_code":{"type":["string","null"]},"name":{"type":"string"},"status":{"type":"string"},"scheme":{"type":["string","null"]},"country":{"type":["object","null"],"properties":{"code":{"type":"string"},"name":{"type":"string"}}},"region":{"type":["string","null"]},"methodology":{"type":["object","null"],"properties":{"code":{"type":["string","null"]},"name":{"type":"string"}}},"credit_type":{"type":["string","null"]},"vintage_year":{"type":["integer","null"]},"activity_period":{"type":"object","properties":{"start":{"type":["string","null"],"format":"date"},"end":{"type":["string","null"],"format":"date"}}},"url":{"type":"string","format":"uri"},"updated_at":{"type":"string","format":"date-time"}}},"ProjectDetail":{"allOf":[{"$ref":"#/components/schemas/Project"},{"type":"object","properties":{"description":{"type":["string","null"]},"owner":{"type":["string","null"]},"contact_email":{"type":["string","null"],"description":"Owner's contact for credits"},"developer":{"type":["string","null"]},"credits":{"type":"object","properties":{"issued":{"type":"integer"},"active":{"type":"integer"},"retired":{"type":"integer"},"cancelled":{"type":"integer"}}},"documents":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"kind":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string"},"sha256":{"type":["string","null"]},"registered_at":{"type":"string","format":"date-time"}}}}}}]},"Credit":{"type":"object","properties":{"serial":{"type":"string"},"status":{"type":"string","enum":["active","retired","cancelled"]},"project":{"type":"object","properties":{"registry_code":{"type":["string","null"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"}}},"holder":{"type":["string","null"]},"issuance":{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"monitoring_period":{"type":"object","properties":{"start":{"type":["string","null"],"format":"date"},"end":{"type":["string","null"],"format":"date"}}},"verification_reference":{"type":["string","null"]}}},"ended":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["retirement","cancellation"]},"date":{"type":"string","format":"date-time"},"reference":{"type":["string","null"]},"beneficiary":{"type":["string","null"]},"beneficiary_type":{"type":["string","null"]},"beneficiary_private":{"type":"boolean"},"purpose":{"type":["string","null"]}}}}},"Transaction":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"date":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"registry_code":{"type":["string","null"]},"name":{"type":"string"}}},"quantity":{"type":"integer"},"first_serial":{"type":["string","null"]},"last_serial":{"type":["string","null"]},"from":{"type":["string","null"]},"to":{"type":["string","null"]},"reference":{"type":["string","null"]},"monitoring_period":{"type":"object","properties":{"start":{"type":["string","null"],"format":"date"},"end":{"type":["string","null"],"format":"date"}}},"verification_reference":{"type":["string","null"]},"beneficiary":{"type":["string","null"],"description":"Null when the beneficiary is a private person"},"beneficiary_type":{"type":["string","null"],"enum":["organization","person",null]},"beneficiary_private":{"type":"boolean"},"purpose":{"type":["string","null"]}}}}}}