许可激活(成员 JWT):激活码校验一次核销 + 绑定 + 审计同事务;issued→active
POST
/v1/org-licenses/activate
const url = 'https://api.tansr.com/v1/org-licenses/activate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tansr.com/v1/org-licenses/activate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
required
string
Examplegenerated
{ "code": "example"}Responses
Section titled “Responses”激活后许可
Media typeapplication/json
object
license
required
object
id
required
string
appId
required
绑定 org 键(api_keys.public_id;UNIQUE 一键一照)
string
epoch
required
许可纪元(revoke/suspend 递增;末端缓存失效锚)
integer
createdAt
required
string
Example
{ "license": { "principalType": "member", "status": "issued", "sourceType": "approval" }}Validation_failed(码无效/已核销/过期)
Media typeapplication/json
object
error
required
object
code
required
错误码注册表单源派生(src/http/errors.ts ERROR_CODES;码稳定,消费方按码翻译)
string
message
required
string
requestId
required
string
detail
object
Example
{ "error": { "code": "adjudicator_not_authorized" }}本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。