No parameters.
Raw schema
{
"type": "object",
"oneOf": [
{
"required": [
"operation",
"body"
],
"properties": {
"operation": {
"const": "create_budget"
},
"body": {
"type": "object",
"required": [
"logical_identity",
"limits"
],
"properties": {
"logical_identity": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
},
"limits": {
"type": "object",
"required": [
"money",
"tokens_atomic",
"calls_atomic"
],
"properties": {
"money": {
"type": "object",
"required": [
"amount_atomic",
"scale",
"currency"
],
"properties": {
"amount_atomic": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,77})$"
},
"scale": {
"type": "integer",
"minimum": 0,
"maximum": 18
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3,12}$"
}
},
"additionalProperties": false
},
"tokens_atomic": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,77})$"
},
"calls_atomic": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,77})$"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"required": [
"operation",
"budget_id"
],
"properties": {
"operation": {
"const": "get_budget"
},
"budget_id": {
"type": "string",
"pattern": "^stb_[a-f0-9]{24}$"
}
},
"additionalProperties": false
},
{
"required": [
"operation",
"budget_id",
"body"
],
"properties": {
"operation": {
"const": "reserve"
},
"budget_id": {
"type": "string",
"pattern": "^stb_[a-f0-9]{24}$"
},
"body": {
"type": "object",
"required": [
"logical_identity",
"agent_id",
"provider",
"operation",
"maximum"
],
"properties": {
"logical_identity": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
},
"agent_id": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
},
"provider": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"maximum": {
"type": "object",
"required": [
"money",
"tokens_atomic",
"calls_atomic"
],
"properties": {
"money": {
"type": "object",
"required": [
"amount_atomic",
"scale",
"currency"
],
"properties": {
"amount_atomic": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,77})$"
},
"scale": {
"type": "integer",
"minimum": 0,
"maximum": 18
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3,12}$"
}
},
"additionalProperties": false
},
"tokens_atomic": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,77})$"
},
"calls_atomic": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,77})$"
}
},
"additionalProperties": false
},
"capability_sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"required": [
"operation",
"budget_id",
"reservation_id"
],
"properties": {
"operation": {
"enum": [
"get_reservation",
"reconcile"
]
},
"budget_id": {
"type": "string",
"pattern": "^stb_[a-f0-9]{24}$"
},
"reservation_id": {
"type": "string",
"pattern": "^str_[a-f0-9]{24}$"
}
},
"additionalProperties": false
},
{
"required": [
"operation",
"budget_id",
"reservation_id",
"body"
],
"properties": {
"operation": {
"enum": [
"begin",
"release"
]
},
"budget_id": {
"type": "string",
"pattern": "^stb_[a-f0-9]{24}$"
},
"reservation_id": {
"type": "string",
"pattern": "^str_[a-f0-9]{24}$"
},
"body": {
"type": "object",
"required": [
"capability"
],
"properties": {
"capability": {
"type": "string",
"pattern": "^stc_[A-Za-z0-9_-]{43}$"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"required": [
"operation",
"budget_id",
"reservation_id",
"body"
],
"properties": {
"operation": {
"const": "settle"
},
"budget_id": {
"type": "string",
"pattern": "^stb_[a-f0-9]{24}$"
},
"reservation_id": {
"type": "string",
"pattern": "^str_[a-f0-9]{24}$"
},
"body": {
"type": "object",
"required": [
"capability",
"evidence"
],
"properties": {
"capability": {
"type": "string",
"pattern": "^stc_[A-Za-z0-9_-]{43}$"
},
"evidence": {
"type": "object",
"additionalProperties": false,
"required": [
"attestation_jws"
],
"properties": {
"attestation_jws": {
"type": "string",
"minLength": 80,
"maxLength": 130974,
"description": "Compact ES256 JWS within the 131072-byte nested REST settle body. Protected header typ must be application/xynthera-spend-outcome+jws and kid must identify a registered verifier key. Payload profile must be xynthera-spend-outcome-v1; status is settled, refused or ambiguous; exact fields are profile, tenant_id, budget_id, reservation_id, logical_key, reservation_sha256, provider_idempotency_key, status, actual, observed_at, provider_reference and reason_code."
}
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"required": [
"operation",
"budget_id",
"reservation_id",
"body"
],
"properties": {
"operation": {
"const": "mark_unknown"
},
"budget_id": {
"type": "string",
"pattern": "^stb_[a-f0-9]{24}$"
},
"reservation_id": {
"type": "string",
"pattern": "^str_[a-f0-9]{24}$"
},
"body": {
"type": "object",
"required": [
"capability",
"reason_code"
],
"properties": {
"capability": {
"type": "string",
"pattern": "^stc_[A-Za-z0-9_-]{43}$"
},
"reason_code": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}