{"openapi":"3.1.0","info":{"title":"CommonRig store","version":"0.1.0"},"servers":[{"url":"https://commonrig.com"}],"paths":{"/v1":{"get":{"summary":"API index","responses":{"200":{"description":"Success"}}}},"/v1/kit":{"get":{"summary":"Product description","responses":{"200":{"description":"Success"}}}},"/v1/sample":{"get":{"summary":"Free orchestration protocol text","responses":{"200":{"description":"Success"}}}},"/v1/stats":{"get":{"summary":"Aggregated research statistics; production by default","responses":{"200":{"description":"Aggregates"},"400":{"description":"Invalid filter"},"401":{"description":"Unauthorised"},"404":{"description":"Stats disabled"}},"security":[{"statsToken":[]}],"parameters":[{"name":"env","in":"query","schema":{"type":"string","enum":["production","staging"],"default":"production"}},{"name":"from","in":"query","schema":{"type":"string","description":"ISO date or timestamp. from inclusive; to exclusive."}},{"name":"to","in":"query","schema":{"type":"string","description":"ISO date or timestamp. from inclusive; to exclusive."}}]}},"/v1/checkout/stripe":{"post":{"summary":"Create Stripe Checkout Session; JSON tier","responses":{"200":{"description":"Checkout URL"},"503":{"description":"Not configured or payments not live"}}}},"/v1/checkout/btcpay":{"post":{"summary":"Create a bitcoin (on-chain) BTCPay invoice; JSON tier. Lightning comes later: lightning=true is refused","responses":{"200":{"description":"Invoice and claim URLs"},"400":{"description":"Invalid tier, or Lightning requested"},"503":{"description":"Not configured or payments not live"}}}},"/v1/doctor/check":{"post":{"summary":"Score bundle using active updates licence or unused check licence","security":[{"licence":[]}],"responses":{"200":{"description":"Doctor report"},"401":{"description":"Invalid or expired licence"},"409":{"description":"Check used"},"413":{"description":"Bundle exceeds 512 KB"}}}},"/v1/licence/activate":{"post":{"summary":"Validate key and client-chosen machine hash","responses":{"200":{"description":"Validity, tier and updates_until"}}}},"/v1/updates":{"get":{"summary":"Rule pack catalogue: version, released_at and download url per pack","security":[{"licence":[]}],"responses":{"200":{"description":"Catalogue"},"401":{"description":"Invalid or expired updates licence"}}}},"/v1/updates/packs/{version}":{"get":{"summary":"Download a catalogued rule pack zip","security":[{"licence":[]}],"parameters":[{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Pack zip"},"401":{"description":"Invalid or expired updates licence"},"404":{"description":"Unknown rule pack"},"503":{"description":"Pack archive not uploaded yet"}}}},"/v1/beacon":{"post":{"summary":"Same-origin first-interaction beacon","responses":{"204":{"description":"Recorded"},"403":{"description":"Origin rejected"}}}},"/v1/buy/x402":{"get":{"summary":"Kit x402 purchase","responses":{"200":{"description":"Verified settlement and delivery"},"402":{"description":"Payment terms"},"503":{"description":"Payment not configured or not live"}}}},"/v1/check":{"post":{"summary":"Hosted doctor check","responses":{"200":{"description":"Verified settlement and delivery"},"402":{"description":"Payment terms"},"503":{"description":"Payment not configured or not live"}}}}},"components":{"securitySchemes":{"statsToken":{"type":"http","scheme":"bearer"},"licence":{"type":"http","scheme":"bearer"}}}}