{"openapi":"3.1.0","info":{"title":"Ekmivo Payment API","version":"0.9.0-draft","description":"PG03 implemented contract: process liveness, financial readiness, and\nreal server-side merchant credential verification. Credential issue/rotate/\nrevoke currently use authenticated owner/admin Next.js server actions.\nPG05 provides SANDBOX-ONLY standalone and server-priced linked order/invoice\nsnapshots, immutable payment intents, opaque hosted checkout, payer+route lock,\nstatus refresh and cancellation. Full commerce/invoice operations, live\nreceiving instructions are\nNOT released. PG06–PG09 source contracts are unverified and not deployed. No money verification\ncan be inferred from return URLs, payer confirmation or sandbox responses.\n"},"servers":[{"url":"https://ekmivo-go-api.onrender.com","description":"Deployed Go API (does NOT imply financial readiness)"}],"tags":[{"name":"Operations"},{"name":"Merchant"}],"paths":{"/v1/workspaces/{workspaceID}/documents/customers":{"get":{"operationId":"listcustomers","summary":"listcustomers","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"createcustomers","summary":"createcustomers","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]}}}}}},"/v1/workspaces/{workspaceID}/documents/customers/{documentID}":{"get":{"operationId":"getcustomers","summary":"getcustomers","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"patch":{"operationId":"editcustomers","summary":"editcustomers","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]}}}}}},"/v1/workspaces/{workspaceID}/documents/customers/commands/import-preview":{"post":{"operationId":"customersimportpreview","summary":"customersimportpreview","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"csv":{"type":"string","maxLength":524288}},"required":["csv"]}}}}}},"/v1/workspaces/{workspaceID}/documents/customers/commands/import":{"post":{"operationId":"customersimport","summary":"customersimport","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"csv":{"type":"string","maxLength":524288}},"required":["csv"]}}}}}},"/v1/workspaces/{workspaceID}/documents/customers/commands/export":{"post":{"operationId":"customersexport","summary":"customersexport","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Private authorized CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}}}},"/v1/workspaces/{workspaceID}/documents/invoices":{"get":{"operationId":"listinvoices","summary":"listinvoices","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"createinvoices","summary":"createinvoices","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]}}}}}},"/v1/workspaces/{workspaceID}/documents/invoices/{documentID}":{"get":{"operationId":"getinvoices","summary":"getinvoices","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"patch":{"operationId":"editinvoices","summary":"editinvoices","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]}}}}}},"/v1/workspaces/{workspaceID}/documents/invoices/{documentID}/issue":{"post":{"operationId":"issueinvoices","summary":"issueinvoices","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000}},"required":["expected_version"]}}}}}},"/v1/workspaces/{workspaceID}/documents/invoices/{documentID}/cancel":{"post":{"operationId":"cancelinvoices","summary":"cancelinvoices","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000}},"required":["expected_version"]}}}}}},"/v1/workspaces/{workspaceID}/documents/invoices/{documentID}/correct":{"post":{"operationId":"correctinvoices","summary":"correctinvoices","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]}}}}}},"/v1/workspaces/{workspaceID}/documents/invoices/commands/export":{"post":{"operationId":"invoicesexport","summary":"invoicesexport","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Private authorized CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}}}},"/v1/workspaces/{workspaceID}/documents/payment-links":{"get":{"operationId":"listpaymentLinks","summary":"listpayment Links","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"createpaymentLinks","summary":"createpayment Links","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]}}}}}},"/v1/workspaces/{workspaceID}/documents/payment-links/{documentID}":{"get":{"operationId":"getpaymentLinks","summary":"getpayment Links","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delivery":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"activity":{"type":"object","additionalProperties":true,"properties":{"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"patch":{"operationId":"editpaymentLinks","summary":"editpayment Links","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]}}}}}},"/v1/workspaces/{workspaceID}/documents/payment-links/{documentID}/publish":{"post":{"operationId":"publishpaymentLinks","summary":"publishpayment Links","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000}},"required":["expected_version"]}}}}}},"/v1/workspaces/{workspaceID}/documents/payment-links/{documentID}/archive":{"post":{"operationId":"archivepaymentLinks","summary":"archivepayment Links","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"kind":{"type":"string","enum":["customers","invoices","payment-links"]},"reference":{"type":"string","maxLength":128},"status":{"type":"string","enum":["draft","active","archived","issued","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"public_token":{"type":"string","maxLength":43},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"intent_id":{"type":"string","format":"uuid"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000}},"required":["expected_version"]}}}}}},"/v1/workspaces/{workspaceID}/documents/payment-links/commands/export":{"post":{"operationId":"paymentLinksexport","summary":"payment Linksexport","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Private authorized CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}}}},"/v1/workspaces/{workspaceID}/refunds":{"get":{"operationId":"listRefundRequests","summary":"list Refund Requests","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"requestSellerRefund","summary":"request Seller Refund","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"reason":{"type":"string","minLength":10,"maxLength":2000}},"required":["payment_id","amount_minor","name","reason"]}}}}}},"/v1/workspaces/{workspaceID}/refunds/{refundID}":{"get":{"operationId":"getRefundRequest","summary":"get Refund Request","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"refundID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/refunds/{refundID}/review":{"post":{"operationId":"sellerRefundreview","summary":"seller Refundreview","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"refundID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000},"note":{"type":"string","minLength":10,"maxLength":2000},"reference":{"type":"string","maxLength":128},"confirm_seller_action":{"type":"boolean","const":true}},"required":["expected_version","note","confirm_seller_action"]}}}}}},"/v1/workspaces/{workspaceID}/refunds/{refundID}/approve":{"post":{"operationId":"sellerRefundapprove","summary":"seller Refundapprove","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"refundID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000},"note":{"type":"string","minLength":10,"maxLength":2000},"reference":{"type":"string","maxLength":128},"confirm_seller_action":{"type":"boolean","const":true}},"required":["expected_version","note","confirm_seller_action"]}}}}}},"/v1/workspaces/{workspaceID}/refunds/{refundID}/reject":{"post":{"operationId":"sellerRefundreject","summary":"seller Refundreject","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"refundID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000},"note":{"type":"string","minLength":10,"maxLength":2000},"reference":{"type":"string","maxLength":128},"confirm_seller_action":{"type":"boolean","const":true}},"required":["expected_version","note","confirm_seller_action"]}}}}}},"/v1/workspaces/{workspaceID}/refunds/{refundID}/report-returned":{"post":{"operationId":"sellerRefundreportreturned","summary":"seller Refundreportreturned","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"refundID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000},"note":{"type":"string","minLength":10,"maxLength":2000},"reference":{"type":"string","maxLength":128},"confirm_seller_action":{"type":"boolean","const":true}},"required":["expected_version","note","confirm_seller_action"]}}}}}},"/v1/workspaces/{workspaceID}/refunds/{refundID}/cancel":{"post":{"operationId":"sellerRefundcancel","summary":"seller Refundcancel","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"refundID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000},"note":{"type":"string","minLength":10,"maxLength":2000},"reference":{"type":"string","maxLength":128},"confirm_seller_action":{"type":"boolean","const":true}},"required":["expected_version","note","confirm_seller_action"]}}}}}},"/v1/public/documents/{token}":{"get":{"operationId":"getPublicDocument","summary":"get Public Document","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"reference":{"type":"string"},"environment":{"type":"string"},"merchant_name":{"type":"string"},"brand":{"anyOf":[{"type":"object","additionalProperties":true,"properties":{"logo_url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"support_url":{"type":"string"},"support_email":{"type":"string"},"legal_url":{"type":"string"},"locale":{"type":"string"}}},{"type":"null"}]},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"due_minor":{"type":"integer","minimum":0,"maximum":100000000000},"currency":{"type":"string","const":"BDT"},"version":{"type":"integer","minimum":1,"maximum":100000000000}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"reference":{"type":"string"},"environment":{"type":"string"},"merchant_name":{"type":"string"},"brand":{"anyOf":[{"type":"object","additionalProperties":true,"properties":{"logo_url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"support_url":{"type":"string"},"support_email":{"type":"string"},"legal_url":{"type":"string"},"locale":{"type":"string"}}},{"type":"null"}]},"body":{"type":"object","additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"notes":{"type":"string","maxLength":4000},"private_notes":{"type":"string","maxLength":4000},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"customer_id":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["title","quantity","unit_amount_minor"]}},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"tax_minor":{"type":"integer","minimum":0,"maximum":100000000000},"fee_minor":{"type":"integer","minimum":0,"maximum":100000000000},"shipping_minor":{"type":"integer","minimum":0,"maximum":100000000000},"discount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"expires_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"max_quantity":{"type":"integer","minimum":1,"maximum":9999},"image_url":{"type":"string","format":"uri"},"return_url":{"type":"string","format":"uri"},"max_uses":{"type":"integer","minimum":0,"maximum":1000000},"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"type":"string","maxLength":120},"type":{"type":"string","enum":["text","textarea","select","radio","checkbox","file"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":30,"uniqueItems":true}},"required":["id","label","type"]},"maxItems":20}},"required":["reference"]},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"paid_minor":{"type":"integer","minimum":0,"maximum":100000000000},"due_minor":{"type":"integer","minimum":0,"maximum":100000000000},"currency":{"type":"string","const":"BDT"},"version":{"type":"integer","minimum":1,"maximum":100000000000}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"createDocumentVisitorCheckout","summary":"create Document Visitor Checkout","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"checkout_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"checkout_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"quantity":{"type":"integer","minimum":1,"maximum":9999},"fields":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","maxLength":2000},{"type":"array","items":{"type":"string","maxLength":160}}]}}},"required":["fields"]}}}}}},"/v1/public/checkout/{token}/refunds":{"post":{"operationId":"customerSellerRefund","summary":"customer Seller Refund","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["requested","reviewing","approved","rejected","seller_reported_returned","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"reason":{"type":"string","maxLength":2000},"seller_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seller_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"customer":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":32}}},"created_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"payment_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"name":{"type":"string","maxLength":160},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":32},"reason":{"type":"string","minLength":10,"maxLength":2000}},"required":["amount_minor","name","reason"]}}}}}},"/v1/workspaces/{workspaceID}/reconciliation":{"get":{"operationId":"getStatementReconciliation","summary":"get Statement Reconciliation","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","schema":{"type":"string","maxLength":40}},{"name":"account","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"object","additionalProperties":true,"properties":{"statements":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"line_id":{"type":"string"},"reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"currency":{"type":"string","const":"BDT"},"direction":{"type":"string","enum":["incoming","outgoing"]},"transaction_at":{"type":"string","format":"date-time"},"payment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"provenance":{"type":"string","const":"merchant_imported_statement"}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"definition":{"type":"string"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"object","additionalProperties":true,"properties":{"statements":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"line_id":{"type":"string"},"reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"currency":{"type":"string","const":"BDT"},"direction":{"type":"string","enum":["incoming","outgoing"]},"transaction_at":{"type":"string","format":"date-time"},"payment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"provenance":{"type":"string","const":"merchant_imported_statement"}}}}}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"definition":{"type":"string"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/reconciliation/statement-preview":{"post":{"operationId":"statementpreview","summary":"statementpreview","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"valid_count":{"type":"integer","minimum":0,"maximum":100000000000},"errors":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"row":{"type":"integer","minimum":1,"maximum":100000000000},"code":{"type":"string"}},"required":["row","code"]}},"provenance":{"type":"string","const":"merchant_imported_statement"}},"required":["valid_count","errors","provenance"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"valid_count":{"type":"integer","minimum":0,"maximum":100000000000},"errors":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"row":{"type":"integer","minimum":1,"maximum":100000000000},"code":{"type":"string"}},"required":["row","code"]}},"provenance":{"type":"string","const":"merchant_imported_statement"}},"required":["valid_count","errors","provenance"]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"account_id":{"type":"string","format":"uuid"},"csv":{"type":"string","maxLength":1048576}},"required":["account_id","csv"]}}}}}},"/v1/workspaces/{workspaceID}/reconciliation/statement-import":{"post":{"operationId":"statementimport","summary":"statementimport","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"imported":{"type":"integer","minimum":0,"maximum":100000000000},"provider_verified":{"type":"boolean","const":false}},"required":["imported","provider_verified"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"imported":{"type":"integer","minimum":0,"maximum":100000000000},"provider_verified":{"type":"boolean","const":false}},"required":["imported","provider_verified"]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"account_id":{"type":"string","format":"uuid"},"csv":{"type":"string","maxLength":1048576}},"required":["account_id","csv"]}}}}}},"/v1/workspaces/{workspaceID}/reconciliation/settlement-link":{"post":{"operationId":"linkMerchantStatement","summary":"link Merchant Statement","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"provenance":{"type":"string","const":"merchant_imported_statement"},"provider_verified":{"type":"boolean","const":false}},"required":["id","payment_id","provenance","provider_verified"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"provenance":{"type":"string","const":"merchant_imported_statement"},"provider_verified":{"type":"boolean","const":false}},"required":["id","payment_id","provenance","provider_verified"]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"line_id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"reason":{"type":"string","minLength":10,"maxLength":2000}},"required":["line_id","payment_id","reason"]}}}}}},"/v1/workspaces/{workspaceID}/integrations":{"get":{"operationId":"listPaymentIntegrations","summary":"list Payment Integrations","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"diagnostics":{"type":"object","additionalProperties":true,"properties":{"endpoint_configured":{"type":"boolean"},"endpoint_active":{"type":"boolean"},"rotation_pending":{"type":"boolean"},"delivered_events":{"type":"integer","minimum":0,"maximum":100000000000},"failed_events":{"type":"integer","minimum":0,"maximum":100000000000},"latest_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string"},"status":{"type":"string","enum":["configured","disabled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}},"approved_sources":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"method":{"type":"string"},"source":{"type":"string"},"parser_id":{"type":"string"},"version":{"type":"integer","minimum":1,"maximum":100000000000},"sandbox_only":{"type":"boolean"}},"required":["method","source","parser_id","version","sandbox_only"]}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"diagnostics":{"type":"object","additionalProperties":true,"properties":{"endpoint_configured":{"type":"boolean"},"endpoint_active":{"type":"boolean"},"rotation_pending":{"type":"boolean"},"delivered_events":{"type":"integer","minimum":0,"maximum":100000000000},"failed_events":{"type":"integer","minimum":0,"maximum":100000000000},"latest_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string"},"status":{"type":"string","enum":["configured","disabled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}},"approved_sources":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"method":{"type":"string"},"source":{"type":"string"},"parser_id":{"type":"string"},"version":{"type":"integer","minimum":1,"maximum":100000000000},"sandbox_only":{"type":"boolean"}},"required":["method","source","parser_id","version","sandbox_only"]}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"configurePaymentIntegration","summary":"configure Payment Integration","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"diagnostics":{"type":"object","additionalProperties":true,"properties":{"endpoint_configured":{"type":"boolean"},"endpoint_active":{"type":"boolean"},"rotation_pending":{"type":"boolean"},"delivered_events":{"type":"integer","minimum":0,"maximum":100000000000},"failed_events":{"type":"integer","minimum":0,"maximum":100000000000},"latest_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string"},"status":{"type":"string","enum":["configured","disabled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"diagnostics":{"type":"object","additionalProperties":true,"properties":{"endpoint_configured":{"type":"boolean"},"endpoint_active":{"type":"boolean"},"rotation_pending":{"type":"boolean"},"delivered_events":{"type":"integer","minimum":0,"maximum":100000000000},"failed_events":{"type":"integer","minimum":0,"maximum":100000000000},"latest_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string"},"status":{"type":"string","enum":["configured","disabled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string","format":"uri"},"webhook_id":{"type":"string","format":"uuid"}},"required":["kind","name","origin"]}}}}}},"/v1/workspaces/{workspaceID}/integrations/{integrationID}/enable":{"post":{"operationId":"enablePaymentIntegration","summary":"enable Payment Integration","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"integrationID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"diagnostics":{"type":"object","additionalProperties":true,"properties":{"endpoint_configured":{"type":"boolean"},"endpoint_active":{"type":"boolean"},"rotation_pending":{"type":"boolean"},"delivered_events":{"type":"integer","minimum":0,"maximum":100000000000},"failed_events":{"type":"integer","minimum":0,"maximum":100000000000},"latest_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string"},"status":{"type":"string","enum":["configured","disabled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"diagnostics":{"type":"object","additionalProperties":true,"properties":{"endpoint_configured":{"type":"boolean"},"endpoint_active":{"type":"boolean"},"rotation_pending":{"type":"boolean"},"delivered_events":{"type":"integer","minimum":0,"maximum":100000000000},"failed_events":{"type":"integer","minimum":0,"maximum":100000000000},"latest_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string"},"status":{"type":"string","enum":["configured","disabled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000}},"required":["expected_version"]}}}}}},"/v1/workspaces/{workspaceID}/integrations/{integrationID}/disable":{"post":{"operationId":"disablePaymentIntegration","summary":"disable Payment Integration","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"integrationID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"diagnostics":{"type":"object","additionalProperties":true,"properties":{"endpoint_configured":{"type":"boolean"},"endpoint_active":{"type":"boolean"},"rotation_pending":{"type":"boolean"},"delivered_events":{"type":"integer","minimum":0,"maximum":100000000000},"failed_events":{"type":"integer","minimum":0,"maximum":100000000000},"latest_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string"},"status":{"type":"string","enum":["configured","disabled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"diagnostics":{"type":"object","additionalProperties":true,"properties":{"endpoint_configured":{"type":"boolean"},"endpoint_active":{"type":"boolean"},"rotation_pending":{"type":"boolean"},"delivered_events":{"type":"integer","minimum":0,"maximum":100000000000},"failed_events":{"type":"integer","minimum":0,"maximum":100000000000},"latest_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string"},"status":{"type":"string","enum":["configured","disabled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000}},"required":["expected_version"]}}}}}},"/v1/workspaces/{workspaceID}/integrations/{integrationID}/edit":{"post":{"operationId":"editPaymentIntegration","summary":"edit Payment Integration","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"integrationID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"diagnostics":{"type":"object","additionalProperties":true,"properties":{"endpoint_configured":{"type":"boolean"},"endpoint_active":{"type":"boolean"},"rotation_pending":{"type":"boolean"},"delivered_events":{"type":"integer","minimum":0,"maximum":100000000000},"failed_events":{"type":"integer","minimum":0,"maximum":100000000000},"latest_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string"},"status":{"type":"string","enum":["configured","disabled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"diagnostics":{"type":"object","additionalProperties":true,"properties":{"endpoint_configured":{"type":"boolean"},"endpoint_active":{"type":"boolean"},"rotation_pending":{"type":"boolean"},"delivered_events":{"type":"integer","minimum":0,"maximum":100000000000},"failed_events":{"type":"integer","minimum":0,"maximum":100000000000},"latest_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string"},"status":{"type":"string","enum":["configured","disabled"]},"version":{"type":"integer","minimum":1,"maximum":100000000000},"webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["website","custom-bot","woocommerce","shopify"]},"name":{"type":"string","maxLength":120},"origin":{"type":"string","format":"uri"},"webhook_id":{"type":"string","format":"uuid"},"expected_version":{"type":"integer","minimum":1,"maximum":100000000000}},"required":["kind","name","origin","expected_version"]}}}}}},"/v1/workspaces/{workspaceID}/activity/audit":{"get":{"operationId":"listIntegrationauditActivity","summary":"list Integrationaudit Activity","description":"Owner/admin session only. Workspace/realm scoped. Fifty records per page. No credentials, request bodies, customer contact data, raw receipt text, audit free-text or export ciphertext. API metadata is best-effort and is not financial audit.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":96}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"resource":{"type":"string"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"action":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","resource","action","created_at"]}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"resource":{"type":"string"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"action":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","resource","action","created_at"]}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/activity/api":{"get":{"operationId":"listIntegrationapiActivity","summary":"list Integrationapi Activity","description":"Owner/admin session only. Workspace/realm scoped. Fifty records per page. No credentials, request bodies, customer contact data, raw receipt text, audit free-text or export ciphertext. API metadata is best-effort and is not financial audit.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":96}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"method":{"type":"string"},"route":{"type":"string","maxLength":160},"http_status":{"type":"integer","minimum":100,"maximum":599},"duration_ms":{"type":"integer","minimum":0,"maximum":100000000000},"correlation_id":{"type":"string","pattern":"^[0-9a-f]{24}$"},"created_at":{"type":"string","format":"date-time"}},"required":["id","method","route","http_status","duration_ms","correlation_id","created_at"]}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"method":{"type":"string"},"route":{"type":"string","maxLength":160},"http_status":{"type":"integer","minimum":100,"maximum":599},"duration_ms":{"type":"integer","minimum":0,"maximum":100000000000},"correlation_id":{"type":"string","pattern":"^[0-9a-f]{24}$"},"created_at":{"type":"string","format":"date-time"}},"required":["id","method","route","http_status","duration_ms","correlation_id","created_at"]}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/activity/exports":{"get":{"operationId":"listIntegrationexportsActivity","summary":"list Integrationexports Activity","description":"Owner/admin session only. Workspace/realm scoped. Fifty records per page. No credentials, request bodies, customer contact data, raw receipt text, audit free-text or export ciphertext. API metadata is best-effort and is not financial audit.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":96}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"resource":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"required":["id","resource","created_at","expires_at"]}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"resource":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"required":["id","resource","created_at","expires_at"]}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/reports":{"get":{"operationId":"getPaymentVolumeReport","summary":"get Payment Volume Report","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"account","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"currency":{"type":"string","const":"BDT"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"generated_at":{"type":"string","format":"date-time"},"timezone":{"type":"string","const":"UTC"},"verified_gross_minor":{"type":"integer","minimum":0,"maximum":100000000000},"allocated_minor":{"type":"integer","minimum":0,"maximum":100000000000},"unallocated_minor":{"type":"integer","minimum":0,"maximum":100000000000},"payment_count":{"type":"integer","minimum":0,"maximum":100000000000},"seller_reported_returned_minor":{"type":"integer","minimum":0,"maximum":100000000000},"refund_independently_verified":{"type":"boolean","const":false},"net_settled_minor":{"type":"null"},"accounts":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"account_id":{"type":"string","format":"uuid"},"method":{"type":"string"},"display_suffix":{"type":"string","maxLength":4},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"payment_count":{"type":"integer","minimum":0,"maximum":100000000000}}}},"customers":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"customer_id":{"type":"string","format":"uuid"},"reference":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"payment_count":{"type":"integer","minimum":0,"maximum":100000000000}}}},"refunds":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"status":{"type":"string"},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"request_count":{"type":"integer","minimum":0,"maximum":100000000000}}}},"statement_links":{"type":"object","additionalProperties":true,"properties":{"provenance":{"type":"string","const":"merchant_imported_statement"},"provider_verified":{"type":"boolean","const":false},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"count":{"type":"integer","minimum":0,"maximum":100000000000}}},"customers_limit":{"type":"integer","minimum":0,"maximum":100000000000},"customers_definition":{"type":"string"},"methods":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"method":{"type":"string"},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"payment_count":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["method","amount_minor","payment_count"]}},"daily":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"day":{"type":"string","format":"date"},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["day","amount_minor"]}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"currency":{"type":"string","const":"BDT"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"generated_at":{"type":"string","format":"date-time"},"timezone":{"type":"string","const":"UTC"},"verified_gross_minor":{"type":"integer","minimum":0,"maximum":100000000000},"allocated_minor":{"type":"integer","minimum":0,"maximum":100000000000},"unallocated_minor":{"type":"integer","minimum":0,"maximum":100000000000},"payment_count":{"type":"integer","minimum":0,"maximum":100000000000},"seller_reported_returned_minor":{"type":"integer","minimum":0,"maximum":100000000000},"refund_independently_verified":{"type":"boolean","const":false},"net_settled_minor":{"type":"null"},"accounts":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"account_id":{"type":"string","format":"uuid"},"method":{"type":"string"},"display_suffix":{"type":"string","maxLength":4},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"payment_count":{"type":"integer","minimum":0,"maximum":100000000000}}}},"customers":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"customer_id":{"type":"string","format":"uuid"},"reference":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"payment_count":{"type":"integer","minimum":0,"maximum":100000000000}}}},"refunds":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"status":{"type":"string"},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"request_count":{"type":"integer","minimum":0,"maximum":100000000000}}}},"statement_links":{"type":"object","additionalProperties":true,"properties":{"provenance":{"type":"string","const":"merchant_imported_statement"},"provider_verified":{"type":"boolean","const":false},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"count":{"type":"integer","minimum":0,"maximum":100000000000}}},"customers_limit":{"type":"integer","minimum":0,"maximum":100000000000},"customers_definition":{"type":"string"},"methods":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"method":{"type":"string"},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000},"payment_count":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["method","amount_minor","payment_count"]}},"daily":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"day":{"type":"string","format":"date"},"amount_minor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["day","amount_minor"]}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/notifications":{"get":{"operationId":"listPaymentNotifications","summary":"list Payment Notifications","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"body":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"body":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/notifications/{notificationID}/read":{"post":{"operationId":"markPaymentNotificationRead","summary":"mark Payment Notification Read","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"notificationID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"read":{"type":"boolean"}},"required":["read"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"read":{"type":"boolean"}},"required":["read"]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}}}},"/v1/workspaces/{workspaceID}/privacy/{requestID}/cancel":{"post":{"operationId":"cancelWorkspacePrivacyRequest","summary":"cancel Workspace Privacy Request","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["export","delete"]},"status":{"type":"string","enum":["requested","processing","blocked","complete_with_retention","complete","cancelled"]},"created_at":{"type":"string","format":"date-time"},"stores":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"store":{"type":"string"},"status":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"retained_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["export","delete"]},"status":{"type":"string","enum":["requested","processing","blocked","complete_with_retention","complete","cancelled"]},"created_at":{"type":"string","format":"date-time"},"stores":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"store":{"type":"string"},"status":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"retained_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}}}}},"202":{"description":"Request recorded; not a claim of export or erasure","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["export","delete"]},"status":{"type":"string","enum":["requested","processing","blocked","complete_with_retention","complete","cancelled"]},"created_at":{"type":"string","format":"date-time"},"stores":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"store":{"type":"string"},"status":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"retained_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"current_password":{"type":"string","maxLength":1024},"confirm_request":{"type":"boolean","const":true}},"required":["current_password","confirm_request"]}}}}}},"/v1/workspaces/{workspaceID}/workspace-tools/team":{"get":{"operationId":"getWorkspaceteam","summary":"get Workspaceteam","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"members":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","editor","viewer"]},"joined_at":{"type":"string","format":"date-time"}}}},"invitations":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}}},"grants":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"boolean"}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"members":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","editor","viewer"]},"joined_at":{"type":"string","format":"date-time"}}}},"invitations":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}}},"grants":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"boolean"}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/workspace-tools/settings":{"get":{"operationId":"getWorkspacesettings","summary":"get Workspacesettings","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"body":{"type":"object","additionalProperties":{"type":"string"}},"version":{"type":"integer","minimum":0,"maximum":100000000000},"updated_at":{"type":"string","format":"date-time"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"body":{"type":"object","additionalProperties":{"type":"string"}},"version":{"type":"integer","minimum":0,"maximum":100000000000},"updated_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"writeWorkspacesettings","summary":"write Workspacesettings","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":0,"maximum":100000000000},"body":{"type":"object","additionalProperties":{"type":"string"}}},"required":["expected_version","body"]}}}}}},"/v1/workspaces/{workspaceID}/workspace-tools/help":{"get":{"operationId":"getWorkspacehelp","summary":"get Workspacehelp","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"subject":{"type":"string","maxLength":160},"message":{"type":"string","maxLength":4000},"status":{"type":"string","enum":["submitted","reviewing","resolved"]},"created_at":{"type":"string","format":"date-time"},"replies":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","maxLength":4000},"created_at":{"type":"string","format":"date-time"}},"required":["message","created_at"]}}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"subject":{"type":"string","maxLength":160},"message":{"type":"string","maxLength":4000},"status":{"type":"string","enum":["submitted","reviewing","resolved"]},"created_at":{"type":"string","format":"date-time"},"replies":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","maxLength":4000},"created_at":{"type":"string","format":"date-time"}},"required":["message","created_at"]}}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"writeWorkspacehelp","summary":"write Workspacehelp","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string","minLength":3,"maxLength":160},"message":{"type":"string","minLength":10,"maxLength":4000}},"required":["subject","message"]}}}}}},"/v1/workspaces/{workspaceID}/privacy":{"get":{"operationId":"getWorkspacePrivacyRequests","summary":"get Workspace Privacy Requests","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["export","delete"]},"status":{"type":"string","enum":["requested","processing","blocked","complete_with_retention","complete","cancelled"]},"created_at":{"type":"string","format":"date-time"},"stores":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"store":{"type":"string"},"status":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"retained_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["export","delete"]},"status":{"type":"string","enum":["requested","processing","blocked","complete_with_retention","complete","cancelled"]},"created_at":{"type":"string","format":"date-time"},"stores":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"store":{"type":"string"},"status":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"retained_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"requestWorkspacePrivacy","summary":"request Workspace Privacy","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["export","delete"]},"status":{"type":"string","enum":["requested","processing","blocked","complete_with_retention","complete","cancelled"]},"created_at":{"type":"string","format":"date-time"},"stores":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"store":{"type":"string"},"status":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"retained_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["export","delete"]},"status":{"type":"string","enum":["requested","processing","blocked","complete_with_retention","complete","cancelled"]},"created_at":{"type":"string","format":"date-time"},"stores":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"store":{"type":"string"},"status":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"retained_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}}}}},"202":{"description":"Request recorded; not a claim of export or erasure","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["export","delete"]},"status":{"type":"string","enum":["requested","processing","blocked","complete_with_retention","complete","cancelled"]},"created_at":{"type":"string","format":"date-time"},"stores":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"store":{"type":"string"},"status":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"retained_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["export","delete"]},"current_password":{"type":"string","maxLength":1024},"confirm_request":{"type":"boolean","const":true}},"required":["kind","current_password","confirm_request"]}}}}}},"/v1/workspaces/{workspaceID}/billing":{"get":{"operationId":"getPaymentServiceBilling","summary":"get Payment Service Billing","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"plans":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"version_id":{"type":"string","format":"uuid"},"terms":{"type":"object","additionalProperties":true}}}},"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"plan_id":{"type":"string"},"plan_version_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["issued","paid"]},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"subscription":{"anyOf":[{"type":"object","additionalProperties":true,"properties":{"plan_id":{"type":"string"},"plan_version_id":{"type":"string","format":"uuid"},"paid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","const":"infinity"}]},"grace_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","const":"infinity"}]},"state":{"type":"string","enum":["active","grace","expired"]}}},{"type":"null"}]},"effective":{"type":"object","additionalProperties":true},"usage":{"type":"object","additionalProperties":true,"properties":{"used":{"type":"integer","minimum":0,"maximum":100000000000},"reserved":{"type":"integer","minimum":0,"maximum":100000000000},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string"}}},"usage_error":{"type":"boolean"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"plans":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"version_id":{"type":"string","format":"uuid"},"terms":{"type":"object","additionalProperties":true}}}},"invoices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"plan_id":{"type":"string"},"plan_version_id":{"type":"string","format":"uuid"},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"status":{"type":"string","enum":["issued","paid"]},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"subscription":{"anyOf":[{"type":"object","additionalProperties":true,"properties":{"plan_id":{"type":"string"},"plan_version_id":{"type":"string","format":"uuid"},"paid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","const":"infinity"}]},"grace_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","const":"infinity"}]},"state":{"type":"string","enum":["active","grace","expired"]}}},{"type":"null"}]},"effective":{"type":"object","additionalProperties":true},"usage":{"type":"object","additionalProperties":true,"properties":{"used":{"type":"integer","minimum":0,"maximum":100000000000},"reserved":{"type":"integer","minimum":0,"maximum":100000000000},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string"}}},"usage_error":{"type":"boolean"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"issuePaymentServiceInvoice","summary":"issue Payment Service Invoice","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"plan_id":{"type":"string","maxLength":40}},"required":["plan_id"]}}}}}},"/v1/workspaces/{workspaceID}/billing/{invoiceID}/reconcile":{"post":{"operationId":"reconcilePlatformSubscription","summary":"reconcile Platform Subscription","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"checkout_token":{"type":"string","maxLength":43},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"verified":{"type":"boolean"},"status":{"type":"string"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"checkout_token":{"type":"string","maxLength":43},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"verified":{"type":"boolean"},"status":{"type":"string"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}}}},"/v1/workspaces/{workspaceID}/billing/free":{"post":{"operationId":"activateFreePaymentPlan","summary":"activate Free Payment Plan","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"active":{"type":"boolean"},"plan_id":{"type":"string"},"version_id":{"type":"string","format":"uuid"},"terms":{"type":"object","additionalProperties":true}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"active":{"type":"boolean"},"plan_id":{"type":"string"},"version_id":{"type":"string","format":"uuid"},"terms":{"type":"object","additionalProperties":true}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"plan_id":{"type":"string","maxLength":40}},"required":["plan_id"]}}}}}},"/v1/platform/workspaces/{workspaceID}/payment-usage":{"get":{"operationId":"getAdminPaymentAllowance","summary":"get Admin Payment Allowance","description":"Super-admin with verified MFA only. Explicit workspace-scoped live allowance read without impersonation. A usage_error indicates the financial store is unavailable, never zero usage.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"effective":{"type":"object","additionalProperties":true},"usage":{"type":"object","additionalProperties":true,"properties":{"used":{"type":"integer","minimum":0,"maximum":100000000000},"reserved":{"type":"integer","minimum":0,"maximum":100000000000},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string"}}},"usage_error":{"type":"boolean"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"effective":{"type":"object","additionalProperties":true},"usage":{"type":"object","additionalProperties":true,"properties":{"used":{"type":"integer","minimum":0,"maximum":100000000000},"reserved":{"type":"integer","minimum":0,"maximum":100000000000},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string"}}},"usage_error":{"type":"boolean"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/workspace-tools/invite":{"post":{"operationId":"writeWorkspaceinvite","summary":"write Workspaceinvite","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["admin","editor","viewer"]}},"required":["email","role"]}}}}}},"/v1/workspaces/{workspaceID}/workspace-tools/remove-member/{targetID}":{"post":{"operationId":"removemember","summary":"removemember","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"targetID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"current_password":{"type":"string","maxLength":1024}},"required":["current_password"]}}}}}},"/v1/workspaces/{workspaceID}/workspace-tools/change-role/{targetID}":{"post":{"operationId":"changerole","summary":"changerole","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"targetID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"role":{"type":"string","enum":["owner","admin","editor","viewer"]},"current_password":{"type":"string","maxLength":1024}},"required":["role","current_password"]}}}}}},"/v1/workspaces/{workspaceID}/workspace-tools/revoke-invite/{targetID}":{"post":{"operationId":"revokeinvite","summary":"revokeinvite","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"targetID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}}}},"/v1/workspaces/{workspaceID}/workspace-tools/resend-invite/{targetID}":{"post":{"operationId":"resendinvite","summary":"resendinvite","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"targetID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}}}},"/v1/workspaces/{workspaceID}/workspace-tools/grants/{targetID}":{"post":{"operationId":"updateMemberGrants","summary":"update Member Grants","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"targetID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"current_password":{"type":"string","maxLength":1024},"payments:read":{"type":"boolean"},"payments:issue":{"type":"boolean"},"payments:manage":{"type":"boolean"},"payments:export":{"type":"boolean"},"workspace:settings":{"type":"boolean"},"members:manage":{"type":"boolean"},"product:payments":{"type":"boolean"}},"required":["current_password"]}}}}}},"/v1/workspaces/{workspaceID}/workspace-tools/transfer-owner/{targetID}":{"post":{"operationId":"transferWorkspaceOwnership","summary":"transfer Workspace Ownership","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"targetID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"current_password":{"type":"string","maxLength":1024}},"required":["current_password"]}}}}}},"/v1/workspace-invites/accept-invite":{"post":{"operationId":"acceptWorkspaceInvite","summary":"accept Workspace Invite","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"saved":{"type":"boolean"},"transferred":{"type":"boolean"},"workspace_id":{"type":"string","format":"uuid"},"invitation_token":{"type":"string","maxLength":43}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"token":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["token"]}}}}}},"/v1/workspaces/{workspaceID}/exports":{"post":{"operationId":"queuePrivateDocumentExport","summary":"queue Private Document Export","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"}},"required":["id","status"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"}},"required":["id","status"]}}}},"202":{"description":"Durably queued","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"}},"required":["id","status"]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"resource":{"type":"string","enum":["customers","invoices","payment-links"]}},"required":["resource"]}}}}}},"/v1/workspaces/{workspaceID}/exports/{exportID}":{"get":{"operationId":"getPrivateExportStatus","summary":"get Private Export Status","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"exportID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","running","complete","failed"]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","running","complete","failed"]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/exports/{exportID}/download":{"get":{"operationId":"downloadPrivateExport","summary":"download Private Export","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"exportID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Private, expiring, fresh role-bound CSV download","content":{"text/csv":{"schema":{"type":"string"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/public/documents/{token}/files":{"post":{"operationId":"uploadPrivateDocumentField","summary":"upload Private Document Field","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"file_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"size_bytes":{"type":"integer","minimum":1,"maximum":100000000000},"scan_status":{"type":"string","const":"clean"}},"required":["file_id","name","size_bytes","scan_status"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"file_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"size_bytes":{"type":"integer","minimum":1,"maximum":100000000000},"scan_status":{"type":"string","const":"clean"}},"required":["file_id","name","size_bytes","scan_status"]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary","maxLength":5242880}}}}}},"/v1/workspaces/{workspaceID}/sandbox/scenarios":{"get":{"operationId":"sandboxscenarios","summary":"sandboxscenarios","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"string"}},"simulation":{"type":"boolean","const":true},"provider_sandbox":{"type":"boolean","const":false},"real_device_verified":{"type":"boolean","const":false}},"required":["items","simulation","provider_sandbox","real_device_verified"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"string"}},"simulation":{"type":"boolean","const":true},"provider_sandbox":{"type":"boolean","const":false},"real_device_verified":{"type":"boolean","const":false}},"required":["items","simulation","provider_sandbox","real_device_verified"]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/sandbox/runs":{"get":{"operationId":"sandboxruns","summary":"sandboxruns","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"scenario":{"type":"string"},"intent_id":{"type":"string","format":"uuid"},"observation_id":{"type":"string","format":"uuid"},"state":{"type":"string"},"match_status":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"simulation":{"type":"boolean","const":true}}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"scenario":{"type":"string"},"intent_id":{"type":"string","format":"uuid"},"observation_id":{"type":"string","format":"uuid"},"state":{"type":"string"},"match_status":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"simulation":{"type":"boolean","const":true}}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}},"post":{"operationId":"runSandboxScenario","summary":"run Sandbox Scenario","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"intent_id":{"type":"string","format":"uuid"},"scenario":{"type":"string"},"simulation":{"type":"boolean","const":true},"archived":{"type":"integer","minimum":0,"maximum":100000000000},"financial_history_retained":{"type":"boolean"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"intent_id":{"type":"string","format":"uuid"},"scenario":{"type":"string"},"simulation":{"type":"boolean","const":true},"archived":{"type":"integer","minimum":0,"maximum":100000000000},"financial_history_retained":{"type":"boolean"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"scenario":{"type":"string","enum":["exact-unique","wrong-payer","under-amount","over-amount","before-window","after-window","missing-time","outgoing","missing-payer","missing-amount","unknown-direction","wrong-account","wrong-method"]}},"required":["scenario"]}}}}}},"/v1/workspaces/{workspaceID}/sandbox/reset":{"post":{"operationId":"archiveSandboxRuns","summary":"archive Sandbox Runs","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"intent_id":{"type":"string","format":"uuid"},"scenario":{"type":"string"},"simulation":{"type":"boolean","const":true},"archived":{"type":"integer","minimum":0,"maximum":100000000000},"financial_history_retained":{"type":"boolean"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"intent_id":{"type":"string","format":"uuid"},"scenario":{"type":"string"},"simulation":{"type":"boolean","const":true},"archived":{"type":"integer","minimum":0,"maximum":100000000000},"financial_history_retained":{"type":"boolean"}}}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"current_password":{"type":"string","maxLength":1024},"confirm_archive_reset":{"type":"boolean","const":true}},"required":["current_password","confirm_archive_reset"]}}}}}},"/v1/workspaces/{workspaceID}/documents/invoices/{documentID}/send":{"post":{"operationId":"sendInvoiceEmail","summary":"send Invoice Email","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"},"delivery_confirmed":{"type":"boolean","const":false},"contact_independently_verified":{"type":"boolean","const":false}},"required":["id","status","delivery_confirmed","contact_independently_verified"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"},"delivery_confirmed":{"type":"boolean","const":false},"contact_independently_verified":{"type":"boolean","const":false}},"required":["id","status","delivery_confirmed","contact_independently_verified"]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000},"consent_to_contact":{"type":"boolean","const":true}},"required":["expected_version","consent_to_contact"]}}}}}},"/v1/workspaces/{workspaceID}/documents/invoices/{documentID}/remind":{"post":{"operationId":"remindInvoiceEmail","summary":"remind Invoice Email","description":"Source contract. Deployment and release acceptance require retained evidence. Financial outcomes come from server verification only.","security":[{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"Scoped server result","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"},"delivery_confirmed":{"type":"boolean","const":false},"contact_independently_verified":{"type":"boolean","const":false}},"required":["id","status","delivery_confirmed","contact_independently_verified"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"},"delivery_confirmed":{"type":"boolean","const":false},"contact_independently_verified":{"type":"boolean","const":false}},"required":["id","status","delivery_confirmed","contact_independently_verified"]}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Missing/invalid identity","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Forbidden scope/role/origin/subscription","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"404":{"description":"Scoped resource unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"409":{"description":"Idempotency/state/version conflict","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"429":{"description":"Rate limit","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"maximum":100000000000},"consent_to_contact":{"type":"boolean","const":true}},"required":["expected_version","consent_to_contact"]}}}}}},"/v1/public/checkout/{token}/notices/{noticeAction}":{"post":{"operationId":"customerReceiptNotice","summary":"Subscribe, verify or withdraw consent-based receipt email","description":"Checkout capability and same-origin POST required. Contact never replaces payer. Subscription emails a purpose-scoped verification code; verification is single-use. SMTP acceptance is not inbox delivery or payment verification. Requires configured TLS SMTP and additive notice migration.","security":[],"parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"in":"path","name":"noticeAction","required":true,"schema":{"type":"string","enum":["subscribe","verify","withdraw"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"required":["email","consent"],"properties":{"email":{"type":"string","format":"email","maxLength":254},"consent":{"type":"boolean","enum":[true]},"locale":{"type":"string","enum":["en","bn"],"default":"en"}}},{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}}}]}}}},"responses":{"200":{"description":"Contact verified or notice consent withdrawn; payment state unchanged","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["verified","withdrawn"]}}}}}},"202":{"description":"Verification email accepted by SMTP; contact is not yet verified"},"403":{"description":"Origin denied"},"404":{"description":"Invalid checkout capability or action"},"422":{"description":"Invalid contact, consent or expired/reused code"},"429":{"description":"Rate limited"},"503":{"description":"Notice service unavailable or verification delivery outcome unconfirmed"}}}},"/v1/workspaces/{workspaceID}/operations/{resource}":{"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"resource","in":"path","required":true,"schema":{"type":"string","enum":["overview","payments","incoming","gateways","devices","webhooks","deliveries","events","parsers"]}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"account","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"method","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}}],"get":{"operationId":"listFinancialOperations","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"responses":{"200":{"description":"Scoped masked items, at most 50, next_cursor; source unavailable is not an empty list."},"401":{"description":"Authentication required"},"403":{"description":"Role or environment denied"},"503":{"description":"Pipeline or realm unavailable"}}},"post":{"operationId":"createFinancialConnection","security":[{"SessionCookie":[]}],"description":"Owner/admin only. Devices require account_id/name/source/binding/parser_id; gateways require method/account_number; webhooks require HTTPS url. Only mutation returns pairing_token/signing_secret.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Configuration persisted; once-visible capability where applicable"},"403":{"description":"Owner/admin and permitted origin required"},"409":{"description":"Identity conflict"},"503":{"description":"Configuration unavailable"}}}},"/v1/workspaces/{workspaceID}/operations/{resource}/{resourceID}":{"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"resource","in":"path","required":true,"schema":{"type":"string","enum":["payments","incoming","gateways","devices","webhooks","deliveries","events","notices"]}},{"name":"resourceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"get":{"operationId":"getFinancialOperation","security":[{"SessionCookie":[]},{"MerchantBearer":[]}],"responses":{"200":{"description":"Scoped detail in items; deliveries uses resourceID as endpoint filter; notices uses resourceID as payment ID, excludes recipient ciphertext."},"403":{"description":"Denied"},"503":{"description":"Source unavailable"}}}},"/v1/workspaces/{workspaceID}/operations/{resource}/{resourceID}/{action}":{"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"resource","in":"path","required":true,"schema":{"type":"string","enum":["incoming","gateways","devices","webhooks","deliveries","notices"]}},{"name":"resourceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","enum":["revoke","rename","reprocess","enable","disable","rotate","replay","retry"]}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"post":{"operationId":"changeFinancialConnection","security":[{"SessionCookie":[]}],"description":"Owner/admin; valid transitions checked in PostgreSQL. Reprocess cannot approve funds. Replay delivers the same event without payment re-execution. Notice retry requires a 10-400 character reason and explicit authorization of possible duplicate email; never changes paid funds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Audited transition committed"},"403":{"description":"Denied"},"404":{"description":"Resource or transition unavailable"},"503":{"description":"Source unavailable"}}}},"/v1/device/{action}":{"parameters":[{"name":"action","in":"path","required":true,"schema":{"type":"string","enum":["claim","heartbeat","events","history"]}},{"name":"X-Ekmivo-Device-ID","in":"header","schema":{"type":"string","format":"uuid"}},{"name":"X-Ekmivo-Event-ID","in":"header","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,128}$"}},{"name":"X-Ekmivo-Timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Ekmivo-Signature","in":"header","required":true,"schema":{"type":"string","contentEncoding":"base64"}}],"post":{"operationId":"signedDeviceRequest","description":"P-256 SHA256 DER Base64 over newline-delimited method/path/Unix-seconds timestamp/event ID/SHA256(raw-body) hex. Transport freshness ±300 seconds.\nClaim body: pairing_token/public_key (X.509 DER Base64), signed by that key. Other bodies bind enrollment_id/environment to registered device.\nEvents: durable sequence >0, source/binding/kind (device_sms/device_notification)/evidence/observed_at. Full actual payer and original transaction time parsed server-side. No customer TrxID entry.\nOffline retry preserves queued bytes/event ID/sequence and refreshes transport timestamp/signature. ACK means durable storage, not verified payment.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"required":["pairing_token","public_key"],"properties":{"pairing_token":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"public_key":{"type":"string","contentEncoding":"base64","description":"P-256 X.509 DER public key; possession proven by the request signature"}}},{"type":"object","additionalProperties":false,"required":["enrollment_id","environment","permission_ok","backlog","overflow_count","queue_error","model","app_version"],"properties":{"enrollment_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"permission_ok":{"type":"boolean"},"backlog":{"type":"integer","minimum":0,"maximum":10000},"overflow_count":{"type":"integer","format":"int64","minimum":0,"description":"Monotonic tally of dropped receipt captures at the 500-event encrypted outbox quota"},"queue_error":{"type":"string","maxLength":64,"pattern":"^[A-Z0-9_]*$","description":"Diagnostic code only, never receipt text"},"model":{"type":"string"},"app_version":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["enrollment_id","environment","source","binding","kind","evidence","observed_at","sequence"],"properties":{"enrollment_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"source":{"type":"string"},"binding":{"type":"string","description":"Enrolled sms:subscriptionID or notification package binding"},"kind":{"type":"string","enum":["device_sms","device_notification"]},"evidence":{"type":"string","maxLength":8192,"description":"Approved incoming receipt only; encrypted server-side, never merchant-facing"},"observed_at":{"type":"string","format":"date-time","description":"Device collection time, never a replacement for original provider transaction time"},"sequence":{"type":"integer","format":"int64","minimum":1}}},{"type":"object","additionalProperties":false,"required":["enrollment_id","environment"],"properties":{"enrollment_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]}}}]}}}},"responses":{"200":{"description":"Enrollment or health or masked device history"},"202":{"description":"Evidence transaction committed; does not verify funds","content":{"application/json":{"schema":{"type":"object","required":["ack","observation_id","reason","replayed"],"properties":{"ack":{"type":"string","const":"durable"},"observation_id":{"type":["string","null"],"format":"uuid"},"reason":{"type":"string"},"replayed":{"type":"boolean"}}}}}},"403":{"description":"Device proof or fresh authorization rejected"},"409":{"description":"Reused identity with changed payload"},"413":{"description":"Body too large"},"422":{"description":"Invalid bound envelope"},"429":{"description":"Rate limited"},"503":{"description":"Source or parser unavailable"}}}},"/healthz":{"get":{"operationId":"getHealth","tags":["Operations"],"summary":"Check process liveness (not payment readiness)","responses":{"200":{"description":"Go process responsive","content":{"application/json":{"schema":{"type":"object","required":["status","service"],"properties":{"status":{"type":"string","const":"ok"},"service":{"type":"string","const":"ekmivo-api"}}}}}}}}},"/readyz":{"get":{"operationId":"getReadiness","tags":["Operations"],"summary":"Financial functionality readiness","description":"Remains HTTP 503 until PG04–PG09 services are functional.","responses":{"503":{"description":"Financial services unavailable","content":{"application/json":{"schema":{"type":"object","required":["status","reason"],"properties":{"status":{"type":"string","const":"not_ready"},"reason":{"type":"string","const":"financial_services_not_implemented"}}}}}}}}},"/v1/merchant/context":{"get":{"operationId":"getMerchantContext","tags":["Merchant"],"summary":"Authenticate a scoped merchant API key without performing financial work","description":"Requires payments:read. Workspace, environment, expiry, revocation\nand enabled Payments product are server verified. Keys are hash-only,\ngenerated in the owner/admin dashboard and shown once. Sandbox and\nLive credentials are never interchangeable.\n","security":[{"MerchantBearer":[]}],"parameters":[{"name":"environment","in":"query","required":true,"description":"Exact API-key environment. Not an authorization override.","schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Authorized credential context (not payment-readiness proof)","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["workspace_id","environment","key_id","scopes","financial_api_ready"],"properties":{"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"key_id":{"type":"string","format":"uuid"},"scopes":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["payments:read","payments:write","customers:read","customers:write","invoices:read","invoices:write","refunds:read","refunds:write","webhooks:manage"]}},"financial_api_ready":{"type":"boolean","const":false}}}}}},"400":{"description":"Missing, repeated or unsupported environment","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"401":{"description":"Invalid, revoked or expired merchant key","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"403":{"description":"Authenticated key cannot access required scope/environment","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"503":{"description":"Credential database unavailable; safe to retry","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/workspaces/{workspaceID}/linked-sources":{"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"get":{"operationId":"listLinkedBillingSources","tags":["Merchant"],"summary":"List issued immutable order/invoice source snapshots (sandbox only)","security":[{"MerchantBearer":[]},{"SessionCookie":[]}],"responses":{"200":{"description":"Last 50 tenant-realm-bound issued sources","content":{"application/json":{"schema":{"type":"object","required":["data","environment"],"properties":{"environment":{"type":"string","const":"sandbox"},"data":{"type":"array","items":{"type":"object","required":["id","source_kind","source_reference","amount_minor","currency","issued_at","items"],"properties":{"id":{"type":"string","format":"uuid"},"source_kind":{"type":"string","enum":["order","invoice"]},"source_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"issued_at":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object"}}}}}}}}}},"403":{"description":"Read scope denied"},"503":{"description":"Dependency or live source unavailable"}}},"post":{"operationId":"issueLinkedBillingSource","tags":["Merchant"],"summary":"Persist a real immutable merchant-issued source with server-calculated total","description":"Minimum PG05 sandbox document source of truth, not a complete invoice\nsystem. Merchant authors the line prices, server computes sum(qty*unit)\nand freezes the issued terms. NO caller-controlled total is accepted.\nRequires payments:write and valid workspace/environment.\n","security":[{"MerchantBearer":[]},{"SessionCookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["source_kind","source_reference","items"],"properties":{"source_kind":{"type":"string","enum":["order","invoice"]},"source_reference":{"type":"string","minLength":1,"maxLength":128},"items":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["title","quantity","unit_amount_minor"],"properties":{"title":{"type":"string","minLength":1,"maxLength":160},"quantity":{"type":"integer","minimum":1,"maximum":9999},"unit_amount_minor":{"type":"integer","minimum":1,"maximum":100000000000}}}}}}}}},"responses":{"201":{"description":"Immutable issued source with total computed by database","content":{"application/json":{"schema":{"type":"object","required":["id","source_kind","source_reference","amount_minor","currency","issued_at","items"],"properties":{"id":{"type":"string","format":"uuid"},"source_kind":{"type":"string","enum":["order","invoice"]},"source_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"issued_at":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"Write scope denied"},"409":{"description":"Duplicate issued document reference"},"422":{"description":"Invalid line or total overflow"},"503":{"description":"Dependency unavailable"}}}},"/v1/payment/create":{"post":{"operationId":"createSimplePayment","summary":"Create a hosted payment","description":"Creates an immutable payment using the existing intent engine. Optional webhook_url is bound automatically; manual registration is not required.","security":[{"MerchantBearer":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":16,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"number","exclusiveMinimum":0,"maximum":1000000000,"multipleOf":0.01},"redirect_url":{"type":"string","format":"uri"},"webhook_url":{"type":"string","format":"uri","description":"Optional public HTTPS destination for this payment."},"cancel_url":{"type":"string","format":"uri"},"reference":{"type":"string","maxLength":128},"customer_name":{"type":"string","maxLength":160},"customer_email":{"type":"string","maxLength":254},"customer_phone":{"type":"string","maxLength":32},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"201":{"description":"Created, not paid. Legacy fields remain available.","content":{"application/json":{"schema":{"type":"object","required":["invoice_id","status"],"properties":{"invoice_id":{"type":"string","format":"uuid"},"payment_url":{"type":"string","format":"uri"},"status":{"type":"string","enum":["PENDING","COMPLETED","CANCELLED","EXPIRED","FAILED","REFUNDED"]}}}}}},"default":{"description":"Request rejected or source unavailable.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/payment/verify":{"post":{"operationId":"verifySimplePayment","summary":"Read authoritative payment status by invoice_id","description":"Read-only lookup. Match invoice_id, amount_minor and currency against the stored order before fulfilment. A webhook or redirect alone is not proof.","security":[{"MerchantBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id"],"additionalProperties":false,"properties":{"invoice_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Lookup succeeded; status must equal COMPLETED before fulfilment.","content":{"application/json":{"schema":{"type":"object","required":["invoice_id","status","amount_minor","currency"],"properties":{"invoice_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PENDING","COMPLETED","CANCELLED","EXPIRED","FAILED","REFUNDED"]},"amount_minor":{"type":"integer"},"currency":{"type":"string"},"reference":{"type":"string"}}}}}},"default":{"description":"Request rejected or source unavailable.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}},"/v1/payment-intents":{"get":{"operationId":"listPaymentIntentsKey","summary":"List up to 50 tenant/environment-scoped issued requests","tags":["Merchant"],"security":[{"MerchantBearer":[]}],"responses":{"200":{"description":"Authorized list of actual financial records","content":{"application/json":{"schema":{"type":"object","required":["data","environment"],"properties":{"environment":{"type":"string","const":"sandbox"},"data":{"type":"array","items":{"type":"object","required":["id","merchant_reference","amount_minor","currency","expires_at","state"],"properties":{"id":{"type":"string","format":"uuid"},"merchant_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"environment":{"type":"string","const":"sandbox"},"source_kind":{"type":["string","null"],"enum":["order","invoice",null]},"source_id":{"type":["string","null"],"format":"uuid"},"source_reference":{"type":["string","null"]},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["requires_payer","awaiting_payment","processing","completed","expired","cancelled"]}}}}}}}}},"401":{"description":"Not authenticated"},"403":{"description":"Read scope or business denied"},"503":{"description":"Financial database or live source unavailable"}}},"post":{"operationId":"createPaymentIntentKey","summary":"Issue an immutable standalone or order/invoice-linked BDT request","tags":["Merchant"],"description":"Simple standalone payments require only amount (BDT); redirect_url is optional for apps and bots\n(HTTPS). The server derives BDT/paisa, merchant_reference, currency BDT\nand default expiry (30 minutes). Existing integrations may continue\nsending amount_minor, merchant_reference, currency and expiry.\nLinked order/invoice requests still resolve the amount from the\nfrozen tenant source. Supplying amount and amount_minor together is\ninvalid. Idempotency-Key is optional but strongly recommended: reuse\nthe same key and body to get a single intent on retries.\nwebhook_url is securely bound to this payment automatically;\nsigned webhook delivery is handled by the normal endpoint worker.\nA redirect or unsigned callback never proves payment.\n","security":[{"MerchantBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Recommended stable identifier for safe server retries.","schema":{"type":"string","minLength":16,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"oneOf":[{"required":["amount"]},{"required":["amount_minor"]},{"required":["order_id"]},{"required":["invoice_id"]}],"properties":{"amount":{"type":"number","minimum":0.01,"maximum":1000000000,"multipleOf":0.01,"description":"Amount in BDT, max two decimal places. No floats are used for server money arithmetic."},"redirect_url":{"type":"string","format":"uri","maxLength":2048,"description":"Public HTTPS return page; not payment proof."},"cancel_url":{"type":"string","format":"uri","maxLength":2048},"webhook_url":{"type":"string","format":"uri","maxLength":2048,"description":"Optional public HTTPS callback bound to this payment. Automatic callback signing secret is available in API Keys."},"customer_name":{"type":"string","maxLength":160},"customer_email":{"type":"string","format":"email","maxLength":254},"customer_phone":{"type":"string","maxLength":32},"metadata":{"type":"object","description":"Merchant-only JSON object, maximum 2048 bytes."},"reference":{"type":"string","minLength":1,"maxLength":128},"merchant_reference":{"type":"string","minLength":1,"maxLength":128,"deprecated":true},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000,"deprecated":true},"order_id":{"type":"string","format":"uuid"},"invoice_id":{"type":"string","format":"uuid"},"currency":{"type":"string","const":"BDT","default":"BDT"},"expires_in_minutes":{"type":"integer","minimum":5,"maximum":60,"default":30}}}}}},"responses":{"201":{"description":"Issued standalone payment request, not paid","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","merchant_reference","amount_minor","currency","expires_at","state"],"properties":{"id":{"type":"string","format":"uuid"},"merchant_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"environment":{"type":"string","const":"sandbox"},"source_kind":{"type":["string","null"],"enum":["order","invoice",null]},"source_id":{"type":["string","null"],"format":"uuid"},"source_reference":{"type":["string","null"]},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["requires_payer","awaiting_payment","processing","completed","expired","cancelled"]}}},{"type":"object","required":["checkout_token"],"properties":{"checkout_token":{"type":"string","minLength":43,"maxLength":43},"checkout_url":{"type":"string","format":"uri","description":"Present when the public HTTPS web origin is configured."}}}]}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Write scope denied"},"404":{"description":"Linked source absent from authorized realm"},"409":{"description":"Duplicate reference or changed idempotency payload"},"422":{"description":"Invalid amount, expiry, mixed source or caller-forged linked total"},"503":{"description":"Finance or live source unavailable"}}}},"/v1/payment-intents/{intentID}":{"get":{"operationId":"getPaymentIntentKey","tags":["Merchant"],"summary":"Read original issued terms, linked lines and immutable history","security":[{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"intentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Masked payer, issued source lines and append-only events","content":{"application/json":{"schema":{"type":"object","required":["data","environment"],"properties":{"environment":{"type":"string","const":"sandbox"},"data":{"allOf":[{"type":"object","required":["id","merchant_reference","amount_minor","currency","expires_at","state"],"properties":{"id":{"type":"string","format":"uuid"},"merchant_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"environment":{"type":"string","const":"sandbox"},"source_kind":{"type":["string","null"],"enum":["order","invoice",null]},"source_id":{"type":["string","null"],"format":"uuid"},"source_reference":{"type":["string","null"]},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["requires_payer","awaiting_payment","processing","completed","expired","cancelled"]}}},{"type":"object","properties":{"items":{"type":["array","null"],"items":{"type":"object","properties":{"title":{"type":"string"},"quantity":{"type":"integer"},"unit_amount_minor":{"type":"integer"}}}},"attempt":{"type":["object","null"],"properties":{"payer_suffix":{"type":"string","pattern":"^[0-9]{4}$"},"method":{"type":"string","enum":["bkash","nagad","rocket"]},"window_start":{"type":"string","format":"date-time"},"window_end":{"type":"string","format":"date-time"}}},"events":{"type":"array","items":{"type":"object","required":["event_type","reason","occurred_at"],"properties":{"event_type":{"type":"string","enum":["created","payer_locked","cancelled"]},"reason":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}}}}]}}}}}},"401":{"description":"Not authenticated"},"403":{"description":"Tenant or read scope denied"},"404":{"description":"Request not found in authorized tenant/environment"},"429":{"description":"Per-process authenticated workspace budget exceeded","headers":{"Retry-After":{"schema":{"type":"integer","const":60}}}},"503":{"description":"Finance or live source unavailable"}}}},"/v1/payment-intents/{intentID}/cancel":{"post":{"operationId":"cancelPaymentIntentKey","tags":["Merchant"],"summary":"Append-only cancellation for an unpaid unexpired request","description":"No refund or paid-state mutation occurs. Verified evidence processing is separate.","security":[{"MerchantBearer":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"intentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Cancelled or previously cancelled"},"403":{"description":"Workspace permission denied"},"404":{"description":"Intent not found in authorized realm"},"409":{"description":"Intent already paid or expired"},"503":{"description":"Finance source unavailable"}}}},"/v1/payment-intents/{intentID}/verify-transaction":{"post":{"operationId":"lookupVerifiedReceiptByTrxID","tags":["Merchant"],"summary":"Read-only TrxID-assisted lookup of an already verified payment","description":"This request does not consume a transaction, verify raw SMS, charge a credit\nor mark money paid. It only reports an already uniquely matched, verified\nobservation within the authenticated API key's workspace and environment.\n","security":[{"MerchantBearer":[]}],"parameters":[{"name":"intentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["transaction_id","provider","amount_minor"],"properties":{"transaction_id":{"type":"string","minLength":4,"maxLength":128},"provider":{"type":"string","enum":["bkash","nagad","rocket"]},"amount_minor":{"type":"integer","minimum":1}}}}}},"responses":{"200":{"description":"Read-only status of uniquely matched payment for the requested intent","content":{"application/json":{"schema":{"type":"object","required":["verified","status","payment_intent_id"],"properties":{"verified":{"type":"boolean"},"status":{"type":"string","enum":["pending","verified"]},"payment_intent_id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"},"verified_at":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Missing or expired merchant API key"},"403":{"description":"Read scope or workspace access denied"},"422":{"description":"Invalid lookup input"},"429":{"description":"Rate limited"},"503":{"description":"Financial dependency unavailable"}}}},"/v1/workspaces/{workspaceID}/payment-intents":{"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]},"description":"Live returns 503 until a real approved receiving source is connected."}],"get":{"operationId":"listPaymentIntents","summary":"List up to 50 tenant/environment-scoped issued requests","tags":["Merchant"],"security":[{"MerchantBearer":[]},{"SessionCookie":[]}],"responses":{"200":{"description":"Authorized list of actual financial records","content":{"application/json":{"schema":{"type":"object","required":["data","environment"],"properties":{"environment":{"type":"string","const":"sandbox"},"data":{"type":"array","items":{"type":"object","required":["id","merchant_reference","amount_minor","currency","expires_at","state"],"properties":{"id":{"type":"string","format":"uuid"},"merchant_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"environment":{"type":"string","const":"sandbox"},"source_kind":{"type":["string","null"],"enum":["order","invoice",null]},"source_id":{"type":["string","null"],"format":"uuid"},"source_reference":{"type":["string","null"]},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["requires_payer","awaiting_payment","processing","completed","expired","cancelled"]}}}}}}}}},"401":{"description":"Not authenticated"},"403":{"description":"Read scope or business denied"},"503":{"description":"Financial database or live source unavailable"}}},"post":{"operationId":"createPaymentIntent","summary":"Issue an immutable standalone or order/invoice-linked BDT request","tags":["Merchant"],"description":"Server-side payments:write permission required. Linked requests include\nonly order_id OR invoice_id; the server resolves the exact amount from\nits immutable tenant/environment-bound source. Caller-provided linked\namount is rejected. Same idempotency key plus identical payload returns\none original request; changed payload or duplicate reference conflicts.\nNo TrxID, payment screenshot, manual approval or client paid state.\n","security":[{"MerchantBearer":[]},{"SessionCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["merchant_reference","currency","expires_in_minutes"],"oneOf":[{"required":["amount_minor"]},{"required":["order_id"]},{"required":["invoice_id"]}],"properties":{"merchant_reference":{"type":"string","minLength":1,"maxLength":128},"amount_minor":{"type":"integer","minimum":1,"maximum":100000000000},"order_id":{"type":"string","format":"uuid"},"invoice_id":{"type":"string","format":"uuid"},"currency":{"type":"string","const":"BDT"},"expires_in_minutes":{"type":"integer","minimum":5,"maximum":60}}}}}},"responses":{"201":{"description":"Issued standalone payment request, not paid","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","merchant_reference","amount_minor","currency","expires_at","state"],"properties":{"id":{"type":"string","format":"uuid"},"merchant_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"environment":{"type":"string","const":"sandbox"},"source_kind":{"type":["string","null"],"enum":["order","invoice",null]},"source_id":{"type":["string","null"],"format":"uuid"},"source_reference":{"type":["string","null"]},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["requires_payer","awaiting_payment","processing","completed","expired","cancelled"]}}},{"type":"object","required":["checkout_token"],"properties":{"checkout_token":{"type":"string","minLength":43,"maxLength":43}}}]}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Write scope denied"},"404":{"description":"Linked source absent from authorized realm"},"409":{"description":"Duplicate reference or changed idempotency payload"},"422":{"description":"Invalid amount, expiry, mixed source or caller-forged linked total"},"503":{"description":"Finance or live source unavailable"}}}},"/v1/workspaces/{workspaceID}/payment-intents/{intentID}":{"get":{"operationId":"getPaymentIntent","tags":["Merchant"],"summary":"Read original issued terms, linked lines and immutable history","security":[{"MerchantBearer":[]},{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"intentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Masked payer, issued source lines and append-only events","content":{"application/json":{"schema":{"type":"object","required":["data","environment"],"properties":{"environment":{"type":"string","const":"sandbox"},"data":{"allOf":[{"type":"object","required":["id","merchant_reference","amount_minor","currency","expires_at","state"],"properties":{"id":{"type":"string","format":"uuid"},"merchant_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"environment":{"type":"string","const":"sandbox"},"source_kind":{"type":["string","null"],"enum":["order","invoice",null]},"source_id":{"type":["string","null"],"format":"uuid"},"source_reference":{"type":["string","null"]},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["requires_payer","awaiting_payment","processing","completed","expired","cancelled"]}}},{"type":"object","properties":{"items":{"type":["array","null"],"items":{"type":"object","properties":{"title":{"type":"string"},"quantity":{"type":"integer"},"unit_amount_minor":{"type":"integer"}}}},"attempt":{"type":["object","null"],"properties":{"payer_suffix":{"type":"string","pattern":"^[0-9]{4}$"},"method":{"type":"string","enum":["bkash","nagad","rocket"]},"window_start":{"type":"string","format":"date-time"},"window_end":{"type":"string","format":"date-time"}}},"events":{"type":"array","items":{"type":"object","required":["event_type","reason","occurred_at"],"properties":{"event_type":{"type":"string","enum":["created","payer_locked","cancelled"]},"reason":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}}}}}]}}}}}},"401":{"description":"Not authenticated"},"403":{"description":"Tenant or read scope denied"},"404":{"description":"Request not found in authorized tenant/environment"},"429":{"description":"Per-process authenticated workspace budget exceeded","headers":{"Retry-After":{"schema":{"type":"integer","const":60}}}},"503":{"description":"Finance or live source unavailable"}}}},"/v1/workspaces/{workspaceID}/payment-intents/{intentID}/cancel":{"post":{"operationId":"cancelPaymentIntent","tags":["Merchant"],"summary":"Append-only cancellation for an unpaid unexpired request","description":"No refund or paid-state mutation occurs. Verified evidence processing is separate.","security":[{"MerchantBearer":[]},{"SessionCookie":[]}],"parameters":[{"name":"workspaceID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"intentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"environment","in":"query","required":true,"schema":{"type":"string","enum":["sandbox","live"]}}],"responses":{"200":{"description":"Cancelled or previously cancelled"},"403":{"description":"Workspace permission denied"},"404":{"description":"Intent not found in authorized realm"},"409":{"description":"Intent already paid or expired"},"503":{"description":"Finance source unavailable"}}}},"/v1/public/checkout/{token}":{"get":{"operationId":"getCheckoutStatus","tags":["Checkout"],"summary":"Safe public capability lookup and authoritative status","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}}],"responses":{"200":{"description":"Opaque-token scope only, no full payer, no raw evidence","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"Referrer-Policy":{"schema":{"type":"string","const":"no-referrer"}}},"content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","merchant_reference","amount_minor","currency","expires_at","state"],"properties":{"id":{"type":"string","format":"uuid"},"merchant_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"environment":{"type":"string","const":"sandbox"},"source_kind":{"type":["string","null"],"enum":["order","invoice",null]},"source_id":{"type":["string","null"],"format":"uuid"},"source_reference":{"type":["string","null"]},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["requires_payer","awaiting_payment","processing","completed","expired","cancelled"]}}},{"type":"object","properties":{"merchant_name":{"type":"string","description":"Current enabled business name from control-plane records"},"brand":{"type":"object","properties":{"logo_url":{"type":["string","null"],"format":"uri"},"checkout_title":{"type":["string","null"]},"checkout_description":{"type":["string","null"]},"support_url":{"type":["string","null"],"format":"uri"},"support_email":{"type":["string","null"],"format":"email"},"legal_url":{"type":["string","null"],"format":"uri"},"locale":{"type":["string","null"],"enum":["en","bn",null]}}},"server_time":{"type":"string","format":"date-time"},"source_reference":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"quantity":{"type":"integer"},"unit_amount_minor":{"type":"integer"}}}},"payer_suffix":{"type":["string","null"],"pattern":"^[0-9]{4}$"},"method":{"type":["string","null"],"enum":["bkash","nagad","rocket",null]},"methods":{"type":"array","items":{"type":"string","enum":["bkash","nagad","rocket"]}},"destination":{"type":["string","null"]},"verification_available":{"type":"boolean","const":false}}}]}}}},"404":{"description":"Invalid or unprovisioned capability"},"503":{"description":"Financial service unavailable"}}}},"/v1/public/checkout/{token}/lock":{"post":{"operationId":"lockCheckoutPayer","tags":["Checkout"],"summary":"Confirm actual payer, receiving method and immutable attempt window","description":"The full payer number is normalized server-side, persisted only as keyed\ndigest and last-four suffix. Repeating identical lock returns the same\nattempt; changed payer/method or overlapping active evidence bucket is\n409. This does not assert that money was sent or verified.\n","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payer_number","method"],"additionalProperties":false,"properties":{"payer_number":{"type":"string","minLength":11,"maxLength":20},"method":{"type":"string","enum":["bkash","nagad","rocket"]}}}}}},"responses":{"200":{"description":"Locked payer and route, awaiting payment evidence only","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","merchant_reference","amount_minor","currency","expires_at","state"],"properties":{"id":{"type":"string","format":"uuid"},"merchant_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"environment":{"type":"string","const":"sandbox"},"source_kind":{"type":["string","null"],"enum":["order","invoice",null]},"source_id":{"type":["string","null"],"format":"uuid"},"source_reference":{"type":["string","null"]},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["requires_payer","awaiting_payment","processing","completed","expired","cancelled"]}}},{"type":"object","properties":{"merchant_name":{"type":"string","description":"Current enabled business name from control-plane records"},"brand":{"type":"object","properties":{"logo_url":{"type":["string","null"],"format":"uri"},"checkout_title":{"type":["string","null"]},"checkout_description":{"type":["string","null"]},"support_url":{"type":["string","null"],"format":"uri"},"support_email":{"type":["string","null"],"format":"email"},"legal_url":{"type":["string","null"],"format":"uri"},"locale":{"type":["string","null"],"enum":["en","bn",null]}}},"server_time":{"type":"string","format":"date-time"},"source_reference":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"quantity":{"type":"integer"},"unit_amount_minor":{"type":"integer"}}}},"payer_suffix":{"type":["string","null"],"pattern":"^[0-9]{4}$"},"method":{"type":["string","null"],"enum":["bkash","nagad","rocket",null]},"methods":{"type":"array","items":{"type":"string","enum":["bkash","nagad","rocket"]}},"destination":{"type":["string","null"]},"verification_available":{"type":"boolean","const":false}}}]}}}},"403":{"description":"Browser origin denied"},"404":{"description":"Checkout capability missing"},"409":{"description":"Expired, changed payer, cancelled or overlap conflict"},"422":{"description":"Invalid full payer or method"},"503":{"description":"Financial service unavailable"}}}}},"components":{"parameters":{"CheckoutToken":{"name":"token","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}}},"securitySchemes":{"SessionCookie":{"type":"apiKey","in":"cookie","name":"ekmivo-session"},"MerchantBearer":{"type":"http","scheme":"bearer","bearerFormat":"ek_test_<publicId>_<random32> or ek_live_<publicId>_<random32>","description":"256-bit random server-side bearer secret, never put into browser JavaScript,\nquery strings or client SDK bundles; store in a server-side secret manager.\n"}},"schemas":{"DeviceClaimRequest":{"type":"object","additionalProperties":false,"required":["pairing_token","public_key"],"properties":{"pairing_token":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"public_key":{"type":"string","contentEncoding":"base64","description":"P-256 X.509 DER public key; possession proven by the request signature"}}},"DeviceHeartbeatRequest":{"type":"object","additionalProperties":false,"required":["enrollment_id","environment","permission_ok","backlog","overflow_count","queue_error","model","app_version"],"properties":{"enrollment_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"permission_ok":{"type":"boolean"},"backlog":{"type":"integer","minimum":0,"maximum":10000},"overflow_count":{"type":"integer","format":"int64","minimum":0,"description":"Monotonic tally of dropped receipt captures at the 500-event encrypted outbox quota"},"queue_error":{"type":"string","maxLength":64,"pattern":"^[A-Z0-9_]*$","description":"Diagnostic code only, never receipt text"},"model":{"type":"string"},"app_version":{"type":"string"}}},"DeviceEventRequest":{"type":"object","additionalProperties":false,"required":["enrollment_id","environment","source","binding","kind","evidence","observed_at","sequence"],"properties":{"enrollment_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"source":{"type":"string"},"binding":{"type":"string","description":"Enrolled sms:subscriptionID or notification package binding"},"kind":{"type":"string","enum":["device_sms","device_notification"]},"evidence":{"type":"string","maxLength":8192,"description":"Approved incoming receipt only; encrypted server-side, never merchant-facing"},"observed_at":{"type":"string","format":"date-time","description":"Device collection time, never a replacement for original provider transaction time"},"sequence":{"type":"integer","format":"int64","minimum":1}}},"DeviceHistoryRequest":{"type":"object","additionalProperties":false,"required":["enrollment_id","environment"],"properties":{"enrollment_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]}}},"DeviceDurableAck":{"type":"object","required":["ack","observation_id","reason","replayed"],"properties":{"ack":{"type":"string","const":"durable"},"observation_id":{"type":["string","null"],"format":"uuid"},"reason":{"type":"string"},"replayed":{"type":"boolean"}}},"BillingSource":{"type":"object","required":["id","source_kind","source_reference","amount_minor","currency","issued_at","items"],"properties":{"id":{"type":"string","format":"uuid"},"source_kind":{"type":"string","enum":["order","invoice"]},"source_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"issued_at":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object"}}}},"Intent":{"type":"object","required":["id","merchant_reference","amount_minor","currency","expires_at","state"],"properties":{"id":{"type":"string","format":"uuid"},"merchant_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"environment":{"type":"string","const":"sandbox"},"source_kind":{"type":["string","null"],"enum":["order","invoice",null]},"source_id":{"type":["string","null"],"format":"uuid"},"source_reference":{"type":["string","null"]},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["requires_payer","awaiting_payment","processing","completed","expired","cancelled"]}}},"Checkout":{"allOf":[{"type":"object","required":["id","merchant_reference","amount_minor","currency","expires_at","state"],"properties":{"id":{"type":"string","format":"uuid"},"merchant_reference":{"type":"string"},"amount_minor":{"type":"integer","minimum":1},"currency":{"type":"string","const":"BDT"},"environment":{"type":"string","const":"sandbox"},"source_kind":{"type":["string","null"],"enum":["order","invoice",null]},"source_id":{"type":["string","null"],"format":"uuid"},"source_reference":{"type":["string","null"]},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["requires_payer","awaiting_payment","processing","completed","expired","cancelled"]}}},{"type":"object","properties":{"merchant_name":{"type":"string","description":"Current enabled business name from control-plane records"},"brand":{"type":"object","properties":{"logo_url":{"type":["string","null"],"format":"uri"},"checkout_title":{"type":["string","null"]},"checkout_description":{"type":["string","null"]},"support_url":{"type":["string","null"],"format":"uri"},"support_email":{"type":["string","null"],"format":"email"},"legal_url":{"type":["string","null"],"format":"uri"},"locale":{"type":["string","null"],"enum":["en","bn",null]}}},"server_time":{"type":"string","format":"date-time"},"source_reference":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"quantity":{"type":"integer"},"unit_amount_minor":{"type":"integer"}}}},"payer_suffix":{"type":["string","null"],"pattern":"^[0-9]{4}$"},"method":{"type":["string","null"],"enum":["bkash","nagad","rocket",null]},"methods":{"type":"array","items":{"type":"string","enum":["bkash","nagad","rocket"]}},"destination":{"type":["string","null"]},"verification_available":{"type":"boolean","const":false}}}]},"MerchantContext":{"type":"object","additionalProperties":false,"required":["workspace_id","environment","key_id","scopes","financial_api_ready"],"properties":{"workspace_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox","live"]},"key_id":{"type":"string","format":"uuid"},"scopes":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["payments:read","payments:write","customers:read","customers:write","invoices:read","invoices:write","refunds:read","refunds:write","webhooks:manage"]}},"financial_api_ready":{"type":"boolean","const":false}}},"KeyScope":{"type":"string","enum":["payments:read","payments:write","customers:read","customers:write","invoices:read","invoices:write","refunds:read","refunds:write","webhooks:manage"]},"ApiError":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}},"responses":{"BadEnvironment":{"description":"Missing, repeated or unsupported environment","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"InvalidCredential":{"description":"Invalid, revoked or expired merchant key","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"ScopeDenied":{"description":"Authenticated key cannot access required scope/environment","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}},"AuthUnavailable":{"description":"Credential database unavailable; safe to retry","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","correlation_id"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["INVALID_ENVIRONMENT","INVALID_API_KEY","SCOPE_OR_ENVIRONMENT_DENIED","AUTH_SERVICE_UNAVAILABLE"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"correlation_id":{"type":"string","pattern":"^[a-f0-9]{24}$"}}}}}}}}}}}