{"openapi":"3.1.0","info":{"title":"ResolveSignal","description":"Bounded business diagnosis. Validate before x402 payment. No customer actions executed.","version":"2.2.1"},"paths":{"/v2/requests":{"get":{"summary":"Discover","operationId":"discover_v2_requests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Submit","operationId":"submit_v2_requests_post","parameters":[{"name":"X-Request-Key","in":"header","required":true,"schema":{"type":"string","minLength":32,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"X-Request-Key"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"Idempotency-Key"}},{"name":"X-Payer-Address","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":42},{"type":"null"}],"title":"X-Payer-Address"}},{"name":"X-Payer-Proof","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"X-Payer-Proof"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/form":{"get":{"summary":"Discover","operationId":"discover_v2_form_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v2/payer-challenge":{"post":{"summary":"Payer Challenge","operationId":"payer_challenge_v2_payer_challenge_post","parameters":[{"name":"X-Request-Key","in":"header","required":true,"schema":{"type":"string","minLength":32,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"X-Request-Key"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"Idempotency-Key"}},{"name":"X-Payer-Address","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":42},{"type":"null"}],"title":"X-Payer-Address"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/requests/{call_id}/pay":{"post":{"summary":"Pay","operationId":"pay_v2_requests__call_id__pay_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"X-Request-Key","in":"header","required":true,"schema":{"type":"string","minLength":32,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"X-Request-Key"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Payment-Signature"}},{"name":"x-demo-payment","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"X-Demo-Payment"}},{"name":"X-Processing-Timeout-Seconds","in":"header","required":false,"schema":{"anyOf":[{"type":"integer","maximum":600,"minimum":1},{"type":"null"}],"title":"X-Processing-Timeout-Seconds"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/requests/{call_id}":{"get":{"summary":"Status","operationId":"status_v2_requests__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"X-Request-Key","in":"header","required":true,"schema":{"type":"string","minLength":32,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"X-Request-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/form":{"get":{"summary":"Form","operationId":"form_v1_form_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/requests":{"get":{"summary":"Form","operationId":"form_v1_requests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Submit","operationId":"submit_v1_requests_post","parameters":[{"name":"X-Request-Key","in":"header","required":true,"schema":{"type":"string","minLength":32,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"X-Request-Key"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Form","operationId":"form__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/requests/{request_id}/pay":{"post":{"summary":"Pay","operationId":"pay_v1_requests__request_id__pay_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"X-Request-Key","in":"header","required":true,"schema":{"type":"string","minLength":32,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"X-Request-Key"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Payment-Signature"}},{"name":"x-demo-payment","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"X-Demo-Payment"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/requests/{request_id}":{"get":{"summary":"Status","operationId":"status_v1_requests__request_id__get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"X-Request-Key","in":"header","required":true,"schema":{"type":"string","minLength":32,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"X-Request-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/requests/{request_id}/retry":{"post":{"summary":"Retry","operationId":"retry_v1_requests__request_id__retry_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"X-Request-Key","in":"header","required":true,"schema":{"type":"string","minLength":32,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"X-Request-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Absent":{"properties":{"status":{"type":"string","const":"none","title":"Status"},"explanation":{"type":"string","maxLength":6000,"minLength":1,"title":"Explanation"}},"additionalProperties":false,"type":"object","required":["status","explanation"],"title":"Absent"},"Action":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$","title":"Id"},"description":{"type":"string","maxLength":6000,"minLength":1,"title":"Description"},"effect":{"type":"string","enum":["read_only","state_change","unknown"],"title":"Effect","description":"Effect of the declared operation: read_only observes without changing business state; state_change writes/acts (including mixed read/write); unknown cannot be selected by the automated service. Not a desired outcome or execution permission."},"requires_approval":{"type":"boolean","title":"Requires Approval"},"arguments":{"anyOf":[{"items":{"$ref":"#/components/schemas/ActionArgument"},"type":"array","maxItems":20,"minItems":1},{"$ref":"#/components/schemas/Absent"}],"title":"Arguments"},"response_observations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ResponseObservation"},"type":"array","maxItems":20,"minItems":1},{"$ref":"#/components/schemas/Absent"}],"title":"Response Observations"},"target_id":{"type":"string","maxLength":6000,"minLength":1,"title":"Target Id"},"cost_fact_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},{"type":"null"}],"title":"Cost Fact Id"}},"additionalProperties":false,"type":"object","required":["id","description","effect","requires_approval","arguments","response_observations","target_id","cost_fact_id"],"title":"Action"},"ActionArgument":{"properties":{"name":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$","title":"Name"},"value":{"type":"string","maxLength":1000,"minLength":1,"title":"Value"}},"additionalProperties":false,"type":"object","required":["name","value"],"title":"ActionArgument"},"Answer":{"properties":{"status":{"type":"string","enum":["provided","none","unknown"],"title":"Status"},"content":{"type":"string","maxLength":6000,"minLength":1,"title":"Content","description":"A real answer, or an explicit explanation such as 'Không có. ...'. Never blank."}},"additionalProperties":false,"type":"object","required":["status","content"],"title":"Answer"},"Capability":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$","title":"Id"},"description":{"type":"string","maxLength":6000,"minLength":1,"title":"Description"},"effect":{"type":"string","enum":["read_only","state_change","unknown"],"title":"Effect","description":"Effect of the declared operation: read_only observes without changing business state; state_change writes/acts (including mixed read/write); unknown cannot be selected by the automated service. Not a desired outcome or execution permission."},"requires_approval":{"type":"boolean","title":"Requires Approval"},"arguments":{"anyOf":[{"items":{"$ref":"#/components/schemas/ActionArgument"},"type":"array","maxItems":20,"minItems":1},{"$ref":"#/components/schemas/Absent"}],"title":"Arguments"},"response_observations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ResponseObservation"},"type":"array","maxItems":20,"minItems":1},{"$ref":"#/components/schemas/Absent"}],"title":"Response Observations"}},"additionalProperties":false,"type":"object","required":["id","description","effect","requires_approval","arguments","response_observations"],"title":"Capability"},"Condition":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$","title":"Id"},"observation_id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$","title":"Observation Id"},"operator":{"type":"string","enum":["eq","ne","gt","gte","lt","lte","exists"],"title":"Operator"},"expected":{"$ref":"#/components/schemas/JsonValue"},"action_ids":{"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"type":"array","title":"Action Ids"}},"additionalProperties":false,"type":"object","required":["id","observation_id","operator","expected","action_ids"],"title":"Condition"},"Fact":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$","title":"Id"},"value":{"type":"string","pattern":"^-?\\d{1,18}(\\.\\d{1,12})?$","title":"Value"},"unit":{"type":"string","maxLength":32,"minLength":1,"title":"Unit"},"source":{"type":"string","maxLength":6000,"minLength":1,"title":"Source"}},"additionalProperties":false,"type":"object","required":["id","value","unit","source"],"title":"Fact"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JsonValue":{},"Objective":{"properties":{"target_id":{"type":"string","maxLength":6000,"minLength":1,"title":"Target Id"},"statement":{"type":"string","maxLength":6000,"minLength":1,"title":"Statement"},"success_contract":{"$ref":"#/components/schemas/SuccessContract"}},"additionalProperties":false,"type":"object","required":["target_id","statement","success_contract"],"title":"Objective"},"Observation":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$","title":"Id"},"target_id":{"type":"string","maxLength":6000,"minLength":1,"title":"Target Id"},"status":{"type":"string","enum":["provided","none","unknown"],"title":"Status"},"value":{"$ref":"#/components/schemas/JsonValue"},"explanation":{"type":"string","maxLength":6000,"minLength":1,"title":"Explanation"},"source":{"type":"string","maxLength":6000,"minLength":1,"title":"Source"}},"additionalProperties":false,"type":"object","required":["id","target_id","status","value","explanation","source"],"title":"Observation"},"PayBody":{"properties":{"input_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Input Hash"}},"additionalProperties":false,"type":"object","required":["input_hash"],"title":"PayBody"},"Policy":{"properties":{"authority":{"$ref":"#/components/schemas/Answer"},"constraints":{"$ref":"#/components/schemas/Answer"},"allowed_action_ids":{"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"type":"array","title":"Allowed Action Ids"},"forbidden_action_ids":{"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"type":"array","title":"Forbidden Action Ids"},"conditions":{"items":{"$ref":"#/components/schemas/Condition"},"type":"array","title":"Conditions"}},"additionalProperties":false,"type":"object","required":["authority","constraints","allowed_action_ids","forbidden_action_ids","conditions"],"title":"Policy"},"Problem":{"properties":{"problem":{"type":"string","maxLength":6000,"minLength":1,"title":"Problem"},"desired_outcome":{"type":"string","maxLength":6000,"minLength":1,"title":"Desired Outcome","description":"State the measurable success condition and all required target/preservation constraints. Explicitly distinguish knowing the current status (which may be pending) from establishing a definitive result or an actual state change. A diagnostic read completing does not itself prove the business goal resolved."},"success_contract":{"$ref":"#/components/schemas/SuccessContract"},"current_state":{"$ref":"#/components/schemas/Answer"},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"evidence":{"$ref":"#/components/schemas/Answer"},"constraints":{"$ref":"#/components/schemas/Answer"},"authority_limits":{"$ref":"#/components/schemas/Answer"},"previous_attempts":{"$ref":"#/components/schemas/Answer"},"output_requirements":{"$ref":"#/components/schemas/Answer"},"available_actions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Capability"},"type":"array","maxItems":30,"minItems":1},{"$ref":"#/components/schemas/Absent"}],"title":"Available Actions"},"facts":{"anyOf":[{"items":{"$ref":"#/components/schemas/Fact"},"type":"array","maxItems":100,"minItems":1},{"$ref":"#/components/schemas/Absent"}],"title":"Facts"}},"additionalProperties":false,"type":"object","required":["problem","desired_outcome","success_contract","current_state","observed_at","evidence","constraints","authority_limits","previous_attempts","output_requirements","available_actions","facts"],"title":"Problem"},"Request":{"properties":{"objective":{"$ref":"#/components/schemas/Objective"},"current_state":{"$ref":"#/components/schemas/Answer"},"observations":{"items":{"$ref":"#/components/schemas/Observation"},"type":"array","minItems":1,"title":"Observations"},"policy":{"$ref":"#/components/schemas/Policy"},"capabilities":{"anyOf":[{"items":{"$ref":"#/components/schemas/Action"},"type":"array","minItems":1},{"$ref":"#/components/schemas/Absent"}],"title":"Capabilities"},"facts":{"anyOf":[{"items":{"$ref":"#/components/schemas/Fact"},"type":"array","minItems":1},{"$ref":"#/components/schemas/Absent"}],"title":"Facts"},"previous_attempts":{"$ref":"#/components/schemas/Answer"},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"locale":{"type":"string","enum":["vi","en"],"title":"Locale"}},"additionalProperties":false,"type":"object","required":["objective","current_state","observations","policy","capabilities","facts","previous_attempts","observed_at","locale"],"title":"Request"},"ResponseCase":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$","title":"Id"},"description":{"type":"string","maxLength":6000,"minLength":1,"title":"Description"},"evidence":{"type":"string","enum":["usable","authoritative_absence","unavailable"],"title":"Evidence"},"target":{"type":"string","enum":["matched","mismatched","unverified"],"title":"Target"},"finality":{"type":"string","enum":["final","non_final","unknown"],"title":"Finality"},"operation_completed":{"type":"boolean","title":"Operation Completed","description":"Whether this response proves the selected operation actually completed. A usable pending record may finish a read; a pending write/ACK does not finish a state change."},"satisfies":{"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"type":"array","title":"Satisfies"}},"additionalProperties":false,"type":"object","required":["id","description","evidence","target","finality","operation_completed","satisfies"],"title":"ResponseCase"},"ResponseObservation":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$","title":"Id","description":"Caller-defined observation metadata ID, not a guaranteed vendor response field name."},"kind":{"type":"string","enum":["acknowledgement","action_completion","problem_state"],"title":"Kind"},"description":{"type":"string","maxLength":6000,"minLength":1,"title":"Description"},"cases":{"items":{"$ref":"#/components/schemas/ResponseCase"},"type":"array","minItems":1,"title":"Cases"}},"additionalProperties":false,"type":"object","required":["id","kind","description","cases"],"title":"ResponseObservation"},"SuccessContract":{"properties":{"requires_final_state":{"type":"boolean","title":"Requires Final State","description":"Explicitly choose whether the goal requires a definitive final business state. Pending cannot satisfy a true declaration."},"criteria":{"items":{"$ref":"#/components/schemas/SuccessCriterion"},"type":"array","minItems":1,"title":"Criteria"}},"additionalProperties":false,"type":"object","required":["requires_final_state","criteria"],"title":"SuccessContract"},"SuccessCriterion":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$","title":"Id"},"description":{"type":"string","minLength":1,"title":"Description"},"allow_authoritative_absence":{"type":"boolean","title":"Allow Authoritative Absence","description":"True only if an explicit definitive negative lookup can satisfy THIS criterion. Missing/unavailable data never satisfies it."}},"additionalProperties":false,"type":"object","required":["id","description","allow_authoritative_absence"],"title":"SuccessCriterion"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}