@hyperscale0/cli 1.0.442 → 1.0.443

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/hyperscale.js +2 -2
  2. package/package.json +2 -2
package/hyperscale.js CHANGED
@@ -10035,7 +10035,7 @@ Callers: the account owner's CLI login, or an agent token with products:read, or
10035
10035
 
10036
10036
  Callers: the account owner's CLI login, or an agent token with products:write, or a personal access token with products:write.`,parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.disable","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either","x-error-codes":["agent_reason_required","agent_result_already_delivered","approval_rejected","approval_required","csrf_token_invalid","environment_mismatch","idempotency_conflict","idempotency_required","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_scope","not_found","oauth_client_not_admitted","product_access_suspended","product_activation_required","rate_limited","request_body_too_large","resource_not_found","state_conflict","state_constraint_failed","tenant_mismatch","tenant_not_found","unauthorized","account_ledger_unprovisioned","agent_token_expired","agent_token_replaced","device_login_expired","instrument_instance_not_found","invalid_credentials","ledger_unavailable","operation_environment_invalid","operation_not_finalized","product_context_forbidden","product_context_mismatch","product_context_owner_mismatch","product_context_required","product_disable_open_activity","product_lifecycle_status_forbidden","product_not_found","product_scope_required","product_scope_unsupported","product_status_forbidden","session_expired","session_required","session_revoked","tenant_status_forbidden"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},reason:{type:"string",minLength:1,maxLength:240}},required:["tenantId","reason"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",reason:"Customer requested this lifecycle change."}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_disableOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/documents":{get:{operationId:"product_documents",tags:["Products"],summary:"Get the five documents a Core generates and its Assure certificate",description:"Returns the Business, Technical, Security, Infrastructure and Tests documents for the Product's current Core, or the saved Core productCoreId names, each a standalone HTML page that prints on A4. They are derived from the Core's compiled UDL, its checks, its program source and the checks' stored outcome: the Tests document names each check's verdict, its failure, the steps it reached, the simulate pass and its seed, the world it ran in, the Arc revision and when it ran. The same Core and outcome always return the same bytes, and each document carries the SHA-256 of its HTML. The certificate names the coreDigest and every check outcome, signed by the instance; it verifies against the instance public key in /release.json.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"productCoreId",in:"query",required:!1,schema:{description:"A saved Core of the Product; the current Core when omitted",type:"string",pattern:"^pbld_(sandbox|live)_[a-z0-9]{8,64}$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.documents","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_core_not_found","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_documentsOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/earn-rates":{get:{operationId:"product_earn_rate_list",tags:["Products"],summary:"List product earn rates",description:"Lists the configured earn rates for a product, one per earnable operation.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.earn.rate.list","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","operation_environment_invalid","product_context_forbidden","product_context_mismatch","product_context_owner_mismatch","product_context_required","product_not_found","product_scope_required","product_scope_unsupported","product_status_forbidden","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_earn_rate_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]},post:{operationId:"product_earn_rate_set",tags:["Products","Founder login"],summary:"Configure a product earn rate",description:`Sets the tenant's fee on an earnable operation as basis points of the transfer amount, a flat amount, or both. The fee posts into the product revenue account atomically with the operation's transfer. Setting bps and flatAmount to zero or omitting both removes the rate.
10037
10037
 
10038
- Callers: the account owner's CLI login, or an agent token with products:write, or a personal access token with products:write.`,parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.earn.rate.set","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either","x-error-codes":["agent_reason_required","agent_result_already_delivered","approval_rejected","approval_required","csrf_token_invalid","environment_mismatch","idempotency_conflict","idempotency_required","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_scope","not_found","oauth_client_not_admitted","product_access_suspended","product_activation_required","rate_limited","request_body_too_large","resource_not_found","state_conflict","state_constraint_failed","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","earn_rate_operation_not_earnable","instrument_instance_not_found","invalid_credentials","operation_environment_invalid","operation_not_finalized","product_context_forbidden","product_context_mismatch","product_context_owner_mismatch","product_context_required","product_not_found","product_scope_required","product_scope_unsupported","product_status_forbidden","session_expired","session_required","session_revoked","tenant_status_forbidden"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},operationName:{type:"string",minLength:1,maxLength:120,pattern:"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"},bps:{type:"string",pattern:"^(0|[1-9][0-9]{0,3}|10000)$",description:"Fee in basis points of the transfer amount (0..10000)"},flatAmount:{type:"string",pattern:"^(0|[1-9][0-9]{0,17})$",description:"Non-negative minor-unit integer amount serialized as a string (at most 18 digits)"}},required:["tenantId","operationName"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",operationName:"account.create"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_earn_rate_setOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/earnings/settlements":{post:{operationId:"product_earnings_settle",tags:["Products"],summary:"Settle product earnings",description:"Moves accumulated earnings from the product revenue account to the tenant settlement account. The ledger rejects settling more than the revenue account holds.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.earnings.settle","x-principal":"api_key","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either","x-error-codes":["agent_cap_exceeded","agent_reason_required","agent_result_already_delivered","approval_rejected","approval_required","csrf_token_invalid","environment_mismatch","idempotency_conflict","idempotency_required","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","request_body_too_large","resource_not_found","state_conflict","state_constraint_failed","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","company_period_closed","cross_tenant_transfer_forbidden","currency_mismatch","device_login_expired","instrument_instance_not_found","insufficient_balance","invalid_credentials","key_revoked","ledger_transfer_rejected","ledger_unavailable","operation_environment_invalid","operation_not_finalized","product_context_forbidden","product_context_mismatch","product_context_owner_mismatch","product_context_required","product_not_found","product_scope_required","product_scope_unsupported","product_status_forbidden","session_expired","session_required","session_revoked","tenant_status_forbidden"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{transferId:{type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale transfer ID"},amount:{type:"string",pattern:"^[1-9][0-9]{0,17}$",description:"Positive minor-unit integer amount serialized as a string (at most 18 digits)"},currency:{type:"string",const:"SAR"}},required:["amount","currency"],additionalProperties:!1},examples:{example:{value:{amount:"1",currency:"SAR"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_earnings_settleOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/economic-snapshot":{get:{operationId:"product_economic_snapshot_retrieve",tags:["Products"],summary:"Read a Product economic revision and confirmed balances",description:"Reads the Product's declared economic records and their ledger balances as one consistent snapshot. Refuses unresolved Product instructions. Proposal records do not change the economic revision. Pending account reservations remain separate from posted balances.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.economic_snapshot.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","economic_snapshot_unstable","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_economic_snapshot_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/evidence":{get:{operationId:"product_evidence_export",tags:["Products"],summary:"Export the evidence bundle for one Core digest",description:"Returns everything an audit team keeps for one coreDigest, as a manifest of entries: the five Core documents, the checks' stored outcome, the Assure certificate, the plan the save reviewed with its planDigest when one was stored, the audit events that touched the Core, the scenario reports Assure stored for it in sandbox, and the public key the certificate verifies against. Each entry carries its SHA-256, and manifestDigest covers them all: two exports of the same digest with nothing new return the same manifestDigest. A digest the Product saved more than once reads its newest Core.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"coreDigest",in:"query",required:!1,schema:{description:"A Core digest the Product saved; the current Core's when omitted",type:"string",pattern:"^[a-f0-9]{64}$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.evidence.export","x-principal":"api_key","x-personal-access-token-scope":"activity:read","x-agent-scope":"activity:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_core_not_found","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_evidence_exportOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["activity:read"]}]}},"/v1/products/{productId}/guidance":{get:{operationId:"product_guidance_retrieve",tags:["Products"],summary:"Retrieve deterministic product guidance",description:"Returns the ordered, contract-owned guidance predicates for a product, combining activation readiness with operational signals such as active API keys and first activity.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.guidance.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_core_not_found","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_guidance_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/instruments-compose":{post:{operationId:"product_instruments_compose",tags:["Products","Founder login"],summary:"Create a Product from an HSX program",description:`Check the HSX program, save it as the first Core with its price fixed, and set up the Product. A browser session also gets a start key, shown once. Any other caller makes keys with the CLI: hyperscale key create --product <productId>.
10038
+ Callers: the account owner's CLI login, or an agent token with products:write, or a personal access token with products:write.`,parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.earn.rate.set","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either","x-error-codes":["agent_reason_required","agent_result_already_delivered","approval_rejected","approval_required","csrf_token_invalid","environment_mismatch","idempotency_conflict","idempotency_required","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_scope","not_found","oauth_client_not_admitted","product_access_suspended","product_activation_required","rate_limited","request_body_too_large","resource_not_found","state_conflict","state_constraint_failed","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","earn_rate_operation_not_earnable","instrument_instance_not_found","invalid_credentials","operation_environment_invalid","operation_not_finalized","product_context_forbidden","product_context_mismatch","product_context_owner_mismatch","product_context_required","product_not_found","product_scope_required","product_scope_unsupported","product_status_forbidden","session_expired","session_required","session_revoked","tenant_status_forbidden"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},operationName:{type:"string",minLength:1,maxLength:120,pattern:"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"},bps:{type:"string",pattern:"^(0|[1-9][0-9]{0,3}|10000)$",description:"Fee in basis points of the transfer amount (0..10000)"},flatAmount:{type:"string",pattern:"^(0|[1-9][0-9]{0,17})$",description:"Non-negative minor-unit integer amount serialized as a string (at most 18 digits)"}},required:["tenantId","operationName"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",operationName:"account.create"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_earn_rate_setOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/earnings/settlements":{post:{operationId:"product_earnings_settle",tags:["Products"],summary:"Settle product earnings",description:"Moves accumulated earnings from the product revenue account to the tenant settlement account. The ledger rejects settling more than the revenue account holds.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.earnings.settle","x-principal":"api_key","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either","x-error-codes":["agent_cap_exceeded","agent_reason_required","agent_result_already_delivered","approval_rejected","approval_required","csrf_token_invalid","environment_mismatch","idempotency_conflict","idempotency_required","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","request_body_too_large","resource_not_found","state_conflict","state_constraint_failed","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","company_period_closed","cross_tenant_transfer_forbidden","currency_mismatch","device_login_expired","instrument_instance_not_found","insufficient_balance","invalid_credentials","key_revoked","ledger_transfer_rejected","ledger_unavailable","operation_environment_invalid","operation_not_finalized","product_context_forbidden","product_context_mismatch","product_context_owner_mismatch","product_context_required","product_not_found","product_scope_required","product_scope_unsupported","product_status_forbidden","session_expired","session_required","session_revoked","tenant_status_forbidden"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{transferId:{type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale transfer ID"},amount:{type:"string",pattern:"^[1-9][0-9]{0,17}$",description:"Positive minor-unit integer amount serialized as a string (at most 18 digits)"},currency:{type:"string",const:"SAR"}},required:["amount","currency"],additionalProperties:!1},examples:{example:{value:{amount:"1",currency:"SAR"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_earnings_settleOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/economic-snapshot":{get:{operationId:"product_economic_snapshot_retrieve",tags:["Products"],summary:"Read a Product economic revision and confirmed balances",description:"Reads the Product's declared economic records and their ledger balances as one consistent snapshot. Refuses unresolved Product instructions. Proposal records do not change the economic revision. Pending account reservations remain separate from posted balances.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.economic_snapshot.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","economic_snapshot_unstable","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_economic_snapshot_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/evidence":{get:{operationId:"product_evidence_export",tags:["Products"],summary:"Export the evidence bundle for one Core digest",description:"Returns everything an audit team keeps for one coreDigest, as a manifest of entries: the five Core documents, the checks' stored outcome, the Assure certificate, the plan the save reviewed with its planDigest when one was stored, the audit events that touched the Core, the scenario reports Assure stored for it in sandbox, and the public key the certificate verifies against. Each entry carries its SHA-256, and manifestDigest covers them all: two exports of the same digest with nothing new return the same manifestDigest. A digest the Product saved more than once reads its newest Core.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"coreDigest",in:"query",required:!1,schema:{description:"A Core digest the Product saved; the current Core's when omitted",type:"string",pattern:"^[a-f0-9]{64}$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.evidence.export","x-principal":"api_key","x-personal-access-token-scope":"activity:read","x-agent-scope":"activity:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_core_not_found","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_evidence_exportOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["activity:read","products:read"]}]}},"/v1/products/{productId}/guidance":{get:{operationId:"product_guidance_retrieve",tags:["Products"],summary:"Retrieve deterministic product guidance",description:"Returns the ordered, contract-owned guidance predicates for a product, combining activation readiness with operational signals such as active API keys and first activity.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.guidance.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_core_not_found","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_guidance_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/instruments-compose":{post:{operationId:"product_instruments_compose",tags:["Products","Founder login"],summary:"Create a Product from an HSX program",description:`Check the HSX program, save it as the first Core with its price fixed, and set up the Product. A browser session also gets a start key, shown once. Any other caller makes keys with the CLI: hyperscale key create --product <productId>.
10039
10039
 
10040
10040
  Callers: the account owner's CLI login, or an agent token with blueprints:write, or a personal access token with blueprints:write.`,parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.instruments.compose","x-principal":"user_session","x-personal-access-token-scope":"blueprints:write","x-agent-scope":"blueprints:write","x-idempotency":"required","x-environment":"sandbox","x-error-codes":["agent_reason_required","agent_result_already_delivered","approval_rejected","approval_required","csrf_token_invalid","environment_mismatch","idempotency_conflict","idempotency_required","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_scope","not_found","oauth_client_not_admitted","rate_limited","request_body_too_large","resource_not_found","state_conflict","state_constraint_failed","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","capability_not_available_in_sandbox","capability_not_configured","catalog_revision_conflict","company_period_closed","cross_tenant_transfer_forbidden","currency_mismatch","device_login_expired","empty_composition","instrument_instance_not_found","insufficient_balance","invalid_credentials","ledger_transfer_rejected","ledger_unavailable","operation_environment_invalid","operation_not_finalized","plan_stale","product_capability_already_enabled","product_context_forbidden","product_context_mismatch","product_context_owner_mismatch","product_context_required","product_core_refuted","product_not_found","product_scope_required","product_scope_unsupported","product_status_forbidden","sandbox_environment_required","session_expired","session_required","session_revoked","tenant_status_forbidden"],requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},name:{type:"string",minLength:1,maxLength:120},program:{type:"object",properties:{source:{type:"string",minLength:1,maxLength:524288}},required:["source"],additionalProperties:!1},partyBindings:{type:"object",propertyNames:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"},additionalProperties:{type:"string",minLength:1,maxLength:160}},expectedPlanDigest:{type:"string",pattern:"^[a-f0-9]{64}$",description:"planDigest from the reviewed composer.plan. The transaction recomputes the plan and refuses with plan_stale, returning the new plan, when it differs."},catalogRevisionId:{type:"string",minLength:1,maxLength:160,description:"Immutable revision of the headers the tenant published, as a Core compiled with them"},extensionIds:{description:"Catalog extensions the program resolves from. Provenance only, recorded on the Core.",type:"array",items:{type:"string",enum:["booking","cards","collections","commerce","escrow","fees","financing","guarantee","lending","marketplace","money","obligations","people","purchase","rental","reporting","wallet"]}},metadata:{$ref:"#/components/schemas/product_instruments_composeInput/$defs/Metadata"},icon:{$ref:"#/components/schemas/product_instruments_composeInput/$defs/ProductIcon"},label:{type:"string",minLength:1,maxLength:80,description:"The account owner's name for this version, such as Dispute window 14 days"},note:{type:"string",minLength:1,maxLength:500,description:"What changed in this version and why"}},required:["tenantId","name","program","partyBindings"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",name:"Sandbox account",program:{source:"x"},partyBindings:{}}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_instruments_composeOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["blueprints:write"]}]}},"/v1/products/{productId}/instruments":{get:{operationId:"product_instruments_list",tags:["Products"],summary:"List the admitted Product instruments and typed fields",description:"Returns each instrument in the Product's current Core with its fields and lifecycle states, plus the Core id, digest, and currency.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.instruments.list","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_instruments_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/margin":{get:{operationId:"product_margin_retrieve",tags:["Products"],summary:"Retrieve the product margin view",description:"Joins the product's frozen plan rate card (the buy side: what the tenant pays Hyperscale per earnable operation) with its configured earn rates (the sell side: what the tenant charges on the same operations) into one per-operation margin line, so the tenant sees what each business event nets before setting prices.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.margin.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_margin_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/actions":{get:{operationId:"product_objects_actions",tags:["Product objects"],summary:"List available actions and required metadata for an object",description:"Returns actions with requiredNow computed against current object metadata. Pages contain up to limit agreement contexts (default 50, range 1-100), newest createdAt then ID first, without splitting an agreement's actions. Current-Core creation actions appear only on the first page. Evidence belongs only to returned actions. Follow nextCursor until absent; a scope, current Core or object revision change refuses the cursor with invalid_request.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum agreement contexts, 1-100, default 50. Every action in a selected agreement is returned."},examples:{}},{name:"onBehalfOf",in:"query",required:!1,schema:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.actions","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","customer_access_pending","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","ledger_unavailable","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_actionsOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/agreements/{instanceId}/evidence":{get:{operationId:"product_objects_agreements_evidence_list",tags:["Product objects"],summary:"Read accepted action evidence for an object's agreement",description:"Returns immutable subject evidence under the agreement's retained Core. Items are ordered by occurredAt descending, then eventId descending, using the object family's cursor. Tied timestamps do not imply execution order. Protected fields use the record read's [unreadable] marker. Object read authority and agreement membership are required.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"instanceId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.agreements.evidence.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","customer_access_pending","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_agreements_evidence_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/agreements":{get:{operationId:"product_objects_agreements_list",tags:["Product objects"],summary:"Read every agreement attached to an object",description:"Includes closed agreements and agreements without public actions, across retained Cores. Terms come from the agreement snapshot, state and declared relationships from its retained Core. Account links carry their book and do not imply object balances. Boundary observations report received facts, never permission to settle. Latest observations are per declared check or instruction. Newest createdAt then instanceId first. Cursors bind the authorized object, caller and object revision.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"rootsOnly",in:"query",required:!1,schema:{type:"string",enum:["true","false"]},examples:{}},{name:"parentInstanceId",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:160},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.agreements.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","customer_access_pending","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_agreements_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}":{post:{operationId:"product_objects_create",tags:["Product objects"],summary:"Create an object with optional metadata and no financial agreement",description:"Creates a new business object instance with an optional externalId and optional metadata fields. The owner is the caller, or the customer named in onBehalfOf.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{day_pass:{value:"prd_sandbox_97c43dbc8495d7ca"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{day_pass:{value:"day_pass"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.objects.create","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either","x-error-codes":["agent_reason_required","agent_result_already_delivered","approval_rejected","approval_required","csrf_token_invalid","customer_access_pending","environment_mismatch","idempotency_conflict","idempotency_required","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","request_body_too_large","resource_not_found","state_conflict","state_constraint_failed","subject_adapter_unbound","subject_evidence_stale","subject_field_unknown","subject_party_unbound","subject_requirement_missing","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","external_id_in_use","instrument_instance_not_found","invalid_credentials","key_revoked","operation_not_finalized","product_not_found","provider_credential_missing","session_expired","session_required","session_revoked","tenant_status_forbidden"],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",properties:{externalId:{type:"string",minLength:1,maxLength:2048},fields:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},onBehalfOf:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."}},required:[],additionalProperties:!1},examples:{day_pass:{value:{fields:{day:"2026-10-11"},onBehalfOf:"cus_sandbox_5d1e8a2c7b9f4036"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_createOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]},{customerSession:[]}]},get:{operationId:"product_objects_list",tags:["Product objects"],summary:"List business objects of a kind",description:"Searches the full authorized set by external ID, declared column filters, agreement state and a declared date column. A signed-in customer's set is the records they own, the records where they are a party on an agreement, and the records with an entry action open for them; access on each item says which. Returns a total and facets for the full filtered set. A cursor refuses changed filters or authority.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"owner",in:"query",required:!1,schema:{type:"string",pattern:"^prn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale principal ID"},examples:{}},{name:"externalId",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2048},examples:{}},{name:"filters",in:"query",required:!1,content:{"application/json":{schema:{type:"object",propertyNames:{type:"string",minLength:1,maxLength:80},additionalProperties:{type:"string",maxLength:2048},"x-query-encoding":"json",description:"Encode this string-valued filter object as JSON in the filters query parameter."},examples:{}}}},{name:"agreementState",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:80},examples:{}},{name:"blockKey",in:"query",required:!1,schema:{type:"string",enum:["financing.installments","escrow.hold","money.hold","marketplace.listing","marketplace.order","marketplace.reservation","insurance.cover","insurance.claim"]},examples:{}},{name:"blockMetric",in:"query",required:!1,schema:{type:"string",enum:["overdue_installments","overdue_amount","held_funds","active_listings","awaiting_fulfilment","active_reservations","active_covers","submitted_claims"]},examples:{}},{name:"dueField",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:80},examples:{}},{name:"dueFrom",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"dueThrough",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","customer_access_pending","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects":{get:{operationId:"product_objects_discover",tags:["Product objects"],summary:"Discover business object kinds, authored fields, and attached actions",description:"Returns compiled object kinds with field definitions, authored fields, JSON Schema for creation, and available attached actions with requirement schemas.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.discover","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either","x-error-codes":["approval_rejected","approval_required","customer_access_pending","environment_mismatch","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","resource_not_found","resource_reader_unavailable","state_conflict","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","device_login_expired","invalid_credentials","key_revoked","product_not_found","session_expired","session_required","session_revoked","tenant_status_forbidden"],responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_discoverOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/actions/{action}":{post:{operationId:"product_objects_execute",tags:["Product objects"],summary:"Execute an attached action with session-bound parties and required metadata",description:"Validates revision and subject requirements, updates object metadata, and executes the attached instrument action. Kind, object id and action are enough: the platform reads the revision, target, Core and digest the caller leaves out from the record as it stands, and checks any it sends. Requires an idempotency key.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{pay_for_day:{value:"prd_sandbox_97c43dbc8495d7ca"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{pay_for_day:{value:"day_pass"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{pay_for_day:{value:"obj_sandbox_12377d6f4b175d34"}}},{name:"action",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{pay_for_day:{value:"pay_for_day"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.objects.execute","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either","x-error-codes":["agent_cap_exceeded","agent_reason_required","agent_result_already_delivered","approval_rejected","approval_required","csrf_token_invalid","customer_access_pending","environment_mismatch","idempotency_conflict","idempotency_required","internal_error","invalid_request","method_not_allowed","missing_required_permission","missing_required_product_capability","missing_required_scope","not_found","oauth_client_not_admitted","operation_not_allowed","product_access_suspended","product_activation_required","rate_limited","request_body_too_large","resource_not_found","state_conflict","state_constraint_failed","subject_adapter_unbound","subject_evidence_stale","subject_field_unknown","subject_party_unbound","subject_requirement_missing","tenant_mismatch","tenant_not_found","unauthorized","agent_token_expired","agent_token_replaced","company_period_closed","cross_tenant_transfer_forbidden","currency_mismatch","device_login_expired","external_confirmation_conflict","external_confirmation_not_found","external_confirmation_resource_conflict","instrument_instance_not_found","insufficient_balance","invalid_credentials","key_revoked","ledger_transfer_rejected","ledger_unavailable","operation_not_finalized","product_not_found","provider_credential_missing","session_expired","session_required","session_revoked","target_needs_instance","tenant_status_forbidden","usage_source_conflict"],requestBody:{required:!1,content:{"application/json":{schema:{type:"object",properties:{expectedRevision:{description:"The revision you read. Omit it to act on the record as it stands; send it to refuse if the record changed since.",type:"integer",exclusiveMinimum:0,maximum:9007199254740991},productCoreId:{description:"Omit it to use the Core the target runs on: the agreement's own Core, or the current one for a new agreement.",type:"string",pattern:"^pbld_(sandbox|live)_[a-z0-9]{8,64}$"},digest:{description:"Omit it with productCoreId; send both to pin what you read.",type:"string",pattern:"^[a-f0-9]{64}$"},target:{description:"Omit it to act on the attachment's one open agreement, or to open one when there is none. With several open, the action refuses with target_needs_instance and lists them. A non-create action sent to an attachment that has an open agreement refuses the same way.",oneOf:[{type:"object",properties:{kind:{type:"string",const:"attachment"},attachment:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"}},required:["kind","attachment"],additionalProperties:!1},{type:"object",properties:{kind:{type:"string",const:"instance"},attachment:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"},instanceId:{type:"string",minLength:1,maxLength:160}},required:["kind","attachment","instanceId"],additionalProperties:!1}]},fields:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},input:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},persons:{type:"object",propertyNames:{type:"string",minLength:1,maxLength:80},additionalProperties:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Tenant-local customer ID"},description:"On a create, the person customer of this Product who fills each of the agreement's named persons, such as a guarantor. Each must be an active person who fills no other party. Refused on any other action."},onBehalfOf:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."}},required:[],additionalProperties:!1},examples:{pay_for_day:{value:{expectedRevision:2,productCoreId:"pbld_sandbox_8a41c0e95d7b2f36",digest:"56e8bb71197ba45bd0ead5b588bca39db9e16dcac8c9234a2ee15f0e143e3d01",target:{kind:"attachment",attachment:"payment"},onBehalfOf:"cus_sandbox_5d1e8a2c7b9f4036"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_objects_executeOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/export":{post:{operationId:"product_objects_export",tags:["Product objects","Founder login"],summary:"Export every matching record as a stored report",description:`Captures the complete authorized object query and stores the filter, schema and Core with immutable CSV bytes. Refuses sets over 1000 records.
10041
10041
 
@@ -10169,7 +10169,7 @@ object day_pass "Day pass" {
10169
10169
  expose create as book_day_pass
10170
10170
  expose pay as pay_for_day
10171
10171
  }
10172
- }`},partyBindings:{}}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_createOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]},get:{operationId:"product_list",tags:["Products"],summary:"List your Products",description:"List the Products in your company with their Core, plan tier, and status.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"productId",in:"query",required:!1,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"query",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:240},examples:{}},{name:"createdFrom",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"createdTo",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"status",in:"query",required:!1,schema:{type:"string",enum:["pending","active","disabled","closed"]},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.list","x-principal":"user_session","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/disable":{post:{operationId:"product_disable",tags:["Products"],summary:"Disable a product",description:"Moves an active Product to disabled operational status only after server-side clearing checks confirm no open customer access, unresolved internal transfers, or non-zero ledger balances/holds remain. A refusal is product_disable_open_activity with details.blockers in the product.closure.retrieve shape. An active API key is not one of those checks: while a Product is disabled its keys authenticate as suspended (product_access_suspended) in every environment, so the pause already stops them and demanding their revocation first would only ask you to undo by hand what disabling does. Products are never deleted: disable is reversible and close is the terminal record-keeping state.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.disable","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},reason:{type:"string",minLength:1,maxLength:240}},required:["tenantId","reason"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",reason:"Customer requested this lifecycle change."}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_disableOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/documents":{get:{operationId:"product_documents",tags:["Products"],summary:"Get the five documents a Core generates and its Assure certificate",description:"Returns the Business, Technical, Security, Infrastructure and Tests documents for the Product's current Core, or the saved Core productCoreId names, each a standalone HTML page that prints on A4. They are derived from the Core's compiled UDL, its checks, its program source and the checks' stored outcome: the Tests document names each check's verdict, its failure, the steps it reached, the simulate pass and its seed, the world it ran in, the Arc revision and when it ran. The same Core and outcome always return the same bytes, and each document carries the SHA-256 of its HTML. The certificate names the coreDigest and every check outcome, signed by the instance; it verifies against the instance public key in /release.json.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"productCoreId",in:"query",required:!1,schema:{description:"A saved Core of the Product; the current Core when omitted",type:"string",pattern:"^pbld_(sandbox|live)_[a-z0-9]{8,64}$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.documents","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_documentsOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/earn-rates":{get:{operationId:"product_earn_rate_list",tags:["Products"],summary:"List product earn rates",description:"Lists the configured earn rates for a product, one per earnable operation.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.earn.rate.list","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_earn_rate_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]},post:{operationId:"product_earn_rate_set",tags:["Products"],summary:"Configure a product earn rate",description:"Sets the tenant's fee on an earnable operation as basis points of the transfer amount, a flat amount, or both. The fee posts into the product revenue account atomically with the operation's transfer. Setting bps and flatAmount to zero or omitting both removes the rate.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.earn.rate.set","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},operationName:{type:"string",minLength:1,maxLength:120,pattern:"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"},bps:{type:"string",pattern:"^(0|[1-9][0-9]{0,3}|10000)$",description:"Fee in basis points of the transfer amount (0..10000)"},flatAmount:{type:"string",pattern:"^(0|[1-9][0-9]{0,17})$",description:"Non-negative minor-unit integer amount serialized as a string (at most 18 digits)"}},required:["tenantId","operationName"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",operationName:"account.create"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_earn_rate_setOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/earnings/settlements":{post:{operationId:"product_earnings_settle",tags:["Products"],summary:"Settle product earnings",description:"Moves accumulated earnings from the product revenue account to the tenant settlement account. The ledger rejects settling more than the revenue account holds.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.earnings.settle","x-principal":"api_key","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},transferId:{type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale transfer ID"},amount:{type:"string",pattern:"^[1-9][0-9]{0,17}$",description:"Positive minor-unit integer amount serialized as a string (at most 18 digits)"},currency:{type:"string",const:"SAR"}},required:["tenantId","amount","currency"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",amount:"1",currency:"SAR"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_earnings_settleOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/economic-snapshot":{get:{operationId:"product_economic_snapshot_retrieve",tags:["Products"],summary:"Read a Product economic revision and confirmed balances",description:"Reads the Product's declared economic records and their ledger balances as one consistent snapshot. Refuses unresolved Product instructions. Proposal records do not change the economic revision. Pending account reservations remain separate from posted balances.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.economic_snapshot.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_economic_snapshot_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/evidence":{get:{operationId:"product_evidence_export",tags:["Products"],summary:"Export the evidence bundle for one Core digest",description:"Returns everything an audit team keeps for one coreDigest, as a manifest of entries: the five Core documents, the checks' stored outcome, the Assure certificate, the plan the save reviewed with its planDigest when one was stored, the audit events that touched the Core, the scenario reports Assure stored for it in sandbox, and the public key the certificate verifies against. Each entry carries its SHA-256, and manifestDigest covers them all: two exports of the same digest with nothing new return the same manifestDigest. A digest the Product saved more than once reads its newest Core.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"coreDigest",in:"query",required:!1,schema:{description:"A Core digest the Product saved; the current Core's when omitted",type:"string",pattern:"^[a-f0-9]{64}$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.evidence.export","x-principal":"api_key","x-personal-access-token-scope":"activity:read","x-agent-scope":"activity:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_evidence_exportOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["activity:read"]}]}},"/v1/products/{productId}/guidance":{get:{operationId:"product_guidance_retrieve",tags:["Products"],summary:"Retrieve deterministic product guidance",description:"Returns the ordered, contract-owned guidance predicates for a product, combining activation readiness with operational signals such as active API keys and first activity.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.guidance.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_guidance_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/instruments-compose":{post:{operationId:"product_instruments_compose",tags:["Products"],summary:"Create a Product from an HSX program",description:"Check the HSX program, save it as the first Core with its price fixed, and set up the Product. A browser session also gets a start key, shown once. Any other caller makes keys with the CLI: hyperscale key create --product <productId>.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.instruments.compose","x-principal":"user_session","x-personal-access-token-scope":"blueprints:write","x-agent-scope":"blueprints:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},name:{type:"string",minLength:1,maxLength:120},program:{type:"object",properties:{source:{type:"string",minLength:1,maxLength:524288}},required:["source"],additionalProperties:!1},partyBindings:{type:"object",propertyNames:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"},additionalProperties:{type:"string",minLength:1,maxLength:160}},expectedPlanDigest:{type:"string",pattern:"^[a-f0-9]{64}$",description:"planDigest from the reviewed composer.plan. The transaction recomputes the plan and refuses with plan_stale, returning the new plan, when it differs."},catalogRevisionId:{type:"string",minLength:1,maxLength:160,description:"Immutable revision of the headers the tenant published, as a Core compiled with them"},extensionIds:{description:"Catalog extensions the program resolves from. Provenance only, recorded on the Core.",type:"array",items:{type:"string",enum:["booking","cards","collections","commerce","escrow","fees","financing","guarantee","lending","marketplace","money","obligations","people","purchase","rental","reporting","wallet"]}},metadata:{$ref:"#/components/schemas/product_instruments_composeInput/$defs/Metadata"},icon:{$ref:"#/components/schemas/product_instruments_composeInput/$defs/ProductIcon"},label:{type:"string",minLength:1,maxLength:80,description:"The account owner's name for this version, such as Dispute window 14 days"},note:{type:"string",minLength:1,maxLength:500,description:"What changed in this version and why"}},required:["tenantId","name","program","partyBindings"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",name:"Sandbox account",program:{source:"x"},partyBindings:{}}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_instruments_composeOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["blueprints:write"]}]}},"/v1/products/{productId}/instruments":{get:{operationId:"product_instruments_list",tags:["Products"],summary:"List the admitted Product instruments and typed fields",description:"Returns each instrument in the Product's current Core with its fields and lifecycle states, plus the Core id, digest, and currency.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.instruments.list","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_instruments_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/margin":{get:{operationId:"product_margin_retrieve",tags:["Products"],summary:"Retrieve the product margin view",description:"Joins the product's frozen plan rate card (the buy side: what the tenant pays Hyperscale per earnable operation) with its configured earn rates (the sell side: what the tenant charges on the same operations) into one per-operation margin line, so the tenant sees what each business event nets before setting prices.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.margin.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_margin_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/actions":{get:{operationId:"product_objects_actions",tags:["Product objects"],summary:"List available actions and required metadata for an object",description:"Returns actions with requiredNow computed against current object metadata. Pages contain up to limit agreement contexts (default 50, range 1-100), newest createdAt then ID first, without splitting an agreement's actions. Current-Core creation actions appear only on the first page. Evidence belongs only to returned actions. Follow nextCursor until absent; a scope, current Core or object revision change refuses the cursor with invalid_request.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum agreement contexts, 1-100, default 50. Every action in a selected agreement is returned."},examples:{}},{name:"onBehalfOf",in:"query",required:!1,schema:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.actions","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_actionsOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/agreements/{instanceId}/evidence":{get:{operationId:"product_objects_agreements_evidence_list",tags:["Product objects"],summary:"Read accepted action evidence for an object's agreement",description:"Returns immutable subject evidence under the agreement's retained Core. Items are ordered by occurredAt descending, then eventId descending, using the object family's cursor. Tied timestamps do not imply execution order. Protected fields use the record read's [unreadable] marker. Object read authority and agreement membership are required.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"instanceId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.agreements.evidence.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_agreements_evidence_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/agreements":{get:{operationId:"product_objects_agreements_list",tags:["Product objects"],summary:"Read every agreement attached to an object",description:"Includes closed agreements and agreements without public actions, across retained Cores. Terms come from the agreement snapshot, state and declared relationships from its retained Core. Account links carry their book and do not imply object balances. Boundary observations report received facts, never permission to settle. Latest observations are per declared check or instruction. Newest createdAt then instanceId first. Cursors bind the authorized object, caller and object revision.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"rootsOnly",in:"query",required:!1,schema:{type:"string",enum:["true","false"]},examples:{}},{name:"parentInstanceId",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:160},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.agreements.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_agreements_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}":{post:{operationId:"product_objects_create",tags:["Product objects"],summary:"Create an object with optional metadata and no financial agreement",description:"Creates a new business object instance with an optional externalId and optional metadata fields. The owner is the caller, or the customer named in onBehalfOf.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{day_pass:{value:"prd_sandbox_97c43dbc8495d7ca"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{day_pass:{value:"day_pass"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.objects.create","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},externalId:{type:"string",minLength:1,maxLength:2048},fields:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},onBehalfOf:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."}},required:["tenantId"],additionalProperties:!1},examples:{day_pass:{value:{fields:{day:"2026-10-11"},onBehalfOf:"cus_sandbox_5d1e8a2c7b9f4036"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_createOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]},{customerSession:[]}]},get:{operationId:"product_objects_list",tags:["Product objects"],summary:"List business objects of a kind",description:"Searches the full authorized set by external ID, declared column filters, agreement state and a declared date column. A signed-in customer's set is the records they own, the records where they are a party on an agreement, and the records with an entry action open for them; access on each item says which. Returns a total and facets for the full filtered set. A cursor refuses changed filters or authority.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"owner",in:"query",required:!1,schema:{type:"string",pattern:"^prn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale principal ID"},examples:{}},{name:"externalId",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2048},examples:{}},{name:"filters",in:"query",required:!1,content:{"application/json":{schema:{type:"object",propertyNames:{type:"string",minLength:1,maxLength:80},additionalProperties:{type:"string",maxLength:2048},"x-query-encoding":"json",description:"Encode this string-valued filter object as JSON in the filters query parameter."},examples:{}}}},{name:"agreementState",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:80},examples:{}},{name:"blockKey",in:"query",required:!1,schema:{type:"string",enum:["financing.installments","escrow.hold","money.hold","marketplace.listing","marketplace.order","marketplace.reservation","insurance.cover","insurance.claim"]},examples:{}},{name:"blockMetric",in:"query",required:!1,schema:{type:"string",enum:["overdue_installments","overdue_amount","held_funds","active_listings","awaiting_fulfilment","active_reservations","active_covers","submitted_claims"]},examples:{}},{name:"dueField",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:80},examples:{}},{name:"dueFrom",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"dueThrough",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects":{get:{operationId:"product_objects_discover",tags:["Product objects"],summary:"Discover business object kinds, authored fields, and attached actions",description:"Returns compiled object kinds with field definitions, authored fields, JSON Schema for creation, and available attached actions with requirement schemas.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.discover","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_discoverOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/actions/{action}":{post:{operationId:"product_objects_execute",tags:["Product objects"],summary:"Execute an attached action with session-bound parties and required metadata",description:"Validates revision and subject requirements, updates object metadata, and executes the attached instrument action. Kind, object id and action are enough: the platform reads the revision, target, Core and digest the caller leaves out from the record as it stands, and checks any it sends. Requires an idempotency key.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{pay_for_day:{value:"prd_sandbox_97c43dbc8495d7ca"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{pay_for_day:{value:"day_pass"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{pay_for_day:{value:"obj_sandbox_12377d6f4b175d34"}}},{name:"action",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{pay_for_day:{value:"pay_for_day"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.objects.execute","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},expectedRevision:{description:"The revision you read. Omit it to act on the record as it stands; send it to refuse if the record changed since.",type:"integer",exclusiveMinimum:0,maximum:9007199254740991},productCoreId:{description:"Omit it to use the Core the target runs on: the agreement's own Core, or the current one for a new agreement.",type:"string",pattern:"^pbld_(sandbox|live)_[a-z0-9]{8,64}$"},digest:{description:"Omit it with productCoreId; send both to pin what you read.",type:"string",pattern:"^[a-f0-9]{64}$"},target:{description:"Omit it to act on the attachment's one open agreement, or to open one when there is none. With several open, the action refuses with target_needs_instance and lists them. A non-create action sent to an attachment that has an open agreement refuses the same way.",oneOf:[{type:"object",properties:{kind:{type:"string",const:"attachment"},attachment:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"}},required:["kind","attachment"],additionalProperties:!1},{type:"object",properties:{kind:{type:"string",const:"instance"},attachment:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"},instanceId:{type:"string",minLength:1,maxLength:160}},required:["kind","attachment","instanceId"],additionalProperties:!1}]},fields:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},input:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},persons:{type:"object",propertyNames:{type:"string",minLength:1,maxLength:80},additionalProperties:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Tenant-local customer ID"},description:"On a create, the person customer of this Product who fills each of the agreement's named persons, such as a guarantor. Each must be an active person who fills no other party. Refused on any other action."},onBehalfOf:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."}},required:["tenantId"],additionalProperties:!1},examples:{pay_for_day:{value:{expectedRevision:2,productCoreId:"pbld_sandbox_8a41c0e95d7b2f36",digest:"56e8bb71197ba45bd0ead5b588bca39db9e16dcac8c9234a2ee15f0e143e3d01",target:{kind:"attachment",attachment:"payment"},onBehalfOf:"cus_sandbox_5d1e8a2c7b9f4036"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_objects_executeOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/export":{post:{operationId:"product_objects_export",tags:["Product objects"],summary:"Export every matching record as a stored report",description:"Captures the complete authorized object query and stores the filter, schema and Core with immutable CSV bytes. Refuses sets over 1000 records.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.objects.export","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},owner:{type:"string",pattern:"^prn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale principal ID"},externalId:{type:"string",minLength:1,maxLength:2048},filters:{type:"object",propertyNames:{type:"string",minLength:1,maxLength:80},additionalProperties:{type:"string",maxLength:2048},"x-query-encoding":"json",description:"Encode this string-valued filter object as JSON in the filters query parameter."},agreementState:{type:"string",minLength:1,maxLength:80},blockKey:{type:"string",enum:["financing.installments","escrow.hold","money.hold","marketplace.listing","marketplace.order","marketplace.reservation","insurance.cover","insurance.claim"]},blockMetric:{type:"string",enum:["overdue_installments","overdue_amount","held_funds","active_listings","awaiting_fulfilment","active_reservations","active_covers","submitted_claims"]},dueField:{type:"string",minLength:1,maxLength:80},dueFrom:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},dueThrough:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},required:["tenantId"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_exportOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/actions/{action}/preview":{post:{operationId:"product_objects_preview",tags:["Product objects"],summary:"Review an action without changing the record or moving money",description:"Evaluates a draft against the retained agreement and caller. Returns missing information, blockers and projected money, state and clock changes. Does not reserve money, consume evidence or contact a provider. Execution checks the facts again. New account IDs are draft references, not issued accounts.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{pay_for_day:{value:"prd_sandbox_97c43dbc8495d7ca"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{pay_for_day:{value:"day_pass"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{pay_for_day:{value:"obj_sandbox_12377d6f4b175d34"}}},{name:"action",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{pay_for_day:{value:"pay_for_day"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.preview","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},expectedRevision:{description:"The revision you read. Omit it to act on the record as it stands; send it to refuse if the record changed since.",type:"integer",exclusiveMinimum:0,maximum:9007199254740991},productCoreId:{description:"Omit it to use the Core the target runs on: the agreement's own Core, or the current one for a new agreement.",type:"string",pattern:"^pbld_(sandbox|live)_[a-z0-9]{8,64}$"},digest:{description:"Omit it with productCoreId; send both to pin what you read.",type:"string",pattern:"^[a-f0-9]{64}$"},target:{description:"Omit it to act on the attachment's one open agreement, or to open one when there is none. With several open, the action refuses with target_needs_instance and lists them. A non-create action sent to an attachment that has an open agreement refuses the same way.",oneOf:[{type:"object",properties:{kind:{type:"string",const:"attachment"},attachment:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"}},required:["kind","attachment"],additionalProperties:!1},{type:"object",properties:{kind:{type:"string",const:"instance"},attachment:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"},instanceId:{type:"string",minLength:1,maxLength:160}},required:["kind","attachment","instanceId"],additionalProperties:!1}]},fields:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},input:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},persons:{type:"object",propertyNames:{type:"string",minLength:1,maxLength:80},additionalProperties:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Tenant-local customer ID"},description:"On a create, the person customer of this Product who fills each of the agreement's named persons, such as a guarantor. Each must be an active person who fills no other party. Refused on any other action."},onBehalfOf:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."}},required:["tenantId"],additionalProperties:!1},examples:{pay_for_day:{value:{expectedRevision:2,productCoreId:"pbld_sandbox_8a41c0e95d7b2f36",digest:"56e8bb71197ba45bd0ead5b588bca39db9e16dcac8c9234a2ee15f0e143e3d01",target:{kind:"attachment",attachment:"payment"},onBehalfOf:"cus_sandbox_5d1e8a2c7b9f4036"}}}}}},responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_previewOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}":{get:{operationId:"product_objects_retrieve",tags:["Product objects"],summary:"Retrieve a business object by ID",description:"Returns the current revision, externalId, metadata fields, Core ID and standing for a business object, with each root agreement's state and progress. Standing matches product.objects.list for the same record.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.retrieve","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/timeline":{get:{operationId:"product_objects_timeline_list",tags:["Product objects"],summary:"Read what happened to an object",description:"Joins accepted actions, recorded refusals, state changes, confirmed ledger movements and reservations, clocks, subject evidence and provider observations. occurredAt uses effective time for accepted actions and provider boundary observations. In live, ledger receipts and refusals use recording time with timeBasis=recorded; in sandbox they date on the Product clock with timeBasis=effective, so one sandbox timeline reads one clock. Subject evidence uses recording time with timeBasis=recorded. Newest occurredAt then id first. Equal times do not establish causality; source operation and event identifiers are retained. agreement is null for facts recorded only against the object. Cursors bind the authorized object, caller and object revision.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.timeline.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_timeline_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/openapi":{get:{operationId:"product_openapi_retrieve",tags:["Products"],summary:"Get the Product's OpenAPI document from its admitted Core",description:"Returns an OpenAPI 3.1 document for the Product's current Core. It lists every Product API route, and each action the Core exposes on an object kind as its own operation at /v1/products/{productId}/objects/{kind}/{objectId}/actions/{action}, with that action's input schema. product.objects.execute is not listed: each action's operation is the execute call for that kind and action.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.openapi.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_openapi_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/operation-set":{get:{operationId:"product_operation_set_retrieve",tags:["Products"],summary:"Retrieve a product's frozen operation set",description:"Returns the latest Core's tenant-visible public actions, setup operations, reads, and persisted digests. Read input and output schemas and setup output schemas come from the frozen Core. Input schemas may omit some constraints; the server still checks every input in full. Frozen setup ids absent from the current catalog appear in unresolvedSetupOperationIds and are omitted from setupOperations. The response never includes the internal execution steps.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{default:{value:"prd_sandbox_00000000000000000001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{default:{value:"ten_sandbox_00000000000000000001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.operation_set.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_operation_set_retrieveOutput"},examples:{default:{value:{status:"frozen",productCoreId:"pbld_sandbox_00000000000000000001",coreDigest:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",tenantId:"ten_sandbox_00000000000000000001",productId:"prd_sandbox_00000000000000000001",environment:"sandbox",operations:[],tenantSurfaceVersion:3,tenantOperationSetDigest:"8bbd5d21c21fbab2b9051ebec508e3b945e2f2f9a299ca5625ee19e037e011d0",publicActions:[{name:"openSettlement",instrument:"held_settlement",inputSchema:{type:"object",additionalProperties:!1,properties:{}},outputSchema:{type:"object",additionalProperties:!1,properties:{}},actorPolicy:{principal:"api_key"},portPolicy:{kind:"none"},idempotencyPolicy:{mode:"required"},receiptPolicy:{type:"held_settlement.created",includeEvidence:!0},receiptEvidence:{required:[]}}],tenantReadOperationSetDigest:"094c5a503fe0059ad018977c331f9762b02256fd9e3697b4fc0a745894983d60",tenantSetupOperationSetDigest:"a458e40bb318cf50b536c5b1b5e131ebcba2b567f50f6566a334e9404391466d",readOperationIds:[],readOperations:[],setupOperationIds:[],setupOperations:[],unresolvedSetupOperationIds:[]}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/reactivate":{post:{operationId:"product_reactivate",tags:["Products"],summary:"Reactivate a product",description:"Restores a disabled Product to active operational status without changing product capabilities, credentials, or ledger state. Closed Products are terminal and cannot be reactivated.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.reactivate","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},reason:{type:"string",minLength:1,maxLength:240}},required:["tenantId","reason"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",reason:"Customer requested this lifecycle change."}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_reactivateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/recompose":{post:{operationId:"product_recompose",tags:["Products"],summary:"Admit a replacement Core",description:"Requires expectedPlanDigest from composer.plan with the same program and bindings: the plan binds the current Core, every changed term, the price and the toolchain. Omitting partyBindings preserves the current Core's bindings. Supplying partyBindings replaces the complete map, including an empty map. A business left out of that map saves unbound: its actions refuse with subject_party_unbound until a save binds it. Each bound business customer gets active access to the Product and a balance account if it lacks them. In live, binding an organization that is not verified refuses with entity_status_forbidden naming the party. In live only bindings change: the program must equal the current Core's source, or the save refuses with program_change_requires_sandbox. Change the program in sandbox and promote it. A save whose Core equals the current one returns the current Core and writes nothing. A sandbox Product with no Core saves the program as its first Core; a live one refuses with product_core_stale. New agreements use the replacement Core; retained agreements keep their original Core.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.recompose","x-principal":"user_session","x-personal-access-token-scope":"blueprints:write","x-agent-scope":"blueprints:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},productId:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},expectedPlanDigest:{type:"string",pattern:"^[a-f0-9]{64}$",description:"planDigest from the reviewed composer.plan. The transaction recomputes the plan and refuses with plan_stale, returning the new plan, when it differs."},program:{type:"object",properties:{source:{type:"string",minLength:1,maxLength:524288}},required:["source"],additionalProperties:!1},partyBindings:{type:"object",propertyNames:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"},additionalProperties:{type:"string",minLength:1,maxLength:160}},extensionIds:{type:"array",items:{type:"string"}},metadata:{$ref:"#/components/schemas/product_recomposeInput/$defs/Metadata"},label:{type:"string",minLength:1,maxLength:80,description:"The account owner's name for this version, such as Dispute window 14 days"},note:{type:"string",minLength:1,maxLength:500,description:"What changed in this version and why"}},required:["tenantId","productId","expectedPlanDigest","program"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",productId:"prd_sandbox_example0001",expectedPlanDigest:"86a7695eb7559a8d3b6914182edf3330d1ebb137bff7455cd342daf24d44ebb6",program:{source:"x"}}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_recomposeOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["blueprints:write"]}]}},"/v1/products/{productId}":{get:{operationId:"product_retrieve",tags:["Products"],summary:"Retrieve a Product",description:"Retrieve a Product joined with its Core, plan tier, go-live readiness and cost, and generated developer surfaces.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{"Sandbox Product summary":{value:"prd_sandbox_escrowmarket01"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{"Sandbox Product summary":{value:"ten_sandbox_founderco01"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.retrieve","x-principal":"user_session","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_retrieveOutput"},examples:{"Sandbox Product summary":{value:{productId:"prd_sandbox_escrowmarket01",tenantId:"ten_sandbox_founderco01",environment:"sandbox",displayName:"Vehicle Escrow Marketplace",slug:"vehicle-escrow-marketplace",kind:"offering",icon:"marketplace",status:"active",instrumentIds:["vehicle_listing","vehicle_escrow"],pricing:{current:{monthly:"100000",setup:"500000",complexityScore:0,currency:"SAR",rates:[],priceBasisIdentity:"0ad3400406a50023d899ff74c0723eb1c94e1d5ab602e09ba58692a96551b12c"}},readiness:{live:!1,blockers:[{code:"commercial_requirement_unsatisfied",requirementId:"kyb_approved"},{code:"commercial_requirement_unsatisfied",requirementId:"live_ledger_partition"}]},capabilities:[{capabilityId:"accounts",name:"Accounts"}],cost:{currency:"SAR",platformMonthly:"100000",platformSetup:"500000",liveCapableCount:0,recurringCharges:[],usageCharges:[],estimatedMonthlyFixed:"100000",blockers:[],complete:!0},boundary:{dailyStatementFetch:!1}}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]},patch:{operationId:"product_update",tags:["Products"],summary:"Update a product",description:"Updates a Product's display name, business description, icon or boundary settings. Omitted fields stay unchanged; null clears the description. boundary.dailyStatementFetch switches on the boundary worker's scheduled fetch: once a day it runs bank_statement.fetch_and_import for each account a bank mirrors on the Product, for the bank day that ended at UTC midnight, and posts nothing. It is off by default and only a live Product takes it. The slug and product id are stable handles referenced by keys, docs, and integrations, so a rename never changes them; closed Products are terminal records and cannot be renamed.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{default:{value:"prd_sandbox_escrow0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.update","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},reason:{type:"string",minLength:1,maxLength:240},displayName:{type:"string",minLength:1,maxLength:120},businessDescription:{anyOf:[{type:"string",maxLength:2e3},{type:"null"}]},icon:{$ref:"#/components/schemas/product_updateInput/$defs/ProductIcon"},boundary:{description:"The Product's boundary settings. Only a live Product takes them; omitted, they stay unchanged.",type:"object",properties:{dailyStatementFetch:{type:"boolean",description:"Fetch and import each mirrored account's statement once a day, posting nothing."}},required:["dailyStatementFetch"],additionalProperties:!1}},required:["tenantId","reason"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_riyadhresale01",displayName:"Escrow Marketplace KSA",reason:"Product renamed for the Saudi launch"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_updateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{tenantId:"ten_sandbox_riyadhresale01",productId:"prd_sandbox_escrow0001",displayName:"Escrow Marketplace KSA",icon:"marketplace",boundary:{dailyStatementFetch:!1},updatedAt:"2026-06-11T12:00:00.000Z",reason:"Product renamed for the Saudi launch"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/schedule":{get:{operationId:"product_schedule_list",tags:["Product objects"],summary:"Read the schedule for one product",description:"Lists dated actions: automatic ones upcoming, due, completed or refused, and dated human actions upcoming or due, each with who acts, who pays when the action moves money, and the effective product time. An automatic action whose due time has passed but which needs a record in another state, such as a schedule piece before the payer activates the schedule, is waiting and runs once that record changes. A repeating automatic action, such as a late fee's charge, lists each past piece as completed with the amount it took beside the next one. One whose record can never reach that state never runs: it is waived when someone waived that record, such as a waived late fee, cancelled when someone cancelled or stopped it, such as a piece of a stopped schedule, and ended when the record finished another way, such as completed or expired. A waived or cancelled piece is not work. A refused automatic action carries its reason and whether it retries. An unfunded charge retries: the maintenance sweep retries it about once a minute, and in sandbox the next clock advance and an action on its record retry it too. Any other refusal is lasting and does not retry on its own; it shows as work for the team, and an action on its record or a write to it retries it.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"objectId",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:160},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.schedule.list","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_schedule_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/treasury":{get:{operationId:"product_treasury_retrieve",tags:["Products"],summary:"Retrieve product treasury balances",description:"Reads the product credit (prepaid spend) and earn-rate fee account balances live from the ledger, and the product's posted revenue to date.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.treasury.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_treasury_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/work":{get:{operationId:"product_work_list",tags:["Product objects"],summary:"Read work for one product",description:"Returns due human work and facts waiting on a customer, provider or clock. Counts cover the authorized product when complete, and are unknown when more candidates remain.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.work.list","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_work_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/provider-credentials":{get:{operationId:"provider_credential_list",tags:["Provider credential"],summary:"List provider credentials",description:"Lists the active credentials of the calling tenant's environment with kind, fingerprint and when and by whom each was set. The value is never returned.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"adapter",in:"query",required:!1,schema:{type:"string",pattern:"^[a-z][a-z0-9_.-]{0,79}$",description:"The provider adapter that declares the credential."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"provider_credential.list","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"founder_cli","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/provider_credential_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]},post:{operationId:"provider_credential_set",tags:["Provider credential"],summary:"Set a provider credential",description:"Seals the secret your provider account issued for one credential an adapter declares, in the calling tenant's environment, and revokes the one it replaces. The kind comes from the declaration. Only the company owner sets it, from a browser session or their own CLI login, with their password; an agent never does. Hyperscale stores your provider account's credential and is never the merchant of record.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"provider_credential.set","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"founder_cli","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},adapter:{type:"string",pattern:"^[a-z][a-z0-9_.-]{0,79}$",description:"The provider adapter that declares the credential."},credential:{type:"string",pattern:"^[a-z][a-zA-Z0-9_]{0,79}$",description:"The credential's name in the adapter's credentials section."},secret:{type:"string",minLength:1,maxLength:32768,description:"The secret the provider issued. Sealed on write and never returned. An api_key or hmac_sha256 credential is the bare value; an mtls one is JSON with the PEM `cert`, `key` and optional `ca`; an oauth_client one is JSON with `clientId`, `clientSecret` and optional `ca`."},password:{type:"string",minLength:1,maxLength:1024,description:"The account owner's password, checked again before the write."}},required:["tenantId","adapter","credential","secret","password"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",adapter:"x",credential:"x",secret:"x",password:"x"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/provider_credential_setOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/provider-credentials/revoke":{post:{operationId:"provider_credential_revoke",tags:["Provider credential"],summary:"Revoke a provider credential",description:"Ends the active credential so no further provider call sends it. A live Product whose adapter needs it is refused provider_credential_missing until a new one is set. Owner only, with their password, never an agent.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"provider_credential.revoke","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"founder_cli","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},adapter:{type:"string",pattern:"^[a-z][a-z0-9_.-]{0,79}$",description:"The provider adapter that declares the credential."},credential:{type:"string",pattern:"^[a-z][a-zA-Z0-9_]{0,79}$",description:"The credential's name in the adapter's credentials section."},password:{type:"string",minLength:1,maxLength:1024,description:"The account owner's password, checked again before the write."}},required:["tenantId","adapter","credential","password"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",adapter:"x",credential:"x",password:"x"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/provider_credential_revokeOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/receipts":{get:{operationId:"receipt_list",tags:["History"],summary:"List Receipts",description:"List Receipts as a cursor-paginated page. The durable proof that an operation completed: what ran, for which company, and the terminal outcome. An operation that promises a receipt is not finished until one exists.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"productId",in:"query",required:!1,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"query",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:240},examples:{}},{name:"createdFrom",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"createdTo",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"receipt.list","x-principal":"api_key","x-personal-access-token-scope":"activity:read","x-agent-scope":"activity:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/receipt_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["activity:read"]}]}},"/v1/receipts/{receiptId}":{get:{operationId:"receipt_retrieve",tags:["History"],summary:"Retrieve a Receipt",description:"Retrieve a single Receipt by its receiptId. The durable proof that an operation completed: what ran, for which company, and the terminal outcome. An operation that promises a receipt is not finished until one exists.",parameters:[{name:"receiptId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"rcp_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"productId",in:"query",required:!1,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"receipt.retrieve","x-principal":"api_key","x-personal-access-token-scope":"activity:read","x-agent-scope":"activity:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/receipt_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["activity:read"]}]}},"/v1/reconciliation-exceptions":{get:{operationId:"reconciliation_exception_list",tags:["Reconciliation"],summary:"List reconciliation exceptions",description:"Lists statement lines no ledger fact explains, oldest first, across every statement or one.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"bankStatementId",in:"query",required:!1,schema:{type:"string",pattern:"^bst_(sandbox|live)_[a-z0-9]{8,64}$",description:"Bank statement ID"},examples:{}},{name:"status",in:"query",required:!1,schema:{description:"Defaults to open.",type:"string",enum:["open","resolved"]},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"reconciliation.exception.list","x-principal":"user_session","x-personal-access-token-scope":"finance:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/reconciliation_exception_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/reconciliation-exceptions/{bankStatementLineId}/reopen":{post:{operationId:"reconciliation_exception_reopen",tags:["Reconciliation"],summary:"Reopen a resolved reconciliation exception",description:"Puts one resolved line back to open with the reason it was raised with. A linked line gives up its transfer, which another line can then claim, and the statement's resolved count falls by one. Only a resolved line reopens; a line the matcher explained stays matched.",parameters:[{name:"bankStatementLineId",in:"path",required:!0,schema:{type:"string",pattern:"^bsl_(sandbox|live)_[a-z0-9]{8,64}$",description:"Bank statement line ID"},examples:{example:{value:"bsl_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"reconciliation.exception.reopen","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"}},required:["tenantId"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/reconciliation_exception_reopenOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/reconciliation-exceptions/{bankStatementLineId}/resolve":{post:{operationId:"reconciliation_exception_resolve",tags:["Reconciliation"],summary:"Resolve a reconciliation exception",description:"Closes one open exception: link it to a posted transfer no other line claims, in the line's currency and for the line's amount, or mark it outside the ledger with a note. A transfer whose posted amount differs is refused with both amounts; a partial capture is closed outside the ledger with a note. The line keeps the reason it was raised with.",parameters:[{name:"bankStatementLineId",in:"path",required:!0,schema:{type:"string",pattern:"^bsl_(sandbox|live)_[a-z0-9]{8,64}$",description:"Bank statement line ID"},examples:{example:{value:"bsl_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"reconciliation.exception.resolve","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},resolution:{type:"string",enum:["linked","outside_ledger"]},transferId:{description:"The posted transfer that explains the line. Required to link.",type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$"},note:{description:"Why the line is outside the ledger. Required for outside_ledger.",type:"string",minLength:1,maxLength:500}},required:["tenantId","resolution"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",resolution:"linked"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/reconciliation_exception_resolveOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/records":{post:{operationId:"record_put",tags:["Record"],summary:"Store a record",description:"Stores a document, message, thread, note, count, event, judgement or extract once per SHA-256 digest. A document's digest is the hash of its bytes; any other kind's is the hash of its JSON. A second put of the same bytes returns the first record with created false. A document put with document.signedAt and parties signs it, once. Storing writes a records confirmation under the digest and signing writes another, which is what an instrument's record evidence reads. Nothing moves money and Arc never reads the content.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"record.put","x-principal":"user_session","x-personal-access-token-scope":"records:write","x-agent-scope":"records:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},title:{type:"string",minLength:1,maxLength:300},refs:{maxItems:20,type:"array",items:{type:"object",properties:{kind:{type:"string",enum:["operation","instance","account","customer","product","record"]},id:{type:"string",minLength:1,maxLength:200}},required:["kind","id"],additionalProperties:!1},description:"Arc facts and records this record is about: an operation, instrument instance, account, customer, Product or another record, by id"},text:{description:"The words of a message, note, judgement, event or extract. The store keeps them as JSON bytes with the kind's fields and hashes those",type:"string",minLength:1,maxLength:65536},kind:{type:"string",enum:["document","message","thread","note","count","event","judgement","extract"]},content:{description:"A document's bytes, base64. Up to 512 KiB stays in the row; up to 720 KiB goes to the blob store",type:"string",maxLength:983040,format:"base64",contentEncoding:"base64",pattern:"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"},mediaType:{description:"A document's media type; defaults to application/pdf",type:"string",maxLength:120,pattern:"^[a-z0-9.+-]+\\/[a-z0-9.+-]+$"},document:{type:"object",properties:{parties:{minItems:1,maxItems:20,type:"array",items:{type:"string",minLength:1,maxLength:200},description:"Who signed: customer or account ids. A record signed_by requirement matches the signing party's account or its owner"},signedAt:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},expiresAt:{description:"When the signature stops counting; a record signed_by requirement refuses evidence_expired after it",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},required:["parties","signedAt"],additionalProperties:!1},message:{type:"object",properties:{threadId:{type:"string",pattern:"^rec_(sandbox|live)_[a-z0-9]{8,64}$",description:"Record ID"},direction:{type:"string",enum:["inbound","outbound"]},from:{type:"string",minLength:1,maxLength:320},to:{maxItems:50,type:"array",items:{type:"string",minLength:1,maxLength:320}},sentAt:{description:"Defaults to now",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},provider:{type:"string",minLength:1,maxLength:80},providerReference:{type:"string",minLength:1,maxLength:200}},required:["threadId","direction"],additionalProperties:!1},thread:{type:"object",properties:{status:{description:"Defaults to open",type:"string",enum:["open","waiting","closed"]},assignee:{description:"A member or agent member id",type:"string",minLength:1,maxLength:200},customerId:{type:"string",minLength:1,maxLength:200}},additionalProperties:!1},note:{type:"object",properties:{subject:{type:"object",properties:{kind:{type:"string",enum:["operation","instance","account","customer","product","record"]},id:{type:"string",minLength:1,maxLength:200}},required:["kind","id"],additionalProperties:!1}},required:["subject"],additionalProperties:!1},count:{type:"object",properties:{measure:{type:"string",minLength:1,maxLength:120,description:"What was counted, such as stock:sku-114"},unit:{type:"string",minLength:1,maxLength:40},quantity:{type:"string",pattern:"^-?(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$",description:"A decimal quantity, up to six places"},location:{type:"string",minLength:1,maxLength:200},at:{description:"When it was measured; defaults to now",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},required:["measure","unit","quantity"],additionalProperties:!1},event:{type:"object",properties:{startsAt:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},endsAt:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},attendees:{maxItems:100,type:"array",items:{type:"string",minLength:1,maxLength:200}}},required:["startsAt"],additionalProperties:!1},judgement:{type:"object",properties:{decision:{type:"string",minLength:1,maxLength:200},reasons:{default:[],maxItems:20,type:"array",items:{type:"string",minLength:1,maxLength:2e3}},decidedAt:{description:"Defaults to now",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},required:["decision"],additionalProperties:!1},extract:{type:"object",properties:{sourceDigest:{type:"string",pattern:"^[a-f0-9]{64}$",description:"The digest of the document these fields were read from"},fields:{type:"object",propertyNames:{type:"string"},additionalProperties:{$ref:"#/components/schemas/record_putInput/$defs/__schema0"}},confidence:{description:"Confidence in basis points",type:"integer",minimum:0,maximum:1e4}},required:["sourceDigest","fields"],additionalProperties:!1}},required:["tenantId","kind"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",kind:"document"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/record_putOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["records:write"]}]},get:{operationId:"record_search",tags:["Record"],summary:"Search records",description:"Lists records newest first, by kind, by an id the record names in refs, by thread, by title text and by time. Metadata only; read one record for its bytes.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"kind",in:"query",required:!1,schema:{type:"string",enum:["document","message","thread","note","count","event","judgement","extract"]},examples:{}},{name:"refId",in:"query",required:!1,schema:{description:"Records that name this Arc fact or record",type:"string",minLength:1,maxLength:200},examples:{}},{name:"threadId",in:"query",required:!1,schema:{description:"Messages in this thread",type:"string",pattern:"^rec_(sandbox|live)_[a-z0-9]{8,64}$"},examples:{}},{name:"title",in:"query",required:!1,schema:{description:"Records whose title contains this text, any case",type:"string",minLength:1,maxLength:300},examples:{}},{name:"createdFrom",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"createdTo",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"record.search","x-principal":"user_session","x-personal-access-token-scope":"records:read","x-agent-scope":"records:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/record_searchOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["records:read"]}]}},"/v1/records/{recordId}":{get:{operationId:"record_retrieve",tags:["Record"],summary:"Read a record",description:"Returns one record's metadata, and with content=true its bytes byte for byte. A blob-stored record reads its bytes from the blob store and checks them against the digest.",parameters:[{name:"recordId",in:"path",required:!0,schema:{type:"string",pattern:"^rec_(sandbox|live)_[a-z0-9]{8,64}$",description:"Record ID"},examples:{example:{value:"rec_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"content",in:"query",required:!1,schema:{description:"true returns the bytes as base64 as well",type:"string",enum:["true","false"]},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"record.retrieve","x-principal":"user_session","x-personal-access-token-scope":"records:read","x-agent-scope":"records:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/record_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["records:read"]}]}},"/v1/refunds":{post:{operationId:"refund_create",tags:["Refund"],summary:"Refund a payment",description:"Moves a posted payment into a Product's pool back to the account that paid it, in full or in part, as a correction of the payment. A full refund first gives back the earn-rate fees taken on the payment; a partial refund leaves them in place. A payment takes one refund: a second refund, or a refund of a payment that already has a reversal or return, is refused with transfer_lineage_conflict naming the existing transfer, and a payment with a return in progress is refused with transfer_return_exists. Platform fee transfers and payments into any account other than a Product pool cannot be refunded here.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"refund.create","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},paymentTransferId:{type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$",description:"The posted payment to refund: a transfer into a Product's pool account."},amount:{description:"Minor units to refund, at most the payment. Omit to refund the whole payment.",type:"string",pattern:"^[1-9][0-9]{0,17}$"},reason:{type:"string",enum:["duplicate","fraudulent","requested_by_customer"]},transferId:{description:"Names the refund transfer. Omit to derive one from the request.",type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$"}},required:["tenantId","paymentTransferId"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",paymentTransferId:"trn_sandbox_example0001"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/refund_createOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/reports/{reportingArtifactId}/download":{get:{operationId:"report_artifact_download",tags:["Report"],summary:"Download immutable stored report bytes",description:"Returns a stored report as JSON or CSV with its filename, SHA-256 digest, and size. A format the report does not declare is refused.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"reportingArtifactId",in:"path",required:!0,schema:{type:"string",pattern:"^rpt_(sandbox|live)_[a-z0-9]{8,64}$",description:"Reporting artifact ID"},examples:{example:{value:"rpt_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"format",in:"query",required:!0,schema:{type:"string",enum:["json","csv"]},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"report.artifact.download","x-principal":"user_session","x-personal-access-token-scope":"billing:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/report_artifact_downloadOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/reports":{get:{operationId:"report_artifact_list",tags:["Report"],summary:"List stored report metadata without bodies",description:"Lists the metadata of the Product's stored reports. Use retrieve or download for the content.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"after",in:"query",required:!1,schema:{type:"string",pattern:"^rpt_(sandbox|live)_[a-z0-9]{8,64}$",description:"Reporting artifact ID"},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"report.artifact.list","x-principal":"user_session","x-personal-access-token-scope":"billing:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/report_artifact_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]},post:{operationId:"report_request",tags:["Report"],summary:"Capture a declared report",description:"Evaluates a frozen Core definition over a complete reporting checkpoint at the Product clock. Refuses unresolved operations, unavailable facts and unsupported history. The caller supplies no report rows or balances. External release requires a separate approved operation.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"report.request","x-principal":"user_session","x-personal-access-token-scope":"billing:write","x-agent-scope":"billing:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},definitionId:{type:"string",minLength:1,maxLength:80},periodStart:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},correction:{type:"object",properties:{artifactId:{type:"string",pattern:"^rpt_(sandbox|live)_[a-z0-9]{8,64}$",description:"Reporting artifact ID"},reason:{type:"string",minLength:1,maxLength:240}},required:["artifactId","reason"],additionalProperties:!1}},required:["tenantId","definitionId","periodStart"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",definitionId:"resource_sandbox_example0001",periodStart:"2026-01-01T00:00:00.000Z"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/report_requestOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/reports/{reportingArtifactId}/replay":{get:{operationId:"report_artifact_replay",tags:["Report"],summary:"Verify byte-identical replay from retained inputs",description:"Rebuilds a stored report from its retained inputs and confirms the result matches the stored bytes. If the bytes differ, the call fails.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"reportingArtifactId",in:"path",required:!0,schema:{type:"string",pattern:"^rpt_(sandbox|live)_[a-z0-9]{8,64}$",description:"Reporting artifact ID"},examples:{example:{value:"rpt_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"report.artifact.replay","x-principal":"user_session","x-personal-access-token-scope":"billing:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/report_artifact_replayOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/reports/{reportingArtifactId}":{get:{operationId:"report_artifact_retrieve",tags:["Report"],summary:"Retrieve a stored report and provenance manifest",description:"Returns one stored report's metadata, definition, provenance manifest, and JSON body.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"reportingArtifactId",in:"path",required:!0,schema:{type:"string",pattern:"^rpt_(sandbox|live)_[a-z0-9]{8,64}$",description:"Reporting artifact ID"},examples:{example:{value:"rpt_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"report.artifact.retrieve","x-principal":"user_session","x-personal-access-token-scope":"billing:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/report_artifact_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/report-definitions/{definitionId}/activate":{post:{operationId:"report_definition_activate",tags:["Report"],summary:"Activate a reporting definition",description:"Binds activation to the exact definition and Core digests. Routine report requests use this activation.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"definitionId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"report.definition.activate","x-principal":"user_session","x-personal-access-token-scope":"billing:write","x-agent-scope":"billing:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},definitionDigest:{type:"string",pattern:"^[a-f0-9]{64}$"},coreDigest:{type:"string",pattern:"^[a-f0-9]{64}$"}},required:["tenantId","definitionDigest","coreDigest"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",definitionDigest:"86a7695eb7559a8d3b6914182edf3330d1ebb137bff7455cd342daf24d44ebb6",coreDigest:"86a7695eb7559a8d3b6914182edf3330d1ebb137bff7455cd342daf24d44ebb6"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/report_definition_activateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/products/{productId}/report-definitions":{get:{operationId:"report_definition_list",tags:["Report"],summary:"List permitted Core report definitions",description:"Lists the report definitions in the Product's current Core that the caller's role may read, each marked activated or not.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"report.definition.list","x-principal":"user_session","x-personal-access-token-scope":"billing:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/report_definition_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/sandbox/account-funding":{post:{operationId:"sandbox_account_fund",tags:["Sandbox"],summary:"Fund a sandbox account",description:"Posts a settled credit into a sandbox account from a system funding source so developers can seed test balances themselves. Self-serve with a product API key or portal session and confined to the sandbox environment; it never moves live money.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"sandbox.account.fund","x-principal":"api_key","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},transferId:{type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale transfer ID"},destinationAccountId:{type:"string",pattern:"^acct_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale account ID"},amount:{type:"string",maxLength:15,pattern:"^[1-9][0-9]{0,17}$",description:"Positive minor-unit integer amount serialized as a string, capped at 15 digits per call"},currency:{type:"string",pattern:"^[A-Z]{3}$"}},required:["tenantId","destinationAccountId","amount","currency"],additionalProperties:!1},examples:{fund_customer_balance:{value:{tenantId:"ten_sandbox_riyadhresale01",destinationAccountId:"acct_sandbox_aisha0001",amount:"1000000",currency:"SAR"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/sandbox_account_fundOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]}]}},"/v1/sandbox/clock/advance":{post:{operationId:"sandbox_clock_advance",tags:["Sandbox"],summary:"Advance the sandbox Product clock",description:"Advances the sandbox clock of the Product bound to the key, or productId named by an authorised tenant session. A key cannot name another Product. Due actions, deadlines and allocation earning read this instant. An unused Product may set its first clock instant in the past, at most 18 calendar months before tenant creation. Business objects, instrument events and money movements prevent a past start. Once set, at only moves the clock forward. Send release instead of at to return the clock to wall time at any point, including from ahead of it; records stamped while the clock ran ahead keep their stamps. Before it responds, the advance runs every clock action that is now due, counts them in ranCount and lists the first 2000 in ran: the record and its title, the customer, the action and the same action in the program's words, its due instant and, for a banking clock that rolled past a closed day, the calendar instant it rolled from, succeeded or refused, the amount it moves, and for a refusal the reason and, when it is an unfunded charge, that it retries and the account, the amount it needed and the shortfall. Each advance first retries every unfunded charge refused before it, oldest first, and the maintenance sweep retries one about once a minute. Any other refusal is lasting: it carries no retries, stays refused until an action on its record or a write to it, and shows as work for the team. A clock action whose action requires a reference in a state, such as a schedule piece before the payer activates the schedule, waits and is not listed; the activation collects it. A due on any other action only makes it runnable, and a passed deadline refuses its action. The receipt records its previous and new instants. Wall time and other Products are unchanged.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"sandbox.clock.advance","x-principal":"api_key","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},productId:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},at:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},release:{type:"boolean",const:!0}},required:["tenantId"],additionalProperties:!1},examples:{one_month:{value:{productId:"prd_sandbox_97c43dbc8495d7ca",at:"2026-11-11T00:00:00Z"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/sandbox_clock_advanceOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/sandbox-clock":{get:{operationId:"sandbox_clock_retrieve",tags:["Sandbox"],summary:"Read the sandbox Product clock",description:"Returns the same effective time used by Product execution. Host mode follows wall time; frozen mode stays at the last clock advance. Observation time always uses wall time.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"sandbox.clock.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"sandbox",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/sandbox_clock_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/sandbox/customer-access/{customerAccessId}/activate":{post:{operationId:"sandbox_customer_access_activate",tags:["Customers"],summary:"Activate sandbox customer access",description:"Activates an authorized sandbox customer-access binding. Customer identity evidence belongs to the customer object action; this operation records access state. When the deployment names an organization verification provider, a pending organization goes to it first: approval verifies the organization, refusal rejects it and blocks this access.",parameters:[{name:"customerAccessId",in:"path",required:!0,schema:{type:"string",pattern:"^cacc_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale customer access ID"},examples:{activate_onboarded_customer:{value:"cacc_sandbox_aisha0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"sandbox.customer_access.activate","x-principal":"api_key","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"}},required:["tenantId"],additionalProperties:!1},examples:{activate_onboarded_customer:{value:{tenantId:"ten_sandbox_riyadhresale01"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/sandbox_customer_access_activateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]}]}},"/v1/sandbox/rehearsals":{post:{operationId:"sandbox_rehearsal_create",tags:["Sandbox"],summary:"Create a fresh rehearsal Product",description:"Copies the frozen Core into a new sandbox Product with new keys and a fresh clock. Prior Products and evidence remain readable. Requires Product creation and key mint authority.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"sandbox.rehearsal.create","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},productId:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},name:{type:"string",minLength:1,maxLength:120}},required:["tenantId","productId","name"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",productId:"prd_sandbox_example0001",name:"Sandbox account"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/sandbox_rehearsal_createOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/health":{get:{operationId:"system_health",tags:["System"],summary:"Check API health",description:"Returns unauthenticated liveness and the exact release commit for monitors and deployment proof. It does not expose tenant, product, or provider state.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"system.health","x-principal":"public","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/system_healthOutput"},examples:{"healthy release":{value:{status:"ok",checkedAt:"2026-08-16T12:00:00.000Z",releaseCommit:"325e7c9a1b64f69fd1e9e936090477ccf14e0ef3"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[]}},"/v1/team/invitations":{get:{operationId:"team_invitation_list",tags:["Team"],summary:"List pending invitations for the caller's team",description:"Returns pending, unexpired invitations ordered by createdAt ascending then ID descending. Limit defaults to 50 and accepts integers from 1 to 100. Follow nextCursor until absent. Cursors bind the environment, tenant and team; another scope refuses with invalid_request. Requires the same team read permission as team.member.list. Contains no invitation tokens.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{default:{value:"ten_sandbox_00000000000000000001"}}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"team.invitation.list","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/team_invitation_listOutput"},examples:{default:{value:{teamId:"team_sandbox_00000000000000000001",items:[{invitationId:"tinv_sandbox_00000000000000000001",email:"developer@example.com",role:"developer",invitedByUserId:"usr_sandbox_00000000000000000001",expiresAt:"2026-01-08T00:00:00.000Z",createdAt:"2026-01-01T00:00:00.000Z"}]}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["activity:read"]}]}},"/v1/team/members/invite":{post:{operationId:"team_member_invite",tags:["Team"],summary:"Invite an email address to the caller's team",description:"Persists a durable pending invitation binding an email address to a team role: a seeded role name or a custom team role id. In sandbox the invited person signs up with the invite token to join this team. In live an existing sandbox member with a verified matching email redeems the invitation by switching to live. The switch assigns the invited live role and consumes the invitation atomically; it does not change sandbox membership. The invite token is a one-time secret surfaced only in the first API response, never in receipts or replays; only its SHA-256 hash is stored. One pending invitation may exist per email per team; invitations expire after seven days. productIds names the Products (Cores) the membership will reach, as sandbox ids; null is every Product, and an id that is not a Product of the company is refused.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.member.invite","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},email:{type:"string",maxLength:254,format:"email",pattern:"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},role:{anyOf:[{type:"string",enum:["owner","admin","developer","operations","finance","viewer"]},{type:"string",pattern:"^trole_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale custom team role ID"}],description:"Seeded role name or custom team role ID"},productIds:{description:"The Products (Cores) the member will reach; null or omitted is every Product. A caller who holds some Products names only those",anyOf:[{maxItems:50,type:"array",items:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"}},{type:"null"}]}},required:["tenantId","email","role"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001",email:"developer@example.com",role:"developer"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/team_member_inviteOutput"},examples:{default:{value:{invitationId:"tinv_sandbox_00000000000000000001",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",email:"developer@example.com",role:"developer",productIds:null,invitedByUserId:"usr_sandbox_00000000000000000001",inviteToken:"hyperscale_invite_0123456789abcdefghijklmnopqrstuv",expiresAt:"2026-01-08T00:00:00.000Z",status:"pending"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/team/members/invitations/{invitationId}/revoke":{post:{operationId:"team_member_invite_revoke",tags:["Team"],summary:"Revoke a pending team invitation",description:"Immediately invalidates a pending invitation: it can no longer be redeemed by sandbox signup or live session switching, and the email address becomes invitable again. Accepted invitations cannot be revoked. Idempotent: revoking an already-revoked invitation succeeds with status already_revoked.",parameters:[{name:"invitationId",in:"path",required:!0,schema:{type:"string",pattern:"^tinv_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale team invitation ID"},examples:{default:{value:"tinv_sandbox_00000000000000000001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.member.invite.revoke","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"}},required:["tenantId"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/team_member_invite_revokeOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{invitationId:"tinv_sandbox_00000000000000000001",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",email:"developer@example.com",updatedAt:"2026-01-02T00:00:00.000Z",status:"revoked"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/team/members":{get:{operationId:"team_member_list",tags:["Team"],summary:"List the caller's team members",description:"Returns the membership roll of the caller's team with each member's email, display name, role, status, and join time, oldest first. The roll pages on `limit` and `cursor`; `nextCursor` is absent on the last page. Pending invitations page independently through team.invitation.list. Requires an authenticated user session on the team's tenant.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{default:{value:"ten_sandbox_00000000000000000001"}}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"team.member.list","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/team_member_listOutput"},examples:{default:{value:{teamId:"team_sandbox_00000000000000000001",members:[{membershipId:"tmem_sandbox_00000000000000000001",userId:"usr_sandbox_00000000000000000001",email:"founder@example.com",displayName:"Founder Example",role:"owner",productIds:null,status:"active",joinedAt:"2026-01-01T00:00:00.000Z"}]}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["activity:read"]}]}},"/v1/team/members/{userId}/remove":{post:{operationId:"team_member_remove",tags:["Team"],summary:"Remove a member from the caller's team",description:"Deletes the member's team membership and revokes their active sessions so the removed member can no longer act on the team. The last remaining owner cannot be removed. The user record itself is not deleted.",parameters:[{name:"userId",in:"path",required:!0,schema:{type:"string",pattern:"^usr_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale user ID"},examples:{default:{value:"usr_sandbox_00000000000000000002"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.member.remove","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"}},required:["tenantId"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/team_member_removeOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{membershipId:"tmem_sandbox_00000000000000000002",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",userId:"usr_sandbox_00000000000000000002",role:"developer",sessionsRevoked:1,removedAt:"2026-01-02T00:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/team/members/{userId}/role":{post:{operationId:"team_member_role_update",tags:["Team"],summary:"Change a team member's role, staff roles and Products",description:"Updates the member's role on their team membership, and with staffRoles the staff roles the member holds. The last remaining owner cannot be moved to a non-owner role. Sessions snapshot their scopes from the member's role at login time, so a role change does not rewrite existing session scopes; instead the member's active sessions are revoked and the next login mints a session with the new role's scopes. Staff roles and productIds are read on every request, so changing them revokes nothing and applies to the next call.",parameters:[{name:"userId",in:"path",required:!0,schema:{type:"string",pattern:"^usr_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale user ID"},examples:{default:{value:"usr_sandbox_00000000000000000002"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.member.role.update","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},role:{anyOf:[{type:"string",enum:["owner","admin","developer","operations","finance","viewer"]},{type:"string",pattern:"^trole_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale custom team role ID"}],description:"Seeded role name or custom team role ID"},staffRoles:{description:"The staff roles the member holds in this tenant, replacing the held set; omitted keeps it. A program's staff party acts only for a member who holds the role it declares.",maxItems:32,type:"array",items:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$",description:"A staff role a program's staff party declares, such as trade_checker"}},productIds:{description:"The Products (Cores) the member reaches, replacing the held list; null is every Product, omitted keeps it",anyOf:[{maxItems:50,type:"array",items:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"}},{type:"null"}]},reason:{description:"Required for staff writes; retained in the audit event",type:"string",minLength:1,maxLength:240}},required:["tenantId","role"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001",role:"admin",staffRoles:["trade_checker"]}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/team_member_role_updateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{membershipId:"tmem_sandbox_00000000000000000002",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",userId:"usr_sandbox_00000000000000000002",previousRole:"developer",role:"admin",staffRoles:["trade_checker"],productIds:null,sessionsRevoked:1,updatedAt:"2026-01-02T00:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/team/roles":{post:{operationId:"team_role_create",tags:["Team"],summary:"Create a custom team role",description:"Persists a custom role owned by the caller's team: a named, flat set of permissions drawn from the fixed catalog. Members and invitations reference the role by its id anywhere a seeded role name is accepted. Role names are unique per team, case-insensitively. Hyperscale enforces the stored permission set on every user-session API request, while operation scopes remain the coarse credential boundary.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.role.create","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},name:{type:"string",minLength:1,maxLength:80,description:"Display name for the custom role, unique per team"},permissions:{maxItems:80,type:"array",items:{type:"string",enum:["desk.activity","desk.billing","desk.compose","desk.discover","desk.handbook","desk.products","desk.security","desk.settings","desk.team","desk.treasury","desk.trust","desk.usage","desk.webhooks","desk.activity.export","desk.compose.create","desk.products.keys_mint","desk.products.keys_revoke","desk.products.manage","desk.products.objects_write","desk.security.sessions_revoke","desk.security.tokens_own","desk.settings.manage","desk.team.manage","desk.treasury.fund_sandbox","desk.treasury.settlement_iban_set","desk.treasury.withdraw","desk.trust.manage","desk.webhooks.manage","ops.activation","ops.activity","ops.billing","ops.customers","ops.margin","ops.money","ops.objects","ops.platform","ops.products","ops.promotions","ops.providers","ops.pulse","ops.records","ops.security","ops.team","ops.treasury","ops.trust","ops.billing.manage","ops.customers.lifecycle","ops.money.reconcile","ops.money.repair","ops.objects.manage","ops.products.capabilities","ops.promotions.promote","ops.providers.manage","ops.security.sessions_revoke","ops.team.manage","ops.treasury.manage","ops.trust.decide"]},description:"Portal permissions this role grants, drawn from the fixed catalog"}},required:["tenantId","name","permissions"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001",name:"Payments desk",permissions:["desk.billing","desk.treasury","desk.treasury.withdraw"]}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/team_role_createOutput"},examples:{default:{value:{roleId:"trole_sandbox_00000000000000000001",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",name:"Payments desk",permissions:["desk.billing","desk.treasury","desk.treasury.withdraw"],createdAt:"2026-01-01T00:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]},get:{operationId:"team_role_list",tags:["Team"],summary:"List the caller's custom team roles",description:"Returns the custom roles of the caller's team with each role's permission set and how many members currently hold it, oldest first, paged on `limit` and `cursor` (`nextCursor` is absent on the last page). Seeded role templates are contract data shipped with the SDKs, not rows, so they are not listed here.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{default:{value:"ten_sandbox_00000000000000000001"}}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"team.role.list","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/team_role_listOutput"},examples:{default:{value:{teamId:"team_sandbox_00000000000000000001",roles:[{roleId:"trole_sandbox_00000000000000000001",name:"Payments desk",permissions:["desk.billing","desk.treasury","desk.treasury.withdraw"],memberCount:2,createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:00:00.000Z"}]}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["activity:read"]}]}},"/v1/team/roles/{roleId}/delete":{post:{operationId:"team_role_delete",tags:["Team"],summary:"Delete an unused custom role",description:"Deletes the role record. A role still held by a member or referenced by a pending invitation cannot be deleted; move those members to another role or revoke the invitations first.",parameters:[{name:"roleId",in:"path",required:!0,schema:{type:"string",pattern:"^trole_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale custom team role ID"},examples:{default:{value:"trole_sandbox_00000000000000000001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.role.delete","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"}},required:["tenantId"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/team_role_deleteOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{roleId:"trole_sandbox_00000000000000000001",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",name:"Payments desk",deletedAt:"2026-01-03T00:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/team/roles/{roleId}":{post:{operationId:"team_role_update",tags:["Team"],summary:"Rename a custom role or change its permissions",description:"Updates the role record. Hyperscale resolves the stored role permissions on every session authentication, and a permission change also revokes active sessions so already-open clients stop immediately. A pure rename revokes nothing.",parameters:[{name:"roleId",in:"path",required:!0,schema:{type:"string",pattern:"^trole_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale custom team role ID"},examples:{default:{value:"trole_sandbox_00000000000000000001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.role.update","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},name:{type:"string",minLength:1,maxLength:80,description:"Display name for the custom role, unique per team"},permissions:{maxItems:80,type:"array",items:{type:"string",enum:["desk.activity","desk.billing","desk.compose","desk.discover","desk.handbook","desk.products","desk.security","desk.settings","desk.team","desk.treasury","desk.trust","desk.usage","desk.webhooks","desk.activity.export","desk.compose.create","desk.products.keys_mint","desk.products.keys_revoke","desk.products.manage","desk.products.objects_write","desk.security.sessions_revoke","desk.security.tokens_own","desk.settings.manage","desk.team.manage","desk.treasury.fund_sandbox","desk.treasury.settlement_iban_set","desk.treasury.withdraw","desk.trust.manage","desk.webhooks.manage","ops.activation","ops.activity","ops.billing","ops.customers","ops.margin","ops.money","ops.objects","ops.platform","ops.products","ops.promotions","ops.providers","ops.pulse","ops.records","ops.security","ops.team","ops.treasury","ops.trust","ops.billing.manage","ops.customers.lifecycle","ops.money.reconcile","ops.money.repair","ops.objects.manage","ops.products.capabilities","ops.promotions.promote","ops.providers.manage","ops.security.sessions_revoke","ops.team.manage","ops.treasury.manage","ops.trust.decide"]},description:"Portal permissions this role grants, drawn from the fixed catalog"}},required:["tenantId"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001",permissions:["desk.billing","desk.treasury","desk.treasury.withdraw","desk.usage"]}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/team_role_updateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{roleId:"trole_sandbox_00000000000000000001",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",name:"Payments desk",permissions:["desk.billing","desk.treasury","desk.treasury.withdraw","desk.usage"],sessionsRevoked:2,updatedAt:"2026-01-02T00:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/tenants/{tenantId}/banking-calendar":{post:{operationId:"tenant_banking_calendar_set",tags:["Tenant"],summary:"Set the banking calendar",description:"Replaces the company's banking calendar: the weekend days, the dated holidays and the timezone they are local to. Banking days are every day outside the weekend and the holidays. A clock clause that counts banking days reads this calendar when it schedules; a Core never stores it. A company that never set one has Friday and Saturday as its weekend, no holidays and Asia/Riyadh as its timezone.",parameters:[{name:"tenantId",in:"path",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{default:{value:"ten_sandbox_riyadhresale01"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"tenant.banking_calendar.set","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"founder_cli","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{weekend:{maxItems:6,type:"array",items:{type:"string",enum:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]},description:"The weekdays the bank is closed, such as friday and saturday."},holidays:{maxItems:366,type:"array",items:{type:"string",format:"date",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},description:"The dated days the bank is closed, as YYYY-MM-DD. Stored and returned in date order."},timezone:{type:"string",description:"The IANA timezone the weekend and holidays are local to, such as Asia/Riyadh."}},required:["weekend","holidays","timezone"],additionalProperties:!1},examples:{default:{value:{weekend:["friday","saturday"],holidays:["2026-09-23","2027-02-22"],timezone:"Asia/Riyadh"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/tenant_banking_calendar_setOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{tenantId:"ten_sandbox_riyadhresale01",weekend:["friday","saturday"],holidays:["2026-09-23","2027-02-22"],timezone:"Asia/Riyadh",updatedAt:"2026-10-27T12:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/calendar":{get:{operationId:"tenant_calendar_list",tags:["Tenant"],summary:"List the company calendar",description:"Lists every dated thing the company owes in date order: scheduled agreement actions from every Product (a filing's deadline, a renewal, a meeting's resolution window) and event records from the record store, each with its owner, instrument, state and days left. Two ordered lists merge under one cursor. A membership holding some Products sees only their actions, and no record-store events.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"productId",in:"query",required:!1,schema:{description:"Only this Product's clocks. Events belong to the company and still list.",type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$"},examples:{}},{name:"source",in:"query",required:!1,schema:{type:"string",enum:["clock","event"]},examples:{}},{name:"from",in:"query",required:!1,schema:{description:"Only entries on or after this instant.",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"to",in:"query",required:!1,schema:{description:"Only entries on or before this instant.",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"tenant.calendar.list","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/tenant_calendar_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/finance/report":{get:{operationId:"tenant_finance_report",tags:["Tenant"],summary:"Read posted company earnings and costs",description:"Sums recorded posting effects by business month at one cutoff. Sandbox periods use the retained Product business time and may run to the latest Product clock; live periods use ledger time. The cutoff is ledger time. Sandbox account statements and statement exports date on the same Product business time. Missing retained classification withholds gross revenue for that product and month and for the totals, never for other products' rows. Hyperscale fees are costs and never revenue. Covers at most 24 UTC months. Rows and totalsByCurrency keep each currency apart; totals and pool read SAR. Without productId it covers every Product the caller's membership holds; with no month named it runs from the first posting to each Product's current business month, keeps the latest whole months within 24 months and the effect budget, and names the newest readable range before them as earlier.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"fromPeriod",in:"query",required:!1,schema:{description:"First business month. With neither month, sandbox runs from the first posting's month, or the earliest Product clock's when that is earlier, to the latest Product clock's month, and live reads the cutoff's month. With one month, the report covers that month.",type:"string",pattern:"^(?:19(?:7[0-9]|[89][0-9])|[2-9][0-9]{3})-(0[1-9]|1[0-2])$"},examples:{}},{name:"toPeriod",in:"query",required:!1,schema:{description:"Last business month.",type:"string",pattern:"^(?:19(?:7[0-9]|[89][0-9])|[2-9][0-9]{3})-(0[1-9]|1[0-2])$"},examples:{}},{name:"productId",in:"query",required:!1,schema:{description:"Narrow the report to one Product. Omit for every Product the caller's membership holds.",type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$"},examples:{}},{name:"cutoff",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"tenant.finance.report","x-principal":"user_session","x-personal-access-token-scope":"finance:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/tenant_finance_reportOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/headers":{post:{operationId:"tenant_header_publish",tags:["Tenant"],summary:"Publish a tenant header",description:"Compiles the HSX header with std and stores it under name in the tenant's catalog, beside the headers the tenant already publishes. A program that says `use bank.trade` compiles with the header this tenant published as bank.trade; another tenant has no such header and its compile refuses with unknown_header. A Core pins the digest of each header it used, so a republish leaves every admitted Core as it was; the next composer.plan on a program that uses the header shows the toolchain move. A header that does not compile refuses with invalid_request, and details.issues lists its diagnostics. Publishing the same source again returns the current revision with unchanged true.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"tenant.header.publish","x-principal":"user_session","x-personal-access-token-scope":"blueprints:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},name:{type:"string",pattern:"^[a-z][a-z0-9_]{0,39}\\.[a-z][a-z0-9_]{0,39}$",description:"A tenant header's name as a use line names it, prefix.name such as bank.trade. The tenant picks both parts."},source:{type:"string",minLength:1,maxLength:262144,description:"HSX header source: instrument, object and enum declarations with no product or attach block."}},required:["tenantId","name","source"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_riyadhresale01",name:"bank.trade",source:`header trade
10172
+ }`},partyBindings:{}}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_createOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]},get:{operationId:"product_list",tags:["Products"],summary:"List your Products",description:"List the Products in your company with their Core, plan tier, and status.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"productId",in:"query",required:!1,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"query",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:240},examples:{}},{name:"createdFrom",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"createdTo",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"status",in:"query",required:!1,schema:{type:"string",enum:["pending","active","disabled","closed"]},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.list","x-principal":"user_session","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/disable":{post:{operationId:"product_disable",tags:["Products"],summary:"Disable a product",description:"Moves an active Product to disabled operational status only after server-side clearing checks confirm no open customer access, unresolved internal transfers, or non-zero ledger balances/holds remain. A refusal is product_disable_open_activity with details.blockers in the product.closure.retrieve shape. An active API key is not one of those checks: while a Product is disabled its keys authenticate as suspended (product_access_suspended) in every environment, so the pause already stops them and demanding their revocation first would only ask you to undo by hand what disabling does. Products are never deleted: disable is reversible and close is the terminal record-keeping state.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.disable","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},reason:{type:"string",minLength:1,maxLength:240}},required:["tenantId","reason"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",reason:"Customer requested this lifecycle change."}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_disableOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/documents":{get:{operationId:"product_documents",tags:["Products"],summary:"Get the five documents a Core generates and its Assure certificate",description:"Returns the Business, Technical, Security, Infrastructure and Tests documents for the Product's current Core, or the saved Core productCoreId names, each a standalone HTML page that prints on A4. They are derived from the Core's compiled UDL, its checks, its program source and the checks' stored outcome: the Tests document names each check's verdict, its failure, the steps it reached, the simulate pass and its seed, the world it ran in, the Arc revision and when it ran. The same Core and outcome always return the same bytes, and each document carries the SHA-256 of its HTML. The certificate names the coreDigest and every check outcome, signed by the instance; it verifies against the instance public key in /release.json.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"productCoreId",in:"query",required:!1,schema:{description:"A saved Core of the Product; the current Core when omitted",type:"string",pattern:"^pbld_(sandbox|live)_[a-z0-9]{8,64}$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.documents","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_documentsOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/earn-rates":{get:{operationId:"product_earn_rate_list",tags:["Products"],summary:"List product earn rates",description:"Lists the configured earn rates for a product, one per earnable operation.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.earn.rate.list","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_earn_rate_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]},post:{operationId:"product_earn_rate_set",tags:["Products"],summary:"Configure a product earn rate",description:"Sets the tenant's fee on an earnable operation as basis points of the transfer amount, a flat amount, or both. The fee posts into the product revenue account atomically with the operation's transfer. Setting bps and flatAmount to zero or omitting both removes the rate.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.earn.rate.set","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},operationName:{type:"string",minLength:1,maxLength:120,pattern:"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"},bps:{type:"string",pattern:"^(0|[1-9][0-9]{0,3}|10000)$",description:"Fee in basis points of the transfer amount (0..10000)"},flatAmount:{type:"string",pattern:"^(0|[1-9][0-9]{0,17})$",description:"Non-negative minor-unit integer amount serialized as a string (at most 18 digits)"}},required:["tenantId","operationName"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",operationName:"account.create"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_earn_rate_setOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/earnings/settlements":{post:{operationId:"product_earnings_settle",tags:["Products"],summary:"Settle product earnings",description:"Moves accumulated earnings from the product revenue account to the tenant settlement account. The ledger rejects settling more than the revenue account holds.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.earnings.settle","x-principal":"api_key","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},transferId:{type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale transfer ID"},amount:{type:"string",pattern:"^[1-9][0-9]{0,17}$",description:"Positive minor-unit integer amount serialized as a string (at most 18 digits)"},currency:{type:"string",const:"SAR"}},required:["tenantId","amount","currency"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",amount:"1",currency:"SAR"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_earnings_settleOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/economic-snapshot":{get:{operationId:"product_economic_snapshot_retrieve",tags:["Products"],summary:"Read a Product economic revision and confirmed balances",description:"Reads the Product's declared economic records and their ledger balances as one consistent snapshot. Refuses unresolved Product instructions. Proposal records do not change the economic revision. Pending account reservations remain separate from posted balances.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.economic_snapshot.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_economic_snapshot_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/evidence":{get:{operationId:"product_evidence_export",tags:["Products"],summary:"Export the evidence bundle for one Core digest",description:"Returns everything an audit team keeps for one coreDigest, as a manifest of entries: the five Core documents, the checks' stored outcome, the Assure certificate, the plan the save reviewed with its planDigest when one was stored, the audit events that touched the Core, the scenario reports Assure stored for it in sandbox, and the public key the certificate verifies against. Each entry carries its SHA-256, and manifestDigest covers them all: two exports of the same digest with nothing new return the same manifestDigest. A digest the Product saved more than once reads its newest Core.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"coreDigest",in:"query",required:!1,schema:{description:"A Core digest the Product saved; the current Core's when omitted",type:"string",pattern:"^[a-f0-9]{64}$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.evidence.export","x-principal":"api_key","x-personal-access-token-scope":"activity:read","x-agent-scope":"activity:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_evidence_exportOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["activity:read","products:read"]}]}},"/v1/products/{productId}/guidance":{get:{operationId:"product_guidance_retrieve",tags:["Products"],summary:"Retrieve deterministic product guidance",description:"Returns the ordered, contract-owned guidance predicates for a product, combining activation readiness with operational signals such as active API keys and first activity.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.guidance.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_guidance_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/instruments-compose":{post:{operationId:"product_instruments_compose",tags:["Products"],summary:"Create a Product from an HSX program",description:"Check the HSX program, save it as the first Core with its price fixed, and set up the Product. A browser session also gets a start key, shown once. Any other caller makes keys with the CLI: hyperscale key create --product <productId>.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.instruments.compose","x-principal":"user_session","x-personal-access-token-scope":"blueprints:write","x-agent-scope":"blueprints:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},name:{type:"string",minLength:1,maxLength:120},program:{type:"object",properties:{source:{type:"string",minLength:1,maxLength:524288}},required:["source"],additionalProperties:!1},partyBindings:{type:"object",propertyNames:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"},additionalProperties:{type:"string",minLength:1,maxLength:160}},expectedPlanDigest:{type:"string",pattern:"^[a-f0-9]{64}$",description:"planDigest from the reviewed composer.plan. The transaction recomputes the plan and refuses with plan_stale, returning the new plan, when it differs."},catalogRevisionId:{type:"string",minLength:1,maxLength:160,description:"Immutable revision of the headers the tenant published, as a Core compiled with them"},extensionIds:{description:"Catalog extensions the program resolves from. Provenance only, recorded on the Core.",type:"array",items:{type:"string",enum:["booking","cards","collections","commerce","escrow","fees","financing","guarantee","lending","marketplace","money","obligations","people","purchase","rental","reporting","wallet"]}},metadata:{$ref:"#/components/schemas/product_instruments_composeInput/$defs/Metadata"},icon:{$ref:"#/components/schemas/product_instruments_composeInput/$defs/ProductIcon"},label:{type:"string",minLength:1,maxLength:80,description:"The account owner's name for this version, such as Dispute window 14 days"},note:{type:"string",minLength:1,maxLength:500,description:"What changed in this version and why"}},required:["tenantId","name","program","partyBindings"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",name:"Sandbox account",program:{source:"x"},partyBindings:{}}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_instruments_composeOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["blueprints:write"]}]}},"/v1/products/{productId}/instruments":{get:{operationId:"product_instruments_list",tags:["Products"],summary:"List the admitted Product instruments and typed fields",description:"Returns each instrument in the Product's current Core with its fields and lifecycle states, plus the Core id, digest, and currency.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.instruments.list","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_instruments_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/margin":{get:{operationId:"product_margin_retrieve",tags:["Products"],summary:"Retrieve the product margin view",description:"Joins the product's frozen plan rate card (the buy side: what the tenant pays Hyperscale per earnable operation) with its configured earn rates (the sell side: what the tenant charges on the same operations) into one per-operation margin line, so the tenant sees what each business event nets before setting prices.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.margin.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_margin_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/actions":{get:{operationId:"product_objects_actions",tags:["Product objects"],summary:"List available actions and required metadata for an object",description:"Returns actions with requiredNow computed against current object metadata. Pages contain up to limit agreement contexts (default 50, range 1-100), newest createdAt then ID first, without splitting an agreement's actions. Current-Core creation actions appear only on the first page. Evidence belongs only to returned actions. Follow nextCursor until absent; a scope, current Core or object revision change refuses the cursor with invalid_request.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum agreement contexts, 1-100, default 50. Every action in a selected agreement is returned."},examples:{}},{name:"onBehalfOf",in:"query",required:!1,schema:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.actions","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_actionsOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/agreements/{instanceId}/evidence":{get:{operationId:"product_objects_agreements_evidence_list",tags:["Product objects"],summary:"Read accepted action evidence for an object's agreement",description:"Returns immutable subject evidence under the agreement's retained Core. Items are ordered by occurredAt descending, then eventId descending, using the object family's cursor. Tied timestamps do not imply execution order. Protected fields use the record read's [unreadable] marker. Object read authority and agreement membership are required.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"instanceId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.agreements.evidence.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_agreements_evidence_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/agreements":{get:{operationId:"product_objects_agreements_list",tags:["Product objects"],summary:"Read every agreement attached to an object",description:"Includes closed agreements and agreements without public actions, across retained Cores. Terms come from the agreement snapshot, state and declared relationships from its retained Core. Account links carry their book and do not imply object balances. Boundary observations report received facts, never permission to settle. Latest observations are per declared check or instruction. Newest createdAt then instanceId first. Cursors bind the authorized object, caller and object revision.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"rootsOnly",in:"query",required:!1,schema:{type:"string",enum:["true","false"]},examples:{}},{name:"parentInstanceId",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:160},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.agreements.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_agreements_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}":{post:{operationId:"product_objects_create",tags:["Product objects"],summary:"Create an object with optional metadata and no financial agreement",description:"Creates a new business object instance with an optional externalId and optional metadata fields. The owner is the caller, or the customer named in onBehalfOf.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{day_pass:{value:"prd_sandbox_97c43dbc8495d7ca"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{day_pass:{value:"day_pass"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.objects.create","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},externalId:{type:"string",minLength:1,maxLength:2048},fields:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},onBehalfOf:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."}},required:["tenantId"],additionalProperties:!1},examples:{day_pass:{value:{fields:{day:"2026-10-11"},onBehalfOf:"cus_sandbox_5d1e8a2c7b9f4036"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_createOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]},{customerSession:[]}]},get:{operationId:"product_objects_list",tags:["Product objects"],summary:"List business objects of a kind",description:"Searches the full authorized set by external ID, declared column filters, agreement state and a declared date column. A signed-in customer's set is the records they own, the records where they are a party on an agreement, and the records with an entry action open for them; access on each item says which. Returns a total and facets for the full filtered set. A cursor refuses changed filters or authority.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"owner",in:"query",required:!1,schema:{type:"string",pattern:"^prn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale principal ID"},examples:{}},{name:"externalId",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2048},examples:{}},{name:"filters",in:"query",required:!1,content:{"application/json":{schema:{type:"object",propertyNames:{type:"string",minLength:1,maxLength:80},additionalProperties:{type:"string",maxLength:2048},"x-query-encoding":"json",description:"Encode this string-valued filter object as JSON in the filters query parameter."},examples:{}}}},{name:"agreementState",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:80},examples:{}},{name:"blockKey",in:"query",required:!1,schema:{type:"string",enum:["financing.installments","escrow.hold","money.hold","marketplace.listing","marketplace.order","marketplace.reservation","insurance.cover","insurance.claim"]},examples:{}},{name:"blockMetric",in:"query",required:!1,schema:{type:"string",enum:["overdue_installments","overdue_amount","held_funds","active_listings","awaiting_fulfilment","active_reservations","active_covers","submitted_claims"]},examples:{}},{name:"dueField",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:80},examples:{}},{name:"dueFrom",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"dueThrough",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects":{get:{operationId:"product_objects_discover",tags:["Product objects"],summary:"Discover business object kinds, authored fields, and attached actions",description:"Returns compiled object kinds with field definitions, authored fields, JSON Schema for creation, and available attached actions with requirement schemas.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.discover","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_discoverOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/actions/{action}":{post:{operationId:"product_objects_execute",tags:["Product objects"],summary:"Execute an attached action with session-bound parties and required metadata",description:"Validates revision and subject requirements, updates object metadata, and executes the attached instrument action. Kind, object id and action are enough: the platform reads the revision, target, Core and digest the caller leaves out from the record as it stands, and checks any it sends. Requires an idempotency key.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{pay_for_day:{value:"prd_sandbox_97c43dbc8495d7ca"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{pay_for_day:{value:"day_pass"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{pay_for_day:{value:"obj_sandbox_12377d6f4b175d34"}}},{name:"action",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{pay_for_day:{value:"pay_for_day"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.objects.execute","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},expectedRevision:{description:"The revision you read. Omit it to act on the record as it stands; send it to refuse if the record changed since.",type:"integer",exclusiveMinimum:0,maximum:9007199254740991},productCoreId:{description:"Omit it to use the Core the target runs on: the agreement's own Core, or the current one for a new agreement.",type:"string",pattern:"^pbld_(sandbox|live)_[a-z0-9]{8,64}$"},digest:{description:"Omit it with productCoreId; send both to pin what you read.",type:"string",pattern:"^[a-f0-9]{64}$"},target:{description:"Omit it to act on the attachment's one open agreement, or to open one when there is none. With several open, the action refuses with target_needs_instance and lists them. A non-create action sent to an attachment that has an open agreement refuses the same way.",oneOf:[{type:"object",properties:{kind:{type:"string",const:"attachment"},attachment:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"}},required:["kind","attachment"],additionalProperties:!1},{type:"object",properties:{kind:{type:"string",const:"instance"},attachment:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"},instanceId:{type:"string",minLength:1,maxLength:160}},required:["kind","attachment","instanceId"],additionalProperties:!1}]},fields:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},input:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},persons:{type:"object",propertyNames:{type:"string",minLength:1,maxLength:80},additionalProperties:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Tenant-local customer ID"},description:"On a create, the person customer of this Product who fills each of the agreement's named persons, such as a guarantor. Each must be an active person who fills no other party. Refused on any other action."},onBehalfOf:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."}},required:["tenantId"],additionalProperties:!1},examples:{pay_for_day:{value:{expectedRevision:2,productCoreId:"pbld_sandbox_8a41c0e95d7b2f36",digest:"56e8bb71197ba45bd0ead5b588bca39db9e16dcac8c9234a2ee15f0e143e3d01",target:{kind:"attachment",attachment:"payment"},onBehalfOf:"cus_sandbox_5d1e8a2c7b9f4036"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_objects_executeOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/export":{post:{operationId:"product_objects_export",tags:["Product objects"],summary:"Export every matching record as a stored report",description:"Captures the complete authorized object query and stores the filter, schema and Core with immutable CSV bytes. Refuses sets over 1000 records.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.objects.export","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},owner:{type:"string",pattern:"^prn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale principal ID"},externalId:{type:"string",minLength:1,maxLength:2048},filters:{type:"object",propertyNames:{type:"string",minLength:1,maxLength:80},additionalProperties:{type:"string",maxLength:2048},"x-query-encoding":"json",description:"Encode this string-valued filter object as JSON in the filters query parameter."},agreementState:{type:"string",minLength:1,maxLength:80},blockKey:{type:"string",enum:["financing.installments","escrow.hold","money.hold","marketplace.listing","marketplace.order","marketplace.reservation","insurance.cover","insurance.claim"]},blockMetric:{type:"string",enum:["overdue_installments","overdue_amount","held_funds","active_listings","awaiting_fulfilment","active_reservations","active_covers","submitted_claims"]},dueField:{type:"string",minLength:1,maxLength:80},dueFrom:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},dueThrough:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},required:["tenantId"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_exportOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/actions/{action}/preview":{post:{operationId:"product_objects_preview",tags:["Product objects"],summary:"Review an action without changing the record or moving money",description:"Evaluates a draft against the retained agreement and caller. Returns missing information, blockers and projected money, state and clock changes. Does not reserve money, consume evidence or contact a provider. Execution checks the facts again. New account IDs are draft references, not issued accounts.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{pay_for_day:{value:"prd_sandbox_97c43dbc8495d7ca"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{pay_for_day:{value:"day_pass"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{pay_for_day:{value:"obj_sandbox_12377d6f4b175d34"}}},{name:"action",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{pay_for_day:{value:"pay_for_day"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.preview","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},expectedRevision:{description:"The revision you read. Omit it to act on the record as it stands; send it to refuse if the record changed since.",type:"integer",exclusiveMinimum:0,maximum:9007199254740991},productCoreId:{description:"Omit it to use the Core the target runs on: the agreement's own Core, or the current one for a new agreement.",type:"string",pattern:"^pbld_(sandbox|live)_[a-z0-9]{8,64}$"},digest:{description:"Omit it with productCoreId; send both to pin what you read.",type:"string",pattern:"^[a-f0-9]{64}$"},target:{description:"Omit it to act on the attachment's one open agreement, or to open one when there is none. With several open, the action refuses with target_needs_instance and lists them. A non-create action sent to an attachment that has an open agreement refuses the same way.",oneOf:[{type:"object",properties:{kind:{type:"string",const:"attachment"},attachment:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"}},required:["kind","attachment"],additionalProperties:!1},{type:"object",properties:{kind:{type:"string",const:"instance"},attachment:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"},instanceId:{type:"string",minLength:1,maxLength:160}},required:["kind","attachment","instanceId"],additionalProperties:!1}]},fields:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},input:{type:"object",propertyNames:{type:"string"},additionalProperties:{}},persons:{type:"object",propertyNames:{type:"string",minLength:1,maxLength:80},additionalProperties:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Tenant-local customer ID"},description:"On a create, the person customer of this Product who fills each of the agreement's named persons, such as a guarantor. Each must be an active person who fills no other party. Refused on any other action."},onBehalfOf:{type:"string",pattern:"^cus_(sandbox|live)_[a-z0-9]{8,64}$",description:"Customer the Product key or a member session acts for. The call runs with that customer's accounts and keeps the operator's view of records."}},required:["tenantId"],additionalProperties:!1},examples:{pay_for_day:{value:{expectedRevision:2,productCoreId:"pbld_sandbox_8a41c0e95d7b2f36",digest:"56e8bb71197ba45bd0ead5b588bca39db9e16dcac8c9234a2ee15f0e143e3d01",target:{kind:"attachment",attachment:"payment"},onBehalfOf:"cus_sandbox_5d1e8a2c7b9f4036"}}}}}},responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_previewOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}":{get:{operationId:"product_objects_retrieve",tags:["Product objects"],summary:"Retrieve a business object by ID",description:"Returns the current revision, externalId, metadata fields, Core ID and standing for a business object, with each root agreement's state and progress. Standing matches product.objects.list for the same record.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",pattern:"^[a-z][a-z0-9_]{2,79}$"},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.retrieve","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/objects/{kind}/{objectId}/timeline":{get:{operationId:"product_objects_timeline_list",tags:["Product objects"],summary:"Read what happened to an object",description:"Joins accepted actions, recorded refusals, state changes, confirmed ledger movements and reservations, clocks, subject evidence and provider observations. occurredAt uses effective time for accepted actions and provider boundary observations. In live, ledger receipts and refusals use recording time with timeBasis=recorded; in sandbox they date on the Product clock with timeBasis=effective, so one sandbox timeline reads one clock. Subject evidence uses recording time with timeBasis=recorded. Newest occurredAt then id first. Equal times do not establish causality; source operation and event identifiers are retained. agreement is null for facts recorded only against the object. Cursors bind the authorized object, caller and object revision.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"kind",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{example:{value:"statement"}}},{name:"objectId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.objects.timeline.list","x-principal":"api_key","x-customer-session":!0,"x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_objects_timeline_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]},{customerSession:[]}]}},"/v1/products/{productId}/openapi":{get:{operationId:"product_openapi_retrieve",tags:["Products"],summary:"Get the Product's OpenAPI document from its admitted Core",description:"Returns an OpenAPI 3.1 document for the Product's current Core. It lists every Product API route, and each action the Core exposes on an object kind as its own operation at /v1/products/{productId}/objects/{kind}/{objectId}/actions/{action}, with that action's input schema. product.objects.execute is not listed: each action's operation is the execute call for that kind and action.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.openapi.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_openapi_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/operation-set":{get:{operationId:"product_operation_set_retrieve",tags:["Products"],summary:"Retrieve a product's frozen operation set",description:"Returns the latest Core's tenant-visible public actions, setup operations, reads, and persisted digests. Read input and output schemas and setup output schemas come from the frozen Core. Input schemas may omit some constraints; the server still checks every input in full. Frozen setup ids absent from the current catalog appear in unresolvedSetupOperationIds and are omitted from setupOperations. The response never includes the internal execution steps.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{default:{value:"prd_sandbox_00000000000000000001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{default:{value:"ten_sandbox_00000000000000000001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.operation_set.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_operation_set_retrieveOutput"},examples:{default:{value:{status:"frozen",productCoreId:"pbld_sandbox_00000000000000000001",coreDigest:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",tenantId:"ten_sandbox_00000000000000000001",productId:"prd_sandbox_00000000000000000001",environment:"sandbox",operations:[],tenantSurfaceVersion:3,tenantOperationSetDigest:"8bbd5d21c21fbab2b9051ebec508e3b945e2f2f9a299ca5625ee19e037e011d0",publicActions:[{name:"openSettlement",instrument:"held_settlement",inputSchema:{type:"object",additionalProperties:!1,properties:{}},outputSchema:{type:"object",additionalProperties:!1,properties:{}},actorPolicy:{principal:"api_key"},portPolicy:{kind:"none"},idempotencyPolicy:{mode:"required"},receiptPolicy:{type:"held_settlement.created",includeEvidence:!0},receiptEvidence:{required:[]}}],tenantReadOperationSetDigest:"094c5a503fe0059ad018977c331f9762b02256fd9e3697b4fc0a745894983d60",tenantSetupOperationSetDigest:"a458e40bb318cf50b536c5b1b5e131ebcba2b567f50f6566a334e9404391466d",readOperationIds:[],readOperations:[],setupOperationIds:[],setupOperations:[],unresolvedSetupOperationIds:[]}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/reactivate":{post:{operationId:"product_reactivate",tags:["Products"],summary:"Reactivate a product",description:"Restores a disabled Product to active operational status without changing product capabilities, credentials, or ledger state. Closed Products are terminal and cannot be reactivated.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.reactivate","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},reason:{type:"string",minLength:1,maxLength:240}},required:["tenantId","reason"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",reason:"Customer requested this lifecycle change."}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_reactivateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/recompose":{post:{operationId:"product_recompose",tags:["Products"],summary:"Admit a replacement Core",description:"Requires expectedPlanDigest from composer.plan with the same program and bindings: the plan binds the current Core, every changed term, the price and the toolchain. Omitting partyBindings preserves the current Core's bindings. Supplying partyBindings replaces the complete map, including an empty map. A business left out of that map saves unbound: its actions refuse with subject_party_unbound until a save binds it. Each bound business customer gets active access to the Product and a balance account if it lacks them. In live, binding an organization that is not verified refuses with entity_status_forbidden naming the party. In live only bindings change: the program must equal the current Core's source, or the save refuses with program_change_requires_sandbox. Change the program in sandbox and promote it. A save whose Core equals the current one returns the current Core and writes nothing. A sandbox Product with no Core saves the program as its first Core; a live one refuses with product_core_stale. New agreements use the replacement Core; retained agreements keep their original Core.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.recompose","x-principal":"user_session","x-personal-access-token-scope":"blueprints:write","x-agent-scope":"blueprints:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},productId:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},expectedPlanDigest:{type:"string",pattern:"^[a-f0-9]{64}$",description:"planDigest from the reviewed composer.plan. The transaction recomputes the plan and refuses with plan_stale, returning the new plan, when it differs."},program:{type:"object",properties:{source:{type:"string",minLength:1,maxLength:524288}},required:["source"],additionalProperties:!1},partyBindings:{type:"object",propertyNames:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$"},additionalProperties:{type:"string",minLength:1,maxLength:160}},extensionIds:{type:"array",items:{type:"string"}},metadata:{$ref:"#/components/schemas/product_recomposeInput/$defs/Metadata"},label:{type:"string",minLength:1,maxLength:80,description:"The account owner's name for this version, such as Dispute window 14 days"},note:{type:"string",minLength:1,maxLength:500,description:"What changed in this version and why"}},required:["tenantId","productId","expectedPlanDigest","program"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",productId:"prd_sandbox_example0001",expectedPlanDigest:"86a7695eb7559a8d3b6914182edf3330d1ebb137bff7455cd342daf24d44ebb6",program:{source:"x"}}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/product_recomposeOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["blueprints:write"]}]}},"/v1/products/{productId}":{get:{operationId:"product_retrieve",tags:["Products"],summary:"Retrieve a Product",description:"Retrieve a Product joined with its Core, plan tier, go-live readiness and cost, and generated developer surfaces.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{"Sandbox Product summary":{value:"prd_sandbox_escrowmarket01"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{"Sandbox Product summary":{value:"ten_sandbox_founderco01"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.retrieve","x-principal":"user_session","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_retrieveOutput"},examples:{"Sandbox Product summary":{value:{productId:"prd_sandbox_escrowmarket01",tenantId:"ten_sandbox_founderco01",environment:"sandbox",displayName:"Vehicle Escrow Marketplace",slug:"vehicle-escrow-marketplace",kind:"offering",icon:"marketplace",status:"active",instrumentIds:["vehicle_listing","vehicle_escrow"],pricing:{current:{monthly:"100000",setup:"500000",complexityScore:0,currency:"SAR",rates:[],priceBasisIdentity:"0ad3400406a50023d899ff74c0723eb1c94e1d5ab602e09ba58692a96551b12c"}},readiness:{live:!1,blockers:[{code:"commercial_requirement_unsatisfied",requirementId:"kyb_approved"},{code:"commercial_requirement_unsatisfied",requirementId:"live_ledger_partition"}]},capabilities:[{capabilityId:"accounts",name:"Accounts"}],cost:{currency:"SAR",platformMonthly:"100000",platformSetup:"500000",liveCapableCount:0,recurringCharges:[],usageCharges:[],estimatedMonthlyFixed:"100000",blockers:[],complete:!0},boundary:{dailyStatementFetch:!1}}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]},patch:{operationId:"product_update",tags:["Products"],summary:"Update a product",description:"Updates a Product's display name, business description, icon or boundary settings. Omitted fields stay unchanged; null clears the description. boundary.dailyStatementFetch switches on the boundary worker's scheduled fetch: once a day it runs bank_statement.fetch_and_import for each account a bank mirrors on the Product, for the bank day that ended at UTC midnight, and posts nothing. It is off by default and only a live Product takes it. The slug and product id are stable handles referenced by keys, docs, and integrations, so a rename never changes them; closed Products are terminal records and cannot be renamed.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{default:{value:"prd_sandbox_escrow0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"product.update","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},reason:{type:"string",minLength:1,maxLength:240},displayName:{type:"string",minLength:1,maxLength:120},businessDescription:{anyOf:[{type:"string",maxLength:2e3},{type:"null"}]},icon:{$ref:"#/components/schemas/product_updateInput/$defs/ProductIcon"},boundary:{description:"The Product's boundary settings. Only a live Product takes them; omitted, they stay unchanged.",type:"object",properties:{dailyStatementFetch:{type:"boolean",description:"Fetch and import each mirrored account's statement once a day, posting nothing."}},required:["dailyStatementFetch"],additionalProperties:!1}},required:["tenantId","reason"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_riyadhresale01",displayName:"Escrow Marketplace KSA",reason:"Product renamed for the Saudi launch"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/product_updateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{tenantId:"ten_sandbox_riyadhresale01",productId:"prd_sandbox_escrow0001",displayName:"Escrow Marketplace KSA",icon:"marketplace",boundary:{dailyStatementFetch:!1},updatedAt:"2026-06-11T12:00:00.000Z",reason:"Product renamed for the Saudi launch"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/schedule":{get:{operationId:"product_schedule_list",tags:["Product objects"],summary:"Read the schedule for one product",description:"Lists dated actions: automatic ones upcoming, due, completed or refused, and dated human actions upcoming or due, each with who acts, who pays when the action moves money, and the effective product time. An automatic action whose due time has passed but which needs a record in another state, such as a schedule piece before the payer activates the schedule, is waiting and runs once that record changes. A repeating automatic action, such as a late fee's charge, lists each past piece as completed with the amount it took beside the next one. One whose record can never reach that state never runs: it is waived when someone waived that record, such as a waived late fee, cancelled when someone cancelled or stopped it, such as a piece of a stopped schedule, and ended when the record finished another way, such as completed or expired. A waived or cancelled piece is not work. A refused automatic action carries its reason and whether it retries. An unfunded charge retries: the maintenance sweep retries it about once a minute, and in sandbox the next clock advance and an action on its record retry it too. Any other refusal is lasting and does not retry on its own; it shows as work for the team, and an action on its record or a write to it retries it.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"objectId",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:160},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.schedule.list","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_schedule_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/treasury":{get:{operationId:"product_treasury_retrieve",tags:["Products"],summary:"Retrieve product treasury balances",description:"Reads the product credit (prepaid spend) and earn-rate fee account balances live from the ledger, and the product's posted revenue to date.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.treasury.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_treasury_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/work":{get:{operationId:"product_work_list",tags:["Product objects"],summary:"Read work for one product",description:"Returns due human work and facts waiting on a customer, provider or clock. Counts cover the authorized product when complete, and are unknown when more candidates remain.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"product.work.list","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/product_work_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/provider-credentials":{get:{operationId:"provider_credential_list",tags:["Provider credential"],summary:"List provider credentials",description:"Lists the active credentials of the calling tenant's environment with kind, fingerprint and when and by whom each was set. The value is never returned.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"adapter",in:"query",required:!1,schema:{type:"string",pattern:"^[a-z][a-z0-9_.-]{0,79}$",description:"The provider adapter that declares the credential."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"provider_credential.list","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"founder_cli","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/provider_credential_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]},post:{operationId:"provider_credential_set",tags:["Provider credential"],summary:"Set a provider credential",description:"Seals the secret your provider account issued for one credential an adapter declares, in the calling tenant's environment, and revokes the one it replaces. The kind comes from the declaration. Only the company owner sets it, from a browser session or their own CLI login, with their password; an agent never does. Hyperscale stores your provider account's credential and is never the merchant of record.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"provider_credential.set","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"founder_cli","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},adapter:{type:"string",pattern:"^[a-z][a-z0-9_.-]{0,79}$",description:"The provider adapter that declares the credential."},credential:{type:"string",pattern:"^[a-z][a-zA-Z0-9_]{0,79}$",description:"The credential's name in the adapter's credentials section."},secret:{type:"string",minLength:1,maxLength:32768,description:"The secret the provider issued. Sealed on write and never returned. An api_key or hmac_sha256 credential is the bare value; an mtls one is JSON with the PEM `cert`, `key` and optional `ca`; an oauth_client one is JSON with `clientId`, `clientSecret` and optional `ca`."},password:{type:"string",minLength:1,maxLength:1024,description:"The account owner's password, checked again before the write."}},required:["tenantId","adapter","credential","secret","password"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",adapter:"x",credential:"x",secret:"x",password:"x"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/provider_credential_setOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/provider-credentials/revoke":{post:{operationId:"provider_credential_revoke",tags:["Provider credential"],summary:"Revoke a provider credential",description:"Ends the active credential so no further provider call sends it. A live Product whose adapter needs it is refused provider_credential_missing until a new one is set. Owner only, with their password, never an agent.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"provider_credential.revoke","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"founder_cli","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},adapter:{type:"string",pattern:"^[a-z][a-z0-9_.-]{0,79}$",description:"The provider adapter that declares the credential."},credential:{type:"string",pattern:"^[a-z][a-zA-Z0-9_]{0,79}$",description:"The credential's name in the adapter's credentials section."},password:{type:"string",minLength:1,maxLength:1024,description:"The account owner's password, checked again before the write."}},required:["tenantId","adapter","credential","password"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",adapter:"x",credential:"x",password:"x"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/provider_credential_revokeOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/receipts":{get:{operationId:"receipt_list",tags:["History"],summary:"List Receipts",description:"List Receipts as a cursor-paginated page. The durable proof that an operation completed: what ran, for which company, and the terminal outcome. An operation that promises a receipt is not finished until one exists.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"productId",in:"query",required:!1,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"query",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:240},examples:{}},{name:"createdFrom",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"createdTo",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"receipt.list","x-principal":"api_key","x-personal-access-token-scope":"activity:read","x-agent-scope":"activity:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/receipt_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["activity:read"]}]}},"/v1/receipts/{receiptId}":{get:{operationId:"receipt_retrieve",tags:["History"],summary:"Retrieve a Receipt",description:"Retrieve a single Receipt by its receiptId. The durable proof that an operation completed: what ran, for which company, and the terminal outcome. An operation that promises a receipt is not finished until one exists.",parameters:[{name:"receiptId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:160},examples:{example:{value:"rcp_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"productId",in:"query",required:!1,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"receipt.retrieve","x-principal":"api_key","x-personal-access-token-scope":"activity:read","x-agent-scope":"activity:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/receipt_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["activity:read"]}]}},"/v1/reconciliation-exceptions":{get:{operationId:"reconciliation_exception_list",tags:["Reconciliation"],summary:"List reconciliation exceptions",description:"Lists statement lines no ledger fact explains, oldest first, across every statement or one.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"bankStatementId",in:"query",required:!1,schema:{type:"string",pattern:"^bst_(sandbox|live)_[a-z0-9]{8,64}$",description:"Bank statement ID"},examples:{}},{name:"status",in:"query",required:!1,schema:{description:"Defaults to open.",type:"string",enum:["open","resolved"]},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"reconciliation.exception.list","x-principal":"user_session","x-personal-access-token-scope":"finance:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/reconciliation_exception_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/reconciliation-exceptions/{bankStatementLineId}/reopen":{post:{operationId:"reconciliation_exception_reopen",tags:["Reconciliation"],summary:"Reopen a resolved reconciliation exception",description:"Puts one resolved line back to open with the reason it was raised with. A linked line gives up its transfer, which another line can then claim, and the statement's resolved count falls by one. Only a resolved line reopens; a line the matcher explained stays matched.",parameters:[{name:"bankStatementLineId",in:"path",required:!0,schema:{type:"string",pattern:"^bsl_(sandbox|live)_[a-z0-9]{8,64}$",description:"Bank statement line ID"},examples:{example:{value:"bsl_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"reconciliation.exception.reopen","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"}},required:["tenantId"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/reconciliation_exception_reopenOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/reconciliation-exceptions/{bankStatementLineId}/resolve":{post:{operationId:"reconciliation_exception_resolve",tags:["Reconciliation"],summary:"Resolve a reconciliation exception",description:"Closes one open exception: link it to a posted transfer no other line claims, in the line's currency and for the line's amount, or mark it outside the ledger with a note. A transfer whose posted amount differs is refused with both amounts; a partial capture is closed outside the ledger with a note. The line keeps the reason it was raised with.",parameters:[{name:"bankStatementLineId",in:"path",required:!0,schema:{type:"string",pattern:"^bsl_(sandbox|live)_[a-z0-9]{8,64}$",description:"Bank statement line ID"},examples:{example:{value:"bsl_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"reconciliation.exception.resolve","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},resolution:{type:"string",enum:["linked","outside_ledger"]},transferId:{description:"The posted transfer that explains the line. Required to link.",type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$"},note:{description:"Why the line is outside the ledger. Required for outside_ledger.",type:"string",minLength:1,maxLength:500}},required:["tenantId","resolution"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",resolution:"linked"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/reconciliation_exception_resolveOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/records":{post:{operationId:"record_put",tags:["Record"],summary:"Store a record",description:"Stores a document, message, thread, note, count, event, judgement or extract once per SHA-256 digest. A document's digest is the hash of its bytes; any other kind's is the hash of its JSON. A second put of the same bytes returns the first record with created false. A document put with document.signedAt and parties signs it, once. Storing writes a records confirmation under the digest and signing writes another, which is what an instrument's record evidence reads. Nothing moves money and Arc never reads the content.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"record.put","x-principal":"user_session","x-personal-access-token-scope":"records:write","x-agent-scope":"records:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},title:{type:"string",minLength:1,maxLength:300},refs:{maxItems:20,type:"array",items:{type:"object",properties:{kind:{type:"string",enum:["operation","instance","account","customer","product","record"]},id:{type:"string",minLength:1,maxLength:200}},required:["kind","id"],additionalProperties:!1},description:"Arc facts and records this record is about: an operation, instrument instance, account, customer, Product or another record, by id"},text:{description:"The words of a message, note, judgement, event or extract. The store keeps them as JSON bytes with the kind's fields and hashes those",type:"string",minLength:1,maxLength:65536},kind:{type:"string",enum:["document","message","thread","note","count","event","judgement","extract"]},content:{description:"A document's bytes, base64. Up to 512 KiB stays in the row; up to 720 KiB goes to the blob store",type:"string",maxLength:983040,format:"base64",contentEncoding:"base64",pattern:"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"},mediaType:{description:"A document's media type; defaults to application/pdf",type:"string",maxLength:120,pattern:"^[a-z0-9.+-]+\\/[a-z0-9.+-]+$"},document:{type:"object",properties:{parties:{minItems:1,maxItems:20,type:"array",items:{type:"string",minLength:1,maxLength:200},description:"Who signed: customer or account ids. A record signed_by requirement matches the signing party's account or its owner"},signedAt:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},expiresAt:{description:"When the signature stops counting; a record signed_by requirement refuses evidence_expired after it",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},required:["parties","signedAt"],additionalProperties:!1},message:{type:"object",properties:{threadId:{type:"string",pattern:"^rec_(sandbox|live)_[a-z0-9]{8,64}$",description:"Record ID"},direction:{type:"string",enum:["inbound","outbound"]},from:{type:"string",minLength:1,maxLength:320},to:{maxItems:50,type:"array",items:{type:"string",minLength:1,maxLength:320}},sentAt:{description:"Defaults to now",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},provider:{type:"string",minLength:1,maxLength:80},providerReference:{type:"string",minLength:1,maxLength:200}},required:["threadId","direction"],additionalProperties:!1},thread:{type:"object",properties:{status:{description:"Defaults to open",type:"string",enum:["open","waiting","closed"]},assignee:{description:"A member or agent member id",type:"string",minLength:1,maxLength:200},customerId:{type:"string",minLength:1,maxLength:200}},additionalProperties:!1},note:{type:"object",properties:{subject:{type:"object",properties:{kind:{type:"string",enum:["operation","instance","account","customer","product","record"]},id:{type:"string",minLength:1,maxLength:200}},required:["kind","id"],additionalProperties:!1}},required:["subject"],additionalProperties:!1},count:{type:"object",properties:{measure:{type:"string",minLength:1,maxLength:120,description:"What was counted, such as stock:sku-114"},unit:{type:"string",minLength:1,maxLength:40},quantity:{type:"string",pattern:"^-?(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$",description:"A decimal quantity, up to six places"},location:{type:"string",minLength:1,maxLength:200},at:{description:"When it was measured; defaults to now",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},required:["measure","unit","quantity"],additionalProperties:!1},event:{type:"object",properties:{startsAt:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},endsAt:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},attendees:{maxItems:100,type:"array",items:{type:"string",minLength:1,maxLength:200}}},required:["startsAt"],additionalProperties:!1},judgement:{type:"object",properties:{decision:{type:"string",minLength:1,maxLength:200},reasons:{default:[],maxItems:20,type:"array",items:{type:"string",minLength:1,maxLength:2e3}},decidedAt:{description:"Defaults to now",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},required:["decision"],additionalProperties:!1},extract:{type:"object",properties:{sourceDigest:{type:"string",pattern:"^[a-f0-9]{64}$",description:"The digest of the document these fields were read from"},fields:{type:"object",propertyNames:{type:"string"},additionalProperties:{$ref:"#/components/schemas/record_putInput/$defs/__schema0"}},confidence:{description:"Confidence in basis points",type:"integer",minimum:0,maximum:1e4}},required:["sourceDigest","fields"],additionalProperties:!1}},required:["tenantId","kind"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",kind:"document"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/record_putOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["records:write"]}]},get:{operationId:"record_search",tags:["Record"],summary:"Search records",description:"Lists records newest first, by kind, by an id the record names in refs, by thread, by title text and by time. Metadata only; read one record for its bytes.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"kind",in:"query",required:!1,schema:{type:"string",enum:["document","message","thread","note","count","event","judgement","extract"]},examples:{}},{name:"refId",in:"query",required:!1,schema:{description:"Records that name this Arc fact or record",type:"string",minLength:1,maxLength:200},examples:{}},{name:"threadId",in:"query",required:!1,schema:{description:"Messages in this thread",type:"string",pattern:"^rec_(sandbox|live)_[a-z0-9]{8,64}$"},examples:{}},{name:"title",in:"query",required:!1,schema:{description:"Records whose title contains this text, any case",type:"string",minLength:1,maxLength:300},examples:{}},{name:"createdFrom",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"createdTo",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"record.search","x-principal":"user_session","x-personal-access-token-scope":"records:read","x-agent-scope":"records:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/record_searchOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["records:read"]}]}},"/v1/records/{recordId}":{get:{operationId:"record_retrieve",tags:["Record"],summary:"Read a record",description:"Returns one record's metadata, and with content=true its bytes byte for byte. A blob-stored record reads its bytes from the blob store and checks them against the digest.",parameters:[{name:"recordId",in:"path",required:!0,schema:{type:"string",pattern:"^rec_(sandbox|live)_[a-z0-9]{8,64}$",description:"Record ID"},examples:{example:{value:"rec_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"content",in:"query",required:!1,schema:{description:"true returns the bytes as base64 as well",type:"string",enum:["true","false"]},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"record.retrieve","x-principal":"user_session","x-personal-access-token-scope":"records:read","x-agent-scope":"records:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/record_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["records:read"]}]}},"/v1/refunds":{post:{operationId:"refund_create",tags:["Refund"],summary:"Refund a payment",description:"Moves a posted payment into a Product's pool back to the account that paid it, in full or in part, as a correction of the payment. A full refund first gives back the earn-rate fees taken on the payment; a partial refund leaves them in place. A payment takes one refund: a second refund, or a refund of a payment that already has a reversal or return, is refused with transfer_lineage_conflict naming the existing transfer, and a payment with a return in progress is refused with transfer_return_exists. Platform fee transfers and payments into any account other than a Product pool cannot be refunded here.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"refund.create","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},paymentTransferId:{type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$",description:"The posted payment to refund: a transfer into a Product's pool account."},amount:{description:"Minor units to refund, at most the payment. Omit to refund the whole payment.",type:"string",pattern:"^[1-9][0-9]{0,17}$"},reason:{type:"string",enum:["duplicate","fraudulent","requested_by_customer"]},transferId:{description:"Names the refund transfer. Omit to derive one from the request.",type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$"}},required:["tenantId","paymentTransferId"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",paymentTransferId:"trn_sandbox_example0001"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/refund_createOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/reports/{reportingArtifactId}/download":{get:{operationId:"report_artifact_download",tags:["Report"],summary:"Download immutable stored report bytes",description:"Returns a stored report as JSON or CSV with its filename, SHA-256 digest, and size. A format the report does not declare is refused.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"reportingArtifactId",in:"path",required:!0,schema:{type:"string",pattern:"^rpt_(sandbox|live)_[a-z0-9]{8,64}$",description:"Reporting artifact ID"},examples:{example:{value:"rpt_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"format",in:"query",required:!0,schema:{type:"string",enum:["json","csv"]},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"report.artifact.download","x-principal":"user_session","x-personal-access-token-scope":"billing:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/report_artifact_downloadOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/reports":{get:{operationId:"report_artifact_list",tags:["Report"],summary:"List stored report metadata without bodies",description:"Lists the metadata of the Product's stored reports. Use retrieve or download for the content.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"after",in:"query",required:!1,schema:{type:"string",pattern:"^rpt_(sandbox|live)_[a-z0-9]{8,64}$",description:"Reporting artifact ID"},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"report.artifact.list","x-principal":"user_session","x-personal-access-token-scope":"billing:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/report_artifact_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]},post:{operationId:"report_request",tags:["Report"],summary:"Capture a declared report",description:"Evaluates a frozen Core definition over a complete reporting checkpoint at the Product clock. Refuses unresolved operations, unavailable facts and unsupported history. The caller supplies no report rows or balances. External release requires a separate approved operation.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"report.request","x-principal":"user_session","x-personal-access-token-scope":"billing:write","x-agent-scope":"billing:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},definitionId:{type:"string",minLength:1,maxLength:80},periodStart:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},correction:{type:"object",properties:{artifactId:{type:"string",pattern:"^rpt_(sandbox|live)_[a-z0-9]{8,64}$",description:"Reporting artifact ID"},reason:{type:"string",minLength:1,maxLength:240}},required:["artifactId","reason"],additionalProperties:!1}},required:["tenantId","definitionId","periodStart"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",definitionId:"resource_sandbox_example0001",periodStart:"2026-01-01T00:00:00.000Z"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/report_requestOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/reports/{reportingArtifactId}/replay":{get:{operationId:"report_artifact_replay",tags:["Report"],summary:"Verify byte-identical replay from retained inputs",description:"Rebuilds a stored report from its retained inputs and confirms the result matches the stored bytes. If the bytes differ, the call fails.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"reportingArtifactId",in:"path",required:!0,schema:{type:"string",pattern:"^rpt_(sandbox|live)_[a-z0-9]{8,64}$",description:"Reporting artifact ID"},examples:{example:{value:"rpt_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"report.artifact.replay","x-principal":"user_session","x-personal-access-token-scope":"billing:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/report_artifact_replayOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/reports/{reportingArtifactId}":{get:{operationId:"report_artifact_retrieve",tags:["Report"],summary:"Retrieve a stored report and provenance manifest",description:"Returns one stored report's metadata, definition, provenance manifest, and JSON body.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"reportingArtifactId",in:"path",required:!0,schema:{type:"string",pattern:"^rpt_(sandbox|live)_[a-z0-9]{8,64}$",description:"Reporting artifact ID"},examples:{example:{value:"rpt_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"report.artifact.retrieve","x-principal":"user_session","x-personal-access-token-scope":"billing:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/report_artifact_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/products/{productId}/report-definitions/{definitionId}/activate":{post:{operationId:"report_definition_activate",tags:["Report"],summary:"Activate a reporting definition",description:"Binds activation to the exact definition and Core digests. Routine report requests use this activation.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"definitionId",in:"path",required:!0,schema:{type:"string",minLength:1,maxLength:80},examples:{example:{value:"resource_sandbox_example0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"report.definition.activate","x-principal":"user_session","x-personal-access-token-scope":"billing:write","x-agent-scope":"billing:write","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},definitionDigest:{type:"string",pattern:"^[a-f0-9]{64}$"},coreDigest:{type:"string",pattern:"^[a-f0-9]{64}$"}},required:["tenantId","definitionDigest","coreDigest"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",definitionDigest:"86a7695eb7559a8d3b6914182edf3330d1ebb137bff7455cd342daf24d44ebb6",coreDigest:"86a7695eb7559a8d3b6914182edf3330d1ebb137bff7455cd342daf24d44ebb6"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/report_definition_activateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/products/{productId}/report-definitions":{get:{operationId:"report_definition_list",tags:["Report"],summary:"List permitted Core report definitions",description:"Lists the report definitions in the Product's current Core that the caller's role may read, each marked activated or not.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"report.definition.list","x-principal":"user_session","x-personal-access-token-scope":"billing:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/report_definition_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/sandbox/account-funding":{post:{operationId:"sandbox_account_fund",tags:["Sandbox"],summary:"Fund a sandbox account",description:"Posts a settled credit into a sandbox account from a system funding source so developers can seed test balances themselves. Self-serve with a product API key or portal session and confined to the sandbox environment; it never moves live money.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"sandbox.account.fund","x-principal":"api_key","x-personal-access-token-scope":null,"x-agent-scope":"products:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},transferId:{type:"string",pattern:"^trn_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale transfer ID"},destinationAccountId:{type:"string",pattern:"^acct_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale account ID"},amount:{type:"string",maxLength:15,pattern:"^[1-9][0-9]{0,17}$",description:"Positive minor-unit integer amount serialized as a string, capped at 15 digits per call"},currency:{type:"string",pattern:"^[A-Z]{3}$"}},required:["tenantId","destinationAccountId","amount","currency"],additionalProperties:!1},examples:{fund_customer_balance:{value:{tenantId:"ten_sandbox_riyadhresale01",destinationAccountId:"acct_sandbox_aisha0001",amount:"1000000",currency:"SAR"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/sandbox_account_fundOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]}]}},"/v1/sandbox/clock/advance":{post:{operationId:"sandbox_clock_advance",tags:["Sandbox"],summary:"Advance the sandbox Product clock",description:"Advances the sandbox clock of the Product bound to the key, or productId named by an authorised tenant session. A key cannot name another Product. Due actions, deadlines and allocation earning read this instant. An unused Product may set its first clock instant in the past, at most 18 calendar months before tenant creation. Business objects, instrument events and money movements prevent a past start. Once set, at only moves the clock forward. Send release instead of at to return the clock to wall time at any point, including from ahead of it; records stamped while the clock ran ahead keep their stamps. Before it responds, the advance runs every clock action that is now due, counts them in ranCount and lists the first 2000 in ran: the record and its title, the customer, the action and the same action in the program's words, its due instant and, for a banking clock that rolled past a closed day, the calendar instant it rolled from, succeeded or refused, the amount it moves, and for a refusal the reason and, when it is an unfunded charge, that it retries and the account, the amount it needed and the shortfall. Each advance first retries every unfunded charge refused before it, oldest first, and the maintenance sweep retries one about once a minute. Any other refusal is lasting: it carries no retries, stays refused until an action on its record or a write to it, and shows as work for the team. A clock action whose action requires a reference in a state, such as a schedule piece before the payer activates the schedule, waits and is not listed; the activation collects it. A due on any other action only makes it runnable, and a passed deadline refuses its action. The receipt records its previous and new instants. Wall time and other Products are unchanged.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"sandbox.clock.advance","x-principal":"api_key","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},productId:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},at:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},release:{type:"boolean",const:!0}},required:["tenantId"],additionalProperties:!1},examples:{one_month:{value:{productId:"prd_sandbox_97c43dbc8495d7ca",at:"2026-11-11T00:00:00Z"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/sandbox_clock_advanceOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]}]}},"/v1/products/{productId}/sandbox-clock":{get:{operationId:"sandbox_clock_retrieve",tags:["Sandbox"],summary:"Read the sandbox Product clock",description:"Returns the same effective time used by Product execution. Host mode follows wall time; frozen mode stays at the last clock advance. Observation time always uses wall time.",parameters:[{name:"productId",in:"path",required:!0,schema:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},examples:{example:{value:"prd_sandbox_example0001"}}},{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"sandbox.clock.retrieve","x-principal":"api_key","x-personal-access-token-scope":"products:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"sandbox",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/sandbox_clock_retrieveOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:read"]}]}},"/v1/sandbox/customer-access/{customerAccessId}/activate":{post:{operationId:"sandbox_customer_access_activate",tags:["Customers"],summary:"Activate sandbox customer access",description:"Activates an authorized sandbox customer-access binding. Customer identity evidence belongs to the customer object action; this operation records access state. When the deployment names an organization verification provider, a pending organization goes to it first: approval verifies the organization, refusal rejects it and blocks this access.",parameters:[{name:"customerAccessId",in:"path",required:!0,schema:{type:"string",pattern:"^cacc_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale customer access ID"},examples:{activate_onboarded_customer:{value:"cacc_sandbox_aisha0001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"sandbox.customer_access.activate","x-principal":"api_key","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"}},required:["tenantId"],additionalProperties:!1},examples:{activate_onboarded_customer:{value:{tenantId:"ten_sandbox_riyadhresale01"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/sandbox_customer_access_activateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{productKey:[]},{session:[]},{oauth2:["products:write"]}]}},"/v1/sandbox/rehearsals":{post:{operationId:"sandbox_rehearsal_create",tags:["Sandbox"],summary:"Create a fresh rehearsal Product",description:"Copies the frozen Core into a new sandbox Product with new keys and a fresh clock. Prior Products and evidence remain readable. Requires Product creation and key mint authority.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"sandbox.rehearsal.create","x-principal":"user_session","x-personal-access-token-scope":"products:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},productId:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"},name:{type:"string",minLength:1,maxLength:120}},required:["tenantId","productId","name"],additionalProperties:!1},examples:{example:{value:{tenantId:"ten_sandbox_example0001",productId:"prd_sandbox_example0001",name:"Sandbox account"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/sandbox_rehearsal_createOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:write"]}]}},"/v1/health":{get:{operationId:"system_health",tags:["System"],summary:"Check API health",description:"Returns unauthenticated liveness and the exact release commit for monitors and deployment proof. It does not expose tenant, product, or provider state.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"system.health","x-principal":"public","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/system_healthOutput"},examples:{"healthy release":{value:{status:"ok",checkedAt:"2026-08-16T12:00:00.000Z",releaseCommit:"325e7c9a1b64f69fd1e9e936090477ccf14e0ef3"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[]}},"/v1/team/invitations":{get:{operationId:"team_invitation_list",tags:["Team"],summary:"List pending invitations for the caller's team",description:"Returns pending, unexpired invitations ordered by createdAt ascending then ID descending. Limit defaults to 50 and accepts integers from 1 to 100. Follow nextCursor until absent. Cursors bind the environment, tenant and team; another scope refuses with invalid_request. Requires the same team read permission as team.member.list. Contains no invitation tokens.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{default:{value:"ten_sandbox_00000000000000000001"}}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"team.invitation.list","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/team_invitation_listOutput"},examples:{default:{value:{teamId:"team_sandbox_00000000000000000001",items:[{invitationId:"tinv_sandbox_00000000000000000001",email:"developer@example.com",role:"developer",invitedByUserId:"usr_sandbox_00000000000000000001",expiresAt:"2026-01-08T00:00:00.000Z",createdAt:"2026-01-01T00:00:00.000Z"}]}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["activity:read"]}]}},"/v1/team/members/invite":{post:{operationId:"team_member_invite",tags:["Team"],summary:"Invite an email address to the caller's team",description:"Persists a durable pending invitation binding an email address to a team role: a seeded role name or a custom team role id. In sandbox the invited person signs up with the invite token to join this team. In live an existing sandbox member with a verified matching email redeems the invitation by switching to live. The switch assigns the invited live role and consumes the invitation atomically; it does not change sandbox membership. The invite token is a one-time secret surfaced only in the first API response, never in receipts or replays; only its SHA-256 hash is stored. One pending invitation may exist per email per team; invitations expire after seven days. productIds names the Products (Cores) the membership will reach, as sandbox ids; null is every Product, and an id that is not a Product of the company is refused.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.member.invite","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},email:{type:"string",maxLength:254,format:"email",pattern:"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},role:{anyOf:[{type:"string",enum:["owner","admin","developer","operations","finance","viewer"]},{type:"string",pattern:"^trole_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale custom team role ID"}],description:"Seeded role name or custom team role ID"},productIds:{description:"The Products (Cores) the member will reach; null or omitted is every Product. A caller who holds some Products names only those",anyOf:[{maxItems:50,type:"array",items:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"}},{type:"null"}]}},required:["tenantId","email","role"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001",email:"developer@example.com",role:"developer"}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/team_member_inviteOutput"},examples:{default:{value:{invitationId:"tinv_sandbox_00000000000000000001",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",email:"developer@example.com",role:"developer",productIds:null,invitedByUserId:"usr_sandbox_00000000000000000001",inviteToken:"hyperscale_invite_0123456789abcdefghijklmnopqrstuv",expiresAt:"2026-01-08T00:00:00.000Z",status:"pending"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/team/members/invitations/{invitationId}/revoke":{post:{operationId:"team_member_invite_revoke",tags:["Team"],summary:"Revoke a pending team invitation",description:"Immediately invalidates a pending invitation: it can no longer be redeemed by sandbox signup or live session switching, and the email address becomes invitable again. Accepted invitations cannot be revoked. Idempotent: revoking an already-revoked invitation succeeds with status already_revoked.",parameters:[{name:"invitationId",in:"path",required:!0,schema:{type:"string",pattern:"^tinv_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale team invitation ID"},examples:{default:{value:"tinv_sandbox_00000000000000000001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.member.invite.revoke","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"}},required:["tenantId"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/team_member_invite_revokeOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{invitationId:"tinv_sandbox_00000000000000000001",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",email:"developer@example.com",updatedAt:"2026-01-02T00:00:00.000Z",status:"revoked"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/team/members":{get:{operationId:"team_member_list",tags:["Team"],summary:"List the caller's team members",description:"Returns the membership roll of the caller's team with each member's email, display name, role, status, and join time, oldest first. The roll pages on `limit` and `cursor`; `nextCursor` is absent on the last page. Pending invitations page independently through team.invitation.list. Requires an authenticated user session on the team's tenant.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{default:{value:"ten_sandbox_00000000000000000001"}}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"team.member.list","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/team_member_listOutput"},examples:{default:{value:{teamId:"team_sandbox_00000000000000000001",members:[{membershipId:"tmem_sandbox_00000000000000000001",userId:"usr_sandbox_00000000000000000001",email:"founder@example.com",displayName:"Founder Example",role:"owner",productIds:null,status:"active",joinedAt:"2026-01-01T00:00:00.000Z"}]}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["activity:read"]}]}},"/v1/team/members/{userId}/remove":{post:{operationId:"team_member_remove",tags:["Team"],summary:"Remove a member from the caller's team",description:"Deletes the member's team membership and revokes their active sessions so the removed member can no longer act on the team. The last remaining owner cannot be removed. The user record itself is not deleted.",parameters:[{name:"userId",in:"path",required:!0,schema:{type:"string",pattern:"^usr_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale user ID"},examples:{default:{value:"usr_sandbox_00000000000000000002"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.member.remove","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"}},required:["tenantId"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/team_member_removeOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{membershipId:"tmem_sandbox_00000000000000000002",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",userId:"usr_sandbox_00000000000000000002",role:"developer",sessionsRevoked:1,removedAt:"2026-01-02T00:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/team/members/{userId}/role":{post:{operationId:"team_member_role_update",tags:["Team"],summary:"Change a team member's role, staff roles and Products",description:"Updates the member's role on their team membership, and with staffRoles the staff roles the member holds. The last remaining owner cannot be moved to a non-owner role. Sessions snapshot their scopes from the member's role at login time, so a role change does not rewrite existing session scopes; instead the member's active sessions are revoked and the next login mints a session with the new role's scopes. Staff roles and productIds are read on every request, so changing them revokes nothing and applies to the next call.",parameters:[{name:"userId",in:"path",required:!0,schema:{type:"string",pattern:"^usr_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale user ID"},examples:{default:{value:"usr_sandbox_00000000000000000002"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.member.role.update","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},role:{anyOf:[{type:"string",enum:["owner","admin","developer","operations","finance","viewer"]},{type:"string",pattern:"^trole_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale custom team role ID"}],description:"Seeded role name or custom team role ID"},staffRoles:{description:"The staff roles the member holds in this tenant, replacing the held set; omitted keeps it. A program's staff party acts only for a member who holds the role it declares.",maxItems:32,type:"array",items:{type:"string",maxLength:80,pattern:"^[a-z][a-zA-Z0-9_]*$",description:"A staff role a program's staff party declares, such as trade_checker"}},productIds:{description:"The Products (Cores) the member reaches, replacing the held list; null is every Product, omitted keeps it",anyOf:[{maxItems:50,type:"array",items:{type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale product ID"}},{type:"null"}]},reason:{description:"Required for staff writes; retained in the audit event",type:"string",minLength:1,maxLength:240}},required:["tenantId","role"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001",role:"admin",staffRoles:["trade_checker"]}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/team_member_role_updateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{membershipId:"tmem_sandbox_00000000000000000002",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",userId:"usr_sandbox_00000000000000000002",previousRole:"developer",role:"admin",staffRoles:["trade_checker"],productIds:null,sessionsRevoked:1,updatedAt:"2026-01-02T00:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/team/roles":{post:{operationId:"team_role_create",tags:["Team"],summary:"Create a custom team role",description:"Persists a custom role owned by the caller's team: a named, flat set of permissions drawn from the fixed catalog. Members and invitations reference the role by its id anywhere a seeded role name is accepted. Role names are unique per team, case-insensitively. Hyperscale enforces the stored permission set on every user-session API request, while operation scopes remain the coarse credential boundary.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.role.create","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},name:{type:"string",minLength:1,maxLength:80,description:"Display name for the custom role, unique per team"},permissions:{maxItems:80,type:"array",items:{type:"string",enum:["desk.activity","desk.billing","desk.compose","desk.discover","desk.handbook","desk.products","desk.security","desk.settings","desk.team","desk.treasury","desk.trust","desk.usage","desk.webhooks","desk.activity.export","desk.compose.create","desk.products.keys_mint","desk.products.keys_revoke","desk.products.manage","desk.products.objects_write","desk.security.sessions_revoke","desk.security.tokens_own","desk.settings.manage","desk.team.manage","desk.treasury.fund_sandbox","desk.treasury.settlement_iban_set","desk.treasury.withdraw","desk.trust.manage","desk.webhooks.manage","ops.activation","ops.activity","ops.billing","ops.customers","ops.margin","ops.money","ops.objects","ops.platform","ops.products","ops.promotions","ops.providers","ops.pulse","ops.records","ops.security","ops.team","ops.treasury","ops.trust","ops.billing.manage","ops.customers.lifecycle","ops.money.reconcile","ops.money.repair","ops.objects.manage","ops.products.capabilities","ops.promotions.promote","ops.providers.manage","ops.security.sessions_revoke","ops.team.manage","ops.treasury.manage","ops.trust.decide"]},description:"Portal permissions this role grants, drawn from the fixed catalog"}},required:["tenantId","name","permissions"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001",name:"Payments desk",permissions:["desk.billing","desk.treasury","desk.treasury.withdraw"]}}}}}},responses:{"200":{description:"OperationRehearsal, when the X-Hyperscale-Rehearsal header is true.",content:{"application/json":{schema:{$ref:"#/components/schemas/OperationRehearsal"}}}},"201":{description:"Success",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{$ref:"#/components/schemas/team_role_createOutput"},examples:{default:{value:{roleId:"trole_sandbox_00000000000000000001",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",name:"Payments desk",permissions:["desk.billing","desk.treasury","desk.treasury.withdraw"],createdAt:"2026-01-01T00:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]},get:{operationId:"team_role_list",tags:["Team"],summary:"List the caller's custom team roles",description:"Returns the custom roles of the caller's team with each role's permission set and how many members currently hold it, oldest first, paged on `limit` and `cursor` (`nextCursor` is absent on the last page). Seeded role templates are contract data shipped with the SDKs, not rows, so they are not listed here.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{default:{value:"ten_sandbox_00000000000000000001"}}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"team.role.list","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/team_role_listOutput"},examples:{default:{value:{teamId:"team_sandbox_00000000000000000001",roles:[{roleId:"trole_sandbox_00000000000000000001",name:"Payments desk",permissions:["desk.billing","desk.treasury","desk.treasury.withdraw"],memberCount:2,createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:00:00.000Z"}]}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["activity:read"]}]}},"/v1/team/roles/{roleId}/delete":{post:{operationId:"team_role_delete",tags:["Team"],summary:"Delete an unused custom role",description:"Deletes the role record. A role still held by a member or referenced by a pending invitation cannot be deleted; move those members to another role or revoke the invitations first.",parameters:[{name:"roleId",in:"path",required:!0,schema:{type:"string",pattern:"^trole_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale custom team role ID"},examples:{default:{value:"trole_sandbox_00000000000000000001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.role.delete","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"}},required:["tenantId"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/team_role_deleteOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{roleId:"trole_sandbox_00000000000000000001",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",name:"Payments desk",deletedAt:"2026-01-03T00:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/team/roles/{roleId}":{post:{operationId:"team_role_update",tags:["Team"],summary:"Rename a custom role or change its permissions",description:"Updates the role record. Hyperscale resolves the stored role permissions on every session authentication, and a permission change also revokes active sessions so already-open clients stop immediately. A pure rename revokes nothing.",parameters:[{name:"roleId",in:"path",required:!0,schema:{type:"string",pattern:"^trole_(sandbox|live)_[a-z0-9]{8,64}$",description:"Hyperscale custom team role ID"},examples:{default:{value:"trole_sandbox_00000000000000000001"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"team.role.update","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":null,"x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},name:{type:"string",minLength:1,maxLength:80,description:"Display name for the custom role, unique per team"},permissions:{maxItems:80,type:"array",items:{type:"string",enum:["desk.activity","desk.billing","desk.compose","desk.discover","desk.handbook","desk.products","desk.security","desk.settings","desk.team","desk.treasury","desk.trust","desk.usage","desk.webhooks","desk.activity.export","desk.compose.create","desk.products.keys_mint","desk.products.keys_revoke","desk.products.manage","desk.products.objects_write","desk.security.sessions_revoke","desk.security.tokens_own","desk.settings.manage","desk.team.manage","desk.treasury.fund_sandbox","desk.treasury.settlement_iban_set","desk.treasury.withdraw","desk.trust.manage","desk.webhooks.manage","ops.activation","ops.activity","ops.billing","ops.customers","ops.margin","ops.money","ops.objects","ops.platform","ops.products","ops.promotions","ops.providers","ops.pulse","ops.records","ops.security","ops.team","ops.treasury","ops.trust","ops.billing.manage","ops.customers.lifecycle","ops.money.reconcile","ops.money.repair","ops.objects.manage","ops.products.capabilities","ops.promotions.promote","ops.providers.manage","ops.security.sessions_revoke","ops.team.manage","ops.treasury.manage","ops.trust.decide"]},description:"Portal permissions this role grants, drawn from the fixed catalog"}},required:["tenantId"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_00000000000000000001",permissions:["desk.billing","desk.treasury","desk.treasury.withdraw","desk.usage"]}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/team_role_updateOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{roleId:"trole_sandbox_00000000000000000001",tenantId:"ten_sandbox_00000000000000000001",teamId:"team_sandbox_00000000000000000001",name:"Payments desk",permissions:["desk.billing","desk.treasury","desk.treasury.withdraw","desk.usage"],sessionsRevoked:2,updatedAt:"2026-01-02T00:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/tenants/{tenantId}/banking-calendar":{post:{operationId:"tenant_banking_calendar_set",tags:["Tenant"],summary:"Set the banking calendar",description:"Replaces the company's banking calendar: the weekend days, the dated holidays and the timezone they are local to. Banking days are every day outside the weekend and the holidays. A clock clause that counts banking days reads this calendar when it schedules; a Core never stores it. A company that never set one has Friday and Saturday as its weekend, no holidays and Asia/Riyadh as its timezone.",parameters:[{name:"tenantId",in:"path",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{default:{value:"ten_sandbox_riyadhresale01"}}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"tenant.banking_calendar.set","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"founder_cli","x-idempotency":"required","x-environment":"either",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{weekend:{maxItems:6,type:"array",items:{type:"string",enum:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]},description:"The weekdays the bank is closed, such as friday and saturday."},holidays:{maxItems:366,type:"array",items:{type:"string",format:"date",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},description:"The dated days the bank is closed, as YYYY-MM-DD. Stored and returned in date order."},timezone:{type:"string",description:"The IANA timezone the weekend and holidays are local to, such as Asia/Riyadh."}},required:["weekend","holidays","timezone"],additionalProperties:!1},examples:{default:{value:{weekend:["friday","saturday"],holidays:["2026-09-23","2027-02-22"],timezone:"Asia/Riyadh"}}}}}},responses:{"200":{description:"Success, or OperationRehearsal when the X-Hyperscale-Rehearsal header is true.",headers:{"idempotent-replayed":{description:"`true` when this response replays an earlier request with the same Idempotency-Key. Nothing ran again.",schema:{type:"string",const:"true"}}},content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/tenant_banking_calendar_setOutput"},{$ref:"#/components/schemas/OperationRehearsal"}]},examples:{default:{value:{tenantId:"ten_sandbox_riyadhresale01",weekend:["friday","saturday"],holidays:["2026-09-23","2027-02-22"],timezone:"Asia/Riyadh",updatedAt:"2026-10-27T12:00:00.000Z"}}}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]}]}},"/v1/calendar":{get:{operationId:"tenant_calendar_list",tags:["Tenant"],summary:"List the company calendar",description:"Lists every dated thing the company owes in date order: scheduled agreement actions from every Product (a filing's deadline, a renewal, a meeting's resolution window) and event records from the record store, each with its owner, instrument, state and days left. Two ordered lists merge under one cursor. A membership holding some Products sees only their actions, and no record-store events.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"productId",in:"query",required:!1,schema:{description:"Only this Product's clocks. Events belong to the company and still list.",type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$"},examples:{}},{name:"source",in:"query",required:!1,schema:{type:"string",enum:["clock","event"]},examples:{}},{name:"from",in:"query",required:!1,schema:{description:"Only entries on or after this instant.",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"to",in:"query",required:!1,schema:{description:"Only entries on or before this instant.",type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},examples:{}},{name:"cursor",in:"query",required:!1,schema:{type:"string",minLength:1,maxLength:2e3},examples:{}},{name:"limit",in:"query",required:!1,schema:{type:"integer",minimum:1,maximum:100,description:"Maximum items to return (1-100). Defaults to 50 when omitted."},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"tenant.calendar.list","x-principal":"user_session","x-personal-access-token-scope":null,"x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/tenant_calendar_listOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/finance/report":{get:{operationId:"tenant_finance_report",tags:["Tenant"],summary:"Read posted company earnings and costs",description:"Sums recorded posting effects by business month at one cutoff. Sandbox periods use the retained Product business time and may run to the latest Product clock; live periods use ledger time. The cutoff is ledger time. Sandbox account statements and statement exports date on the same Product business time. Missing retained classification withholds gross revenue for that product and month and for the totals, never for other products' rows. Hyperscale fees are costs and never revenue. Covers at most 24 UTC months. Rows and totalsByCurrency keep each currency apart; totals and pool read SAR. Without productId it covers every Product the caller's membership holds; with no month named it runs from the first posting to each Product's current business month, keeps the latest whole months within 24 months and the effect budget, and names the newest readable range before them as earlier.",parameters:[{name:"tenantId",in:"query",required:!0,schema:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},examples:{}},{name:"fromPeriod",in:"query",required:!1,schema:{description:"First business month. With neither month, sandbox runs from the first posting's month, or the earliest Product clock's when that is earlier, to the latest Product clock's month, and live reads the cutoff's month. With one month, the report covers that month.",type:"string",pattern:"^(?:19(?:7[0-9]|[89][0-9])|[2-9][0-9]{3})-(0[1-9]|1[0-2])$"},examples:{}},{name:"toPeriod",in:"query",required:!1,schema:{description:"Last business month.",type:"string",pattern:"^(?:19(?:7[0-9]|[89][0-9])|[2-9][0-9]{3})-(0[1-9]|1[0-2])$"},examples:{}},{name:"productId",in:"query",required:!1,schema:{description:"Narrow the report to one Product. Omit for every Product the caller's membership holds.",type:"string",pattern:"^prd_(sandbox|live)_[a-z0-9]{8,64}$"},examples:{}},{name:"cutoff",in:"query",required:!1,schema:{type:"string",format:"date-time",pattern:"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},examples:{}},{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}}],"x-operation-name":"tenant.finance.report","x-principal":"user_session","x-personal-access-token-scope":"finance:read","x-agent-scope":"products:read","x-idempotency":"not_required","x-environment":"either",responses:{"200":{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/tenant_finance_reportOutput"},examples:{}}}},default:{description:"ErrorResponse. See x-errors for each code's HTTP status and retry guidance.",content:{"application/json":{schema:{$ref:"#/components/schemas/ErrorResponse"}}}}},security:[{session:[]},{oauth2:["products:read"]}]}},"/v1/headers":{post:{operationId:"tenant_header_publish",tags:["Tenant"],summary:"Publish a tenant header",description:"Compiles the HSX header with std and stores it under name in the tenant's catalog, beside the headers the tenant already publishes. A program that says `use bank.trade` compiles with the header this tenant published as bank.trade; another tenant has no such header and its compile refuses with unknown_header. A Core pins the digest of each header it used, so a republish leaves every admitted Core as it was; the next composer.plan on a program that uses the header shows the toolchain move. A header that does not compile refuses with invalid_request, and details.issues lists its diagnostics. Publishing the same source again returns the current revision with unchanged true.",parameters:[{name:"X-Hyperscale-Environment",in:"header",required:!1,schema:{type:"string",enum:["sandbox","live"],default:"sandbox"}},{name:"Idempotency-Key",in:"header",required:!0,schema:{type:"string"}},{name:"X-Hyperscale-Rehearsal",in:"header",required:!1,schema:{type:"string",const:"true",description:"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request."}}],"x-operation-name":"tenant.header.publish","x-principal":"user_session","x-personal-access-token-scope":"blueprints:write","x-agent-scope":"products:write","x-idempotency":"required","x-environment":"sandbox",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{tenantId:{type:"string",pattern:"^ten_(sandbox|live)_[a-z0-9]{8,64}$",description:"Organization tenant ID"},name:{type:"string",pattern:"^[a-z][a-z0-9_]{0,39}\\.[a-z][a-z0-9_]{0,39}$",description:"A tenant header's name as a use line names it, prefix.name such as bank.trade. The tenant picks both parts."},source:{type:"string",minLength:1,maxLength:262144,description:"HSX header source: instrument, object and enum declarations with no product or attach block."}},required:["tenantId","name","source"],additionalProperties:!1},examples:{default:{value:{tenantId:"ten_sandbox_riyadhresale01",name:"bank.trade",source:`header trade
10173
10173
 
10174
10174
  instrument exposure_line(limit: money) {
10175
10175
  ...